Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x7D5f6108...fFc30A348 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
RolesAuthority
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0-onlypragma solidity >=0.8.0;import {Auth, Authority} from "../Auth.sol";/// @notice Role based Authority that supports up to 256 roles./// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/authorities/RolesAuthority.sol)/// @author Modified from Dappsys (https://github.com/dapphub/ds-roles/blob/master/src/roles.sol)contract RolesAuthority is Auth, Authority {/*//////////////////////////////////////////////////////////////EVENTS//////////////////////////////////////////////////////////////*/event UserRoleUpdated(address indexed user, uint8 indexed role, bool enabled);event PublicCapabilityUpdated(address indexed target, bytes4 indexed functionSig, bool enabled);event RoleCapabilityUpdated(uint8 indexed role, address indexed target, bytes4 indexed functionSig, bool enabled);/*//////////////////////////////////////////////////////////////CONSTRUCTOR//////////////////////////////////////////////////////////////*/constructor(address _owner, Authority _authority) Auth(_owner, _authority) {}/*//////////////////////////////////////////////////////////////
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0-onlypragma solidity >=0.8.0;/// @notice Provides a flexible and updatable auth pattern which is completely separate from application logic./// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Auth.sol)/// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol)abstract contract Auth {event OwnershipTransferred(address indexed user, address indexed newOwner);event AuthorityUpdated(address indexed user, Authority indexed newAuthority);address public owner;Authority public authority;constructor(address _owner, Authority _authority) {owner = _owner;authority = _authority;emit OwnershipTransferred(msg.sender, _owner);emit AuthorityUpdated(msg.sender, _authority);}modifier requiresAuth() virtual {require(isAuthorized(msg.sender, msg.sig), "UNAUTHORIZED");
1234567891011121314151617181920212223242526{"remappings": ["@solmate/=lib/solmate/src/","@forge-std/=lib/forge-std/src/","@ds-test/=lib/forge-std/lib/ds-test/src/","ds-test/=lib/forge-std/lib/ds-test/src/","@openzeppelin/=lib/openzeppelin-contracts/","@ccip/=lib/ccip/","@oapp-auth/=lib/OAppAuth/src/","@devtools-oapp-evm/=lib/OAppAuth/lib/devtools/packages/oapp-evm/contracts/oapp/","@layerzerolabs/lz-evm-messagelib-v2/=lib/OAppAuth/node_modules/@layerzerolabs/lz-evm-messagelib-v2/","@layerzerolabs/lz-evm-protocol-v2/=lib/OAppAuth/lib/LayerZero-V2/packages/layerzero-v2/evm/protocol/","@layerzerolabs/oapp-evm/=lib/OAppAuth/lib/devtools/packages/oapp-evm/","@lz-oapp-evm/=lib/OAppAuth/lib/LayerZero-V2/packages/layerzero-v2/evm/oapp/contracts/oapp/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","@sbu/=lib/OAppAuth/lib/solidity-bytes-utils/","LayerZero-V2/=lib/OAppAuth/lib/","OAppAuth/=lib/OAppAuth/","ccip/=lib/ccip/contracts/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","halmos-cheatcodes/=lib/OAppAuth/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/","openzeppelin-contracts/=lib/openzeppelin-contracts/","solidity-bytes-utils/=lib/OAppAuth/node_modules/solidity-bytes-utils/","solmate/=lib/solmate/src/"],
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"contract Authority","name":"_authority","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"contract Authority","name":"newAuthority","type":"address"}],"name":"AuthorityUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":true,"internalType":"bytes4","name":"functionSig","type":"bytes4"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"PublicCapabilityUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"role","type":"uint8"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":true,"internalType":"bytes4","name":"functionSig","type":"bytes4"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"RoleCapabilityUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint8","name":"role","type":"uint8"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"UserRoleUpdated","type":"event"},{"inputs":[],"name":"authority","outputs":[{"internalType":"contract Authority","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4","name":"functionSig","type":"bytes4"}],"name":"canCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"role","type":"uint8"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4","name":"functionSig","type":"bytes4"}],"name":"doesRoleHaveCapability","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint8","name":"role","type":"uint8"}],"name":"doesUserHaveRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"getRolesWithCapability","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getUserRoles","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"isCapabilityPublic","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Authority","name":"newAuthority","type":"address"}],"name":"setAuthority","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4","name":"functionSig","type":"bytes4"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setPublicCapability","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"role","type":"uint8"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4","name":"functionSig","type":"bytes4"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setRoleCapability","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint8","name":"role","type":"uint8"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setUserRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80638da5cb5b1161008c578063bf7e214f11610066578063bf7e214f14610236578063c6b0263e14610249578063ea7ca2761461025c578063f2fde38b1461029357600080fd5b80638da5cb5b146101ab578063b4bad06a146101d6578063b70096131461022357600080fd5b806306a36aee146100d45780632f47571f1461010757806367aff484146101455780637917b7941461015a5780637a9e5e4b146101855780637d40583d14610198575b600080fd5b6100f46100e23660046107d7565b60026020526000908152604090205481565b6040519081526020015b60405180910390f35b610135610115366004610818565b600360209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016100fe565b61015861015336600461086c565b6102a6565b005b6100f4610168366004610818565b600460209081526000928352604080842090915290825290205481565b6101586101933660046107d7565b610384565b6101586101a63660046108b5565b61046e565b6000546101be906001600160a01b031681565b6040516001600160a01b0390911681526020016100fe565b6101356101e436600461090d565b6001600160a01b039190911660009081526004602090815260408083206001600160e01b031990941683529290522054600160ff929092161c16151590565b610135610231366004610952565b610579565b6001546101be906001600160a01b031681565b610158610257366004610972565b6105f8565b61013561026a3660046109a0565b6001600160a01b0391909116600090815260026020526040902054600160ff9092161c16151590565b6101586102a13660046107d7565b610699565b6102bc336000356001600160e01b031916610716565b6102e15760405162461bcd60e51b81526004016102d8906109cc565b60405180910390fd5b8015610310576001600160a01b03831660009081526002602052604090208054600160ff85161b179055610336565b6001600160a01b03831660009081526002602052604090208054600160ff85161b191690555b8160ff16836001600160a01b03167f4c9bdd0c8e073eb5eda2250b18d8e5121ff27b62064fbeeeed4869bb99bc5bf283604051610377911515815260200190565b60405180910390a3505050565b6000546001600160a01b0316331480610419575060015460405163b700961360e01b81526001600160a01b039091169063b7009613906103d890339030906001600160e01b031960003516906004016109f2565b602060405180830381865afa1580156103f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104199190610a1f565b61042257600080fd5b600180546001600160a01b0319166001600160a01b03831690811790915560405133907fa3396fd7f6e0a21b50e5089d2da70d5ac0a3bbbd1f617a93f134b7638998019890600090a350565b610484336000356001600160e01b031916610716565b6104a05760405162461bcd60e51b81526004016102d8906109cc565b80156104e4576001600160a01b03831660009081526004602090815260408083206001600160e01b03198616845290915290208054600160ff87161b17905561051f565b6001600160a01b03831660009081526004602090815260408083206001600160e01b03198616845290915290208054600160ff87161b191690555b816001600160e01b031916836001600160a01b03168560ff167fa52ea92e6e955aa8ac66420b86350f7139959adfcc7e6a14eee1bd116d09860e8460405161056b911515815260200190565b60405180910390a450505050565b6001600160a01b03821660009081526003602090815260408083206001600160e01b03198516845290915281205460ff16806105f057506001600160a01b0380841660009081526004602090815260408083206001600160e01b031987168452825280832054938816835260029091529020541615155b949350505050565b61060e336000356001600160e01b031916610716565b61062a5760405162461bcd60e51b81526004016102d8906109cc565b6001600160a01b03831660008181526003602090815260408083206001600160e01b0319871680855290835292819020805460ff191686151590811790915590519081529192917f950a343f5d10445e82a71036d3f4fb3016180a25805141932543b83e2078a93e9101610377565b6106af336000356001600160e01b031916610716565b6106cb5760405162461bcd60e51b81526004016102d8906109cc565b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b6001546000906001600160a01b031680158015906107a0575060405163b700961360e01b81526001600160a01b0382169063b70096139061075f908790309088906004016109f2565b602060405180830381865afa15801561077c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a09190610a1f565b806105f057506000546001600160a01b03858116911614949350505050565b6001600160a01b03811681146107d457600080fd5b50565b6000602082840312156107e957600080fd5b81356107f4816107bf565b9392505050565b80356001600160e01b03198116811461081357600080fd5b919050565b6000806040838503121561082b57600080fd5b8235610836816107bf565b9150610844602084016107fb565b90509250929050565b803560ff8116811461081357600080fd5b80151581146107d457600080fd5b60008060006060848603121561088157600080fd5b833561088c816107bf565b925061089a6020850161084d565b915060408401356108aa8161085e565b809150509250925092565b600080600080608085870312156108cb57600080fd5b6108d48561084d565b935060208501356108e4816107bf565b92506108f2604086016107fb565b915060608501356109028161085e565b939692955090935050565b60008060006060848603121561092257600080fd5b61092b8461084d565b9250602084013561093b816107bf565b9150610949604085016107fb565b90509250925092565b60008060006060848603121561096757600080fd5b833561092b816107bf565b60008060006060848603121561098757600080fd5b8335610992816107bf565b925061089a602085016107fb565b600080604083850312156109b357600080fd5b82356109be816107bf565b91506108446020840161084d565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b6001600160a01b0393841681529190921660208201526001600160e01b0319909116604082015260600190565b600060208284031215610a3157600080fd5b81516107f48161085e56fea26469706673582212200f1f0819869ebc74004492c1b2e05c8c67a7beb3788bbc39ce4b1805a4f136ec64736f6c63430008150033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.