More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 355 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deposit | 15319318 | 897 days ago | IN | 0 ETH | 0.00203644 | ||||
Deposit | 15319314 | 897 days ago | IN | 0 ETH | 0.00171489 | ||||
Deposit | 15319308 | 897 days ago | IN | 0 ETH | 0.0021683 | ||||
Deposit | 15319281 | 897 days ago | IN | 0 ETH | 0.00343826 | ||||
Deposit | 15319259 | 897 days ago | IN | 0 ETH | 0.0019746 | ||||
Deposit | 15319234 | 897 days ago | IN | 0 ETH | 0.00195255 | ||||
Deposit | 15319219 | 897 days ago | IN | 0 ETH | 0.00204929 | ||||
Deposit | 15319205 | 897 days ago | IN | 0 ETH | 0.0020516 | ||||
Deposit | 15319204 | 897 days ago | IN | 0 ETH | 0.00214858 | ||||
Deposit | 15319188 | 897 days ago | IN | 0 ETH | 0.00205214 | ||||
Deposit | 15319185 | 897 days ago | IN | 0 ETH | 0.00221931 | ||||
Deposit | 15319159 | 897 days ago | IN | 0 ETH | 0.00513798 | ||||
Deposit | 15319140 | 897 days ago | IN | 0 ETH | 0.00134652 | ||||
Deposit | 15319127 | 897 days ago | IN | 0 ETH | 0.00290973 | ||||
Deposit | 15319101 | 897 days ago | IN | 0 ETH | 0.00340827 | ||||
Deposit | 15319064 | 897 days ago | IN | 0 ETH | 0.00251535 | ||||
Deposit | 15319018 | 897 days ago | IN | 0 ETH | 0.002805 | ||||
Deposit | 15318936 | 897 days ago | IN | 0 ETH | 0.00345252 | ||||
Deposit | 15318934 | 897 days ago | IN | 0 ETH | 0.00281845 | ||||
Deposit | 15318932 | 897 days ago | IN | 0 ETH | 0.00305322 | ||||
Deposit | 15318851 | 897 days ago | IN | 0 ETH | 0.00362159 | ||||
Deposit | 15318609 | 897 days ago | IN | 0 ETH | 0.00230936 | ||||
Deposit | 15318607 | 897 days ago | IN | 0 ETH | 0.00236805 | ||||
Deposit | 15318577 | 897 days ago | IN | 0 ETH | 0.00237936 | ||||
Deposit | 15318533 | 897 days ago | IN | 0 ETH | 0.00248263 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
MuonPresale
Compiler Version
v0.8.0+commit.c7dfd78e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IMuonV02.sol"; import "./IMRC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; contract MuonPresale is Ownable { using ECDSA for bytes32; IMuonV02 public muon; mapping(address => uint256) public balances; mapping(address => uint256) public lastTimes; mapping(address => mapping(uint8 => uint256)) public roundBalances; uint32 public APP_ID = 0x2031768f; bool public running = true; uint256 public maxMuonDelay = 5 minutes; // Total USD amount uint256 public totalBalance = 0; uint256 public startTime = 1659886200; event Deposit( address token, address fromAddress, address forAddress, uint8 round, uint256[5] extraParameters ); modifier isRunning() { require(running && startTime < block.timestamp, "!running"); _; } constructor(address _muon) { muon = IMuonV02(_muon); } function getChainID() public view returns (uint256) { uint256 id; assembly { id := chainid() } return id; } function deposit( address token, address forAddress, uint8 round, uint256[5] memory extraParameters, // [0]=allocation,[1]=chainId,[2]=tokenPrice, [3]=amount ,[4]=time, bytes calldata reqId, IMuonV02.SchnorrSign[] calldata sigs ) public payable isRunning { require(sigs.length > 0, "!sigs"); require(extraParameters[1] == getChainID(), "Invalid Chain ID"); bytes32 hash = keccak256( abi.encodePacked( APP_ID, token, round, extraParameters[3], extraParameters[4], forAddress, extraParameters[0], extraParameters[1], extraParameters[2] ) ); bool verified = muon.verify(reqId, uint256(hash), sigs); require(verified, "!verified"); // check max uint256 usdAmount = token != address(0) ? (extraParameters[3] * extraParameters[2]) / (10**IMRC20(token).decimals()) : (extraParameters[3] * extraParameters[2]) / (10**18); balances[forAddress] += usdAmount; roundBalances[forAddress][round] += usdAmount; require(roundBalances[forAddress][round] <= extraParameters[0], ">max"); totalBalance += usdAmount; require( extraParameters[4] + maxMuonDelay > block.timestamp, "muon: expired" ); require( extraParameters[4] - lastTimes[forAddress] > maxMuonDelay, "duplicate" ); lastTimes[forAddress] = extraParameters[4]; require( token != address(0) || extraParameters[3] == msg.value, "amount err" ); if (token != address(0)) { IMRC20(token).transferFrom( address(msg.sender), address(this), extraParameters[3] ); } emit Deposit(token, msg.sender, forAddress, round, extraParameters); } function setMuonContract(address addr) public onlyOwner { muon = IMuonV02(addr); } function setIsRunning(bool val) public onlyOwner { running = val; } function setMaxMuonDelay(uint256 delay) public onlyOwner { maxMuonDelay = delay; } function setMuonAppID(uint32 appid) public onlyOwner { APP_ID = appid; } function setStartTime(uint256 _time) public onlyOwner { startTime = _time; } function withdrawETH(uint256 amount, address addr) public onlyOwner { require(addr != address(0)); payable(addr).transfer(amount); } function withdrawERC20Tokens( address _tokenAddr, address _to, uint256 _amount ) public onlyOwner { require(_to != address(0)); IMRC20(_tokenAddr).transfer(_to, _amount); } function userInfo(address _user, uint8 rounds) public view returns ( uint256 _totalBalance, uint256 _startTime, uint256 _userBalance, uint256 _lastTime, uint256[] memory _roundBalances ) { _startTime = startTime; _totalBalance = totalBalance; _userBalance = balances[_user]; _lastTime = lastTimes[_user]; _roundBalances = new uint256[](rounds); for(uint8 i=0; i<rounds; i++){ _roundBalances[i] = roundBalances[_user][i+1]; } } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; interface IMuonV02 { struct SchnorrSign { uint256 signature; address owner; address nonce; } function verify( bytes calldata reqId, uint256 hash, SchnorrSign[] calldata _sigs ) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol'; interface IMRC20 is IERC20, IERC20Metadata{ function mint(address reveiver, uint256 amount) external; function burn(uint256 amount) external; function burnFrom(address account, uint256 amount) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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.0 (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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 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.0 (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.0 (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.0 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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.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 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 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()); } } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_muon","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"fromAddress","type":"address"},{"indexed":false,"internalType":"address","name":"forAddress","type":"address"},{"indexed":false,"internalType":"uint8","name":"round","type":"uint8"},{"indexed":false,"internalType":"uint256[5]","name":"extraParameters","type":"uint256[5]"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"APP_ID","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"forAddress","type":"address"},{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"uint256[5]","name":"extraParameters","type":"uint256[5]"},{"internalType":"bytes","name":"reqId","type":"bytes"},{"components":[{"internalType":"uint256","name":"signature","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"nonce","type":"address"}],"internalType":"struct IMuonV02.SchnorrSign[]","name":"sigs","type":"tuple[]"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getChainID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastTimes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMuonDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"muon","outputs":[{"internalType":"contract IMuonV02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint8","name":"","type":"uint8"}],"name":"roundBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"running","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"val","type":"bool"}],"name":"setIsRunning","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"delay","type":"uint256"}],"name":"setMaxMuonDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"appid","type":"uint32"}],"name":"setMuonAppID","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setMuonContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_time","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint8","name":"rounds","type":"uint8"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"_totalBalance","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_userBalance","type":"uint256"},{"internalType":"uint256","name":"_lastTime","type":"uint256"},{"internalType":"uint256[]","name":"_roundBalances","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddr","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawERC20Tokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"addr","type":"address"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526005805460ff60201b1963ffffffff19909116632031768f171664010000000017905561012c60065560006007556362efda786008553480156200004757600080fd5b50604051620018fb380380620018fb8339810160408190526200006a91620000f8565b6200007e62000078620000a4565b620000a8565b600180546001600160a01b0319166001600160a01b039290921691909117905562000128565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156200010a578081fd5b81516001600160a01b038116811462000121578182fd5b9392505050565b6117c380620001386000396000f3fe6080604052600436106101355760003560e01c80638da5cb5b116100ab578063b1c971941161006f578063b1c9719414610310578063bcdd1e1314610341578063c187bbc114610361578063d85bd52614610383578063f2fde38b146103a5578063f48db204146103c557610135565b80638da5cb5b146102865780639aa2cadc1461029b5780639efb5df1146102bb578063a0cfc482146102db578063ad7a672f146102fb57610135565b80633e0a322d116100fd5780633e0a322d146101e75780634f1e8e5214610207578063564b81ef146102275780635ecbfd171461023c578063715018a61461025c57806378e979251461027157610135565b8063097baf881461013a57806311490d291461014f5780631dbd9ea01461017a57806327e235e3146101a757806336118b52146101c7575b600080fd5b61014d610148366004610f88565b6103da565b005b34801561015b57600080fd5b506101646108c1565b6040516101719190611201565b60405180910390f35b34801561018657600080fd5b5061019a61019536600461109c565b6108d0565b60405161017191906114fe565b3480156101b357600080fd5b5061019a6101c2366004610f2c565b6108ed565b3480156101d357600080fd5b5061014d6101e2366004611122565b6108ff565b3480156101f357600080fd5b5061014d61020236600461110a565b61098c565b34801561021357600080fd5b5061019a610222366004610f2c565b6109d0565b34801561023357600080fd5b5061019a6109e2565b34801561024857600080fd5b5061014d61025736600461114d565b6109e6565b34801561026857600080fd5b5061014d610a41565b34801561027d57600080fd5b5061019a610a8c565b34801561029257600080fd5b50610164610a92565b3480156102a757600080fd5b5061014d6102b6366004610f2c565b610aa1565b3480156102c757600080fd5b5061014d6102d63660046110d2565b610b02565b3480156102e757600080fd5b5061014d6102f636600461110a565b610b61565b34801561030757600080fd5b5061019a610ba5565b34801561031c57600080fd5b5061033061032b36600461109c565b610bab565b604051610171959493929190611507565b34801561034d57600080fd5b5061014d61035c366004610f4d565b610cc6565b34801561036d57600080fd5b50610376610d9e565b6040516101719190611569565b34801561038f57600080fd5b50610398610daa565b60405161017191906112b6565b3480156103b157600080fd5b5061014d6103c0366004610f2c565b610dbb565b3480156103d157600080fd5b5061019a610e2c565b600554640100000000900460ff1680156103f5575042600854105b61041a5760405162461bcd60e51b8152600401610411906114b8565b60405180910390fd5b806104375760405162461bcd60e51b815260040161041190611446565b61043f6109e2565b6020860151146104615760405162461bcd60e51b815260040161041190611369565b60055460009063ffffffff168988886003602002015189600460200201518c8b600060200201518c600160200201518d600260200201516040516020016104b09998979695949392919061118d565b60408051601f1981840301815290829052805160209091012060015463e80876cf60e01b83529092506000916001600160a01b039091169063e80876cf90610504908990899087908a908a906004016112c1565b602060405180830381600087803b15801561051e57600080fd5b505af1158015610532573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055691906110ee565b9050806105755760405162461bcd60e51b815260040161041190611393565b60006001600160a01b038b166105b15760408801516060890151670de0b6b3a7640000916105a2916116ee565b6105ac91906115b7565b61064b565b8a6001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156105ea57600080fd5b505afa1580156105fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106229190611171565b61062d90600a61161d565b604089015160608a015161064191906116ee565b61064b91906115b7565b6001600160a01b038b1660009081526002602052604081208054929350839290919061067890849061157a565b90915550506001600160a01b038a16600090815260046020908152604080832060ff8d168452909152812080548392906106b390849061157a565b909155505087516001600160a01b038b16600090815260046020908152604080832060ff8e16845290915290205411156106ff5760405162461bcd60e51b815260040161041190611465565b8060076000828254610711919061157a565b9091555050600654608089015142916107299161157a565b116107465760405162461bcd60e51b81526004016104119061141f565b6006546001600160a01b038b1660009081526003602052604090205460808a0151610771919061170d565b1161078e5760405162461bcd60e51b8152600401610411906113fc565b60808801516001600160a01b038b81166000908152600360205260409020919091558b161515806107c25750606088015134145b6107de5760405162461bcd60e51b8152600401610411906114da565b6001600160a01b038b16156108755760608801516040516323b872dd60e01b81526001600160a01b038d16916323b872dd91610821913391309190600401611279565b602060405180830381600087803b15801561083b57600080fd5b505af115801561084f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087391906110ee565b505b7fc60e20c09075d815341d293259c2be852d59c53f65d659764435e191c76c1f958b338c8c8c6040516108ac959493929190611215565b60405180910390a15050505050505050505050565b6001546001600160a01b031681565b600460209081526000928352604080842090915290825290205481565b60026020526000908152604090205481565b610907610e32565b6001600160a01b0316610918610a92565b6001600160a01b03161461093e5760405162461bcd60e51b815260040161041190611483565b6001600160a01b03811661095157600080fd5b6040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015610987573d6000803e3d6000fd5b505050565b610994610e32565b6001600160a01b03166109a5610a92565b6001600160a01b0316146109cb5760405162461bcd60e51b815260040161041190611483565b600855565b60036020526000908152604090205481565b4690565b6109ee610e32565b6001600160a01b03166109ff610a92565b6001600160a01b031614610a255760405162461bcd60e51b815260040161041190611483565b6005805463ffffffff191663ffffffff92909216919091179055565b610a49610e32565b6001600160a01b0316610a5a610a92565b6001600160a01b031614610a805760405162461bcd60e51b815260040161041190611483565b610a8a6000610e36565b565b60085481565b6000546001600160a01b031690565b610aa9610e32565b6001600160a01b0316610aba610a92565b6001600160a01b031614610ae05760405162461bcd60e51b815260040161041190611483565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b610b0a610e32565b6001600160a01b0316610b1b610a92565b6001600160a01b031614610b415760405162461bcd60e51b815260040161041190611483565b600580549115156401000000000264ff0000000019909216919091179055565b610b69610e32565b6001600160a01b0316610b7a610a92565b6001600160a01b031614610ba05760405162461bcd60e51b815260040161041190611483565b600655565b60075481565b6008546007546001600160a01b038416600090815260026020908152604080832054600390925290912054919291606060ff861667ffffffffffffffff811115610c0557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610c2e578160200160208202803683370190505b50905060005b8660ff168160ff161015610cbb576001600160a01b038816600090815260046020526040812090610c66836001611592565b60ff1660ff16815260200190815260200160002054828260ff1681518110610c9e57634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610cb381611724565b915050610c34565b509295509295909350565b610cce610e32565b6001600160a01b0316610cdf610a92565b6001600160a01b031614610d055760405162461bcd60e51b815260040161041190611483565b6001600160a01b038216610d1857600080fd5b60405163a9059cbb60e01b81526001600160a01b0384169063a9059cbb90610d46908590859060040161129d565b602060405180830381600087803b158015610d6057600080fd5b505af1158015610d74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9891906110ee565b50505050565b60055463ffffffff1681565b600554640100000000900460ff1681565b610dc3610e32565b6001600160a01b0316610dd4610a92565b6001600160a01b031614610dfa5760405162461bcd60e51b815260040161041190611483565b6001600160a01b038116610e205760405162461bcd60e51b8152600401610411906113b6565b610e2981610e36565b50565b60065481565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b0381168114610e9d57600080fd5b919050565b60008083601f840112610eb3578081fd5b50813567ffffffffffffffff811115610eca578182fd5b602083019150836020606083028501011115610ee557600080fd5b9250929050565b60008083601f840112610efd578182fd5b50813567ffffffffffffffff811115610f14578182fd5b602083019150836020828501011115610ee557600080fd5b600060208284031215610f3d578081fd5b610f4682610e86565b9392505050565b600080600060608486031215610f61578182fd5b610f6a84610e86565b9250610f7860208501610e86565b9150604084013590509250925092565b600080600080600080600080610140898b031215610fa4578384fd5b610fad89610e86565b97506020610fbc818b01610e86565b975060408a0135610fcc8161177e565b9650607f8a018b13610fdc578485fd5b60405160a0810167ffffffffffffffff82821081831117156110005761100061175a565b8160405282915060608d016101008e018f81111561101c57898afd5b895b600581101561103b5782358552938601939186019160010161101e565b50849a5080359550505080841115611051578788fd5b61105d8e858f01610eec565b90985096506101208d0135935087925080841115611079578586fd5b5050506110888b828c01610ea2565b999c989b5096995094979396929594505050565b600080604083850312156110ae578182fd5b6110b783610e86565b915060208301356110c78161177e565b809150509250929050565b6000602082840312156110e3578081fd5b8135610f4681611770565b6000602082840312156110ff578081fd5b8151610f4681611770565b60006020828403121561111b578081fd5b5035919050565b60008060408385031215611134578182fd5b8235915061114460208401610e86565b90509250929050565b60006020828403121561115e578081fd5b813563ffffffff81168114610f46578182fd5b600060208284031215611182578081fd5b8151610f468161177e565b60e09990991b6001600160e01b0319168952606097881b6bffffffffffffffffffffffff1990811660048b015260f89790971b6001600160f81b03191660188a015260198901959095526039880193909352941b9092166059850152606d840192909252608d83015260ad82015260cd0190565b6001600160a01b0391909116815260200190565b6001600160a01b038681168252858116602080840191909152908516604083015260ff8416606083015261012082019060808301908460005b600581101561126b5781518452928201929082019060010161124e565b505050509695505050505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b600060608083528681840152868860808501378160808885010152601f19601f880116830160808101602088818701526040608087850301818801528288845260a0850190508994508693505b888410156113595784358152611325838601610e86565b6001600160a01b038181168386015280611340888601610e86565b168385015250509385019360019390930192850161130e565b9c9b505050505050505050505050565b60208082526010908201526f125b9d985b1a590810da185a5b88125160821b604082015260600190565b602080825260099082015268085d995c9a599a595960ba1b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252600990820152686475706c696361746560b81b604082015260600190565b6020808252600d908201526c1b5d5bdb8e88195e1c1a5c9959609a1b604082015260600190565b602080825260059082015264217369677360d81b604082015260600190565b60208082526004908201526307cdac2f60e31b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600890820152672172756e6e696e6760c01b604082015260600190565b6020808252600a908201526930b6b7bab73a1032b93960b11b604082015260600190565b90815260200190565b600060a082018783526020878185015286604085015285606085015260a0608085015281855180845260c0860191508287019350845b818110156115595784518352938301939183019160010161153d565b50909a9950505050505050505050565b63ffffffff91909116815260200190565b6000821982111561158d5761158d611744565b500190565b600060ff821660ff84168060ff038211156115af576115af611744565b019392505050565b6000826115d257634e487b7160e01b81526012600452602481fd5b500490565b80825b60018086116115e95750611614565b8187048211156115fb576115fb611744565b8086161561160857918102915b9490941c9380026115da565b94509492505050565b6000610f4660001960ff85168460008261163957506001610f46565b8161164657506000610f46565b816001811461165c576002811461166657611693565b6001915050610f46565b60ff84111561167757611677611744565b6001841b91508482111561168d5761168d611744565b50610f46565b5060208310610133831016604e8410600b84101617156116c6575081810a838111156116c1576116c1611744565b610f46565b6116d384848460016115d7565b8086048211156116e5576116e5611744565b02949350505050565b600081600019048311821515161561170857611708611744565b500290565b60008282101561171f5761171f611744565b500390565b600060ff821660ff81141561173b5761173b611744565b60010192915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610e2957600080fd5b60ff81168114610e2957600080fdfea264697066735822122041a960221e6fd08cf35d613c0806c1385ef7a2e4804ad5dea8e0a230f89c325c64736f6c63430008000033000000000000000000000000e4f8d9a30936a6f8b17a73dc6feb51a3bbabd51a
Deployed Bytecode
0x6080604052600436106101355760003560e01c80638da5cb5b116100ab578063b1c971941161006f578063b1c9719414610310578063bcdd1e1314610341578063c187bbc114610361578063d85bd52614610383578063f2fde38b146103a5578063f48db204146103c557610135565b80638da5cb5b146102865780639aa2cadc1461029b5780639efb5df1146102bb578063a0cfc482146102db578063ad7a672f146102fb57610135565b80633e0a322d116100fd5780633e0a322d146101e75780634f1e8e5214610207578063564b81ef146102275780635ecbfd171461023c578063715018a61461025c57806378e979251461027157610135565b8063097baf881461013a57806311490d291461014f5780631dbd9ea01461017a57806327e235e3146101a757806336118b52146101c7575b600080fd5b61014d610148366004610f88565b6103da565b005b34801561015b57600080fd5b506101646108c1565b6040516101719190611201565b60405180910390f35b34801561018657600080fd5b5061019a61019536600461109c565b6108d0565b60405161017191906114fe565b3480156101b357600080fd5b5061019a6101c2366004610f2c565b6108ed565b3480156101d357600080fd5b5061014d6101e2366004611122565b6108ff565b3480156101f357600080fd5b5061014d61020236600461110a565b61098c565b34801561021357600080fd5b5061019a610222366004610f2c565b6109d0565b34801561023357600080fd5b5061019a6109e2565b34801561024857600080fd5b5061014d61025736600461114d565b6109e6565b34801561026857600080fd5b5061014d610a41565b34801561027d57600080fd5b5061019a610a8c565b34801561029257600080fd5b50610164610a92565b3480156102a757600080fd5b5061014d6102b6366004610f2c565b610aa1565b3480156102c757600080fd5b5061014d6102d63660046110d2565b610b02565b3480156102e757600080fd5b5061014d6102f636600461110a565b610b61565b34801561030757600080fd5b5061019a610ba5565b34801561031c57600080fd5b5061033061032b36600461109c565b610bab565b604051610171959493929190611507565b34801561034d57600080fd5b5061014d61035c366004610f4d565b610cc6565b34801561036d57600080fd5b50610376610d9e565b6040516101719190611569565b34801561038f57600080fd5b50610398610daa565b60405161017191906112b6565b3480156103b157600080fd5b5061014d6103c0366004610f2c565b610dbb565b3480156103d157600080fd5b5061019a610e2c565b600554640100000000900460ff1680156103f5575042600854105b61041a5760405162461bcd60e51b8152600401610411906114b8565b60405180910390fd5b806104375760405162461bcd60e51b815260040161041190611446565b61043f6109e2565b6020860151146104615760405162461bcd60e51b815260040161041190611369565b60055460009063ffffffff168988886003602002015189600460200201518c8b600060200201518c600160200201518d600260200201516040516020016104b09998979695949392919061118d565b60408051601f1981840301815290829052805160209091012060015463e80876cf60e01b83529092506000916001600160a01b039091169063e80876cf90610504908990899087908a908a906004016112c1565b602060405180830381600087803b15801561051e57600080fd5b505af1158015610532573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055691906110ee565b9050806105755760405162461bcd60e51b815260040161041190611393565b60006001600160a01b038b166105b15760408801516060890151670de0b6b3a7640000916105a2916116ee565b6105ac91906115b7565b61064b565b8a6001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156105ea57600080fd5b505afa1580156105fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106229190611171565b61062d90600a61161d565b604089015160608a015161064191906116ee565b61064b91906115b7565b6001600160a01b038b1660009081526002602052604081208054929350839290919061067890849061157a565b90915550506001600160a01b038a16600090815260046020908152604080832060ff8d168452909152812080548392906106b390849061157a565b909155505087516001600160a01b038b16600090815260046020908152604080832060ff8e16845290915290205411156106ff5760405162461bcd60e51b815260040161041190611465565b8060076000828254610711919061157a565b9091555050600654608089015142916107299161157a565b116107465760405162461bcd60e51b81526004016104119061141f565b6006546001600160a01b038b1660009081526003602052604090205460808a0151610771919061170d565b1161078e5760405162461bcd60e51b8152600401610411906113fc565b60808801516001600160a01b038b81166000908152600360205260409020919091558b161515806107c25750606088015134145b6107de5760405162461bcd60e51b8152600401610411906114da565b6001600160a01b038b16156108755760608801516040516323b872dd60e01b81526001600160a01b038d16916323b872dd91610821913391309190600401611279565b602060405180830381600087803b15801561083b57600080fd5b505af115801561084f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087391906110ee565b505b7fc60e20c09075d815341d293259c2be852d59c53f65d659764435e191c76c1f958b338c8c8c6040516108ac959493929190611215565b60405180910390a15050505050505050505050565b6001546001600160a01b031681565b600460209081526000928352604080842090915290825290205481565b60026020526000908152604090205481565b610907610e32565b6001600160a01b0316610918610a92565b6001600160a01b03161461093e5760405162461bcd60e51b815260040161041190611483565b6001600160a01b03811661095157600080fd5b6040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015610987573d6000803e3d6000fd5b505050565b610994610e32565b6001600160a01b03166109a5610a92565b6001600160a01b0316146109cb5760405162461bcd60e51b815260040161041190611483565b600855565b60036020526000908152604090205481565b4690565b6109ee610e32565b6001600160a01b03166109ff610a92565b6001600160a01b031614610a255760405162461bcd60e51b815260040161041190611483565b6005805463ffffffff191663ffffffff92909216919091179055565b610a49610e32565b6001600160a01b0316610a5a610a92565b6001600160a01b031614610a805760405162461bcd60e51b815260040161041190611483565b610a8a6000610e36565b565b60085481565b6000546001600160a01b031690565b610aa9610e32565b6001600160a01b0316610aba610a92565b6001600160a01b031614610ae05760405162461bcd60e51b815260040161041190611483565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b610b0a610e32565b6001600160a01b0316610b1b610a92565b6001600160a01b031614610b415760405162461bcd60e51b815260040161041190611483565b600580549115156401000000000264ff0000000019909216919091179055565b610b69610e32565b6001600160a01b0316610b7a610a92565b6001600160a01b031614610ba05760405162461bcd60e51b815260040161041190611483565b600655565b60075481565b6008546007546001600160a01b038416600090815260026020908152604080832054600390925290912054919291606060ff861667ffffffffffffffff811115610c0557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610c2e578160200160208202803683370190505b50905060005b8660ff168160ff161015610cbb576001600160a01b038816600090815260046020526040812090610c66836001611592565b60ff1660ff16815260200190815260200160002054828260ff1681518110610c9e57634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610cb381611724565b915050610c34565b509295509295909350565b610cce610e32565b6001600160a01b0316610cdf610a92565b6001600160a01b031614610d055760405162461bcd60e51b815260040161041190611483565b6001600160a01b038216610d1857600080fd5b60405163a9059cbb60e01b81526001600160a01b0384169063a9059cbb90610d46908590859060040161129d565b602060405180830381600087803b158015610d6057600080fd5b505af1158015610d74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9891906110ee565b50505050565b60055463ffffffff1681565b600554640100000000900460ff1681565b610dc3610e32565b6001600160a01b0316610dd4610a92565b6001600160a01b031614610dfa5760405162461bcd60e51b815260040161041190611483565b6001600160a01b038116610e205760405162461bcd60e51b8152600401610411906113b6565b610e2981610e36565b50565b60065481565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b0381168114610e9d57600080fd5b919050565b60008083601f840112610eb3578081fd5b50813567ffffffffffffffff811115610eca578182fd5b602083019150836020606083028501011115610ee557600080fd5b9250929050565b60008083601f840112610efd578182fd5b50813567ffffffffffffffff811115610f14578182fd5b602083019150836020828501011115610ee557600080fd5b600060208284031215610f3d578081fd5b610f4682610e86565b9392505050565b600080600060608486031215610f61578182fd5b610f6a84610e86565b9250610f7860208501610e86565b9150604084013590509250925092565b600080600080600080600080610140898b031215610fa4578384fd5b610fad89610e86565b97506020610fbc818b01610e86565b975060408a0135610fcc8161177e565b9650607f8a018b13610fdc578485fd5b60405160a0810167ffffffffffffffff82821081831117156110005761100061175a565b8160405282915060608d016101008e018f81111561101c57898afd5b895b600581101561103b5782358552938601939186019160010161101e565b50849a5080359550505080841115611051578788fd5b61105d8e858f01610eec565b90985096506101208d0135935087925080841115611079578586fd5b5050506110888b828c01610ea2565b999c989b5096995094979396929594505050565b600080604083850312156110ae578182fd5b6110b783610e86565b915060208301356110c78161177e565b809150509250929050565b6000602082840312156110e3578081fd5b8135610f4681611770565b6000602082840312156110ff578081fd5b8151610f4681611770565b60006020828403121561111b578081fd5b5035919050565b60008060408385031215611134578182fd5b8235915061114460208401610e86565b90509250929050565b60006020828403121561115e578081fd5b813563ffffffff81168114610f46578182fd5b600060208284031215611182578081fd5b8151610f468161177e565b60e09990991b6001600160e01b0319168952606097881b6bffffffffffffffffffffffff1990811660048b015260f89790971b6001600160f81b03191660188a015260198901959095526039880193909352941b9092166059850152606d840192909252608d83015260ad82015260cd0190565b6001600160a01b0391909116815260200190565b6001600160a01b038681168252858116602080840191909152908516604083015260ff8416606083015261012082019060808301908460005b600581101561126b5781518452928201929082019060010161124e565b505050509695505050505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b600060608083528681840152868860808501378160808885010152601f19601f880116830160808101602088818701526040608087850301818801528288845260a0850190508994508693505b888410156113595784358152611325838601610e86565b6001600160a01b038181168386015280611340888601610e86565b168385015250509385019360019390930192850161130e565b9c9b505050505050505050505050565b60208082526010908201526f125b9d985b1a590810da185a5b88125160821b604082015260600190565b602080825260099082015268085d995c9a599a595960ba1b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252600990820152686475706c696361746560b81b604082015260600190565b6020808252600d908201526c1b5d5bdb8e88195e1c1a5c9959609a1b604082015260600190565b602080825260059082015264217369677360d81b604082015260600190565b60208082526004908201526307cdac2f60e31b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600890820152672172756e6e696e6760c01b604082015260600190565b6020808252600a908201526930b6b7bab73a1032b93960b11b604082015260600190565b90815260200190565b600060a082018783526020878185015286604085015285606085015260a0608085015281855180845260c0860191508287019350845b818110156115595784518352938301939183019160010161153d565b50909a9950505050505050505050565b63ffffffff91909116815260200190565b6000821982111561158d5761158d611744565b500190565b600060ff821660ff84168060ff038211156115af576115af611744565b019392505050565b6000826115d257634e487b7160e01b81526012600452602481fd5b500490565b80825b60018086116115e95750611614565b8187048211156115fb576115fb611744565b8086161561160857918102915b9490941c9380026115da565b94509492505050565b6000610f4660001960ff85168460008261163957506001610f46565b8161164657506000610f46565b816001811461165c576002811461166657611693565b6001915050610f46565b60ff84111561167757611677611744565b6001841b91508482111561168d5761168d611744565b50610f46565b5060208310610133831016604e8410600b84101617156116c6575081810a838111156116c1576116c1611744565b610f46565b6116d384848460016115d7565b8086048211156116e5576116e5611744565b02949350505050565b600081600019048311821515161561170857611708611744565b500290565b60008282101561171f5761171f611744565b500390565b600060ff821660ff81141561173b5761173b611744565b60010192915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610e2957600080fd5b60ff81168114610e2957600080fdfea264697066735822122041a960221e6fd08cf35d613c0806c1385ef7a2e4804ad5dea8e0a230f89c325c64736f6c63430008000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e4f8d9a30936a6f8b17a73dc6feb51a3bbabd51a
-----Decoded View---------------
Arg [0] : _muon (address): 0xE4F8d9A30936a6F8b17a73dC6fEb51a3BBABD51A
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000e4f8d9a30936a6f8b17a73dc6feb51a3bbabd51a
Loading...
Loading
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.