Address Contract Verified
Address
0x522b2040CdfD247ED60921623044dF1c929524B7
Balance
0 ETH
Nonce
1
Code Size
4092 bytes
Creator
0x3f5e52EF...046F at tx 0x0f0b7420...ec20d5
Indexed Transactions
0
Contract Bytecode
4092 bytes
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80632f2ff15d116100715780632f2ff15d1461014357806336568abe146101585780638ea59e1d1461016b57806391d148541461017e578063a217fddf14610191578063d547741f14610199576100b4565b806301ffc9a7146100b957806309648a9d146100e25780630aeb5fa21461010257806313bf2c97146101155780632450a4a214610128578063248a9ca314610130575b600080fd5b6100cc6100c7366004610b92565b6101ac565b6040516100d99190610c53565b60405180910390f35b6100f56100f0366004610b40565b6101d7565b6040516100d99190610c5e565b6100f5610110366004610a56565b6101e9565b6100cc610123366004610b40565b610549565b6100f561055d565b6100f561013e366004610b40565b610581565b610156610151366004610b58565b610596565b005b610156610166366004610b58565b6105bf565b610156610179366004610b40565b61060e565b6100cc61018c366004610b58565b610667565b6100f5610690565b6101566101a7366004610b58565b610695565b60006001600160e01b03198216637965db0b60e01b14806101d157506101d1826106b4565b92915050565b60009081526001602052604090205490565b60008080806101f8898c610d77565b67ffffffffffffffff81111561021e57634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561025757816020015b6102446109f6565b81526020019060019003908161023c5790505b50905060005b8983108061026a57508b84105b156104f7576000878761027d8787610d77565b81811061029a57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906102af9190610bba565b9050600060086102bf8787610d77565b6102c99190610f86565b6102d4906007610f03565b6102df906002610de9565b6102ea906001610eda565b60f81b8b8b60086102fb8a8a610d77565b6103059190610d8f565b81811061032257634e487b7160e01b600052603260045260246000fd5b6001600160f81b0319920135929092161615905061037f57610345856001610d77565b94508c8c610354600188610f03565b81811061037157634e487b7160e01b600052603260045260246000fd5b9050602002013590506103c0565b61038a866001610d77565b95508e8e610399600189610f03565b8181106103b657634e487b7160e01b600052603260045260246000fd5b9050602002013590505b821580159061040f575063ffffffff8216846103dd600186610f03565b815181106103fb57634e487b7160e01b600052603260045260246000fd5b60200260200101516020015163ffffffff16145b1561049d57600084610422600186610f03565b8151811061044057634e487b7160e01b600052603260045260246000fd5b602002602001015160000151905060018461045b9190610f03565b93508082604051602001610470929190610c67565b6040516020818303038152906040528051906020012091506001836104959190610f1a565b9250506103c0565b60405180604001604052808281526020018363ffffffff168152508484815181106104d857634e487b7160e01b600052603260045260246000fd5b60209081029190910101526104ee836001610d77565b9250505061025d565b600160008360008151811061051c57634e487b7160e01b600052603260045260246000fd5b60200260200101516000015181526020019081526020016000205494505050505098975050505050505050565b600090815260016020526040902054151590565b7f7c0c08811839d3a8bfad3f26fd05feea7daf5d75bf9d6f3fe140cd8f62b7af3881565b60009081526020819052604090206001015490565b61059f82610581565b6105b0816105ab6106cd565b6106d1565b6105ba8383610735565b505050565b6105c76106cd565b6001600160a01b0316816001600160a01b0316146106005760405162461bcd60e51b81526004016105f790610d28565b60405180910390fd5b61060a82826107ba565b5050565b6106387f7c0c08811839d3a8bfad3f26fd05feea7daf5d75bf9d6f3fe140cd8f62b7af3833610667565b6106545760405162461bcd60e51b81526004016105f790610cdd565b6000908152600160205260409020429055565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600081565b61069e82610581565b6106aa816105ab6106cd565b6105ba83836107ba565b6001600160e01b031981166301ffc9a760e01b14919050565b3390565b6106db8282610667565b61060a576106f3816001600160a01b0316601461083d565b6106fe83602061083d565b60405160200161070f929190610bde565b60408051601f198184030181529082905262461bcd60e51b82526105f791600401610c75565b61073f8282610667565b61060a576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556107766106cd565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6107c48282610667565b1561060a576000828152602081815260408083206001600160a01b03851684529091529020805460ff191690556107f96106cd565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6060600061084c836002610ebb565b610857906002610d77565b67ffffffffffffffff81111561087d57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156108a7576020820181803683370190505b509050600360fc1b816000815181106108d057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061090d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000610931846002610ebb565b61093c906001610d77565b90505b60018111156109d0576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061097e57634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106109a257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936109c981610f6f565b905061093f565b5083156109ef5760405162461bcd60e51b81526004016105f790610ca8565b9392505050565b604080518082019091526000808252602082015290565b60008083601f840112610a1e578182fd5b50813567ffffffffffffffff811115610a35578182fd5b6020830191508360208083028501011115610a4f57600080fd5b9250929050565b6000806000806000806000806080898b031215610a71578384fd5b883567ffffffffffffffff80821115610a88578586fd5b610a948c838d01610a0d565b909a50985060208b0135915080821115610aac578586fd5b610ab88c838d01610a0d565b909850965060408b0135915080821115610ad0578586fd5b818b0191508b601f830112610ae3578586fd5b813581811115610af1578687fd5b8c6020828501011115610b02578687fd5b6020830196508095505060608b0135915080821115610b1f578384fd5b50610b2c8b828c01610a0d565b999c989b5096995094979396929594505050565b600060208284031215610b51578081fd5b5035919050565b60008060408385031215610b6a578182fd5b8235915060208301356001600160a01b0381168114610b87578182fd5b809150509250929050565b600060208284031215610ba3578081fd5b81356001600160e01b0319811681146109ef578182fd5b600060208284031215610bcb578081fd5b813563ffffffff811681146109ef578182fd5b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351610c16816017850160208801610f3f565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351610c47816028840160208801610f3f565b01602801949350505050565b901515815260200190565b90815260200190565b918252602082015260400190565b6000602082528251806020840152610c94816040850160208701610f3f565b601f01601f19169190910160400192915050565b6020808252818101527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604082015260600190565b6020808252602b908201527f426c6f6f636b53746174653a3a75706461746553746174653a204f4e4c595f4160408201526a4c4c4f5745445f524f4c4560a81b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201526e103937b632b9903337b91039b2b63360891b606082015260800190565b60008219821115610d8a57610d8a610f9a565b500190565b600082610d9e57610d9e610fb0565b500490565b80825b6001808611610db55750610de0565b818704821115610dc757610dc7610f9a565b80861615610dd457918102915b9490941c938002610da6565b94509492505050565b60006109ef60ff80851660ff8516600082610e06575060016109ef565b81610e13575060006109ef565b8160018114610e295760028114610e3357610e60565b60019150506109ef565b60ff841115610e4457610e44610f9a565b6001841b915084821115610e5a57610e5a610f9a565b506109ef565b5060208310610133831016604e8410600b8410161715610e93575081810a83811115610e8e57610e8e610f9a565b6109ef565b610ea08484846001610da3565b808604821115610eb257610eb2610f9a565b02949350505050565b6000816000190483118215151615610ed557610ed5610f9a565b500290565b600060ff821660ff84168160ff0481118215151615610efb57610efb610f9a565b029392505050565b600082821015610f1557610f15610f9a565b500390565b600063ffffffff83811690831681811015610f3757610f37610f9a565b039392505050565b60005b83811015610f5a578181015183820152602001610f42565b83811115610f69576000848401525b50505050565b600081610f7e57610f7e610f9a565b506000190190565b600082610f9557610f95610fb0565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fdfea264697066735822122089b8a54f1f806fedf0d4d42cf4e90eb6cdf2141b76d924a8a5dca2f749e506e264736f6c63430008010033
Verified Source Code Full Match
Compiler: v0.8.1+commit.df193b15
EVM: istanbul
Optimization: Yes (200 runs)
BloockState.sol 97 lines
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
contract BloockState is AccessControl {
// bytes32(keccak245(bytes("STATE_MANAGER")));
bytes32 public constant STATE_MANAGER = 0x7c0c08811839d3a8bfad3f26fd05feea7daf5d75bf9d6f3fe140cd8f62b7af38;
// Map containing a relation of the state roots and the timestamp they where published on. 0 if not present.
mapping (bytes32 => uint256) private states;
/**
* @dev Constructor function.
* @param role_manager is the address granted the default_admin role.
* @param state_manager is the address granted the state_manager role.
*/
constructor(address role_manager, address state_manager) {
_setupRole(DEFAULT_ADMIN_ROLE, role_manager);
_setupRole(STATE_MANAGER, state_manager);
}
/**
* @dev Appends a new state to the states map with the current timestamp.
* @param state_root the new state_root to append.
*/
function updateState(bytes32 state_root) external {
require(
hasRole(STATE_MANAGER, msg.sender),
"BloockState::updateState: ONLY_ALLOWED_ROLE"
);
states[state_root] = block.timestamp;
}
/**
* @dev Checks whether the state_root is present in the state_machine or not.
* @param state_root the state_root to check.
*/
function isStatePresent(bytes32 state_root) public view returns (bool) {
return states[state_root] != 0;
}
/**
* @dev Gets the value of an specific state_root.
* @param state_root the state_root to get.
* @return the timestamp of the anchor.
*/
function getState(bytes32 state_root) public view returns (uint256) {
return states[state_root];
}
struct InternalStack {
bytes32 hash;
uint32 depth;
}
/**
* @dev Checks the validity of the inclusion proof for a set of contents.
* @param content the hashes of the content to test (keccak).
* @param hashes the minimal set of keys required, aside from the ones in `content` to compute the root key value. They are ordered following a post-order tree traversal.
* @param bitmap Bitmap representing whether an element of `depths` belong `content` set (value 0) or `hashes` set (value 1).
* @param depths Vector containing the depth of each node whose keys belongs to `leaves` or `hashes` set relative to the tree root node. It also follows the post-order traversal order.
* @return the timestamp of the anchor. 0 if not present.
*/
function verifyInclusionProof(bytes32[] calldata content, bytes32[] calldata hashes, bytes calldata bitmap, uint32[] calldata depths) public view returns (uint256) {
uint256 it_content = 0;
uint256 it_hashes = 0;
InternalStack[] memory stack = new InternalStack[](content.length + hashes.length);
uint256 len_stack = 0;
while (it_hashes < hashes.length || it_content < content.length) {
uint32 act_depth = depths[it_hashes + it_content];
bytes32 act_hash;
if (bitmap[(it_hashes+it_content)/8] & bytes1(uint8(0x01) * uint8(2) ** uint8(7-(it_hashes+it_content)%8)) != 0) {
it_hashes = it_hashes + 1;
act_hash = hashes[it_hashes - 1];
} else {
it_content = it_content + 1;
act_hash = content[it_content - 1];
}
while (len_stack != 0 && stack[len_stack-1].depth == act_depth) {
bytes32 last_hash = stack[len_stack-1].hash;
len_stack = len_stack - 1;
act_hash = keccak256(abi.encode(last_hash, act_hash));
act_depth = act_depth - 1;
}
stack[len_stack] = InternalStack(act_hash, act_depth);
len_stack = len_stack + 1;
}
return states[stack[0].hash];
}
}
Context.sol 23 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
Strings.sol 66 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
AccessControl.sol 210 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role, _msgSender());
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
function _grantRole(bytes32 role, address account) private {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
function _revokeRole(bytes32 role, address account) private {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}
IAccessControl.sol 87 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}
ERC165.sol 28 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
IERC165.sol 24 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
Read Contract
DEFAULT_ADMIN_ROLE 0xa217fddf → bytes32
STATE_MANAGER 0x2450a4a2 → bytes32
getRoleAdmin 0x248a9ca3 → bytes32
getState 0x09648a9d → uint256
hasRole 0x91d14854 → bool
isStatePresent 0x13bf2c97 → bool
supportsInterface 0x01ffc9a7 → bool
verifyInclusionProof 0x0aeb5fa2 → uint256
Write Contract 4 functions
These functions modify contract state and require a wallet transaction to execute.
grantRole 0x2f2ff15d
bytes32 role
address account
renounceRole 0x36568abe
bytes32 role
address account
revokeRole 0xd547741f
bytes32 role
address account
updateState 0x8ea59e1d
bytes32 state_root
Recent Transactions
No transactions found for this address