Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Loading...
Loading
Loading...
Loading
Contract Name:
DappRegistry
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// Copyright (C) 2021 Argent Labs Ltd. <https://argent.xyz>
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.3;
import "./interfaces/IAuthoriser.sol";
import "./interfaces/IFilter.sol";
contract DappRegistry is IAuthoriser {
// The timelock period
uint64 public timelockPeriod;
// The new timelock period
uint64 public newTimelockPeriod;
// Time at which the new timelock becomes effective
uint64 public timelockPeriodChangeAfter;
// bit vector of enabled registry ids for each wallet
mapping (address => bytes32) public enabledRegistryIds; // [wallet] => [bit vector of 256 registry ids]
// authorised dapps and their filters for each registry id
mapping (uint8 => mapping (address => bytes32)) public authorisations; // [registryId] => [dapp] => [{filter:160}{validAfter:64}]
// pending authorised dapps and their filters for each registry id
mapping (uint8 => mapping (address => bytes32)) public pendingFilterUpdates; // [registryId] => [dapp] => [{filter:160}{validAfter:64}]
// owners for each registry id
mapping (uint8 => address) public registryOwners; // [registryId] => [owner]
event RegistryCreated(uint8 registryId, address registryOwner);
event OwnerChanged(uint8 registryId, address newRegistryOwner);
event TimelockChangeRequested(uint64 newTimelockPeriod);
event TimelockChanged(uint64 newTimelockPeriod);
event FilterUpdated(uint8 indexed registryId, address dapp, address filter, uint256 validAfter);
event FilterUpdateRequested(uint8 indexed registryId, address dapp, address filter, uint256 validAfter);
event DappAdded(uint8 indexed registryId, address dapp, address filter, uint256 validAfter);
event DappRemoved(uint8 indexed registryId, address dapp);
event ToggledRegistry(address indexed sender, uint8 registryId, bool enabled);
modifier onlyOwner(uint8 _registryId) {
validateOwner(_registryId);
_;
}
constructor(uint64 _timelockPeriod) {
// set the timelock period
timelockPeriod = _timelockPeriod;
// set the owner of the Argent Registry (registryId = 0)
registryOwners[0] = msg.sender;
emit RegistryCreated(0, msg.sender);
emit TimelockChanged(_timelockPeriod);
}
/********* Wallet-centered functions *************/
/**
* @notice Returns whether a registry is enabled for a wallet
* @param _wallet The wallet
* @param _registryId The registry id
*/
function isEnabledRegistry(address _wallet, uint8 _registryId) external view returns (bool isEnabled) {
uint registries = uint(enabledRegistryIds[_wallet]);
return (((registries >> _registryId) & 1) > 0) /* "is bit set for regId?" */ == (_registryId > 0) /* "not Argent registry?" */;
}
/**
* @notice Returns whether a (_spender, _to, _data) call is authorised for a wallet
* @param _wallet The wallet
* @param _spender The spender of the tokens for token approvals, or the target of the transaction otherwise
* @param _to The target of the transaction
* @param _data The calldata of the transaction
*/
function isAuthorised(address _wallet, address _spender, address _to, bytes calldata _data) public view override returns (bool) {
uint registries = uint(enabledRegistryIds[_wallet]);
// Check Argent Default Registry first. It is enabled by default, implying that a zero
// at position 0 of the `registries` bit vector means that the Argent Registry is enabled)
for(uint registryId = 0; registryId == 0 || (registries >> registryId) > 0; registryId++) {
bool isEnabled = (((registries >> registryId) & 1) > 0) /* "is bit set for regId?" */ == (registryId > 0) /* "not Argent registry?" */;
if(isEnabled) { // if registryId is enabled
uint auth = uint(authorisations[uint8(registryId)][_spender]);
uint validAfter = auth & 0xffffffffffffffff;
if (0 < validAfter && validAfter <= block.timestamp) { // if the current time is greater than the validity time
address filter = address(uint160(auth >> 64));
if(filter == address(0) || IFilter(filter).isValid(_wallet, _spender, _to, _data)) {
return true;
}
}
}
}
return false;
}
/**
* @notice Returns whether a collection of (_spender, _to, _data) calls are authorised for a wallet
* @param _wallet The wallet
* @param _spenders The spenders of the tokens for token approvals, or the targets of the transaction otherwise
* @param _to The targets of the transaction
* @param _data The calldata of the transaction
*/
function areAuthorised(
address _wallet,
address[] calldata _spenders,
address[] calldata _to,
bytes[] calldata _data
)
external
view
override
returns (bool)
{
for(uint i = 0; i < _spenders.length; i++) {
if(!isAuthorised(_wallet, _spenders[i], _to[i], _data[i])) {
return false;
}
}
return true;
}
/**
* @notice Allows a wallet to decide whether _registryId should be part of the list of enabled registries for that wallet
* @param _registryId The id of the registry to enable/disable
* @param _enabled Whether the registry should be enabled (true) or disabled (false)
*/
function toggleRegistry(uint8 _registryId, bool _enabled) external {
require(registryOwners[_registryId] != address(0), "DR: unknown registry");
uint registries = uint(enabledRegistryIds[msg.sender]);
bool current = (((registries >> _registryId) & 1) > 0) /* "is bit set for regId?" */ == (_registryId > 0) /* "not Argent registry?" */;
if(current != _enabled) {
enabledRegistryIds[msg.sender] = bytes32(registries ^ (uint(1) << _registryId)); // toggle [_registryId]^th bit
emit ToggledRegistry(msg.sender, _registryId, _enabled);
}
}
/************** Management of registry list *****************/
/**
* @notice Create a new registry. Only the owner of the Argent registry (i.e. the registry with id 0 -- hence the use of `onlyOwner(0)`)
* can create a new registry.
* @param _registryId The id of the registry to create
* @param _registryOwner The owner of that new registry
*/
function createRegistry(uint8 _registryId, address _registryOwner) external onlyOwner(0) {
require(_registryOwner != address(0), "DR: registry owner is 0");
require(registryOwners[_registryId] == address(0), "DR: duplicate registry");
registryOwners[_registryId] = _registryOwner;
emit RegistryCreated(_registryId, _registryOwner);
}
// Note: removeRegistry is not supported because that would allow the owner to replace registries that
// have already been enabled by users with a new (potentially maliciously populated) registry
/**
* @notice Lets a registry owner change the owner of the registry.
* @param _registryId The id of the registry
* @param _newRegistryOwner The new owner of the registry
*/
function changeOwner(uint8 _registryId, address _newRegistryOwner) external onlyOwner(_registryId) {
require(_newRegistryOwner != address(0), "DR: new registry owner is 0");
registryOwners[_registryId] = _newRegistryOwner;
emit OwnerChanged(_registryId, _newRegistryOwner);
}
/**
* @notice Request a change of the timelock value. Only the owner of the Argent registry (i.e. the registry with id 0 --
* hence the use of `onlyOwner(0)`) can perform that action. This action can be confirmed after the (old) timelock period.
* @param _newTimelockPeriod The new timelock period
*/
function requestTimelockChange(uint64 _newTimelockPeriod) external onlyOwner(0) {
newTimelockPeriod = _newTimelockPeriod;
timelockPeriodChangeAfter = uint64(block.timestamp) + timelockPeriod;
emit TimelockChangeRequested(_newTimelockPeriod);
}
/**
* @notice Confirm a change of the timelock value requested by `requestTimelockChange()`.
*/
function confirmTimelockChange() external {
uint64 newPeriod = newTimelockPeriod;
require(timelockPeriodChangeAfter > 0 && timelockPeriodChangeAfter <= block.timestamp, "DR: can't (yet) change timelock");
timelockPeriod = newPeriod;
newTimelockPeriod = 0;
timelockPeriodChangeAfter = 0;
emit TimelockChanged(newPeriod);
}
/************** Management of registries' content *****************/
/**
* @notice Returns the (filter, validAfter) tuple recorded for a dapp in a given registry.
* `filter` is the authorisation filter stored for the dapp (if any) and `validAfter` is the
* timestamp after which the filter becomes active.
* @param _registryId The registry id
* @param _dapp The dapp
*/
function getAuthorisation(uint8 _registryId, address _dapp) external view returns (address filter, uint64 validAfter) {
uint auth = uint(authorisations[_registryId][_dapp]);
filter = address(uint160(auth >> 64));
validAfter = uint64(auth & 0xffffffffffffffff);
}
/**
* @notice Add a new dapp to the registry with an optional filter
* @param _registryId The id of the registry to modify
* @param _dapp The address of the dapp contract to authorise.
* @param _filter The address of the filter contract to use, if any.
*/
function addDapp(uint8 _registryId, address _dapp, address _filter) external onlyOwner(_registryId) {
require(authorisations[_registryId][_dapp] == bytes32(0), "DR: dapp already added");
uint validAfter = block.timestamp + timelockPeriod;
// Store the new authorisation as {filter:160}{validAfter:64}.
authorisations[_registryId][_dapp] = bytes32((uint(uint160(_filter)) << 64) | validAfter);
emit DappAdded(_registryId, _dapp, _filter, validAfter);
}
/**
* @notice Deauthorise a dapp in a registry
* @param _registryId The id of the registry to modify
* @param _dapp The address of the dapp contract to deauthorise.
*/
function removeDapp(uint8 _registryId, address _dapp) external onlyOwner(_registryId) {
require(authorisations[_registryId][_dapp] != bytes32(0), "DR: unknown dapp");
delete authorisations[_registryId][_dapp];
delete pendingFilterUpdates[_registryId][_dapp];
emit DappRemoved(_registryId, _dapp);
}
/**
* @notice Request to change an authorisation filter for a dapp that has previously been authorised. We cannot
* immediately override the existing filter and need to store the new filter for a timelock period before being
* able to change the filter.
* @param _registryId The id of the registry to modify
* @param _dapp The address of the dapp contract to authorise.
* @param _filter The address of the new filter contract to use.
*/
function requestFilterUpdate(uint8 _registryId, address _dapp, address _filter) external onlyOwner(_registryId) {
require(authorisations[_registryId][_dapp] != bytes32(0), "DR: unknown dapp");
uint validAfter = block.timestamp + timelockPeriod;
// Store the future authorisation as {filter:160}{validAfter:64}
pendingFilterUpdates[_registryId][_dapp] = bytes32((uint(uint160(_filter)) << 64) | validAfter);
emit FilterUpdateRequested(_registryId, _dapp, _filter, validAfter);
}
/**
* @notice Confirm the filter change requested by `requestFilterUpdate`
* @param _registryId The id of the registry to modify
* @param _dapp The address of the dapp contract to authorise.
*/
function confirmFilterUpdate(uint8 _registryId, address _dapp) external {
uint newAuth = uint(pendingFilterUpdates[_registryId][_dapp]);
require(newAuth > 0, "DR: no pending filter update");
uint validAfter = newAuth & 0xffffffffffffffff;
require(validAfter <= block.timestamp, "DR: too early to confirm auth");
authorisations[_registryId][_dapp] = bytes32(newAuth);
emit FilterUpdated(_registryId, _dapp, address(uint160(newAuth >> 64)), validAfter);
delete pendingFilterUpdates[_registryId][_dapp];
}
/******** Internal Functions ***********/
function validateOwner(uint8 _registryId) internal view {
address owner = registryOwners[_registryId];
require(owner != address(0), "DR: unknown registry");
require(msg.sender == owner, "DR: sender != registry owner");
}
}// Copyright (C) 2021 Argent Labs Ltd. <https://argent.xyz>
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.3;
interface IAuthoriser {
function isAuthorised(address _wallet, address _spender, address _to, bytes calldata _data) external view returns (bool);
function areAuthorised(
address _wallet,
address[] calldata _spenders,
address[] calldata _to,
bytes[] calldata _data
)
external
view
returns (bool);
}// Copyright (C) 2021 Argent Labs Ltd. <https://argent.xyz>
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.3;
interface IFilter {
function isValid(address _wallet, address _spender, address _to, bytes calldata _data) external view returns (bool valid);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
},
"libraries": {}
}Contract ABI
API[{"inputs":[{"internalType":"uint64","name":"_timelockPeriod","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"registryId","type":"uint8"},{"indexed":false,"internalType":"address","name":"dapp","type":"address"},{"indexed":false,"internalType":"address","name":"filter","type":"address"},{"indexed":false,"internalType":"uint256","name":"validAfter","type":"uint256"}],"name":"DappAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"registryId","type":"uint8"},{"indexed":false,"internalType":"address","name":"dapp","type":"address"}],"name":"DappRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"registryId","type":"uint8"},{"indexed":false,"internalType":"address","name":"dapp","type":"address"},{"indexed":false,"internalType":"address","name":"filter","type":"address"},{"indexed":false,"internalType":"uint256","name":"validAfter","type":"uint256"}],"name":"FilterUpdateRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"registryId","type":"uint8"},{"indexed":false,"internalType":"address","name":"dapp","type":"address"},{"indexed":false,"internalType":"address","name":"filter","type":"address"},{"indexed":false,"internalType":"uint256","name":"validAfter","type":"uint256"}],"name":"FilterUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"registryId","type":"uint8"},{"indexed":false,"internalType":"address","name":"newRegistryOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"registryId","type":"uint8"},{"indexed":false,"internalType":"address","name":"registryOwner","type":"address"}],"name":"RegistryCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"newTimelockPeriod","type":"uint64"}],"name":"TimelockChangeRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"newTimelockPeriod","type":"uint64"}],"name":"TimelockChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint8","name":"registryId","type":"uint8"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"ToggledRegistry","type":"event"},{"inputs":[{"internalType":"uint8","name":"_registryId","type":"uint8"},{"internalType":"address","name":"_dapp","type":"address"},{"internalType":"address","name":"_filter","type":"address"}],"name":"addDapp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"},{"internalType":"address[]","name":"_spenders","type":"address[]"},{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"bytes[]","name":"_data","type":"bytes[]"}],"name":"areAuthorised","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"address","name":"","type":"address"}],"name":"authorisations","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_registryId","type":"uint8"},{"internalType":"address","name":"_newRegistryOwner","type":"address"}],"name":"changeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_registryId","type":"uint8"},{"internalType":"address","name":"_dapp","type":"address"}],"name":"confirmFilterUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"confirmTimelockChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_registryId","type":"uint8"},{"internalType":"address","name":"_registryOwner","type":"address"}],"name":"createRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"enabledRegistryIds","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_registryId","type":"uint8"},{"internalType":"address","name":"_dapp","type":"address"}],"name":"getAuthorisation","outputs":[{"internalType":"address","name":"filter","type":"address"},{"internalType":"uint64","name":"validAfter","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"},{"internalType":"address","name":"_spender","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"isAuthorised","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"},{"internalType":"uint8","name":"_registryId","type":"uint8"}],"name":"isEnabledRegistry","outputs":[{"internalType":"bool","name":"isEnabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newTimelockPeriod","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"address","name":"","type":"address"}],"name":"pendingFilterUpdates","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"registryOwners","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_registryId","type":"uint8"},{"internalType":"address","name":"_dapp","type":"address"}],"name":"removeDapp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_registryId","type":"uint8"},{"internalType":"address","name":"_dapp","type":"address"},{"internalType":"address","name":"_filter","type":"address"}],"name":"requestFilterUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_newTimelockPeriod","type":"uint64"}],"name":"requestTimelockChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timelockPeriod","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timelockPeriodChangeAfter","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_registryId","type":"uint8"},{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"toggleRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b5060405161153738038061153783398101604081905261002f91610101565b600080546001600160401b0319166001600160401b038316178155808052600460209081527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec8054336001600160a01b0319909116811790915560408051938452918301527fcf0821d600839aa615a26b19af26ff187a7efc142f0487233e2768987237db31910160405180910390a16040516001600160401b03821681527f5cc48c8c2fbfcbb899f818c7569d966a7ebe91ead498b9234cddfc509453659b9060200160405180910390a150610131565b60006020828403121561011357600080fd5b81516001600160401b038116811461012a57600080fd5b9392505050565b6113f7806101406000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80636dd2ee2d116100ad578063945188191161007157806394518819146102f2578063b0e8b8a614610305578063cbe0afaa14610318578063ecd08dba1461032b578063fcc6983e1461034557600080fd5b80636dd2ee2d1461024b578063770982901461028c57806387f4415f146102ac5780638aa6e8de146102d75780638c6f896a146102ea57600080fd5b8063314c51fe116100f4578063314c51fe146101c657806332df0560146101d9578063402129161461021257806345d62e08146102255780635cfdc4d01461023857600080fd5b806305424669146101315780630ee981f21461014657806319a1fa6f1461017d5780632a42be54146101905780632ecaf675146101b3575b600080fd5b61014461013f366004610fa6565b6103b7565b005b60005461016090600160801b90046001600160401b031681565b6040516001600160401b0390911681526020015b60405180910390f35b61014461018b366004610fa6565b610488565b6101a361019e366004611024565b6105f5565b6040519015158152602001610174565b600054610160906001600160401b031681565b6101446101d4366004610fa6565b6106a8565b6102046101e7366004610fa6565b600260209081526000928352604080842090915290825290205481565b604051908152602001610174565b610144610220366004610fa6565b6107ce565b6101a36102333660046110ce565b6108b3565b6101a36102463660046110f8565b6108e6565b610274610259366004611199565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610174565b61020461029a3660046111bb565b60016020526000908152604090205481565b6102046102ba366004610fa6565b600360209081526000928352604080842090915290825290205481565b6101446102e53660046111e7565b610a32565b610144610b1a565b61014461030036600461121e565b610bf8565b610144610313366004611261565b610d10565b61014461032636600461121e565b610db7565b60005461016090600160401b90046001600160401b031681565b610390610353366004610fa6565b60ff90911660009081526002602090815260408083206001600160a01b039094168352929052819020549081901c916001600160401b0390911690565b604080516001600160a01b0390931683526001600160401b03909116602083015201610174565b816103c181610ebd565b6001600160a01b03821661041c5760405162461bcd60e51b815260206004820152601b60248201527f44523a206e6577207265676973747279206f776e65722069732030000000000060448201526064015b60405180910390fd5b60ff831660008181526004602090815260409182902080546001600160a01b0319166001600160a01b0387169081179091558251938452908301527f37f23baa6a7d1fb1a55c195205c562cf79564602b331961ea8c3a5a2deed99ba91015b60405180910390a1505050565b60ff821660009081526003602090815260408083206001600160a01b0385168452909152902054806104fc5760405162461bcd60e51b815260206004820152601c60248201527f44523a206e6f2070656e64696e672066696c74657220757064617465000000006044820152606401610413565b6001600160401b038116428111156105565760405162461bcd60e51b815260206004820152601d60248201527f44523a20746f6f206561726c7920746f20636f6e6669726d20617574680000006044820152606401610413565b60ff841660008181526002602090815260408083206001600160a01b0388811680865291845293829020879055815190815286821c9093169183019190915281018390527f8a5ab3077deda9cd003e635672e2b76a9511e7b7e887881e48a1272baa5eae6f9060600160405180910390a2505060ff90911660009081526003602090815260408083206001600160a01b03909416835292905290812055565b6000805b8681101561069757610677898989848181106106175761061761128a565b905060200201602081019061062c91906111bb565b88888581811061063e5761063e61128a565b905060200201602081019061065391906111bb565b8787868181106106655761066561128a565b905060200281019061024691906112a0565b61068557600091505061069d565b8061068f816112fc565b9150506105f9565b50600190505b979650505050505050565b60006106b381610ebd565b6001600160a01b0382166107095760405162461bcd60e51b815260206004820152601760248201527f44523a207265676973747279206f776e657220697320300000000000000000006044820152606401610413565b60ff83166000908152600460205260409020546001600160a01b03161561076b5760405162461bcd60e51b815260206004820152601660248201527544523a206475706c696361746520726567697374727960501b6044820152606401610413565b60ff831660008181526004602090815260409182902080546001600160a01b0319166001600160a01b0387169081179091558251938452908301527fcf0821d600839aa615a26b19af26ff187a7efc142f0487233e2768987237db31910161047b565b816107d881610ebd565b60ff831660009081526002602090815260408083206001600160a01b038616845290915290205461083e5760405162461bcd60e51b815260206004820152601060248201526f044523a20756e6b6e6f776e20646170760841b6044820152606401610413565b60ff831660008181526002602090815260408083206001600160a01b03871680855290835281842084905584845260038352818420818552835281842093909355519182527f5585d359d64ad5b95bbb98eb5ea9bae762f70d022015e4887305b1f070d149c4910160405180910390a2505050565b6001600160a01b03821660009081526001602081905260409091205460ff831690811c9091161515901515145b92915050565b6001600160a01b038516600090815260016020526040812054815b80158061090f575081811c15155b15610a2257600182821c161515811515148015610a0f5760ff821660009081526002602090815260408083206001600160a01b038c1684529091529020546001600160401b03811680158015906109665750428111155b15610a0c57604082901c6001600160a01b03811615806109f6575060405163e0274e1d60e01b81526001600160a01b0382169063e0274e1d906109b5908f908f908f908f908f90600401611315565b602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f6919061136a565b15610a0a5760019650505050505050610a29565b505b50505b5080610a1a816112fc565b915050610901565b5060009150505b95945050505050565b60ff82166000908152600460205260409020546001600160a01b0316610a915760405162461bcd60e51b815260206004820152601460248201527344523a20756e6b6e6f776e20726567697374727960601b6044820152606401610413565b336000908152600160208190526040909120549060ff841682811c9091161515901515148215158114610b14573360008181526001602081815260409283902060ff891692831b871890558251918252861515908201527ff5ccd7ad3122597a385a39f9a6337dee41076036734cf1a1de45c2893a0191ac910160405180910390a25b50505050565b6000546001600160401b03600160401b8204811691600160801b90041615801590610b58575060005442600160801b9091046001600160401b031611155b610ba45760405162461bcd60e51b815260206004820152601f60248201527f44523a2063616e2774202879657429206368616e67652074696d656c6f636b006044820152606401610413565b600080546001600160c01b0319166001600160401b0383169081179091556040519081527f5cc48c8c2fbfcbb899f818c7569d966a7ebe91ead498b9234cddfc509453659b9060200160405180910390a150565b82610c0281610ebd565b60ff841660009081526002602090815260408083206001600160a01b038716845290915290205415610c6f5760405162461bcd60e51b815260206004820152601660248201527511148e8819185c1c08185b1c9958591e48185919195960521b6044820152606401610413565b60008054610c86906001600160401b031642611387565b60ff861660008181526002602090815260408083206001600160a01b038a81168086529184529382902089831b600160401b600160e01b0316871790558151908152928816918301919091528101839052919250907f4fb13278643ce6c9ced7cdc7fdb7a726ce56f62bb8e985aa634b2c4288672331906060015b60405180910390a25050505050565b6000610d1b81610ebd565b600080546001600160401b03808516600160401b026fffffffffffffffff00000000000000001983168117909355610d589281169116174261139a565b6000805467ffffffffffffffff60801b1916600160801b6001600160401b039384160217905560405190831681527ff4b7860684c929835858edd3e43644f73901d2b6e70bd71c83920fff61539bb79060200160405180910390a15050565b82610dc181610ebd565b60ff841660009081526002602090815260408083206001600160a01b0387168452909152902054610e275760405162461bcd60e51b815260206004820152601060248201526f044523a20756e6b6e6f776e20646170760841b6044820152606401610413565b60008054610e3e906001600160401b031642611387565b60ff861660008181526003602090815260408083206001600160a01b038a81168086529184529382902089831b600160401b600160e01b0316871790558151908152928816918301919091528101839052919250907fea06a73e654a8bf96d06dfbceea17dbb955d1f3e3d508d724c67c8846fa0d55290606001610d01565b60ff81166000908152600460205260409020546001600160a01b031680610f1d5760405162461bcd60e51b815260206004820152601460248201527344523a20756e6b6e6f776e20726567697374727960601b6044820152606401610413565b336001600160a01b03821614610f755760405162461bcd60e51b815260206004820152601c60248201527f44523a2073656e64657220213d207265676973747279206f776e6572000000006044820152606401610413565b5050565b803560ff81168114610f8a57600080fd5b919050565b80356001600160a01b0381168114610f8a57600080fd5b60008060408385031215610fb957600080fd5b610fc283610f79565b9150610fd060208401610f8f565b90509250929050565b60008083601f840112610feb57600080fd5b5081356001600160401b0381111561100257600080fd5b6020830191508360208260051b850101111561101d57600080fd5b9250929050565b60008060008060008060006080888a03121561103f57600080fd5b61104888610f8f565b965060208801356001600160401b038082111561106457600080fd5b6110708b838c01610fd9565b909850965060408a013591508082111561108957600080fd5b6110958b838c01610fd9565b909650945060608a01359150808211156110ae57600080fd5b506110bb8a828b01610fd9565b989b979a50959850939692959293505050565b600080604083850312156110e157600080fd5b6110ea83610f8f565b9150610fd060208401610f79565b60008060008060006080868803121561111057600080fd5b61111986610f8f565b945061112760208701610f8f565b935061113560408701610f8f565b925060608601356001600160401b038082111561115157600080fd5b818801915088601f83011261116557600080fd5b81358181111561117457600080fd5b89602082850101111561118657600080fd5b9699959850939650602001949392505050565b6000602082840312156111ab57600080fd5b6111b482610f79565b9392505050565b6000602082840312156111cd57600080fd5b6111b482610f8f565b80151581146111e457600080fd5b50565b600080604083850312156111fa57600080fd5b61120383610f79565b91506020830135611213816111d6565b809150509250929050565b60008060006060848603121561123357600080fd5b61123c84610f79565b925061124a60208501610f8f565b915061125860408501610f8f565b90509250925092565b60006020828403121561127357600080fd5b81356001600160401b03811681146111b457600080fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126112b757600080fd5b8301803591506001600160401b038211156112d157600080fd5b60200191503681900382131561101d57600080fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161130e5761130e6112e6565b5060010190565b6001600160a01b03868116825285811660208301528416604082015260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b60006020828403121561137c57600080fd5b81516111b4816111d6565b808201808211156108e0576108e06112e6565b6001600160401b038181168382160190808211156113ba576113ba6112e6565b509291505056fea26469706673582212206dd19048d2e345a6b6eb25eb4281fe0ea5c6b20a1cc26d8202f1a5aab79a828764736f6c634300081200330000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80636dd2ee2d116100ad578063945188191161007157806394518819146102f2578063b0e8b8a614610305578063cbe0afaa14610318578063ecd08dba1461032b578063fcc6983e1461034557600080fd5b80636dd2ee2d1461024b578063770982901461028c57806387f4415f146102ac5780638aa6e8de146102d75780638c6f896a146102ea57600080fd5b8063314c51fe116100f4578063314c51fe146101c657806332df0560146101d9578063402129161461021257806345d62e08146102255780635cfdc4d01461023857600080fd5b806305424669146101315780630ee981f21461014657806319a1fa6f1461017d5780632a42be54146101905780632ecaf675146101b3575b600080fd5b61014461013f366004610fa6565b6103b7565b005b60005461016090600160801b90046001600160401b031681565b6040516001600160401b0390911681526020015b60405180910390f35b61014461018b366004610fa6565b610488565b6101a361019e366004611024565b6105f5565b6040519015158152602001610174565b600054610160906001600160401b031681565b6101446101d4366004610fa6565b6106a8565b6102046101e7366004610fa6565b600260209081526000928352604080842090915290825290205481565b604051908152602001610174565b610144610220366004610fa6565b6107ce565b6101a36102333660046110ce565b6108b3565b6101a36102463660046110f8565b6108e6565b610274610259366004611199565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610174565b61020461029a3660046111bb565b60016020526000908152604090205481565b6102046102ba366004610fa6565b600360209081526000928352604080842090915290825290205481565b6101446102e53660046111e7565b610a32565b610144610b1a565b61014461030036600461121e565b610bf8565b610144610313366004611261565b610d10565b61014461032636600461121e565b610db7565b60005461016090600160401b90046001600160401b031681565b610390610353366004610fa6565b60ff90911660009081526002602090815260408083206001600160a01b039094168352929052819020549081901c916001600160401b0390911690565b604080516001600160a01b0390931683526001600160401b03909116602083015201610174565b816103c181610ebd565b6001600160a01b03821661041c5760405162461bcd60e51b815260206004820152601b60248201527f44523a206e6577207265676973747279206f776e65722069732030000000000060448201526064015b60405180910390fd5b60ff831660008181526004602090815260409182902080546001600160a01b0319166001600160a01b0387169081179091558251938452908301527f37f23baa6a7d1fb1a55c195205c562cf79564602b331961ea8c3a5a2deed99ba91015b60405180910390a1505050565b60ff821660009081526003602090815260408083206001600160a01b0385168452909152902054806104fc5760405162461bcd60e51b815260206004820152601c60248201527f44523a206e6f2070656e64696e672066696c74657220757064617465000000006044820152606401610413565b6001600160401b038116428111156105565760405162461bcd60e51b815260206004820152601d60248201527f44523a20746f6f206561726c7920746f20636f6e6669726d20617574680000006044820152606401610413565b60ff841660008181526002602090815260408083206001600160a01b0388811680865291845293829020879055815190815286821c9093169183019190915281018390527f8a5ab3077deda9cd003e635672e2b76a9511e7b7e887881e48a1272baa5eae6f9060600160405180910390a2505060ff90911660009081526003602090815260408083206001600160a01b03909416835292905290812055565b6000805b8681101561069757610677898989848181106106175761061761128a565b905060200201602081019061062c91906111bb565b88888581811061063e5761063e61128a565b905060200201602081019061065391906111bb565b8787868181106106655761066561128a565b905060200281019061024691906112a0565b61068557600091505061069d565b8061068f816112fc565b9150506105f9565b50600190505b979650505050505050565b60006106b381610ebd565b6001600160a01b0382166107095760405162461bcd60e51b815260206004820152601760248201527f44523a207265676973747279206f776e657220697320300000000000000000006044820152606401610413565b60ff83166000908152600460205260409020546001600160a01b03161561076b5760405162461bcd60e51b815260206004820152601660248201527544523a206475706c696361746520726567697374727960501b6044820152606401610413565b60ff831660008181526004602090815260409182902080546001600160a01b0319166001600160a01b0387169081179091558251938452908301527fcf0821d600839aa615a26b19af26ff187a7efc142f0487233e2768987237db31910161047b565b816107d881610ebd565b60ff831660009081526002602090815260408083206001600160a01b038616845290915290205461083e5760405162461bcd60e51b815260206004820152601060248201526f044523a20756e6b6e6f776e20646170760841b6044820152606401610413565b60ff831660008181526002602090815260408083206001600160a01b03871680855290835281842084905584845260038352818420818552835281842093909355519182527f5585d359d64ad5b95bbb98eb5ea9bae762f70d022015e4887305b1f070d149c4910160405180910390a2505050565b6001600160a01b03821660009081526001602081905260409091205460ff831690811c9091161515901515145b92915050565b6001600160a01b038516600090815260016020526040812054815b80158061090f575081811c15155b15610a2257600182821c161515811515148015610a0f5760ff821660009081526002602090815260408083206001600160a01b038c1684529091529020546001600160401b03811680158015906109665750428111155b15610a0c57604082901c6001600160a01b03811615806109f6575060405163e0274e1d60e01b81526001600160a01b0382169063e0274e1d906109b5908f908f908f908f908f90600401611315565b602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f6919061136a565b15610a0a5760019650505050505050610a29565b505b50505b5080610a1a816112fc565b915050610901565b5060009150505b95945050505050565b60ff82166000908152600460205260409020546001600160a01b0316610a915760405162461bcd60e51b815260206004820152601460248201527344523a20756e6b6e6f776e20726567697374727960601b6044820152606401610413565b336000908152600160208190526040909120549060ff841682811c9091161515901515148215158114610b14573360008181526001602081815260409283902060ff891692831b871890558251918252861515908201527ff5ccd7ad3122597a385a39f9a6337dee41076036734cf1a1de45c2893a0191ac910160405180910390a25b50505050565b6000546001600160401b03600160401b8204811691600160801b90041615801590610b58575060005442600160801b9091046001600160401b031611155b610ba45760405162461bcd60e51b815260206004820152601f60248201527f44523a2063616e2774202879657429206368616e67652074696d656c6f636b006044820152606401610413565b600080546001600160c01b0319166001600160401b0383169081179091556040519081527f5cc48c8c2fbfcbb899f818c7569d966a7ebe91ead498b9234cddfc509453659b9060200160405180910390a150565b82610c0281610ebd565b60ff841660009081526002602090815260408083206001600160a01b038716845290915290205415610c6f5760405162461bcd60e51b815260206004820152601660248201527511148e8819185c1c08185b1c9958591e48185919195960521b6044820152606401610413565b60008054610c86906001600160401b031642611387565b60ff861660008181526002602090815260408083206001600160a01b038a81168086529184529382902089831b600160401b600160e01b0316871790558151908152928816918301919091528101839052919250907f4fb13278643ce6c9ced7cdc7fdb7a726ce56f62bb8e985aa634b2c4288672331906060015b60405180910390a25050505050565b6000610d1b81610ebd565b600080546001600160401b03808516600160401b026fffffffffffffffff00000000000000001983168117909355610d589281169116174261139a565b6000805467ffffffffffffffff60801b1916600160801b6001600160401b039384160217905560405190831681527ff4b7860684c929835858edd3e43644f73901d2b6e70bd71c83920fff61539bb79060200160405180910390a15050565b82610dc181610ebd565b60ff841660009081526002602090815260408083206001600160a01b0387168452909152902054610e275760405162461bcd60e51b815260206004820152601060248201526f044523a20756e6b6e6f776e20646170760841b6044820152606401610413565b60008054610e3e906001600160401b031642611387565b60ff861660008181526003602090815260408083206001600160a01b038a81168086529184529382902089831b600160401b600160e01b0316871790558151908152928816918301919091528101839052919250907fea06a73e654a8bf96d06dfbceea17dbb955d1f3e3d508d724c67c8846fa0d55290606001610d01565b60ff81166000908152600460205260409020546001600160a01b031680610f1d5760405162461bcd60e51b815260206004820152601460248201527344523a20756e6b6e6f776e20726567697374727960601b6044820152606401610413565b336001600160a01b03821614610f755760405162461bcd60e51b815260206004820152601c60248201527f44523a2073656e64657220213d207265676973747279206f776e6572000000006044820152606401610413565b5050565b803560ff81168114610f8a57600080fd5b919050565b80356001600160a01b0381168114610f8a57600080fd5b60008060408385031215610fb957600080fd5b610fc283610f79565b9150610fd060208401610f8f565b90509250929050565b60008083601f840112610feb57600080fd5b5081356001600160401b0381111561100257600080fd5b6020830191508360208260051b850101111561101d57600080fd5b9250929050565b60008060008060008060006080888a03121561103f57600080fd5b61104888610f8f565b965060208801356001600160401b038082111561106457600080fd5b6110708b838c01610fd9565b909850965060408a013591508082111561108957600080fd5b6110958b838c01610fd9565b909650945060608a01359150808211156110ae57600080fd5b506110bb8a828b01610fd9565b989b979a50959850939692959293505050565b600080604083850312156110e157600080fd5b6110ea83610f8f565b9150610fd060208401610f79565b60008060008060006080868803121561111057600080fd5b61111986610f8f565b945061112760208701610f8f565b935061113560408701610f8f565b925060608601356001600160401b038082111561115157600080fd5b818801915088601f83011261116557600080fd5b81358181111561117457600080fd5b89602082850101111561118657600080fd5b9699959850939650602001949392505050565b6000602082840312156111ab57600080fd5b6111b482610f79565b9392505050565b6000602082840312156111cd57600080fd5b6111b482610f8f565b80151581146111e457600080fd5b50565b600080604083850312156111fa57600080fd5b61120383610f79565b91506020830135611213816111d6565b809150509250929050565b60008060006060848603121561123357600080fd5b61123c84610f79565b925061124a60208501610f8f565b915061125860408501610f8f565b90509250925092565b60006020828403121561127357600080fd5b81356001600160401b03811681146111b457600080fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126112b757600080fd5b8301803591506001600160401b038211156112d157600080fd5b60200191503681900382131561101d57600080fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161130e5761130e6112e6565b5060010190565b6001600160a01b03868116825285811660208301528416604082015260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b60006020828403121561137c57600080fd5b81516111b4816111d6565b808201808211156108e0576108e06112e6565b6001600160401b038181168382160190808211156113ba576113ba6112e6565b509291505056fea26469706673582212206dd19048d2e345a6b6eb25eb4281fe0ea5c6b20a1cc26d8202f1a5aab79a828764736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _timelockPeriod (uint64): 0
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.