Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
Latest 16 from a total of 16 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Return Stake | 18860183 | 217 days ago | IN | 0 ETH | 0.00047698 | ||||
Stake | 18848977 | 219 days ago | IN | 0.055 ETH | 0.00304494 | ||||
Stake | 18801424 | 226 days ago | IN | 0.05 ETH | 0.00398462 | ||||
Stake | 18756858 | 232 days ago | IN | 0.045 ETH | 0.0028967 | ||||
Stake | 18753244 | 232 days ago | IN | 0.0198 ETH | 0.00168153 | ||||
Stake | 18752975 | 232 days ago | IN | 0.018 ETH | 0.00164739 | ||||
Stake | 18752941 | 232 days ago | IN | 0.01629999 ETH | 0.00170421 | ||||
Stake | 18752897 | 232 days ago | IN | 0.0148 ETH | 0.00155964 | ||||
Stake | 18752795 | 232 days ago | IN | 0.0134 ETH | 0.00227396 | ||||
Stake | 18751742 | 232 days ago | IN | 0.0121 ETH | 0.00301528 | ||||
Return Stake | 18751736 | 232 days ago | IN | 0 ETH | 0.00089453 | ||||
Stake | 18751695 | 232 days ago | IN | 0.011 ETH | 0.00248445 | ||||
Stake | 18751665 | 232 days ago | IN | 0.01 ETH | 0.00360474 | ||||
Set Asset Eligib... | 18751572 | 233 days ago | IN | 0 ETH | 0.00189882 | ||||
Set Asset Eligib... | 18751572 | 233 days ago | IN | 0 ETH | 0.00189882 | ||||
0x60806040 | 18751250 | 233 days ago | IN | 0 ETH | 0.0527441 |
Latest 11 internal transactions
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
18860183 | 217 days ago | 0.055 ETH | ||||
18848977 | 219 days ago | 0.05 ETH | ||||
18801424 | 226 days ago | 0.045 ETH | ||||
18756858 | 232 days ago | 0.0198 ETH | ||||
18753244 | 232 days ago | 0.018 ETH | ||||
18752975 | 232 days ago | 0.01629999 ETH | ||||
18752941 | 232 days ago | 0.0148 ETH | ||||
18752897 | 232 days ago | 0.0134 ETH | ||||
18752795 | 232 days ago | 0.0121 ETH | ||||
18751736 | 232 days ago | 0.011 ETH | ||||
18751695 | 232 days ago | 0.01 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x0F74a470...ee4a8b4D2 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
PudgyPenguinsMiami2023
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol"; import {ISignVerifierRegistry} from "../signVerifierRegistry/ISignVerifierRegistry.sol"; import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract PudgyPenguinsMiami2023 is AccessControl, ReentrancyGuard { /////////////////////////////////////////// ////////// Errors ////////////// ////////////////////////////////////////// error AssetNotEligible(); error InsufficientStakeAmount(); error ExpiredSignature(); error InvalidSignature(); error TransferFailed(); /////////////////////////////////////////// ///// State Varibles /////////// ////////////////////////////////////////// // functions from the ECDSA library can be called directly on any bytes32 variable using ECDSA for bytes32; // Create a new role identifier for the ADMIN role bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); // Address of registry that resolves the signVerifier ISignVerifierRegistry public signVerifierRegistry; // bytes32 variable representing the ID of the sign verifier within the Sign Verifier Registry. bytes32 public signVerifierId; uint256 public minimumStakeIncrease = 10; // 10% address public currentStaker; uint256 public currentStake; mapping(address => bool) public eligibleAssets; mapping(address => uint256) public stakeNonces; /////////////////////////////////////////// /////// Events /////////// ////////////////////////////////////////// event SignVerifierRegistryUpdated(address indexed signVerifierRegistry, address indexed oldSignVerifierRegistry); event SignVerifierIdUpdated(bytes32 indexed signVerifierId, bytes32 indexed oldSignVerifierId); event AssetEligibilityUpdated(address asset, bool isEligible); event Staked(address indexed staker, uint256 amount, address asset, uint256 tokenId); event StakeReturned(address indexed staker, uint256 amount); event MinimumStakeIncreased(uint256 indexed amount); /////////////////////////////////////////// ////////// Functions ////////// ////////////////////////////////////////// constructor(address _signVerifierRegistry, bytes32 _signVerifierId) { // Grant admin role to the contract deployer _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); grantAdminRole(msg.sender); // Set up the signVerifierRegistry setSignVerifierRegistry(_signVerifierRegistry); setSignVerifierId(_signVerifierId); } //////////////////////////////////////////////// /// Public and External Functions //////// /////////////////////////////////////////////// /** * @notice Updates the ID of the sign verifier * @dev Requires the DEFAULT_ADMIN_ROLE to call * @param _signVerifierId The ID of the new sign verifier */ function setSignVerifierId(bytes32 _signVerifierId) public onlyRole(ADMIN_ROLE) { require(_signVerifierId != bytes32(0), "_signVerifierId cannot be the zero ID"); bytes32 oldSignVerifierId = signVerifierId; signVerifierId = _signVerifierId; emit SignVerifierIdUpdated(_signVerifierId, oldSignVerifierId); } /** * @notice Updates the sign verifier registry address * @param _signVerifierRegistry The address the new registry * @dev Requires the DEFAULT_ADMIN_ROLE to call */ function setSignVerifierRegistry(address _signVerifierRegistry) public onlyRole(ADMIN_ROLE) { require(_signVerifierRegistry != address(0), "_signVerifierRegistry cannot be the zero address"); require( IERC165(_signVerifierRegistry).supportsInterface(type(ISignVerifierRegistry).interfaceId), "_signVerifierRegistry does not implement ISignVerifierRegistry" ); address oldSignVerifierRegistry = address(signVerifierRegistry); signVerifierRegistry = ISignVerifierRegistry(_signVerifierRegistry); emit SignVerifierRegistryUpdated(_signVerifierRegistry, oldSignVerifierRegistry); } /** * @notice Function to grant the ADMIN ROLE to an account * @dev this function can performed using "grantRole" function which is available in this contract due to inheritance of Access Control Libarary * @dev so this function can removed to save deployment gas * @param _account address of the account to set ADMIN */ function grantAdminRole(address _account) public onlyRole(DEFAULT_ADMIN_ROLE) { _grantRole(ADMIN_ROLE, _account); } /** * @notice function to increase the Minimum Stake Increse * @dev function can only be called by the ADMIN * @param _newMinimum amount of new Minimum value */ function setMinimumStakeIncrease(uint256 _newMinimum) public onlyRole(ADMIN_ROLE) { minimumStakeIncrease = _newMinimum; emit MinimumStakeIncreased(_newMinimum); } /** * @notice function to add/remove new NFT collection to stake * @param _collectionAddress address of the collection * @param _isEligible true -> added , false -> removal */ function setAssetEligibility(address _collectionAddress, bool _isEligible) public onlyRole(ADMIN_ROLE) { eligibleAssets[_collectionAddress] = _isEligible; emit AssetEligibilityUpdated(_collectionAddress, _isEligible); } /** * @notice function to stake the amount on the particular NFT of NFT Collection * @param _selectedAsset address of the NFT collection * @param _selectedAssetTokenID Token ID of the collection * @param _sig signature to check the correct user */ function stake( address _selectedAsset, uint256 _selectedAssetTokenID, uint256 _blockExpiry, bytes memory _sig ) public payable nonReentrant { if (!eligibleAssets[_selectedAsset]) { revert AssetNotEligible(); } if (msg.value < currentStake + ((currentStake * minimumStakeIncrease) / 100)) { revert InsufficientStakeAmount(); } if (block.number > _blockExpiry) { revert ExpiredSignature(); } if (!(_verifySignature(msg.sender, _selectedAsset, _selectedAssetTokenID, _blockExpiry, _sig))) { revert InvalidSignature(); } if (currentStaker != address(0)) { (bool sent, ) = currentStaker.call{value: currentStake}(""); if (!sent) { revert TransferFailed(); } } currentStaker = msg.sender; currentStake = msg.value; stakeNonces[msg.sender]++; emit Staked(msg.sender, msg.value, _selectedAsset, _selectedAssetTokenID); } /** * @notice function to return the currently staked amount to the current staker * @dev function can only be called by the ADMIN */ function returnStake() public onlyRole(ADMIN_ROLE) { require(currentStaker != address(0), "No current staker"); require(currentStake > 0, "No stake to return"); (bool sent, ) = currentStaker.call{value: currentStake}(""); if (!sent) { revert TransferFailed(); } emit StakeReturned(currentStaker, currentStake); currentStaker = address(0); currentStake = 0; } //////////////////////////////////////////////// /// Private and Internal Functions //////// /////////////////////////////////////////////// /** * @notice function to check the correct user * @param _staker address of the staker * @param _asset address of the NFT Collection * @param _tokenId Token ID of the collection * @param _sig signature to check the correct user */ function _verifySignature( address _staker, address _asset, uint256 _tokenId, uint256 _blockExpiry, bytes memory _sig ) private view returns (bool) { bytes32 message = getStakeSigningHash(_staker, _asset, _tokenId, _blockExpiry).toEthSignedMessageHash(); require(ECDSA.recover(message, _sig) == getSignVerifier(), "Permission to call this function failed"); return true; } ////////////////////////////////////////////////////// /////// Public & External VIEW Functions //////// ////////////////////////////////////////////////////// /** * @notice function to get the hash to be signed for staking * @param _staker address of the staker * @param _asset address of the NFT Collection * @param _tokenId Token ID of the collection */ function getStakeSigningHash( address _staker, address _asset, uint256 _tokenId, uint256 _blockExpiry ) public view returns (bytes32) { return keccak256(abi.encodePacked(_staker, _asset, _tokenId, _blockExpiry, address(this), stakeNonces[_staker])); } /** * @notice Returns the address of the sign verifier */ function getSignVerifier() public view returns (address) { // retrieve the address of a sign verifier associated with a specific ID. address signVerifier = signVerifierRegistry.get(signVerifierId); require(signVerifier != address(0), "cannot use zero address as sign verifier"); return signVerifier; } /** * @notice Function to check whether the address is an ADMIN or not * @param _address address to check */ function isAddressAdmin(address _address) public view returns (bool) { return hasRole(ADMIN_ROLE, _address); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol) 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 virtual 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 virtual { 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 virtual 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 revoked `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}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ 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); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; interface ISignVerifierRegistry is IERC165 { /** * @notice Emitted upon the registration of `signVerifier` to a previously unregistered ID `id`. */ event Register(bytes32 id, address signVerifier); /** * @notice Emitted upon the update of `signVerifier` to a previously unregistered ID `id`, replacing `oldSignVerifier`. */ event Update(bytes32 id, address signVerifier, address oldSignVerifier); /** * @notice Registers `signVerifier` to `id`, with the registrant set as the admin of `id`. * @dev Does not allow updating of an existing ID, or registering an ID that matches the admin role. */ function register(bytes32 id, address signVerifier) external; /** * @notice Updates the sign verifier for `id` to `signVerifier`. * @dev Allows for the signVerifier to be the zero address, which can be dangerous but is a way of invalidating signatures en masse if required. */ function update(bytes32 id, address signVerifier) external; /** * @notice Returns the address of the sign verifier registered to `id`. * @dev Reverts if `id` has not been registered yet */ function get(bytes32 id) external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) 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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) 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; } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_signVerifierRegistry","type":"address"},{"internalType":"bytes32","name":"_signVerifierId","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AssetNotEligible","type":"error"},{"inputs":[],"name":"ExpiredSignature","type":"error"},{"inputs":[],"name":"InsufficientStakeAmount","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"bool","name":"isEligible","type":"bool"}],"name":"AssetEligibilityUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MinimumStakeIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"signVerifierId","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"oldSignVerifierId","type":"bytes32"}],"name":"SignVerifierIdUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"signVerifierRegistry","type":"address"},{"indexed":true,"internalType":"address","name":"oldSignVerifierRegistry","type":"address"}],"name":"SignVerifierRegistryUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StakeReturned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Staked","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentStaker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"eligibleAssets","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSignVerifier","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_staker","type":"address"},{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_blockExpiry","type":"uint256"}],"name":"getStakeSigningHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"grantAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isAddressAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumStakeIncrease","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"returnStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collectionAddress","type":"address"},{"internalType":"bool","name":"_isEligible","type":"bool"}],"name":"setAssetEligibility","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMinimum","type":"uint256"}],"name":"setMinimumStakeIncrease","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_signVerifierId","type":"bytes32"}],"name":"setSignVerifierId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signVerifierRegistry","type":"address"}],"name":"setSignVerifierRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signVerifierId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"signVerifierRegistry","outputs":[{"internalType":"contract ISignVerifierRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_selectedAsset","type":"address"},{"internalType":"uint256","name":"_selectedAssetTokenID","type":"uint256"},{"internalType":"uint256","name":"_blockExpiry","type":"uint256"},{"internalType":"bytes","name":"_sig","type":"bytes"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakeNonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x6080604052600436106101965760003560e01c80638bb86022116100e1578063bef3bd291161008a578063ebb3bdf111610064578063ebb3bdf11461051c578063f061ab261461053c578063f9063e161461055c578063fdeaacd61461057c57600080fd5b8063bef3bd29146104bc578063c634b78e146104dc578063d547741f146104fc57600080fd5b80639810c4a4116100bb5780639810c4a414610471578063a217fddf14610487578063aa7f31771461049c57600080fd5b80638bb86022146103fa57806391d148541461041a578063950d37d41461045e57600080fd5b80635bc7ef87116101435780637ac665741161011d5780637ac66574146103a35780637b86073e146103b857806386a9d8a8146103cd57600080fd5b80635bc7ef87146102965780635ce88a971461033757806375b238fc1461036f57600080fd5b80632f2ff15d116101745780632f2ff15d1461023e57806336568abe146102605780633af8d3b91461028057600080fd5b806301ffc9a71461019b578063066959cf146101d0578063248a9ca314610200575b600080fd5b3480156101a757600080fd5b506101bb6101b6366004611932565b610592565b60405190151581526020015b60405180910390f35b3480156101dc57600080fd5b506101bb6101eb366004611989565b60076020526000908152604090205460ff1681565b34801561020c57600080fd5b5061023061021b3660046119a6565b60009081526020819052604090206001015490565b6040519081526020016101c7565b34801561024a57600080fd5b5061025e6102593660046119bf565b610612565b005b34801561026c57600080fd5b5061025e61027b3660046119bf565b61063d565b34801561028c57600080fd5b5061023060045481565b3480156102a257600080fd5b506102306102b13660046119ef565b6001600160a01b03841660009081526008602090815260408083205490516bffffffffffffffffffffffff19606089811b82169483019490945287841b8116603483015260488201879052606882018690523090931b9092166088830152609c82015260bc01604051602081830303815290604052805190602001209050949350505050565b34801561034357600080fd5b50600554610357906001600160a01b031681565b6040516001600160a01b0390911681526020016101c7565b34801561037b57600080fd5b506102307fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156103af57600080fd5b5061025e6106ce565b3480156103c457600080fd5b50610357610884565b3480156103d957600080fd5b506102306103e8366004611989565b60086020526000908152604090205481565b34801561040657600080fd5b50600254610357906001600160a01b031681565b34801561042657600080fd5b506101bb6104353660046119bf565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61025e61046c366004611a4b565b61099b565b34801561047d57600080fd5b5061023060035481565b34801561049357600080fd5b50610230600081565b3480156104a857600080fd5b506101bb6104b7366004611989565b610c47565b3480156104c857600080fd5b5061025e6104d7366004611989565b610c87565b3480156104e857600080fd5b5061025e6104f7366004611989565b610e87565b34801561050857600080fd5b5061025e6105173660046119bf565b610ebd565b34801561052857600080fd5b5061025e610537366004611b30565b610ee3565b34801561054857600080fd5b5061025e6105573660046119a6565b610f72565b34801561056857600080fd5b5061025e6105773660046119a6565b61104a565b34801561058857600080fd5b5061023060065481565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061060c57506301ffc9a760e01b7fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60008281526020819052604090206001015461062e8133611291565b610638838361130f565b505050565b6001600160a01b03811633146106c05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6106ca82826113ad565b5050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106f98133611291565b6005546001600160a01b03166107515760405162461bcd60e51b815260206004820152601160248201527f4e6f2063757272656e74207374616b657200000000000000000000000000000060448201526064016106b7565b6000600654116107a35760405162461bcd60e51b815260206004820152601260248201527f4e6f207374616b6520746f2072657475726e000000000000000000000000000060448201526064016106b7565b6005546006546040516000926001600160a01b031691908381818185875af1925050503d80600081146107f2576040519150601f19603f3d011682016040523d82523d6000602084013e6107f7565b606091505b5050905080610819576040516312171d8360e31b815260040160405180910390fd5b6005546006546040519081526001600160a01b03909116907fd2ba84da58fee5faf229bb112f12eec4ff1d1be2f6b9c38440dd02d482b32cff9060200160405180910390a250506005805473ffffffffffffffffffffffffffffffffffffffff191690556000600655565b6002546003546040517f8eaa6ac000000000000000000000000000000000000000000000000000000000815260009283926001600160a01b0390911691638eaa6ac0916108d79160040190815260200190565b602060405180830381865afa1580156108f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109189190611b5e565b90506001600160a01b0381166109965760405162461bcd60e51b815260206004820152602860248201527f63616e6e6f7420757365207a65726f2061646472657373206173207369676e2060448201527f766572696669657200000000000000000000000000000000000000000000000060648201526084016106b7565b919050565b600260015414156109ee5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106b7565b60026001556001600160a01b03841660009081526007602052604090205460ff16610a45576040517fc415ac0f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6064600454600654610a579190611b91565b610a619190611bb0565b600654610a6e9190611bd2565b341015610aa7576040517fa8ded35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81431115610ae1576040517fdf4cc36d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aee338585858561142c565b610b24576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005546001600160a01b031615610bad576005546006546040516000926001600160a01b031691908381818185875af1925050503d8060008114610b84576040519150601f19603f3d011682016040523d82523d6000602084013e610b89565b606091505b5050905080610bab576040516312171d8360e31b815260040160405180910390fd5b505b6005805473ffffffffffffffffffffffffffffffffffffffff191633908117909155346006556000908152600860205260408120805491610bed83611bea565b9091555050604080513481526001600160a01b038616602082015290810184905233907ff65271afc35201e83c229b7b581d7fde59bfe7b7dd943e8719fc8c5f5ada63f69060600160405180910390a25050600180555050565b6001600160a01b03811660009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604081205460ff1661060c565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610cb28133611291565b6001600160a01b038216610d2e5760405162461bcd60e51b815260206004820152603060248201527f5f7369676e566572696669657252656769737472792063616e6e6f742062652060448201527f746865207a65726f20616464726573730000000000000000000000000000000060648201526084016106b7565b6040516301ffc9a760e01b81527f1668c2a90000000000000000000000000000000000000000000000000000000060048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa158015610d92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db69190611c05565b610e285760405162461bcd60e51b815260206004820152603e60248201527f5f7369676e5665726966696572526567697374727920646f6573206e6f74206960448201527f6d706c656d656e7420495369676e56657269666965725265676973747279000060648201526084016106b7565b600280546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff198316811790935560405191169182917f78f83104cd73ca1470706a4dfb0ab769a5bdb4217a200d14602e02cc9925cd3d90600090a3505050565b6000610e938133611291565b6106ca7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758361130f565b600082815260208190526040902060010154610ed98133611291565b61063883836113ad565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610f0e8133611291565b6001600160a01b038316600081815260076020908152604091829020805460ff19168615159081179091558251938452908301527f34b3b00845d59d7ebdd77f105f1304f7321073297bff0d68ca780ae3fbc1a751910160405180910390a1505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610f9d8133611291565b816110105760405162461bcd60e51b815260206004820152602560248201527f5f7369676e566572696669657249642063616e6e6f7420626520746865207a6560448201527f726f20494400000000000000000000000000000000000000000000000000000060648201526084016106b7565b6003805490839055604051819084907f2d87eba9dd392fcda14b366f76541b6c3af5d0706caa646d48217129c5f16b8590600090a3505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756110758133611291565b600482905560405182907f888aa3f625a366c59c371f0138b5afc84bc3012aedacceedaeaea478c8729bc190600090a25050565b606060006110b8836002611b91565b6110c3906002611bd2565b67ffffffffffffffff8111156110db576110db611a35565b6040519080825280601f01601f191660200182016040528015611105576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061113c5761113c611c22565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061118757611187611c22565b60200101906001600160f81b031916908160001a90535060006111ab846002611b91565b6111b6906001611bd2565b90505b600181111561123b577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106111f7576111f7611c22565b1a60f81b82828151811061120d5761120d611c22565b60200101906001600160f81b031916908160001a90535060049490941c9361123481611c38565b90506111b9565b50831561128a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106b7565b9392505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166106ca576112cd816001600160a01b031660146110a9565b6112d88360206110a9565b6040516020016112e9929190611c7f565b60408051601f198184030181529082905262461bcd60e51b82526106b791600401611d00565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166106ca576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556113693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16156106ca576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b03851660009081526008602090815260408083205481516bffffffffffffffffffffffff1960608b811b8216838701528a811b82166034840152604883018a90526068830189905230901b166088820152609c808201929092528251808203909201825260bc01909152805191012081906114fb906040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050611505610884565b6001600160a01b031661151882856115a1565b6001600160a01b0316146115945760405162461bcd60e51b815260206004820152602760248201527f5065726d697373696f6e20746f2063616c6c20746869732066756e6374696f6e60448201527f206661696c65640000000000000000000000000000000000000000000000000060648201526084016106b7565b5060019695505050505050565b60008060006115b085856115c5565b915091506115bd81611635565b509392505050565b6000808251604114156115fc5760208301516040840151606085015160001a6115f0878285856117f3565b9450945050505061162e565b825160401415611626576020830151604084015161161b8683836118e0565b93509350505061162e565b506000905060025b9250929050565b600081600481111561164957611649611d33565b14156116525750565b600181600481111561166657611666611d33565b14156116b45760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106b7565b60028160048111156116c8576116c8611d33565b14156117165760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106b7565b600381600481111561172a5761172a611d33565b14156117835760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106b7565b600481600481111561179757611797611d33565b14156117f05760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016106b7565b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561182a57506000905060036118d7565b8460ff16601b1415801561184257508460ff16601c14155b1561185357506000905060046118d7565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156118a7573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166118d0576000600192509250506118d7565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83168161191660ff86901c601b611bd2565b9050611924878288856117f3565b935093505050935093915050565b60006020828403121561194457600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461128a57600080fd5b6001600160a01b03811681146117f057600080fd5b60006020828403121561199b57600080fd5b813561128a81611974565b6000602082840312156119b857600080fd5b5035919050565b600080604083850312156119d257600080fd5b8235915060208301356119e481611974565b809150509250929050565b60008060008060808587031215611a0557600080fd5b8435611a1081611974565b93506020850135611a2081611974565b93969395505050506040820135916060013590565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215611a6157600080fd5b8435611a6c81611974565b93506020850135925060408501359150606085013567ffffffffffffffff80821115611a9757600080fd5b818701915087601f830112611aab57600080fd5b813581811115611abd57611abd611a35565b604051601f8201601f19908116603f01168101908382118183101715611ae557611ae5611a35565b816040528281528a6020848701011115611afe57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b80151581146117f057600080fd5b60008060408385031215611b4357600080fd5b8235611b4e81611974565b915060208301356119e481611b22565b600060208284031215611b7057600080fd5b815161128a81611974565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615611bab57611bab611b7b565b500290565b600082611bcd57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611be557611be5611b7b565b500190565b6000600019821415611bfe57611bfe611b7b565b5060010190565b600060208284031215611c1757600080fd5b815161128a81611b22565b634e487b7160e01b600052603260045260246000fd5b600081611c4757611c47611b7b565b506000190190565b60005b83811015611c6a578181015183820152602001611c52565b83811115611c79576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611cb7816017850160208801611c4f565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611cf4816028840160208801611c4f565b01602801949350505050565b6020815260008251806020840152611d1f816040850160208701611c4f565b601f01601f19169190910160400192915050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212206eda7b591ebc0f7a68aef39508420966bf427ced6a5683eecf8ddf9e85d986bf64736f6c634300080c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ 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.