Contract Overview
Balance:
0 Ether
More Info
My Name Tag:
Not Available
Txn Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
0x6464e0920a88640d4f8b2a74b3dfc869ef82da1b9dc71dd52ced61c68a0c658e | 0x60806040 | 9063492 | 334 days 23 hrs ago | 0x94c34fb5025e054b24398220cbdabe901bd8ee5e | IN | Contract Creation | 0 Ether | 0.00038484 |
[ Download CSV Export ]
Latest 25 internal transaction
[ Download CSV Export ]
Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x4fE12C45EA84B1ae828615Ccbc958c8E8F38EDD8
Contract Name:
GovernRegistry
Compiler Version
v0.6.8+commit.0bbfe453
Contract Source Code (Solidity Standard Json-Input format)
/* * SPDX-License-Identifier: MIT */ pragma solidity ^0.6.8; abstract contract ERC165 { // Includes supportsInterface method: bytes4 internal constant ERC165_INTERFACE_ID = bytes4(0x01ffc9a7); /** * @dev Query if a contract implements a certain interface * @param _interfaceId The interface identifier being queried, as specified in ERC-165 * @return True if the contract implements the requested interface and if its not 0xffffffff, false otherwise */ function supportsInterface(bytes4 _interfaceId) virtual public view returns (bool) { return _interfaceId == ERC165_INTERFACE_ID; } }
/* * SPDX-License-Identifier: GPL-3.0 */ pragma solidity 0.6.8; import "erc3k/contracts/IERC3000.sol"; import "erc3k/contracts/IERC3000Executor.sol"; import "erc3k/contracts/IERC3000Registry.sol"; import "@aragon/govern-contract-utils/contracts/erc165/ERC165.sol"; contract GovernRegistry is IERC3000Registry { mapping(string => bool) public nameUsed; function register( IERC3000Executor _executor, IERC3000 _queue, IERC20 _token, address minter, string calldata _name, bytes calldata _initialMetadata ) override external { require(!nameUsed[_name], "registry: name used"); nameUsed[_name] = true; emit Registered(_executor, _queue, _token, minter, msg.sender, _name); _setMetadata(_executor, _initialMetadata); } function setMetadata(bytes memory _metadata) override public { _setMetadata(IERC3000Executor(msg.sender), _metadata); } function _setMetadata(IERC3000Executor _executor, bytes memory _metadata) internal { emit SetMetadata(_executor, _metadata); } }
/* * SPDX-License-Identifier: GPL-3.0 */ pragma solidity ^0.6.8; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); }
/* * SPDX-License-Identifier: MIT */ pragma solidity ^0.6.8; pragma experimental ABIEncoderV2; import "./IERC3000Executor.sol"; library ERC3000Data { // TODO: come up with a non-shitty name struct Container { Payload payload; Config config; } // WARN: Always remember to change the 'hash' function if modifying the struct struct Payload { uint256 nonce; uint256 executionTime; address submitter; IERC3000Executor executor; Action[] actions; bytes32 allowFailuresMap; bytes proof; } struct Action { address to; uint256 value; bytes data; } struct Config { uint256 executionDelay; // how many seconds to wait before being able to call `execute`. Collateral scheduleDeposit; // fees for scheduling Collateral challengeDeposit; // fees for challenging address resolver; // resolver that will rule the disputes bytes rules; // rules of how DAO should be managed uint256 maxCalldataSize; // max calldatasize for the schedule } struct Collateral { address token; uint256 amount; } function containerHash(bytes32 payloadHash, bytes32 configHash) internal view returns (bytes32) { uint chainId; assembly { chainId := chainid() } return keccak256(abi.encodePacked("erc3k-v1", address(this), chainId, payloadHash, configHash)); } function hash(Container memory container) internal view returns (bytes32) { return containerHash(hash(container.payload), hash(container.config)); } function hash(Payload memory payload) internal pure returns (bytes32) { return keccak256( abi.encode( payload.nonce, payload.executionTime, payload.submitter, payload.executor, keccak256(abi.encode(payload.actions)), payload.allowFailuresMap, keccak256(payload.proof) ) ); } function hash(Config memory config) internal pure returns (bytes32) { return keccak256(abi.encode(config)); } }
/* * SPDX-License-Identifier: MIT */ pragma solidity ^0.6.8; pragma experimental ABIEncoderV2; import "./ERC3000Data.sol"; abstract contract IERC3000 { /** * @notice Schedules an action for execution, allowing for challenges and vetos on a defined time window * @param container A Container struct holding both the payload being scheduled for execution and * the current configuration of the system * @return containerHash */ function schedule(ERC3000Data.Container memory container) virtual public returns (bytes32 containerHash); event Scheduled(bytes32 indexed containerHash, ERC3000Data.Payload payload); /** * @notice Executes an action after its execution delay has passed and its state hasn't been altered by a challenge or veto * @param container A ERC3000Data.Container struct holding both the payload being scheduled for execution and * the current configuration of the system * MUST be an ERC3000Executor call: payload.executor.exec(payload.actions) * @return failureMap * @return execResults */ function execute(ERC3000Data.Container memory container) virtual public returns (bytes32 failureMap, bytes[] memory execResults); event Executed(bytes32 indexed containerHash, address indexed actor); /** * @notice Challenge a container in case its scheduling is illegal as per Config.rules. Pulls collateral and dispute fees from sender into contract * @param container A ERC3000Data.Container struct holding both the payload being scheduled for execution and * the current configuration of the system * @param reason Hint for case reviewers as to why the scheduled container is illegal * @return resolverId */ function challenge(ERC3000Data.Container memory container, bytes memory reason) virtual public returns (uint256 resolverId); event Challenged(bytes32 indexed containerHash, address indexed actor, bytes reason, uint256 resolverId, ERC3000Data.Collateral collateral); /** * @notice Apply arbitrator's ruling over a challenge once it has come to a final ruling * @param container A ERC3000Data.Container struct holding both the payload being scheduled for execution and * the current configuration of the system * @param resolverId disputeId in the arbitrator in which the dispute over the container was created * @return failureMap * @return execResults */ function resolve(ERC3000Data.Container memory container, uint256 resolverId) virtual public returns (bytes32 failureMap, bytes[] memory execResults); event Resolved(bytes32 indexed containerHash, address indexed actor, bool approved); /** * @notice Apply arbitrator's ruling over a challenge once it has come to a final ruling * @param container A ERC3000Data.Container struct holding both the payload being scheduled for execution and * the current configuration of the system * @param reason Justification for the veto */ function veto(ERC3000Data.Container memory container, bytes memory reason) virtual public; event Vetoed(bytes32 indexed containerHash, address indexed actor, bytes reason); /** * @notice Apply a new configuration for all *new* containers to be scheduled * @param config A ERC3000Data.Config struct holding all the new params that will control the system * @return configHash */ function configure(ERC3000Data.Config memory config) virtual public returns (bytes32 configHash); event Configured(bytes32 indexed configHash, address indexed actor, ERC3000Data.Config config); }
/* * SPDX-License-Identifier: MIT */ pragma solidity ^0.6.8; pragma experimental ABIEncoderV2; import "./ERC3000Data.sol"; abstract contract IERC3000Executor { bytes4 internal constant ERC3000_EXEC_INTERFACE_ID = this.exec.selector; /** * @notice Executes all given actions * @param actions A array of ERC3000Data.Action for later executing those * @param allowFailuresMap A map with the allowed failures * @param memo The hash of the ERC3000Data.Container * @return failureMap * @return execResults */ function exec(ERC3000Data.Action[] memory actions, bytes32 allowFailuresMap, bytes32 memo) virtual public returns (bytes32 failureMap, bytes[] memory execResults); event Executed(address indexed actor, ERC3000Data.Action[] actions, bytes32 memo, bytes32 failureMap, bytes[] execResults); }
/* * SPDX-License-Identifier: MIT */ pragma solidity 0.6.8; import "./IERC3000.sol"; import "./IERC3000Executor.sol"; import "@aragon/govern-token/contracts/interfaces/IERC20.sol"; abstract contract IERC3000Registry { /** * @notice Registers a IERC3000Executor and IERC3000 contract by a name and with his metadata * @param executor IERC3000Executor contract * @param queue IERC3000 contract * @param name The name of this DAO * @param token Governance token of the DAO * @param initialMetadata Additional data to store for this DAO */ function register(IERC3000Executor executor, IERC3000 queue, IERC20 token, address minter, string calldata name, bytes calldata initialMetadata) virtual external; event Registered(IERC3000Executor indexed executor, IERC3000 queue, IERC20 indexed token, address minter, address indexed registrant, string name); /** * @notice Sets or updates the metadata of a DAO * @param metadata Additional data to store for this DAO */ function setMetadata(bytes memory metadata) virtual public; event SetMetadata(IERC3000Executor indexed executor, bytes metadata); }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 20000 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC3000Executor","name":"executor","type":"address"},{"indexed":false,"internalType":"contract IERC3000","name":"queue","type":"address"},{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":true,"internalType":"address","name":"registrant","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"Registered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC3000Executor","name":"executor","type":"address"},{"indexed":false,"internalType":"bytes","name":"metadata","type":"bytes"}],"name":"SetMetadata","type":"event"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"nameUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC3000Executor","name":"_executor","type":"address"},{"internalType":"contract IERC3000","name":"_queue","type":"address"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"address","name":"minter","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"bytes","name":"_initialMetadata","type":"bytes"}],"name":"register","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_metadata","type":"bytes"}],"name":"setMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50610603806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630b9b6e8b14610046578063776ff4bd14610100578063ee57e36f146101f9575b600080fd5b6100ec6004803603602081101561005c57600080fd5b81019060208101813564010000000081111561007757600080fd5b82018360208201111561008957600080fd5b803590602001918460018302840111640100000000831117156100ab57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061029f945050505050565b604080519115158252519081900360200190f35b6101f7600480360360c081101561011657600080fd5b73ffffffffffffffffffffffffffffffffffffffff823581169260208101358216926040820135831692606083013516919081019060a08101608082013564010000000081111561016657600080fd5b82018360208201111561017857600080fd5b8035906020019184600183028401116401000000008311171561019a57600080fd5b9193909290916020810190356401000000008111156101b857600080fd5b8201836020820111156101ca57600080fd5b803590602001918460018302840111640100000000831117156101ec57600080fd5b5090925090506102bf565b005b6101f76004803603602081101561020f57600080fd5b81019060208101813564010000000081111561022a57600080fd5b82018360208201111561023c57600080fd5b8035906020019184600183028401116401000000008311171561025e57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061050c945050505050565b805160208183018101805160008252928201919093012091525460ff1681565b6000848460405180838380828437919091019485525050604051928390036020019092205460ff16159150610357905057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f72656769737472793a206e616d65207573656400000000000000000000000000604482015290519081900360640190fd5b600160008585604051808383808284378083019250505092505050908152602001604051809103902060006101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fb8b8650874e8f21584e6566ce5e718fbc6f1c7aeb2ba4c651318e4fbcd7462018a898989604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252848482818152602001925080828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690920182900397509095505050505050a46105028883838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061051992505050565b5050505050505050565b6105163382610519565b50565b8173ffffffffffffffffffffffffffffffffffffffff167f8fa78869a20b896e44b704e4e5ee97cbb81cc5639ff16aec59c41cd97427b5a6826040518080602001828103825283818151815260200191508051906020019080838360005b8381101561058f578181015183820152602001610577565b50505050905090810190601f1680156105bc5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505056fea2646970667358221220310345ea04100060134c224f0326ee17805ed250f0a2e41a16afb2a3b5a960d564736f6c63430006080033
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.