Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Multichain Info
No addresses found
Latest 25 from a total of 3,941 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Create Wallet | 13266335 | 1308 days ago | IN | 0 ETH | 0.0450637 | ||||
Create Wallet | 12771321 | 1385 days ago | IN | 0 ETH | 0.00819226 | ||||
Create Wallet | 12760488 | 1386 days ago | IN | 0 ETH | 0.00702188 | ||||
Create Wallet | 12457710 | 1433 days ago | IN | 0 ETH | 0.04149103 | ||||
Create Wallet | 12207981 | 1472 days ago | IN | 0 ETH | 0.0822146 | ||||
Create Wallet | 12070963 | 1493 days ago | IN | 0 ETH | 0.08664606 | ||||
Create Wallet | 12066812 | 1494 days ago | IN | 0 ETH | 0.08531294 | ||||
Create Wallet | 12057989 | 1495 days ago | IN | 0 ETH | 0.1768215 | ||||
Create Wallet | 11919071 | 1516 days ago | IN | 0 ETH | 0.10549615 | ||||
Create Wallet | 11856166 | 1526 days ago | IN | 0 ETH | 0.09324007 | ||||
Create Wallet | 11846204 | 1528 days ago | IN | 0 ETH | 0.08959138 | ||||
Create Wallet | 11829800 | 1530 days ago | IN | 0 ETH | 0.1768251 | ||||
Create Wallet | 11823555 | 1531 days ago | IN | 0 ETH | 0.1768179 | ||||
Create Wallet2 | 11796617 | 1535 days ago | IN | 0 ETH | 0.0917079 | ||||
Create Wallet2 | 11795267 | 1535 days ago | IN | 0 ETH | 0.06182088 | ||||
Create Wallet | 11795267 | 1535 days ago | IN | 0 ETH | 0.119216 | ||||
Create Wallet | 11779966 | 1538 days ago | IN | 0 ETH | 0.10464321 | ||||
Create Wallet | 11779626 | 1538 days ago | IN | 0 ETH | 0.06778157 | ||||
Create Wallet | 11779372 | 1538 days ago | IN | 0 ETH | 0.08491563 | ||||
Create Wallet | 11776160 | 1538 days ago | IN | 0 ETH | 0.1178728 | ||||
Create Wallet | 11776086 | 1538 days ago | IN | 0 ETH | 0.08870184 | ||||
Create Wallet | 11775377 | 1538 days ago | IN | 0 ETH | 0.08192562 | ||||
Create Wallet | 11774746 | 1539 days ago | IN | 0 ETH | 0.0695492 | ||||
Create Wallet | 11774649 | 1539 days ago | IN | 0 ETH | 0.0589393 | ||||
Create Wallet | 11774634 | 1539 days ago | IN | 0 ETH | 0.0601139 |
Latest 25 internal transactions (View All)
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
WalletFactory
Compiler Version
v0.7.0+commit.9e61f92b
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-11-12 */ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.7.0; pragma experimental ABIEncoderV2; // File: contracts/lib/Ownable.sol // Copyright 2017 Loopring Technology Limited. /// @title Ownable /// @author Brecht Devos - <[email protected]> /// @dev The Ownable contract has an owner address, and provides basic /// authorization control functions, this simplifies the implementation of /// "user permissions". contract Ownable { address public owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /// @dev The Ownable constructor sets the original `owner` of the contract /// to the sender. constructor() { owner = msg.sender; } /// @dev Throws if called by any account other than the owner. modifier onlyOwner() { require(msg.sender == owner, "UNAUTHORIZED"); _; } /// @dev Allows the current owner to transfer control of the contract to a /// new owner. /// @param newOwner The address to transfer ownership to. function transferOwnership( address newOwner ) public virtual onlyOwner { require(newOwner != address(0), "ZERO_ADDRESS"); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(owner, address(0)); owner = address(0); } } // File: contracts/iface/Wallet.sol // Copyright 2017 Loopring Technology Limited. /// @title Wallet /// @dev Base contract for smart wallets. /// Sub-contracts must NOT use non-default constructor to initialize /// wallet states, instead, `init` shall be used. This is to enable /// proxies to be deployed in front of the real wallet contract for /// saving gas. /// /// @author Daniel Wang - <[email protected]> interface Wallet { function version() external pure returns (string memory); function owner() external view returns (address); /// @dev Set a new owner. function setOwner(address newOwner) external; /// @dev Adds a new module. The `init` method of the module /// will be called with `address(this)` as the parameter. /// This method must throw if the module has already been added. /// @param _module The module's address. function addModule(address _module) external; /// @dev Removes an existing module. This method must throw if the module /// has NOT been added or the module is the wallet's only module. /// @param _module The module's address. function removeModule(address _module) external; /// @dev Checks if a module has been added to this wallet. /// @param _module The module to check. /// @return True if the module exists; False otherwise. function hasModule(address _module) external view returns (bool); /// @dev Binds a method from the given module to this /// wallet so the method can be invoked using this wallet's default /// function. /// Note that this method must throw when the given module has /// not been added to this wallet. /// @param _method The method's 4-byte selector. /// @param _module The module's address. Use address(0) to unbind the method. function bindMethod(bytes4 _method, address _module) external; /// @dev Returns the module the given method has been bound to. /// @param _method The method's 4-byte selector. /// @return _module The address of the bound module. If no binding exists, /// returns address(0) instead. function boundMethodModule(bytes4 _method) external view returns (address _module); /// @dev Performs generic transactions. Any module that has been added to this /// wallet can use this method to transact on any third-party contract with /// msg.sender as this wallet itself. /// /// Note: 1) this method must ONLY allow invocations from a module that has /// been added to this wallet. The wallet owner shall NOT be permitted /// to call this method directly. 2) Reentrancy inside this function should /// NOT cause any problems. /// /// @param mode The transaction mode, 1 for CALL, 2 for DELEGATECALL. /// @param to The desitination address. /// @param value The amount of Ether to transfer. /// @param data The data to send over using `to.call{value: value}(data)` /// @return returnData The transaction's return value. function transact( uint8 mode, address to, uint value, bytes calldata data ) external returns (bytes memory returnData); } // File: contracts/iface/Module.sol // Copyright 2017 Loopring Technology Limited. /// @title Module /// @dev Base contract for all smart wallet modules. /// /// @author Daniel Wang - <[email protected]> interface Module { /// @dev Activates the module for the given wallet (msg.sender) after the module is added. /// Warning: this method shall ONLY be callable by a wallet. function activate() external; /// @dev Deactivates the module for the given wallet (msg.sender) before the module is removed. /// Warning: this method shall ONLY be callable by a wallet. function deactivate() external; } // File: contracts/lib/ERC20.sol // Copyright 2017 Loopring Technology Limited. /// @title ERC20 Token Interface /// @dev see https://github.com/ethereum/EIPs/issues/20 /// @author Daniel Wang - <[email protected]> abstract contract ERC20 { function totalSupply() public view virtual returns (uint); function balanceOf( address who ) public view virtual returns (uint); function allowance( address owner, address spender ) public view virtual returns (uint); function transfer( address to, uint value ) public virtual returns (bool); function transferFrom( address from, address to, uint value ) public virtual returns (bool); function approve( address spender, uint value ) public virtual returns (bool); } // File: contracts/lib/ReentrancyGuard.sol // Copyright 2017 Loopring Technology Limited. /// @title ReentrancyGuard /// @author Brecht Devos - <[email protected]> /// @dev Exposes a modifier that guards a function against reentrancy /// Changing the value of the same storage value multiple times in a transaction /// is cheap (starting from Istanbul) so there is no need to minimize /// the number of times the value is changed contract ReentrancyGuard { //The default value must be 0 in order to work behind a proxy. uint private _guardValue; modifier nonReentrant() { require(_guardValue == 0, "REENTRANCY"); _guardValue = 1; _; _guardValue = 0; } } // File: contracts/iface/ModuleRegistry.sol // Copyright 2017 Loopring Technology Limited. /// @title ModuleRegistry /// @dev A registry for modules. /// /// @author Daniel Wang - <[email protected]> interface ModuleRegistry { /// @dev Registers and enables a new module. function registerModule(address module) external; /// @dev Disables a module function disableModule(address module) external; /// @dev Returns true if the module is registered and enabled. function isModuleEnabled(address module) external view returns (bool); /// @dev Returns the list of enabled modules. function enabledModules() external view returns (address[] memory _modules); /// @dev Returns the number of enbaled modules. function numOfEnabledModules() external view returns (uint); /// @dev Returns true if the module is ever registered. function isModuleRegistered(address module) external view returns (bool); } // File: contracts/base/Controller.sol // Copyright 2017 Loopring Technology Limited. /// @title Controller /// /// @author Daniel Wang - <[email protected]> abstract contract Controller { function moduleRegistry() external view virtual returns (ModuleRegistry); function walletFactory() external view virtual returns (address); } // File: contracts/base/BaseWallet.sol // Copyright 2017 Loopring Technology Limited. /// @title BaseWallet /// @dev This contract provides basic implementation for a Wallet. /// /// @author Daniel Wang - <[email protected]> abstract contract BaseWallet is ReentrancyGuard, Wallet { // WARNING: do not delete wallet state data to make this implementation // compatible with early versions. // // ----- DATA LAYOUT BEGINS ----- address internal _owner; mapping (address => bool) private modules; Controller public controller; mapping (bytes4 => address) internal methodToModule; // ----- DATA LAYOUT ENDS ----- event OwnerChanged (address newOwner); event ControllerChanged (address newController); event ModuleAdded (address module); event ModuleRemoved (address module); event MethodBound (bytes4 method, address module); event WalletSetup (address owner); modifier onlyFromModule { require(modules[msg.sender], "MODULE_UNAUTHORIZED"); _; } modifier onlyFromFactory { require( msg.sender == controller.walletFactory(), "UNAUTHORIZED" ); _; } /// @dev We need to make sure the Factory address cannot be changed without wallet owner's /// explicit authorization. modifier onlyFromFactoryOrModule { require( modules[msg.sender] || msg.sender == controller.walletFactory(), "UNAUTHORIZED" ); _; } /// @dev Set up this wallet by assigning an original owner /// /// Note that calling this method more than once will throw. /// /// @param _initialOwner The owner of this wallet, must not be address(0). function initOwner( address _initialOwner ) external onlyFromFactory { require(controller != Controller(0), "NO_CONTROLLER"); require(_owner == address(0), "INITIALIZED_ALREADY"); require(_initialOwner != address(0), "ZERO_ADDRESS"); _owner = _initialOwner; emit WalletSetup(_initialOwner); } /// @dev Set up this wallet by assigning a controller and initial modules. /// /// Note that calling this method more than once will throw. /// And this method must be invoked before owner is initialized /// /// @param _controller The Controller instance. /// @param _modules The initial modules. function init( Controller _controller, address[] calldata _modules ) external { require( _owner == address(0) && controller == Controller(0) && _controller != Controller(0), "CONTROLLER_INIT_FAILED" ); controller = _controller; ModuleRegistry moduleRegistry = controller.moduleRegistry(); for (uint i = 0; i < _modules.length; i++) { _addModule(_modules[i], moduleRegistry); } } function owner() override public view returns (address) { return _owner; } function setOwner(address newOwner) external override onlyFromModule { require(newOwner != address(0), "ZERO_ADDRESS"); require(newOwner != address(this), "PROHIBITED"); require(newOwner != _owner, "SAME_ADDRESS"); _owner = newOwner; emit OwnerChanged(newOwner); } function setController(Controller newController) external onlyFromModule { require(newController != controller, "SAME_CONTROLLER"); require(newController != Controller(0), "INVALID_CONTROLLER"); controller = newController; emit ControllerChanged(address(newController)); } function addModule(address _module) external override onlyFromFactoryOrModule { _addModule(_module, controller.moduleRegistry()); } function removeModule(address _module) external override onlyFromModule { // Allow deactivate to fail to make sure the module can be removed require(modules[_module], "MODULE_NOT_EXISTS"); try Module(_module).deactivate() {} catch {} delete modules[_module]; emit ModuleRemoved(_module); } function hasModule(address _module) public view override returns (bool) { return modules[_module]; } function bindMethod(bytes4 _method, address _module) external override onlyFromModule { require(_method != bytes4(0), "BAD_METHOD"); if (_module != address(0)) { require(modules[_module], "MODULE_UNAUTHORIZED"); } methodToModule[_method] = _module; emit MethodBound(_method, _module); } function boundMethodModule(bytes4 _method) public view override returns (address) { return methodToModule[_method]; } function transact( uint8 mode, address to, uint value, bytes calldata data ) external override onlyFromFactoryOrModule returns (bytes memory returnData) { bool success; (success, returnData) = _call(mode, to, value, data); if (!success) { assembly { returndatacopy(0, 0, returndatasize()) revert(0, returndatasize()) } } } receive() external payable { } /// @dev This default function can receive Ether or perform queries to modules /// using bound methods. fallback() external payable { address module = methodToModule[msg.sig]; require(modules[module], "MODULE_UNAUTHORIZED"); (bool success, bytes memory returnData) = module.call{value: msg.value}(msg.data); assembly { switch success case 0 { revert(add(returnData, 32), mload(returnData)) } default { return(add(returnData, 32), mload(returnData)) } } } function _addModule(address _module, ModuleRegistry moduleRegistry) internal { require(_module != address(0), "NULL_MODULE"); require(modules[_module] == false, "MODULE_EXISTS"); require( moduleRegistry.isModuleEnabled(_module), "INVALID_MODULE" ); modules[_module] = true; emit ModuleAdded(_module); Module(_module).activate(); } function _call( uint8 mode, address target, uint value, bytes calldata data ) private returns ( bool success, bytes memory returnData ) { if (mode == 1) { // solium-disable-next-line security/no-call-value (success, returnData) = target.call{value: value}(data); } else if (mode == 2) { // solium-disable-next-line security/no-call-value (success, returnData) = target.delegatecall(data); } else if (mode == 3) { require(value == 0, "INVALID_VALUE"); // solium-disable-next-line security/no-call-value (success, returnData) = target.staticcall(data); } else { revert("UNSUPPORTED_MODE"); } } } // File: contracts/lib/AddressSet.sol // Copyright 2017 Loopring Technology Limited. /// @title AddressSet /// @author Daniel Wang - <[email protected]> contract AddressSet { struct Set { address[] addresses; mapping (address => uint) positions; uint count; } mapping (bytes32 => Set) private sets; function addAddressToSet( bytes32 key, address addr, bool maintainList ) internal { Set storage set = sets[key]; require(set.positions[addr] == 0, "ALREADY_IN_SET"); if (maintainList) { require(set.addresses.length == set.count, "PREVIOUSLY_NOT_MAINTAILED"); set.addresses.push(addr); } else { require(set.addresses.length == 0, "MUST_MAINTAIN"); } set.count += 1; set.positions[addr] = set.count; } function removeAddressFromSet( bytes32 key, address addr ) internal { Set storage set = sets[key]; uint pos = set.positions[addr]; require(pos != 0, "NOT_IN_SET"); delete set.positions[addr]; set.count -= 1; if (set.addresses.length > 0) { address lastAddr = set.addresses[set.count]; if (lastAddr != addr) { set.addresses[pos - 1] = lastAddr; set.positions[lastAddr] = pos; } set.addresses.pop(); } } function removeSet(bytes32 key) internal { delete sets[key]; } function isAddressInSet( bytes32 key, address addr ) internal view returns (bool) { return sets[key].positions[addr] != 0; } function numAddressesInSet(bytes32 key) internal view returns (uint) { Set storage set = sets[key]; return set.count; } function addressesInSet(bytes32 key) internal view returns (address[] memory) { Set storage set = sets[key]; require(set.count == set.addresses.length, "NOT_MAINTAINED"); return sets[key].addresses; } } // File: contracts/lib/Claimable.sol // Copyright 2017 Loopring Technology Limited. /// @title Claimable /// @author Brecht Devos - <[email protected]> /// @dev Extension for the Ownable contract, where the ownership needs /// to be claimed. This allows the new owner to accept the transfer. contract Claimable is Ownable { address public pendingOwner; /// @dev Modifier throws if called by any account other than the pendingOwner. modifier onlyPendingOwner() { require(msg.sender == pendingOwner, "UNAUTHORIZED"); _; } /// @dev Allows the current owner to set the pendingOwner address. /// @param newOwner The address to transfer ownership to. function transferOwnership( address newOwner ) public override onlyOwner { require(newOwner != address(0) && newOwner != owner, "INVALID_ADDRESS"); pendingOwner = newOwner; } /// @dev Allows the pendingOwner address to finalize the transfer. function claimOwnership() public onlyPendingOwner { emit OwnershipTransferred(owner, pendingOwner); owner = pendingOwner; pendingOwner = address(0); } } // File: contracts/lib/OwnerManagable.sol // Copyright 2017 Loopring Technology Limited. contract OwnerManagable is Claimable, AddressSet { bytes32 internal constant MANAGER = keccak256("__MANAGED__"); event ManagerAdded (address indexed manager); event ManagerRemoved(address indexed manager); modifier onlyManager { require(isManager(msg.sender), "NOT_MANAGER"); _; } modifier onlyOwnerOrManager { require(msg.sender == owner || isManager(msg.sender), "NOT_OWNER_OR_MANAGER"); _; } constructor() Claimable() {} /// @dev Gets the managers. /// @return The list of managers. function managers() public view returns (address[] memory) { return addressesInSet(MANAGER); } /// @dev Gets the number of managers. /// @return The numer of managers. function numManagers() public view returns (uint) { return numAddressesInSet(MANAGER); } /// @dev Checks if an address is a manger. /// @param addr The address to check. /// @return True if the address is a manager, False otherwise. function isManager(address addr) public view returns (bool) { return isAddressInSet(MANAGER, addr); } /// @dev Adds a new manager. /// @param manager The new address to add. function addManager(address manager) public onlyOwner { addManagerInternal(manager); } /// @dev Removes a manager. /// @param manager The manager to remove. function removeManager(address manager) public onlyOwner { removeAddressFromSet(MANAGER, manager); emit ManagerRemoved(manager); } function addManagerInternal(address manager) internal { addAddressToSet(MANAGER, manager, true); emit ManagerAdded(manager); } } // File: contracts/lib/AddressUtil.sol // Copyright 2017 Loopring Technology Limited. /// @title Utility Functions for addresses /// @author Daniel Wang - <[email protected]> /// @author Brecht Devos - <[email protected]> library AddressUtil { using AddressUtil for *; function isContract( address addr ) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(addr) } return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470); } function toPayable( address addr ) internal pure returns (address payable) { return payable(addr); } // Works like address.send but with a customizable gas limit // Make sure your code is safe for reentrancy when using this function! function sendETH( address to, uint amount, uint gasLimit ) internal returns (bool success) { if (amount == 0) { return true; } address payable recipient = to.toPayable(); /* solium-disable-next-line */ (success,) = recipient.call{value: amount, gas: gasLimit}(""); } // Works like address.transfer but with a customizable gas limit // Make sure your code is safe for reentrancy when using this function! function sendETHAndVerify( address to, uint amount, uint gasLimit ) internal returns (bool success) { success = to.sendETH(amount, gasLimit); require(success, "TRANSFER_FAILURE"); } // Works like call but is slightly more efficient when data // needs to be copied from memory to do the call. function fastCall( address to, uint gasLimit, uint value, bytes memory data ) internal returns (bool success, bytes memory returnData) { if (to != address(0)) { assembly { // Do the call success := call(gasLimit, to, value, add(data, 32), mload(data), 0, 0) // Copy the return data let size := returndatasize() returnData := mload(0x40) mstore(returnData, size) returndatacopy(add(returnData, 32), 0, size) // Update free memory pointer mstore(0x40, add(returnData, add(32, size))) } } } // Like fastCall, but throws when the call is unsuccessful. function fastCallAndVerify( address to, uint gasLimit, uint value, bytes memory data ) internal returns (bytes memory returnData) { bool success; (success, returnData) = fastCall(to, gasLimit, value, data); if (!success) { assembly { revert(add(returnData, 32), mload(returnData)) } } } } // File: contracts/lib/EIP712.sol // Copyright 2017 Loopring Technology Limited. library EIP712 { struct Domain { string name; string version; address verifyingContract; } bytes32 constant internal EIP712_DOMAIN_TYPEHASH = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); string constant internal EIP191_HEADER = "\x19\x01"; function hash(Domain memory domain) internal pure returns (bytes32) { uint _chainid; assembly { _chainid := chainid() } return keccak256( abi.encode( EIP712_DOMAIN_TYPEHASH, keccak256(bytes(domain.name)), keccak256(bytes(domain.version)), _chainid, domain.verifyingContract ) ); } function hashPacked( bytes32 domainSeperator, bytes memory encodedData ) internal pure returns (bytes32) { return keccak256( abi.encodePacked(EIP191_HEADER, domainSeperator, keccak256(encodedData)) ); } } // File: contracts/thirdparty/Create2.sol // Taken from: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/970f687f04d20e01138a3e8ccf9278b1d4b3997b/contracts/utils/Create2.sol /** * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer. * `CREATE2` can be used to compute in advance the address where a smart * contract will be deployed, which allows for interesting new mechanisms known * as 'counterfactual interactions'. * * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more * information. */ library Create2 { /** * @dev Deploys a contract using `CREATE2`. The address where the contract * will be deployed can be known in advance via {computeAddress}. Note that * a contract cannot be deployed twice using the same salt. */ function deploy(bytes32 salt, bytes memory bytecode) internal returns (address payable) { address payable addr; // solhint-disable-next-line no-inline-assembly assembly { addr := create2(0, add(bytecode, 0x20), mload(bytecode), salt) } require(addr != address(0), "CREATE2_FAILED"); return addr; } /** * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the `bytecode` * or `salt` will result in a new destination address. */ function computeAddress(bytes32 salt, bytes memory bytecode) internal view returns (address) { return computeAddress(salt, bytecode, address(this)); } /** * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}. */ function computeAddress(bytes32 salt, bytes memory bytecodeHash, address deployer) internal pure returns (address) { bytes32 bytecodeHashHash = keccak256(bytecodeHash); bytes32 _data = keccak256( abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHashHash) ); return address(bytes20(_data << 96)); } } // File: contracts/thirdparty/strings.sol /* * @title String & slice utility library for Solidity contracts. * @author Nick Johnson <[email protected]> * * @dev Functionality in this library is largely implemented using an * abstraction called a 'slice'. A slice represents a part of a string - * anything from the entire string to a single character, or even no * characters at all (a 0-length slice). Since a slice only has to specify * an offset and a length, copying and manipulating slices is a lot less * expensive than copying and manipulating the strings they reference. * * To further reduce gas costs, most functions on slice that need to return * a slice modify the original one instead of allocating a new one; for * instance, `s.split(".")` will return the text up to the first '.', * modifying s to only contain the remainder of the string after the '.'. * In situations where you do not want to modify the original slice, you * can make a copy first with `.copy()`, for example: * `s.copy().split(".")`. Try and avoid using this idiom in loops; since * Solidity has no memory management, it will result in allocating many * short-lived slices that are later discarded. * * Functions that return two slices come in two versions: a non-allocating * version that takes the second slice as an argument, modifying it in * place, and an allocating version that allocates and returns the second * slice; see `nextRune` for example. * * Functions that have to copy string data will return strings rather than * slices; these can be cast back to slices for further processing if * required. * * For convenience, some functions are provided with non-modifying * variants that create a new slice and return both; for instance, * `s.splitNew('.')` leaves s unmodified, and returns two values * corresponding to the left and right parts of the string. */ /* solium-disable */ library strings { struct slice { uint _len; uint _ptr; } function memcpy(uint dest, uint src, uint len) private pure { // Copy word-length chunks while possible for(; len >= 32; len -= 32) { assembly { mstore(dest, mload(src)) } dest += 32; src += 32; } // Copy remaining bytes uint mask = 256 ** (32 - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) let destpart := and(mload(dest), mask) mstore(dest, or(destpart, srcpart)) } } /* * @dev Returns a slice containing the entire string. * @param self The string to make a slice from. * @return A newly allocated slice containing the entire string. */ function toSlice(string memory self) internal pure returns (slice memory) { uint ptr; assembly { ptr := add(self, 0x20) } return slice(bytes(self).length, ptr); } /* * @dev Returns the length of a null-terminated bytes32 string. * @param self The value to find the length of. * @return The length of the string, from 0 to 32. */ function len(bytes32 self) internal pure returns (uint) { uint ret; if (self == 0) return 0; if (uint256(self) & 0xffffffffffffffffffffffffffffffff == 0) { ret += 16; self = bytes32(uint(self) / 0x100000000000000000000000000000000); } if (uint256(self) & 0xffffffffffffffff == 0) { ret += 8; self = bytes32(uint(self) / 0x10000000000000000); } if (uint256(self) & 0xffffffff == 0) { ret += 4; self = bytes32(uint(self) / 0x100000000); } if (uint256(self) & 0xffff == 0) { ret += 2; self = bytes32(uint(self) / 0x10000); } if (uint256(self) & 0xff == 0) { ret += 1; } return 32 - ret; } /* * @dev Returns a slice containing the entire bytes32, interpreted as a * null-terminated utf-8 string. * @param self The bytes32 value to convert to a slice. * @return A new slice containing the value of the input argument up to the * first null. */ function toSliceB32(bytes32 self) internal pure returns (slice memory ret) { // Allocate space for `self` in memory, copy it there, and point ret at it assembly { let ptr := mload(0x40) mstore(0x40, add(ptr, 0x20)) mstore(ptr, self) mstore(add(ret, 0x20), ptr) } ret._len = len(self); } /* * @dev Returns a new slice containing the same data as the current slice. * @param self The slice to copy. * @return A new slice containing the same data as `self`. */ function copy(slice memory self) internal pure returns (slice memory) { return slice(self._len, self._ptr); } /* * @dev Copies a slice to a new string. * @param self The slice to copy. * @return A newly allocated string containing the slice's text. */ function toString(slice memory self) internal pure returns (string memory) { string memory ret = new string(self._len); uint retptr; assembly { retptr := add(ret, 32) } memcpy(retptr, self._ptr, self._len); return ret; } /* * @dev Returns the length in runes of the slice. Note that this operation * takes time proportional to the length of the slice; avoid using it * in loops, and call `slice.empty()` if you only need to kblock.timestamp whether * the slice is empty or not. * @param self The slice to operate on. * @return The length of the slice in runes. */ function len(slice memory self) internal pure returns (uint l) { // Starting at ptr-31 means the LSB will be the byte we care about uint ptr = self._ptr - 31; uint end = ptr + self._len; for (l = 0; ptr < end; l++) { uint8 b; assembly { b := and(mload(ptr), 0xFF) } if (b < 0x80) { ptr += 1; } else if(b < 0xE0) { ptr += 2; } else if(b < 0xF0) { ptr += 3; } else if(b < 0xF8) { ptr += 4; } else if(b < 0xFC) { ptr += 5; } else { ptr += 6; } } } /* * @dev Returns true if the slice is empty (has a length of 0). * @param self The slice to operate on. * @return True if the slice is empty, False otherwise. */ function empty(slice memory self) internal pure returns (bool) { return self._len == 0; } /* * @dev Returns a positive number if `other` comes lexicographically after * `self`, a negative number if it comes before, or zero if the * contents of the two slices are equal. Comparison is done per-rune, * on unicode codepoints. * @param self The first slice to compare. * @param other The second slice to compare. * @return The result of the comparison. */ function compare(slice memory self, slice memory other) internal pure returns (int) { uint shortest = self._len; if (other._len < self._len) shortest = other._len; uint selfptr = self._ptr; uint otherptr = other._ptr; for (uint idx = 0; idx < shortest; idx += 32) { uint a; uint b; assembly { a := mload(selfptr) b := mload(otherptr) } if (a != b) { // Mask out irrelevant bytes and check again uint256 mask = uint256(-1); // 0xffff... if(shortest < 32) { mask = ~(2 ** (8 * (32 - shortest + idx)) - 1); } uint256 diff = (a & mask) - (b & mask); if (diff != 0) return int(diff); } selfptr += 32; otherptr += 32; } return int(self._len) - int(other._len); } /* * @dev Returns true if the two slices contain the same text. * @param self The first slice to compare. * @param self The second slice to compare. * @return True if the slices are equal, false otherwise. */ function equals(slice memory self, slice memory other) internal pure returns (bool) { return compare(self, other) == 0; } /* * @dev Extracts the first rune in the slice into `rune`, advancing the * slice to point to the next rune and returning `self`. * @param self The slice to operate on. * @param rune The slice that will contain the first rune. * @return `rune`. */ function nextRune(slice memory self, slice memory rune) internal pure returns (slice memory) { rune._ptr = self._ptr; if (self._len == 0) { rune._len = 0; return rune; } uint l; uint b; // Load the first byte of the rune into the LSBs of b assembly { b := and(mload(sub(mload(add(self, 32)), 31)), 0xFF) } if (b < 0x80) { l = 1; } else if(b < 0xE0) { l = 2; } else if(b < 0xF0) { l = 3; } else { l = 4; } // Check for truncated codepoints if (l > self._len) { rune._len = self._len; self._ptr += self._len; self._len = 0; return rune; } self._ptr += l; self._len -= l; rune._len = l; return rune; } /* * @dev Returns the first rune in the slice, advancing the slice to point * to the next rune. * @param self The slice to operate on. * @return A slice containing only the first rune from `self`. */ function nextRune(slice memory self) internal pure returns (slice memory ret) { nextRune(self, ret); } /* * @dev Returns the number of the first codepoint in the slice. * @param self The slice to operate on. * @return The number of the first codepoint in the slice. */ function ord(slice memory self) internal pure returns (uint ret) { if (self._len == 0) { return 0; } uint word; uint length; uint divisor = 2 ** 248; // Load the rune into the MSBs of b assembly { word:= mload(mload(add(self, 32))) } uint b = word / divisor; if (b < 0x80) { ret = b; length = 1; } else if(b < 0xE0) { ret = b & 0x1F; length = 2; } else if(b < 0xF0) { ret = b & 0x0F; length = 3; } else { ret = b & 0x07; length = 4; } // Check for truncated codepoints if (length > self._len) { return 0; } for (uint i = 1; i < length; i++) { divisor = divisor / 256; b = (word / divisor) & 0xFF; if (b & 0xC0 != 0x80) { // Invalid UTF-8 sequence return 0; } ret = (ret * 64) | (b & 0x3F); } return ret; } /* * @dev Returns the keccak-256 hash of the slice. * @param self The slice to hash. * @return The hash of the slice. */ function keccak(slice memory self) internal pure returns (bytes32 ret) { assembly { ret := keccak256(mload(add(self, 32)), mload(self)) } } /* * @dev Returns true if `self` starts with `needle`. * @param self The slice to operate on. * @param needle The slice to search for. * @return True if the slice starts with the provided text, false otherwise. */ function startsWith(slice memory self, slice memory needle) internal pure returns (bool) { if (self._len < needle._len) { return false; } if (self._ptr == needle._ptr) { return true; } bool equal; assembly { let length := mload(needle) let selfptr := mload(add(self, 0x20)) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } return equal; } /* * @dev If `self` starts with `needle`, `needle` is removed from the * beginning of `self`. Otherwise, `self` is unmodified. * @param self The slice to operate on. * @param needle The slice to search for. * @return `self` */ function beyond(slice memory self, slice memory needle) internal pure returns (slice memory) { if (self._len < needle._len) { return self; } bool equal = true; if (self._ptr != needle._ptr) { assembly { let length := mload(needle) let selfptr := mload(add(self, 0x20)) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } } if (equal) { self._len -= needle._len; self._ptr += needle._len; } return self; } /* * @dev Returns true if the slice ends with `needle`. * @param self The slice to operate on. * @param needle The slice to search for. * @return True if the slice starts with the provided text, false otherwise. */ function endsWith(slice memory self, slice memory needle) internal pure returns (bool) { if (self._len < needle._len) { return false; } uint selfptr = self._ptr + self._len - needle._len; if (selfptr == needle._ptr) { return true; } bool equal; assembly { let length := mload(needle) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } return equal; } /* * @dev If `self` ends with `needle`, `needle` is removed from the * end of `self`. Otherwise, `self` is unmodified. * @param self The slice to operate on. * @param needle The slice to search for. * @return `self` */ function until(slice memory self, slice memory needle) internal pure returns (slice memory) { if (self._len < needle._len) { return self; } uint selfptr = self._ptr + self._len - needle._len; bool equal = true; if (selfptr != needle._ptr) { assembly { let length := mload(needle) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } } if (equal) { self._len -= needle._len; } return self; } // Returns the memory address of the first byte of the first occurrence of // `needle` in `self`, or the first byte after `self` if not found. function findPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) { uint ptr = selfptr; uint idx; if (needlelen <= selflen) { if (needlelen <= 32) { bytes32 mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1)); bytes32 needledata; assembly { needledata := and(mload(needleptr), mask) } uint end = selfptr + selflen - needlelen; bytes32 ptrdata; assembly { ptrdata := and(mload(ptr), mask) } while (ptrdata != needledata) { if (ptr >= end) return selfptr + selflen; ptr++; assembly { ptrdata := and(mload(ptr), mask) } } return ptr; } else { // For long needles, use hashing bytes32 hash; assembly { hash := keccak256(needleptr, needlelen) } for (idx = 0; idx <= selflen - needlelen; idx++) { bytes32 testHash; assembly { testHash := keccak256(ptr, needlelen) } if (hash == testHash) return ptr; ptr += 1; } } } return selfptr + selflen; } // Returns the memory address of the first byte after the last occurrence of // `needle` in `self`, or the address of `self` if not found. function rfindPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) { uint ptr; if (needlelen <= selflen) { if (needlelen <= 32) { bytes32 mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1)); bytes32 needledata; assembly { needledata := and(mload(needleptr), mask) } ptr = selfptr + selflen - needlelen; bytes32 ptrdata; assembly { ptrdata := and(mload(ptr), mask) } while (ptrdata != needledata) { if (ptr <= selfptr) return selfptr; ptr--; assembly { ptrdata := and(mload(ptr), mask) } } return ptr + needlelen; } else { // For long needles, use hashing bytes32 hash; assembly { hash := keccak256(needleptr, needlelen) } ptr = selfptr + (selflen - needlelen); while (ptr >= selfptr) { bytes32 testHash; assembly { testHash := keccak256(ptr, needlelen) } if (hash == testHash) return ptr + needlelen; ptr -= 1; } } } return selfptr; } /* * @dev Modifies `self` to contain everything from the first occurrence of * `needle` to the end of the slice. `self` is set to the empty slice * if `needle` is not found. * @param self The slice to search and modify. * @param needle The text to search for. * @return `self`. */ function find(slice memory self, slice memory needle) internal pure returns (slice memory) { uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr); self._len -= ptr - self._ptr; self._ptr = ptr; return self; } /* * @dev Modifies `self` to contain the part of the string from the start of * `self` to the end of the first occurrence of `needle`. If `needle` * is not found, `self` is set to the empty slice. * @param self The slice to search and modify. * @param needle The text to search for. * @return `self`. */ function rfind(slice memory self, slice memory needle) internal pure returns (slice memory) { uint ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr); self._len = ptr - self._ptr; return self; } /* * @dev Splits the slice, setting `self` to everything after the first * occurrence of `needle`, and `token` to everything before it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and `token` is set to the entirety of `self`. * @param self The slice to split. * @param needle The text to search for in `self`. * @param token An output parameter to which the first token is written. * @return `token`. */ function split(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) { uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr); token._ptr = self._ptr; token._len = ptr - self._ptr; if (ptr == self._ptr + self._len) { // Not found self._len = 0; } else { self._len -= token._len + needle._len; self._ptr = ptr + needle._len; } return token; } /* * @dev Splits the slice, setting `self` to everything after the first * occurrence of `needle`, and returning everything before it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and the entirety of `self` is returned. * @param self The slice to split. * @param needle The text to search for in `self`. * @return The part of `self` up to the first occurrence of `delim`. */ function split(slice memory self, slice memory needle) internal pure returns (slice memory token) { split(self, needle, token); } /* * @dev Splits the slice, setting `self` to everything before the last * occurrence of `needle`, and `token` to everything after it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and `token` is set to the entirety of `self`. * @param self The slice to split. * @param needle The text to search for in `self`. * @param token An output parameter to which the first token is written. * @return `token`. */ function rsplit(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) { uint ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr); token._ptr = ptr; token._len = self._len - (ptr - self._ptr); if (ptr == self._ptr) { // Not found self._len = 0; } else { self._len -= token._len + needle._len; } return token; } /* * @dev Splits the slice, setting `self` to everything before the last * occurrence of `needle`, and returning everything after it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and the entirety of `self` is returned. * @param self The slice to split. * @param needle The text to search for in `self`. * @return The part of `self` after the last occurrence of `delim`. */ function rsplit(slice memory self, slice memory needle) internal pure returns (slice memory token) { rsplit(self, needle, token); } /* * @dev Counts the number of nonoverlapping occurrences of `needle` in `self`. * @param self The slice to search. * @param needle The text to search for in `self`. * @return The number of occurrences of `needle` found in `self`. */ function count(slice memory self, slice memory needle) internal pure returns (uint cnt) { uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr) + needle._len; while (ptr <= self._ptr + self._len) { cnt++; ptr = findPtr(self._len - (ptr - self._ptr), ptr, needle._len, needle._ptr) + needle._len; } } /* * @dev Returns True if `self` contains `needle`. * @param self The slice to search. * @param needle The text to search for in `self`. * @return True if `needle` is found in `self`, false otherwise. */ function contains(slice memory self, slice memory needle) internal pure returns (bool) { return rfindPtr(self._len, self._ptr, needle._len, needle._ptr) != self._ptr; } /* * @dev Returns a newly allocated string containing the concatenation of * `self` and `other`. * @param self The first slice to concatenate. * @param other The second slice to concatenate. * @return The concatenation of the two strings. */ function concat(slice memory self, slice memory other) internal pure returns (string memory) { string memory ret = new string(self._len + other._len); uint retptr; assembly { retptr := add(ret, 32) } memcpy(retptr, self._ptr, self._len); memcpy(retptr + self._len, other._ptr, other._len); return ret; } /* * @dev Joins an array of slices, using `self` as a delimiter, returning a * newly allocated string. * @param self The delimiter to use. * @param parts A list of slices to join. * @return A newly allocated string containing all the slices in `parts`, * joined with `self`. */ function join(slice memory self, slice[] memory parts) internal pure returns (string memory) { if (parts.length == 0) return ""; uint length = self._len * (parts.length - 1); for(uint i = 0; i < parts.length; i++) length += parts[i]._len; string memory ret = new string(length); uint retptr; assembly { retptr := add(ret, 32) } for(uint i = 0; i < parts.length; i++) { memcpy(retptr, parts[i]._ptr, parts[i]._len); retptr += parts[i]._len; if (i < parts.length - 1) { memcpy(retptr, self._ptr, self._len); retptr += self._len; } } return ret; } } // File: contracts/thirdparty/ens/ENS.sol // Taken from Argent's code base - https://github.com/argentlabs/argent-contracts/blob/develop/contracts/ens/ENS.sol // with few modifications. /** * ENS Registry interface. */ interface ENSRegistry { // Logged when the owner of a node assigns a new owner to a subnode. event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner); // Logged when the owner of a node transfers ownership to a new account. event Transfer(bytes32 indexed node, address owner); // Logged when the resolver for a node changes. event NewResolver(bytes32 indexed node, address resolver); // Logged when the TTL of a node changes event NewTTL(bytes32 indexed node, uint64 ttl); function setSubnodeOwner(bytes32 node, bytes32 label, address owner) external; function setResolver(bytes32 node, address resolver) external; function setOwner(bytes32 node, address owner) external; function setTTL(bytes32 node, uint64 ttl) external; function owner(bytes32 node) external view returns (address); function resolver(bytes32 node) external view returns (address); function ttl(bytes32 node) external view returns (uint64); } /** * ENS Resolver interface. */ abstract contract ENSResolver { function addr(bytes32 _node) public view virtual returns (address); function setAddr(bytes32 _node, address _addr) public virtual; function name(bytes32 _node) public view virtual returns (string memory); function setName(bytes32 _node, string memory _name) public virtual; } /** * ENS Reverse Registrar interface. */ abstract contract ENSReverseRegistrar { function claim(address _owner) public virtual returns (bytes32 _node); function claimWithResolver(address _owner, address _resolver) public virtual returns (bytes32); function setName(string memory _name) public virtual returns (bytes32); function node(address _addr) public view virtual returns (bytes32); } // File: contracts/thirdparty/ens/ENSConsumer.sol // Taken from Argent's code base - https://github.com/argentlabs/argent-contracts/blob/develop/contracts/ens/ENSConsumer.sol // with few modifications. /** * @title ENSConsumer * @dev Helper contract to resolve ENS names. * @author Julien Niset - <[email protected]> */ contract ENSConsumer { using strings for *; // namehash('addr.reverse') bytes32 public constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2; // the address of the ENS registry address immutable ensRegistry; /** * @dev No address should be provided when deploying on Mainnet to avoid storage cost. The * contract will use the hardcoded value. */ constructor(address _ensRegistry) { ensRegistry = _ensRegistry; } /** * @dev Resolves an ENS name to an address. * @param _node The namehash of the ENS name. */ function resolveEns(bytes32 _node) public view returns (address) { address resolver = getENSRegistry().resolver(_node); return ENSResolver(resolver).addr(_node); } /** * @dev Gets the official ENS registry. */ function getENSRegistry() public view returns (ENSRegistry) { return ENSRegistry(ensRegistry); } /** * @dev Gets the official ENS reverse registrar. */ function getENSReverseRegistrar() public view returns (ENSReverseRegistrar) { return ENSReverseRegistrar(getENSRegistry().owner(ADDR_REVERSE_NODE)); } } // File: contracts/thirdparty/BytesUtil.sol //Mainly taken from https://github.com/GNSPS/solidity-bytes-utils/blob/master/contracts/BytesLib.sol library BytesUtil { function slice( bytes memory _bytes, uint _start, uint _length ) internal pure returns (bytes memory) { require(_bytes.length >= (_start + _length)); bytes memory tempBytes; assembly { switch iszero(_length) case 0 { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // The first word of the slice result is potentially a partial // word read from the original array. To read it, we calculate // the length of that partial word and start copying that many // bytes into the array. The first word we copy will start with // data we don't care about, but the last `lengthmod` bytes will // land at the beginning of the contents of the new array. When // we're done copying, we overwrite the full first word with // the actual length of the slice. let lengthmod := and(_length, 31) // The multiplication in the next line is necessary // because when slicing multiples of 32 bytes (lengthmod == 0) // the following copy loop was copying the origin's length // and then ending prematurely not copying everything it should. let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) let end := add(mc, _length) for { // The multiplication in the next line has the same exact purpose // as the one above. let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } mstore(tempBytes, _length) //update free-memory pointer //allocating the array padded to 32 bytes like the compiler does now mstore(0x40, and(add(mc, 31), not(31))) } //if we want a zero-length slice let's just return a zero-length array default { tempBytes := mload(0x40) mstore(0x40, add(tempBytes, 0x20)) } } return tempBytes; } function toAddress(bytes memory _bytes, uint _start) internal pure returns (address) { require(_bytes.length >= (_start + 20)); address tempAddress; assembly { tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000) } return tempAddress; } function toUint8(bytes memory _bytes, uint _start) internal pure returns (uint8) { require(_bytes.length >= (_start + 1)); uint8 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x1), _start)) } return tempUint; } function toUint16(bytes memory _bytes, uint _start) internal pure returns (uint16) { require(_bytes.length >= (_start + 2)); uint16 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x2), _start)) } return tempUint; } function toUint24(bytes memory _bytes, uint _start) internal pure returns (uint24) { require(_bytes.length >= (_start + 3)); uint24 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x3), _start)) } return tempUint; } function toUint32(bytes memory _bytes, uint _start) internal pure returns (uint32) { require(_bytes.length >= (_start + 4)); uint32 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x4), _start)) } return tempUint; } function toUint64(bytes memory _bytes, uint _start) internal pure returns (uint64) { require(_bytes.length >= (_start + 8)); uint64 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x8), _start)) } return tempUint; } function toUint96(bytes memory _bytes, uint _start) internal pure returns (uint96) { require(_bytes.length >= (_start + 12)); uint96 tempUint; assembly { tempUint := mload(add(add(_bytes, 0xc), _start)) } return tempUint; } function toUint128(bytes memory _bytes, uint _start) internal pure returns (uint128) { require(_bytes.length >= (_start + 16)); uint128 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x10), _start)) } return tempUint; } function toUint(bytes memory _bytes, uint _start) internal pure returns (uint256) { require(_bytes.length >= (_start + 32)); uint256 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x20), _start)) } return tempUint; } function toBytes4(bytes memory _bytes, uint _start) internal pure returns (bytes4) { require(_bytes.length >= (_start + 4)); bytes4 tempBytes4; assembly { tempBytes4 := mload(add(add(_bytes, 0x20), _start)) } return tempBytes4; } function toBytes32(bytes memory _bytes, uint _start) internal pure returns (bytes32) { require(_bytes.length >= (_start + 32)); bytes32 tempBytes32; assembly { tempBytes32 := mload(add(add(_bytes, 0x20), _start)) } return tempBytes32; } function fastSHA256( bytes memory data ) internal view returns (bytes32) { bytes32[] memory result = new bytes32[](1); bool success; assembly { let ptr := add(data, 32) success := staticcall(sub(gas(), 2000), 2, ptr, mload(data), add(result, 32), 32) } require(success, "SHA256_FAILED"); return result[0]; } } // File: contracts/lib/ERC1271.sol // Copyright 2017 Loopring Technology Limited. abstract contract ERC1271 { // bytes4(keccak256("isValidSignature(bytes32,bytes)") bytes4 constant internal ERC1271_MAGICVALUE = 0x1626ba7e; function isValidSignature( bytes32 _hash, bytes memory _signature) public view virtual returns (bytes4 magicValueB32); } // File: contracts/lib/MathUint.sol // Copyright 2017 Loopring Technology Limited. /// @title Utility Functions for uint /// @author Daniel Wang - <[email protected]> library MathUint { function mul( uint a, uint b ) internal pure returns (uint c) { c = a * b; require(a == 0 || c / a == b, "MUL_OVERFLOW"); } function sub( uint a, uint b ) internal pure returns (uint) { require(b <= a, "SUB_UNDERFLOW"); return a - b; } function add( uint a, uint b ) internal pure returns (uint c) { c = a + b; require(c >= a, "ADD_OVERFLOW"); } } // File: contracts/lib/SignatureUtil.sol // Copyright 2017 Loopring Technology Limited. /// @title SignatureUtil /// @author Daniel Wang - <[email protected]> /// @dev This method supports multihash standard. Each signature's last byte indicates /// the signature's type. library SignatureUtil { using BytesUtil for bytes; using MathUint for uint; using AddressUtil for address; enum SignatureType { ILLEGAL, INVALID, EIP_712, ETH_SIGN, WALLET // deprecated } bytes4 constant internal ERC1271_MAGICVALUE = 0x1626ba7e; function verifySignatures( bytes32 signHash, address[] memory signers, bytes[] memory signatures ) internal view returns (bool) { require(signers.length == signatures.length, "BAD_SIGNATURE_DATA"); address lastSigner; for (uint i = 0; i < signers.length; i++) { require(signers[i] > lastSigner, "INVALID_SIGNERS_ORDER"); lastSigner = signers[i]; if (!verifySignature(signHash, signers[i], signatures[i])) { return false; } } return true; } function verifySignature( bytes32 signHash, address signer, bytes memory signature ) internal view returns (bool) { if (signer == address(0)) { return false; } return signer.isContract()? verifyERC1271Signature(signHash, signer, signature): verifyEOASignature(signHash, signer, signature); } function recoverECDSASigner( bytes32 signHash, bytes memory signature ) internal pure returns (address) { if (signature.length != 65) { return address(0); } bytes32 r; bytes32 s; uint8 v; // we jump 32 (0x20) as the first slot of bytes contains the length // we jump 65 (0x41) per signature // for v we load 32 bytes ending with v (the first 31 come from s) then apply a mask assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := and(mload(add(signature, 0x41)), 0xff) } // See https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/cryptography/ECDSA.sol if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return address(0); } if (v == 27 || v == 28) { return ecrecover(signHash, v, r, s); } else { return address(0); } } function verifyEOASignature( bytes32 signHash, address signer, bytes memory signature ) private pure returns (bool success) { if (signer == address(0)) { return false; } uint signatureTypeOffset = signature.length.sub(1); SignatureType signatureType = SignatureType(signature.toUint8(signatureTypeOffset)); // Strip off the last byte of the signature by updating the length assembly { mstore(signature, signatureTypeOffset) } if (signatureType == SignatureType.EIP_712) { success = (signer == recoverECDSASigner(signHash, signature)); } else if (signatureType == SignatureType.ETH_SIGN) { bytes32 hash = keccak256( abi.encodePacked("\x19Ethereum Signed Message:\n32", signHash) ); success = (signer == recoverECDSASigner(hash, signature)); } else { success = false; } // Restore the signature length assembly { mstore(signature, add(signatureTypeOffset, 1)) } return success; } function verifyERC1271Signature( bytes32 signHash, address signer, bytes memory signature ) private view returns (bool) { bytes memory callData = abi.encodeWithSelector( ERC1271.isValidSignature.selector, signHash, signature ); (bool success, bytes memory result) = signer.staticcall(callData); return ( success && result.length == 32 && result.toBytes4(0) == ERC1271_MAGICVALUE ); } } // File: contracts/thirdparty/ens/BaseENSManager.sol // Taken from Argent's code base - https://github.com/argentlabs/argent-contracts/blob/develop/contracts/ens/ArgentENSManager.sol // with few modifications. /** * @dev Interface for an ENS Mananger. */ interface IENSManager { function changeRootnodeOwner(address _newOwner) external; function isAvailable(bytes32 _subnode) external view returns (bool); function resolveName(address _wallet) external view returns (string memory); function register( address _wallet, address _owner, string calldata _label, bytes calldata _approval ) external; } /** * @title BaseENSManager * @dev Implementation of an ENS manager that orchestrates the complete * registration of subdomains for a single root (e.g. argent.eth). * The contract defines a manager role who is the only role that can trigger the registration of * a new subdomain. * @author Julien Niset - <[email protected]> */ contract BaseENSManager is IENSManager, OwnerManagable, ENSConsumer { using strings for *; using BytesUtil for bytes; using MathUint for uint; // The managed root name string public rootName; // The managed root node bytes32 public immutable rootNode; // The address of the ENS resolver address public ensResolver; // *************** Events *************************** // event RootnodeOwnerChange(bytes32 indexed _rootnode, address indexed _newOwner); event ENSResolverChanged(address addr); event Registered(address indexed _wallet, address _owner, string _ens); event Unregistered(string _ens); // *************** Constructor ********************** // /** * @dev Constructor that sets the ENS root name and root node to manage. * @param _rootName The root name (e.g. argentx.eth). * @param _rootNode The node of the root name (e.g. namehash(argentx.eth)). */ constructor(string memory _rootName, bytes32 _rootNode, address _ensRegistry, address _ensResolver) ENSConsumer(_ensRegistry) { rootName = _rootName; rootNode = _rootNode; ensResolver = _ensResolver; } // *************** External Functions ********************* // /** * @dev This function must be called when the ENS Manager contract is replaced * and the address of the new Manager should be provided. * @param _newOwner The address of the new ENS manager that will manage the root node. */ function changeRootnodeOwner(address _newOwner) external override onlyOwner { getENSRegistry().setOwner(rootNode, _newOwner); emit RootnodeOwnerChange(rootNode, _newOwner); } /** * @dev Lets the owner change the address of the ENS resolver contract. * @param _ensResolver The address of the ENS resolver contract. */ function changeENSResolver(address _ensResolver) external onlyOwner { require(_ensResolver != address(0), "WF: address cannot be null"); ensResolver = _ensResolver; emit ENSResolverChanged(_ensResolver); } /** * @dev Lets the manager assign an ENS subdomain of the root node to a target address. * Registers both the forward and reverse ENS. * @param _wallet The wallet which owns the subdomain. * @param _owner The wallet's owner. * @param _label The subdomain label. * @param _approval The signature of _wallet, _owner and _label by a manager. */ function register( address _wallet, address _owner, string calldata _label, bytes calldata _approval ) external override onlyManager { verifyApproval(_wallet, _owner, _label, _approval); ENSRegistry _ensRegistry = getENSRegistry(); ENSResolver _ensResolver = ENSResolver(ensResolver); bytes32 labelNode = keccak256(abi.encodePacked(_label)); bytes32 node = keccak256(abi.encodePacked(rootNode, labelNode)); address currentOwner = _ensRegistry.owner(node); require(currentOwner == address(0), "AEM: _label is alrealdy owned"); // Forward ENS _ensRegistry.setSubnodeOwner(rootNode, labelNode, address(this)); _ensRegistry.setResolver(node, address(_ensResolver)); _ensRegistry.setOwner(node, _wallet); _ensResolver.setAddr(node, _wallet); // Reverse ENS strings.slice[] memory parts = new strings.slice[](2); parts[0] = _label.toSlice(); parts[1] = rootName.toSlice(); string memory name = ".".toSlice().join(parts); bytes32 reverseNode = getENSReverseRegistrar().node(_wallet); _ensResolver.setName(reverseNode, name); emit Registered(_wallet, _owner, name); } // *************** Public Functions ********************* // /** * @dev Resolves an address to an ENS name * @param _wallet The ENS owner address */ function resolveName(address _wallet) public view override returns (string memory) { bytes32 reverseNode = getENSReverseRegistrar().node(_wallet); return ENSResolver(ensResolver).name(reverseNode); } /** * @dev Returns true is a given subnode is available. * @param _subnode The target subnode. * @return true if the subnode is available. */ function isAvailable(bytes32 _subnode) public view override returns (bool) { bytes32 node = keccak256(abi.encodePacked(rootNode, _subnode)); address currentOwner = getENSRegistry().owner(node); if(currentOwner == address(0)) { return true; } return false; } function verifyApproval( address _wallet, address _owner, string calldata _label, bytes calldata _approval ) internal view { bytes32 messageHash = keccak256( abi.encodePacked( _wallet, _owner, _label ) ); bytes32 hash = keccak256( abi.encodePacked( "\x19Ethereum Signed Message:\n32", messageHash ) ); address signer = SignatureUtil.recoverECDSASigner(hash, _approval); require(isManager(signer), "UNAUTHORIZED"); } } // File: contracts/thirdparty/proxy/CloneFactory.sol // This code is taken from https://eips.ethereum.org/EIPS/eip-1167 // Modified to a library and generalized to support create/create2. /* The MIT License (MIT) Copyright (c) 2018 Murray Software, LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ //solhint-disable max-line-length //solhint-disable no-inline-assembly library CloneFactory { function getByteCode(address target) internal pure returns (bytes memory byteCode) { bytes20 targetBytes = bytes20(target); assembly { byteCode := mload(0x40) mstore(byteCode, 0x37) let clone := add(byteCode, 0x20) mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(clone, 0x14), targetBytes) mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) mstore(0x40, add(byteCode, 0x60)) } } } // File: contracts/modules/base/MetaTxAware.sol // Copyright 2017 Loopring Technology Limited. /// @title MetaTxAware /// @author Daniel Wang - <[email protected]> /// /// The design of this contract is inspired by GSN's contract codebase: /// https://github.com/opengsn/gsn/contracts /// /// @dev Inherit this abstract contract to make a module meta-transaction /// aware. `msgSender()` shall be used to replace `msg.sender` for /// verifying permissions. abstract contract MetaTxAware { using AddressUtil for address; using BytesUtil for bytes; address public immutable metaTxForwarder; constructor(address _metaTxForwarder) { metaTxForwarder = _metaTxForwarder; } modifier txAwareHashNotAllowed() { require(txAwareHash() == 0, "INVALID_TX_AWARE_HASH"); _; } /// @dev Return's the function's logicial message sender. This method should be // used to replace `msg.sender` for all meta-tx enabled functions. function msgSender() internal view returns (address payable) { if (msg.data.length >= 56 && msg.sender == metaTxForwarder) { return msg.data.toAddress(msg.data.length - 52).toPayable(); } else { return msg.sender; } } function txAwareHash() internal view returns (bytes32) { if (msg.data.length >= 56 && msg.sender == metaTxForwarder) { return msg.data.toBytes32(msg.data.length - 32); } else { return 0; } } } // File: contracts/iface/PriceOracle.sol // Copyright 2017 Loopring Technology Limited. /// @title PriceOracle interface PriceOracle { // @dev Return's the token's value in ETH function tokenValue(address token, uint amount) external view returns (uint value); } // File: contracts/base/DataStore.sol // Copyright 2017 Loopring Technology Limited. /// @title DataStore /// @dev Modules share states by accessing the same storage instance. /// Using ModuleStorage will achieve better module decoupling. /// /// @author Daniel Wang - <[email protected]> abstract contract DataStore { modifier onlyWalletModule(address wallet) { requireWalletModule(wallet); _; } function requireWalletModule(address wallet) view internal { require(Wallet(wallet).hasModule(msg.sender), "UNAUTHORIZED"); } } // File: contracts/stores/HashStore.sol // Copyright 2017 Loopring Technology Limited. /// @title HashStore /// @dev This store maintains all hashes for SignedRequest. contract HashStore is DataStore { // wallet => hash => consumed mapping(address => mapping(bytes32 => bool)) public hashes; constructor() {} function verifyAndUpdate(address wallet, bytes32 hash) external { require(!hashes[wallet][hash], "HASH_EXIST"); requireWalletModule(wallet); hashes[wallet][hash] = true; } } // File: contracts/thirdparty/SafeCast.sol // Taken from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/SafeCast.sol /** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such an operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. * * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing * all math on `uint256` and `int256` and then downcasting. */ library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { require(value < 2**128, "SafeCast: value doesn\'t fit in 128 bits"); return uint128(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits */ function toUint96(uint256 value) internal pure returns (uint96) { require(value < 2**96, "SafeCast: value doesn\'t fit in 96 bits"); return uint96(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { require(value < 2**64, "SafeCast: value doesn\'t fit in 64 bits"); return uint64(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { require(value < 2**32, "SafeCast: value doesn\'t fit in 32 bits"); return uint32(value); } /** * @dev Returns the downcasted uint40 from uint256, reverting on * overflow (when the input is greater than largest uint40). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 40 bits */ function toUint40(uint256 value) internal pure returns (uint40) { require(value < 2**40, "SafeCast: value doesn\'t fit in 40 bits"); return uint40(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { require(value < 2**16, "SafeCast: value doesn\'t fit in 16 bits"); return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits. */ function toUint8(uint256 value) internal pure returns (uint8) { require(value < 2**8, "SafeCast: value doesn\'t fit in 8 bits"); return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { require(value >= 0, "SafeCast: value must be positive"); return uint256(value); } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits * * _Available since v3.1._ */ function toInt128(int256 value) internal pure returns (int128) { require(value >= -2**127 && value < 2**127, "SafeCast: value doesn\'t fit in 128 bits"); return int128(value); } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits * * _Available since v3.1._ */ function toInt64(int256 value) internal pure returns (int64) { require(value >= -2**63 && value < 2**63, "SafeCast: value doesn\'t fit in 64 bits"); return int64(value); } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits * * _Available since v3.1._ */ function toInt32(int256 value) internal pure returns (int32) { require(value >= -2**31 && value < 2**31, "SafeCast: value doesn\'t fit in 32 bits"); return int32(value); } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits * * _Available since v3.1._ */ function toInt16(int256 value) internal pure returns (int16) { require(value >= -2**15 && value < 2**15, "SafeCast: value doesn\'t fit in 16 bits"); return int16(value); } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits. * * _Available since v3.1._ */ function toInt8(int256 value) internal pure returns (int8) { require(value >= -2**7 && value < 2**7, "SafeCast: value doesn\'t fit in 8 bits"); return int8(value); } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { require(value < 2**255, "SafeCast: value doesn't fit in an int256"); return int256(value); } } // File: contracts/stores/QuotaStore.sol // Copyright 2017 Loopring Technology Limited. /// @title QuotaStore /// @dev This store maintains daily spending quota for each wallet. /// A rolling daily limit is used. contract QuotaStore is DataStore { using MathUint for uint; using SafeCast for uint; uint128 public constant MAX_QUOTA = uint128(-1); // Optimized to fit into 64 bytes (2 slots) struct Quota { uint128 currentQuota; uint128 pendingQuota; uint128 spentAmount; uint64 spentTimestamp; uint64 pendingUntil; } mapping (address => Quota) public quotas; event QuotaScheduled( address wallet, uint pendingQuota, uint64 pendingUntil ); constructor() DataStore() { } // 0 for newQuota indicates unlimited quota, or daily quota is disabled. function changeQuota( address wallet, uint newQuota, uint effectiveTime ) external onlyWalletModule(wallet) { require(newQuota <= MAX_QUOTA, "INVALID_VALUE"); if (newQuota == MAX_QUOTA) { newQuota = 0; } quotas[wallet].currentQuota = currentQuota(wallet).toUint128(); quotas[wallet].pendingQuota = newQuota.toUint128(); quotas[wallet].pendingUntil = effectiveTime.toUint64(); emit QuotaScheduled( wallet, newQuota, quotas[wallet].pendingUntil ); } function checkAndAddToSpent( address wallet, address token, uint amount, PriceOracle priceOracle ) external { Quota memory q = quotas[wallet]; uint available = _availableQuota(q); if (available != MAX_QUOTA) { uint value = (token == address(0)) ? amount : priceOracle.tokenValue(token, amount); if (value > 0) { require(available >= value, "QUOTA_EXCEEDED"); requireWalletModule(wallet); _addToSpent(wallet, q, value); } } } function addToSpent( address wallet, uint amount ) external onlyWalletModule(wallet) { _addToSpent(wallet, quotas[wallet], amount); } // Returns 0 to indiciate unlimited quota function currentQuota(address wallet) public view returns (uint) { return _currentQuota(quotas[wallet]); } // Returns 0 to indiciate unlimited quota function pendingQuota(address wallet) public view returns ( uint __pendingQuota, uint __pendingUntil ) { return _pendingQuota(quotas[wallet]); } function spentQuota(address wallet) public view returns (uint) { return _spentQuota(quotas[wallet]); } function availableQuota(address wallet) public view returns (uint) { return _availableQuota(quotas[wallet]); } function hasEnoughQuota( address wallet, uint requiredAmount ) public view returns (bool) { return _hasEnoughQuota(quotas[wallet], requiredAmount); } // Internal function _currentQuota(Quota memory q) private view returns (uint) { return q.pendingUntil <= block.timestamp ? q.pendingQuota : q.currentQuota; } function _pendingQuota(Quota memory q) private view returns ( uint __pendingQuota, uint __pendingUntil ) { if (q.pendingUntil > 0 && q.pendingUntil > block.timestamp) { __pendingQuota = q.pendingQuota; __pendingUntil = q.pendingUntil; } } function _spentQuota(Quota memory q) private view returns (uint) { uint timeSinceLastSpent = block.timestamp.sub(q.spentTimestamp); if (timeSinceLastSpent < 1 days) { return uint(q.spentAmount).sub(timeSinceLastSpent.mul(q.spentAmount) / 1 days); } else { return 0; } } function _availableQuota(Quota memory q) private view returns (uint) { uint quota = _currentQuota(q); if (quota == 0) { return MAX_QUOTA; } uint spent = _spentQuota(q); return quota > spent ? quota - spent : 0; } function _hasEnoughQuota( Quota memory q, uint requiredAmount ) private view returns (bool) { return _availableQuota(q) >= requiredAmount; } function _addToSpent( address wallet, Quota memory q, uint amount ) private { Quota storage s = quotas[wallet]; s.spentAmount = _spentQuota(q).add(amount).toUint128(); s.spentTimestamp = uint64(block.timestamp); } } // File: contracts/stores/Data.sol // Copyright 2017 Loopring Technology Limited. library Data { enum GuardianStatus { REMOVE, // Being removed or removed after validUntil timestamp ADD // Being added or added after validSince timestamp. } // Optimized to fit into 32 bytes (1 slot) struct Guardian { address addr; uint8 status; uint64 timestamp; // validSince if status = ADD; validUntil if adding = REMOVE; } } // File: contracts/stores/GuardianStore.sol // Copyright 2017 Loopring Technology Limited. /// @title GuardianStore /// /// @author Daniel Wang - <[email protected]> abstract contract GuardianStore is DataStore { using MathUint for uint; using SafeCast for uint; struct Wallet { address inheritor; uint32 inheritWaitingPeriod; uint64 lastActive; // the latest timestamp the owner is considered to be active bool locked; Data.Guardian[] guardians; mapping (address => uint) guardianIdx; } mapping (address => Wallet) public wallets; constructor() DataStore() {} function isGuardian( address wallet, address addr, bool includePendingAddition ) public view returns (bool) { Data.Guardian memory g = _getGuardian(wallet, addr); return _isActiveOrPendingAddition(g, includePendingAddition); } function guardians( address wallet, bool includePendingAddition ) public view returns (Data.Guardian[] memory _guardians) { Wallet storage w = wallets[wallet]; _guardians = new Data.Guardian[](w.guardians.length); uint index = 0; for (uint i = 0; i < w.guardians.length; i++) { Data.Guardian memory g = w.guardians[i]; if (_isActiveOrPendingAddition(g, includePendingAddition)) { _guardians[index] = g; index++; } } assembly { mstore(_guardians, index) } } function numGuardians( address wallet, bool includePendingAddition ) public view returns (uint count) { Wallet storage w = wallets[wallet]; for (uint i = 0; i < w.guardians.length; i++) { Data.Guardian memory g = w.guardians[i]; if (_isActiveOrPendingAddition(g, includePendingAddition)) { count++; } } } function removeAllGuardians(address wallet) external { Wallet storage w = wallets[wallet]; uint size = w.guardians.length; if (size == 0) return; requireWalletModule(wallet); for (uint i = 0; i < w.guardians.length; i++) { delete w.guardianIdx[w.guardians[i].addr]; } delete w.guardians; } function cancelPendingGuardians(address wallet) external { bool cancelled = false; Wallet storage w = wallets[wallet]; for (uint i = 0; i < w.guardians.length; i++) { Data.Guardian memory g = w.guardians[i]; if (_isPendingAddition(g)) { w.guardians[i].status = uint8(Data.GuardianStatus.REMOVE); w.guardians[i].timestamp = 0; cancelled = true; } if (_isPendingRemoval(g)) { w.guardians[i].status = uint8(Data.GuardianStatus.ADD); w.guardians[i].timestamp = 0; cancelled = true; } } if (cancelled) { requireWalletModule(wallet); } _cleanRemovedGuardians(wallet, true); } function cleanRemovedGuardians(address wallet) external { _cleanRemovedGuardians(wallet, true); } function addGuardian( address wallet, address addr, uint validSince, bool alwaysOverride ) external onlyWalletModule(wallet) returns (uint) { require(validSince >= block.timestamp, "INVALID_VALID_SINCE"); require(addr != address(0), "ZERO_ADDRESS"); Wallet storage w = wallets[wallet]; uint pos = w.guardianIdx[addr]; if(pos == 0) { // Add the new guardian Data.Guardian memory g = Data.Guardian( addr, uint8(Data.GuardianStatus.ADD), validSince.toUint64() ); w.guardians.push(g); w.guardianIdx[addr] = w.guardians.length; _cleanRemovedGuardians(wallet, false); return validSince; } Data.Guardian memory g = w.guardians[pos - 1]; if (_isRemoved(g)) { w.guardians[pos - 1].status = uint8(Data.GuardianStatus.ADD); w.guardians[pos - 1].timestamp = validSince.toUint64(); return validSince; } if (_isPendingRemoval(g)) { w.guardians[pos - 1].status = uint8(Data.GuardianStatus.ADD); w.guardians[pos - 1].timestamp = 0; return 0; } if (_isPendingAddition(g)) { if (!alwaysOverride) return g.timestamp; w.guardians[pos - 1].timestamp = validSince.toUint64(); return validSince; } require(_isAdded(g), "UNEXPECTED_RESULT"); return 0; } function removeGuardian( address wallet, address addr, uint validUntil, bool alwaysOverride ) external onlyWalletModule(wallet) returns (uint) { require(validUntil >= block.timestamp, "INVALID_VALID_UNTIL"); require(addr != address(0), "ZERO_ADDRESS"); Wallet storage w = wallets[wallet]; uint pos = w.guardianIdx[addr]; require(pos > 0, "GUARDIAN_NOT_EXISTS"); Data.Guardian memory g = w.guardians[pos - 1]; if (_isAdded(g)) { w.guardians[pos - 1].status = uint8(Data.GuardianStatus.REMOVE); w.guardians[pos - 1].timestamp = validUntil.toUint64(); return validUntil; } if (_isPendingAddition(g)) { w.guardians[pos - 1].status = uint8(Data.GuardianStatus.REMOVE); w.guardians[pos - 1].timestamp = 0; return 0; } if (_isPendingRemoval(g)) { if (!alwaysOverride) return g.timestamp; w.guardians[pos - 1].timestamp = validUntil.toUint64(); return validUntil; } require(_isRemoved(g), "UNEXPECTED_RESULT"); return 0; } // ---- internal functions --- function _getGuardian( address wallet, address addr ) private view returns (Data.Guardian memory) { Wallet storage w = wallets[wallet]; uint pos = w.guardianIdx[addr]; if (pos > 0) { return w.guardians[pos - 1]; } } function _isAdded(Data.Guardian memory guardian) private view returns (bool) { return guardian.status == uint8(Data.GuardianStatus.ADD) && guardian.timestamp <= block.timestamp; } function _isPendingAddition(Data.Guardian memory guardian) private view returns (bool) { return guardian.status == uint8(Data.GuardianStatus.ADD) && guardian.timestamp > block.timestamp; } function _isRemoved(Data.Guardian memory guardian) private view returns (bool) { return guardian.status == uint8(Data.GuardianStatus.REMOVE) && guardian.timestamp <= block.timestamp; } function _isPendingRemoval(Data.Guardian memory guardian) private view returns (bool) { return guardian.status == uint8(Data.GuardianStatus.REMOVE) && guardian.timestamp > block.timestamp; } function _isActive(Data.Guardian memory guardian) private view returns (bool) { return _isAdded(guardian) || _isPendingRemoval(guardian); } function _isActiveOrPendingAddition( Data.Guardian memory guardian, bool includePendingAddition ) private view returns (bool) { return _isActive(guardian) || includePendingAddition && _isPendingAddition(guardian); } function _cleanRemovedGuardians( address wallet, bool force ) private { Wallet storage w = wallets[wallet]; uint count = w.guardians.length; if (!force && count < 10) return; for (int i = int(count) - 1; i >= 0; i--) { Data.Guardian memory g = w.guardians[uint(i)]; if (_isRemoved(g)) { Data.Guardian memory lastGuardian = w.guardians[w.guardians.length - 1]; if (g.addr != lastGuardian.addr) { w.guardians[uint(i)] = lastGuardian; w.guardianIdx[lastGuardian.addr] = uint(i) + 1; } w.guardians.pop(); delete w.guardianIdx[g.addr]; } } } } // File: contracts/stores/SecurityStore.sol // Copyright 2017 Loopring Technology Limited. /// @title SecurityStore /// /// @author Daniel Wang - <[email protected]> contract SecurityStore is GuardianStore { using MathUint for uint; using SafeCast for uint; constructor() GuardianStore() {} function setLock( address wallet, bool locked ) external onlyWalletModule(wallet) { wallets[wallet].locked = locked; } function touchLastActive(address wallet) external onlyWalletModule(wallet) { wallets[wallet].lastActive = uint64(block.timestamp); } function touchLastActiveWhenRequired( address wallet, uint minInternval ) external { if (wallets[wallet].inheritor != address(0) && block.timestamp > lastActive(wallet) + minInternval) { requireWalletModule(wallet); wallets[wallet].lastActive = uint64(block.timestamp); } } function setInheritor( address wallet, address who, uint32 _inheritWaitingPeriod ) external onlyWalletModule(wallet) { wallets[wallet].inheritor = who; wallets[wallet].inheritWaitingPeriod = _inheritWaitingPeriod; wallets[wallet].lastActive = uint64(block.timestamp); } function isLocked(address wallet) public view returns (bool) { return wallets[wallet].locked; } function lastActive(address wallet) public view returns (uint) { return wallets[wallet].lastActive; } function inheritor(address wallet) public view returns ( address _who, uint _effectiveTimestamp ) { address _inheritor = wallets[wallet].inheritor; if (_inheritor == address(0)) { return (address(0), 0); } uint32 _inheritWaitingPeriod = wallets[wallet].inheritWaitingPeriod; if (_inheritWaitingPeriod == 0) { return (address(0), 0); } uint64 _lastActive = wallets[wallet].lastActive; if (_lastActive == 0) { _lastActive = uint64(block.timestamp); } _who = _inheritor; _effectiveTimestamp = _lastActive + _inheritWaitingPeriod; } } // File: contracts/stores/WhitelistStore.sol // Copyright 2017 Loopring Technology Limited. /// @title WhitelistStore /// @dev This store maintains a wallet's whitelisted addresses. contract WhitelistStore is DataStore, AddressSet, OwnerManagable { bytes32 internal constant DAPPS = keccak256("__DAPPS__"); // wallet => whitelisted_addr => effective_since mapping(address => mapping(address => uint)) public effectiveTimeMap; event Whitelisted( address wallet, address addr, bool whitelisted, uint effectiveTime ); event DappWhitelisted( address addr, bool whitelisted ); constructor() DataStore() {} function addToWhitelist( address wallet, address addr, uint effectiveTime ) external onlyWalletModule(wallet) { addAddressToSet(_walletKey(wallet), addr, true); uint effective = effectiveTime >= block.timestamp ? effectiveTime : block.timestamp; effectiveTimeMap[wallet][addr] = effective; emit Whitelisted(wallet, addr, true, effective); } function removeFromWhitelist( address wallet, address addr ) external onlyWalletModule(wallet) { removeAddressFromSet(_walletKey(wallet), addr); delete effectiveTimeMap[wallet][addr]; emit Whitelisted(wallet, addr, false, 0); } function addDapp(address addr) external onlyManager { addAddressToSet(DAPPS, addr, true); emit DappWhitelisted(addr, true); } function removeDapp(address addr) external onlyManager { removeAddressFromSet(DAPPS, addr); emit DappWhitelisted(addr, false); } function whitelist(address wallet) public view returns ( address[] memory addresses, uint[] memory effectiveTimes ) { addresses = addressesInSet(_walletKey(wallet)); effectiveTimes = new uint[](addresses.length); for (uint i = 0; i < addresses.length; i++) { effectiveTimes[i] = effectiveTimeMap[wallet][addresses[i]]; } } function isWhitelisted( address wallet, address addr ) public view returns ( bool isWhitelistedAndEffective, uint effectiveTime ) { effectiveTime = effectiveTimeMap[wallet][addr]; isWhitelistedAndEffective = effectiveTime > 0 && effectiveTime <= block.timestamp; } function whitelistSize(address wallet) public view returns (uint) { return numAddressesInSet(_walletKey(wallet)); } function dapps() public view returns ( address[] memory addresses ) { return addressesInSet(DAPPS); } function isDapp( address addr ) public view returns (bool) { return isAddressInSet(DAPPS, addr); } function numDapps() public view returns (uint) { return numAddressesInSet(DAPPS); } function isDappOrWhitelisted( address wallet, address addr ) public view returns (bool res) { (res,) = isWhitelisted(wallet, addr); return res || isAddressInSet(DAPPS, addr); } function _walletKey(address addr) private pure returns (bytes32) { return keccak256(abi.encodePacked("__WHITELIST__", addr)); } } // File: contracts/modules/ControllerImpl.sol // Copyright 2017 Loopring Technology Limited. /// @title ControllerImpl /// @dev Basic implementation of a Controller. /// /// @author Daniel Wang - <[email protected]> contract ControllerImpl is Claimable, Controller { HashStore public immutable hashStore; QuotaStore public immutable quotaStore; SecurityStore public immutable securityStore; WhitelistStore public immutable whitelistStore; ModuleRegistry public immutable override moduleRegistry; address public override walletFactory; address public immutable feeCollector; BaseENSManager public immutable ensManager; PriceOracle public immutable priceOracle; event AddressChanged( string name, address addr ); constructor( HashStore _hashStore, QuotaStore _quotaStore, SecurityStore _securityStore, WhitelistStore _whitelistStore, ModuleRegistry _moduleRegistry, address _feeCollector, BaseENSManager _ensManager, PriceOracle _priceOracle ) { hashStore = _hashStore; quotaStore = _quotaStore; securityStore = _securityStore; whitelistStore = _whitelistStore; moduleRegistry = _moduleRegistry; require(_feeCollector != address(0), "ZERO_ADDRESS"); feeCollector = _feeCollector; ensManager = _ensManager; priceOracle = _priceOracle; } function initWalletFactory(address _walletFactory) external onlyOwner { require(walletFactory == address(0), "INITIALIZED_ALREADY"); require(_walletFactory != address(0), "ZERO_ADDRESS"); walletFactory = _walletFactory; emit AddressChanged("WalletFactory", walletFactory); } } // File: contracts/modules/core/WalletFactory.sol // Copyright 2017 Loopring Technology Limited. /// @title WalletFactory /// @dev A factory contract to create a new wallet by deploying a proxy /// in front of a real wallet. /// /// @author Daniel Wang - <[email protected]> contract WalletFactory { using AddressUtil for address; using SignatureUtil for bytes32; event BlankDeployed (address blank, bytes32 version); event BlankConsumed (address blank); event WalletCreated (address wallet, string ensLabel, address owner, bool blankUsed); string public constant WALLET_CREATION = "WALLET_CREATION"; bytes32 public constant CREATE_WALLET_TYPEHASH = keccak256( "createWallet(address owner,uint256 salt,address blankAddress,string ensLabel,bool ensRegisterReverse,address[] modules)" ); mapping(address => bytes32) blanks; bytes32 public immutable DOMAIN_SEPERATOR; ControllerImpl public immutable controller; address public immutable walletImplementation; bool public immutable allowEmptyENS; // MUST be false in production BaseENSManager public immutable ensManager; address public immutable ensResolver; ENSReverseRegistrar public immutable ensReverseRegistrar; constructor( ControllerImpl _controller, address _walletImplementation, bool _allowEmptyENS ) { DOMAIN_SEPERATOR = EIP712.hash( EIP712.Domain("WalletFactory", "1.2.0", address(this)) ); controller = _controller; walletImplementation = _walletImplementation; allowEmptyENS = _allowEmptyENS; BaseENSManager _ensManager = _controller.ensManager(); ensManager = _ensManager; ensResolver = _ensManager.ensResolver(); ensReverseRegistrar = _ensManager.getENSReverseRegistrar(); } /// @dev Create a set of new wallet blanks to be used in the future. /// @param modules The wallet's modules. /// @param salts The salts that can be used to generate nice addresses. function createBlanks( address[] calldata modules, uint[] calldata salts ) external { for (uint i = 0; i < salts.length; i++) { _createBlank(modules, salts[i]); } } /// @dev Create a new wallet by deploying a proxy. /// @param _owner The wallet's owner. /// @param _salt A salt to adjust address. /// @param _ensLabel The ENS subdomain to register, use "" to skip. /// @param _ensApproval The signature for ENS subdomain approval. /// @param _ensRegisterReverse True to register reverse ENS. /// @param _modules The wallet's modules. /// @param _signature The wallet owner's signature. /// @return _wallet The new wallet address function createWallet( address _owner, uint _salt, string calldata _ensLabel, bytes calldata _ensApproval, bool _ensRegisterReverse, address[] calldata _modules, bytes calldata _signature ) external payable returns (address _wallet) { _validateRequest( _owner, _salt, address(0), _ensLabel, _ensRegisterReverse, _modules, _signature ); _wallet = _deploy(_modules, _owner, _salt); _initializeWallet( _wallet, _owner, _ensLabel, _ensApproval, _ensRegisterReverse, false ); } /// @dev Create a new wallet by using a pre-deployed blank. /// @param _owner The wallet's owner. /// @param _blank The address of the blank to use. /// @param _ensLabel The ENS subdomain to register, use "" to skip. /// @param _ensApproval The signature for ENS subdomain approval. /// @param _ensRegisterReverse True to register reverse ENS. /// @param _modules The wallet's modules. /// @param _signature The wallet owner's signature. /// @return _wallet The new wallet address function createWallet2( address _owner, address _blank, string calldata _ensLabel, bytes calldata _ensApproval, bool _ensRegisterReverse, address[] calldata _modules, bytes calldata _signature ) external payable returns (address _wallet) { _validateRequest( _owner, 0, _blank, _ensLabel, _ensRegisterReverse, _modules, _signature ); _wallet = _consumeBlank(_blank, _modules); _initializeWallet( _wallet, _owner, _ensLabel, _ensApproval, _ensRegisterReverse, true ); } function registerENS( address _wallet, address _owner, string calldata _ensLabel, bytes calldata _ensApproval, bool _ensRegisterReverse ) external { _registerENS(_wallet, _owner, _ensLabel, _ensApproval, _ensRegisterReverse); } function computeWalletAddress(address owner, uint salt) public view returns (address) { return _computeAddress(owner, salt); } function computeBlankAddress(uint salt) public view returns (address) { return _computeAddress(address(0), salt); } function getWalletCreationCode() public view returns (bytes memory) { return CloneFactory.getByteCode(walletImplementation); } function _consumeBlank( address blank, address[] calldata modules ) internal returns (address) { bytes32 version = keccak256(abi.encode(modules)); require(blanks[blank] == version, "INVALID_ADOBE"); delete blanks[blank]; emit BlankConsumed(blank); return blank; } function _createBlank( address[] calldata modules, uint salt ) internal returns (address blank) { blank = _deploy(modules, address(0), salt); bytes32 version = keccak256(abi.encode(modules)); blanks[blank] = version; emit BlankDeployed(blank, version); } function _deploy( address[] calldata modules, address owner, uint salt ) internal returns (address payable wallet) { wallet = Create2.deploy( keccak256(abi.encodePacked(WALLET_CREATION, owner, salt)), CloneFactory.getByteCode(walletImplementation) ); BaseWallet(wallet).init(controller, modules); } function _validateRequest( address _owner, uint _salt, address _blankAddress, string memory _ensLabel, bool _ensRegisterReverse, address[] memory _modules, bytes memory _signature ) private view { require(_owner != address(0) && !_owner.isContract(), "INVALID_OWNER"); require(_modules.length > 0, "EMPTY_MODULES"); bytes memory encodedRequest = abi.encode( CREATE_WALLET_TYPEHASH, _owner, _salt, _blankAddress, keccak256(bytes(_ensLabel)), _ensRegisterReverse, keccak256(abi.encode(_modules)) ); bytes32 signHash = EIP712.hashPacked(DOMAIN_SEPERATOR, encodedRequest); require(signHash.verifySignature(_owner, _signature), "INVALID_SIGNATURE"); } function _initializeWallet( address _wallet, address _owner, string memory _ensLabel, bytes memory _ensApproval, bool _ensRegisterReverse, bool _blankUsed ) private { BaseWallet(_wallet.toPayable()).initOwner(_owner); if (bytes(_ensLabel).length > 0) { _registerENS(_wallet, _owner, _ensLabel, _ensApproval, _ensRegisterReverse); } else { require(allowEmptyENS, "EMPTY_ENS_NOT_ALLOWED"); } emit WalletCreated(_wallet, _ensLabel, _owner, _blankUsed); } function _computeAddress( address owner, uint salt ) private view returns (address) { return Create2.computeAddress( keccak256(abi.encodePacked(WALLET_CREATION, owner, salt)), CloneFactory.getByteCode(walletImplementation) ); } function _registerENS( address wallet, address owner, string memory ensLabel, bytes memory ensApproval, bool ensRegisterReverse ) private { require( bytes(ensLabel).length > 0 && ensApproval.length > 0, "INVALID_LABEL_OR_SIGNATURE" ); ensManager.register(wallet, owner, ensLabel, ensApproval); if (ensRegisterReverse) { bytes memory data = abi.encodeWithSelector( ENSReverseRegistrar.claimWithResolver.selector, address(0), // the owner of the reverse record ensResolver ); Wallet(wallet).transact( uint8(1), address(ensReverseRegistrar), 0, // value data ); } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract ControllerImpl","name":"_controller","type":"address"},{"internalType":"address","name":"_walletImplementation","type":"address"},{"internalType":"bool","name":"_allowEmptyENS","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"blank","type":"address"}],"name":"BlankConsumed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"blank","type":"address"},{"indexed":false,"internalType":"bytes32","name":"version","type":"bytes32"}],"name":"BlankDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"string","name":"ensLabel","type":"string"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"bool","name":"blankUsed","type":"bool"}],"name":"WalletCreated","type":"event"},{"inputs":[],"name":"CREATE_WALLET_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPERATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WALLET_CREATION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowEmptyENS","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"salt","type":"uint256"}],"name":"computeBlankAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"salt","type":"uint256"}],"name":"computeWalletAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"controller","outputs":[{"internalType":"contract ControllerImpl","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"modules","type":"address[]"},{"internalType":"uint256[]","name":"salts","type":"uint256[]"}],"name":"createBlanks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_salt","type":"uint256"},{"internalType":"string","name":"_ensLabel","type":"string"},{"internalType":"bytes","name":"_ensApproval","type":"bytes"},{"internalType":"bool","name":"_ensRegisterReverse","type":"bool"},{"internalType":"address[]","name":"_modules","type":"address[]"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"createWallet","outputs":[{"internalType":"address","name":"_wallet","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_blank","type":"address"},{"internalType":"string","name":"_ensLabel","type":"string"},{"internalType":"bytes","name":"_ensApproval","type":"bytes"},{"internalType":"bool","name":"_ensRegisterReverse","type":"bool"},{"internalType":"address[]","name":"_modules","type":"address[]"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"createWallet2","outputs":[{"internalType":"address","name":"_wallet","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"ensManager","outputs":[{"internalType":"contract BaseENSManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ensResolver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ensReverseRegistrar","outputs":[{"internalType":"contract ENSReverseRegistrar","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWalletCreationCode","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"string","name":"_ensLabel","type":"string"},{"internalType":"bytes","name":"_ensApproval","type":"bytes"},{"internalType":"bool","name":"_ensRegisterReverse","type":"bool"}],"name":"registerENS","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"walletImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6101606040523480156200001257600080fd5b506040516200279b3803806200279b833981016040819052620000359162000338565b620000b060405180606001604052806040518060400160405280600d81526020016c57616c6c6574466163746f727960981b8152508152602001604051806040016040528060058152602001640312e322e360dc1b8152508152602001306001600160a01b03168152506200029960201b620007ad1760201c565b6080526001600160601b0319606084811b821660a05283901b1660c05280151560f81b60e05260408051635a6971f960e01b815290516000916001600160a01b03861691635a6971f991600480820192602092909190829003018186803b1580156200011b57600080fd5b505afa15801562000130573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000156919062000312565b9050806001600160a01b0316610100816001600160a01b031660601b81525050806001600160a01b031663adce1c5f6040518163ffffffff1660e01b815260040160206040518083038186803b158015620001b057600080fd5b505afa158015620001c5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001eb919062000312565b6001600160a01b0316610120816001600160a01b031660601b81525050806001600160a01b03166309d734426040518163ffffffff1660e01b815260040160206040518083038186803b1580156200024257600080fd5b505afa15801562000257573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200027d919062000312565b60601b6001600160601b0319166101405250620003d392505050565b6000804690507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f836000015180519060200120846020015180519060200120838660400151604051602001620002f49594939291906200038e565b60405160208183030381529060405280519060200120915050919050565b60006020828403121562000324578081fd5b81516200033181620003ba565b9392505050565b6000806000606084860312156200034d578182fd5b83516200035a81620003ba565b60208501519093506200036d81620003ba565b6040850151909250801515811462000383578182fd5b809150509250925092565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b6001600160a01b0381168114620003d057600080fd5b50565b60805160a05160601c60c05160601c60e05160f81c6101005160601c6101205160601c6101405160601c61233562000466600039806107675280610af252508061048652806109f652508061033152806109755250806103555280611022525080610379528061045b5280610c635280610e9f52508061078b5280610f155250806102b15280610dc252506123356000f3fe6080604052600436106100f35760003560e01c8063a6d868b61161008a578063b72de7fc11610059578063b72de7fc14610252578063ce15861214610265578063d19050ee14610285578063f77c47911461029a576100f3565b8063a6d868b6146101f5578063adce1c5f1461020a578063b15776821461021f578063b6dffa3f1461023f576100f3565b80636c77ecd4116100c65780636c77ecd41461017c5780638117abc11461019e57806390610b0e146101b35780639d318d66146101d5576100f3565b80630df63210146100f8578063486525c9146101235780634c30d6c9146101455780635a6971f91461015a575b600080fd5b34801561010457600080fd5b5061010d6102af565b60405161011a9190611fa3565b60405180910390f35b34801561012f57600080fd5b5061014361013e366004611b27565b6102d3565b005b34801561015157600080fd5b5061010d61030b565b34801561016657600080fd5b5061016f61032f565b60405161011a9190611e2a565b34801561018857600080fd5b50610191610353565b60405161011a9190611f98565b3480156101aa57600080fd5b5061016f610377565b3480156101bf57600080fd5b506101c861039b565b60405161011a9190612068565b3480156101e157600080fd5b506101436101f036600461188e565b6103d4565b34801561020157600080fd5b506101c8610454565b34801561021657600080fd5b5061016f610484565b34801561022b57600080fd5b5061016f61023a366004611c49565b6104a8565b61016f61024d366004611a5d565b6104bb565b61016f610260366004611938565b61060d565b34801561027157600080fd5b5061016f610280366004611a33565b610752565b34801561029157600080fd5b5061016f610765565b3480156102a657600080fd5b5061016f610789565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005b81811015610304576102fb85858585858181106102ef57fe5b90506020020135610824565b506001016102d6565b5050505050565b7f955c17f8655850cf80e8446390a2bd7ba809a4af212a3b8fe68b04e3f03af21781565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040518060400160405280600f81526020017f57414c4c45545f4352454154494f4e000000000000000000000000000000000081525081565b61044b878787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b0181900481028201810190925289815292508991508890819084018382808284376000920191909152508892506108e7915050565b50505050505050565b606061047f7f0000000000000000000000000000000000000000000000000000000000000000610b93565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006104b5600083610bf9565b92915050565b60006105688c8c60008d8d8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020808e0282810182019093528d82528f94509092508d918d9182919085019084908082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b9081908401838280828437600092019190915250610c8c92505050565b61057485858e8e610e35565b90506105fe818d8c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052508e93509150610f7b9050565b9b9a5050505050505050505050565b60006106ba8c60008d8d8d8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020808e0282810182019093528d82528f94509092508d918d9182919085019084908082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b9081908401838280828437600092019190915250610c8c92505050565b6106c58b86866110bc565b90506105fe818d8c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d925060019150610f7b9050565b600061075e8383610bf9565b9392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000804690507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f836000015180519060200120846020015180519060200120838660400151604051602001610806959493929190611ff8565b60405160208183030381529060405280519060200120915050919050565b60006108338484600085610e35565b90506000848460405160200161084a929190611f2a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012073ffffffffffffffffffffffffffffffffffffffff861660009081529182905291902081905591507f4dc3e5ea78260cf367afeb08d05f788d6af83c2c6db8117694a31ec0e26b3efd906108d79084908490611ebd565b60405180910390a1509392505050565b600083511180156108f9575060008251115b610938576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f90612235565b60405180910390fd5b6040517f76d6497400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906376d64974906109b0908890889088908890600401611e72565b600060405180830381600087803b1580156109ca57600080fd5b505af11580156109de573d6000803e3d6000fd5b505050508015610304576060630f5a546660e01b60007f0000000000000000000000000000000000000000000000000000000000000000604051602401610a26929190611e4b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290517f7122b74c00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff871690637122b74c90610b1f906001907f000000000000000000000000000000000000000000000000000000000000000090600090879060040161226c565b600060405180830381600087803b158015610b3957600080fd5b505af1158015610b4d573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261044b9190810190611b90565b60408051603781527f3d602d80600a3d3981f3363d3d373d3d3d363d730000000000000000000000006020820152606092831b60348201527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006048820152918201905290565b600061075e6040518060400160405280600f81526020017f57414c4c45545f4352454154494f4e00000000000000000000000000000000008152508484604051602001610c4893929190611d80565b60405160208183030381529060405280519060200120610c877f0000000000000000000000000000000000000000000000000000000000000000610b93565b6111cf565b73ffffffffffffffffffffffffffffffffffffffff871615801590610ccd5750610ccb8773ffffffffffffffffffffffffffffffffffffffff166111dc565b155b610d03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f906121c7565b6000825111610d3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f90612122565b60607f955c17f8655850cf80e8446390a2bd7ba809a4af212a3b8fe68b04e3f03af21788888888805190602001208888604051602001610d7e9190611f3e565b60405160208183030381529060405280519060200120604051602001610daa9796959493929190611fac565b60405160208183030381529060405290506000610de77f000000000000000000000000000000000000000000000000000000000000000083611213565b9050610df4818a85611284565b610e2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f90612159565b505050505050505050565b6000610ec86040518060400160405280600f81526020017f57414c4c45545f4352454154494f4e00000000000000000000000000000000008152508484604051602001610e8493929190611d80565b60405160208183030381529060405280519060200120610ec37f0000000000000000000000000000000000000000000000000000000000000000610b93565b6112ef565b6040517f3c5a3cea00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff821690633c5a3cea90610f41907f0000000000000000000000000000000000000000000000000000000000000000908990899060040161207b565b600060405180830381600087803b158015610f5b57600080fd5b505af1158015610f6f573d6000803e3d6000fd5b50505050949350505050565b610f9a8673ffffffffffffffffffffffffffffffffffffffff1661134b565b73ffffffffffffffffffffffffffffffffffffffff16630d009297866040518263ffffffff1660e01b8152600401610fd29190611e2a565b600060405180830381600087803b158015610fec57600080fd5b505af1158015611000573d6000803e3d6000fd5b505050506000845111156110205761101b86868686866108e7565b611077565b7f0000000000000000000000000000000000000000000000000000000000000000611077576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f906120b4565b7f60488568340cbdf60d672f6b1b896cde221bdcd9062bdd6a95cfded547013d13868587846040516110ac9493929190611ee3565b60405180910390a1505050505050565b60008083836040516020016110d2929190611f2a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012073ffffffffffffffffffffffffffffffffffffffff88166000908152928390529120549091508114611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f906120eb565b73ffffffffffffffffffffffffffffffffffffffff851660009081526020819052604080822091909155517fd722f65e2020c25177252b959d040ad8f01463b4c6bb7ca601cb72e3188b9aef906111be908790611e2a565b60405180910390a150929392505050565b600061075e83833061134e565b6000813f801580159061075e57507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470141592915050565b60006040518060400160405280600281526020017f190100000000000000000000000000000000000000000000000000000000000081525083838051906020012060405160200161126693929190611dd2565b60405160208183030381529060405280519060200120905092915050565b600073ffffffffffffffffffffffffffffffffffffffff83166112a95750600061075e565b6112c88373ffffffffffffffffffffffffffffffffffffffff166111dc565b6112dc576112d78484846113e9565b6112e7565b6112e7848484611523565b949350505050565b600080838351602085016000f5905073ffffffffffffffffffffffffffffffffffffffff811661075e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f906121fe565b90565b81516020808401919091206040516000928391611393917fff000000000000000000000000000000000000000000000000000000000000009187918a91879101611d00565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018152919052805160209091012073ffffffffffffffffffffffffffffffffffffffff169695505050505050565b600073ffffffffffffffffffffffffffffffffffffffff831661140e5750600061075e565b815160009061141e90600161167f565b9050600061142c84836116c1565b60ff16600481111561143a57fe5b8285529050600281600481111561144d57fe5b14156114925761145d86856116dd565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16149250611516565b60038160048111156114a057fe5b1415611511576000866040516020016114b99190611df9565b6040516020818303038152906040528051906020012090506114db81866116dd565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614935050611516565b600092505b5060010182529392505050565b60006060631626ba7e60e01b8584604051602401611542929190612031565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600060608573ffffffffffffffffffffffffffffffffffffffff16836040516115ca9190611d64565b600060405180830381855afa9150503d8060008114611605576040519150601f19603f3d011682016040523d82523d6000602084013e61160a565b606091505b509150915081801561161d575080516020145b801561167457507f1626ba7e000000000000000000000000000000000000000000000000000000006116508260006117b5565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b979650505050505050565b6000828211156116bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f90612190565b50900390565b600081600101835110156116d457600080fd5b50016001015190565b600081516041146116f0575060006104b5565b60208201516040830151604184015160ff167f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a082111561173657600093505050506104b5565b8060ff16601b148061174b57508060ff16601c145b156117a95760018682858560405160008152602001604052604051611773949392919061204a565b6020604051602081039080840390855afa158015611795573d6000803e3d6000fd5b5050506020604051035193505050506104b5565b600093505050506104b5565b600081600401835110156117c857600080fd5b50016020015190565b803573ffffffffffffffffffffffffffffffffffffffff811681146104b557600080fd5b60008083601f840112611806578182fd5b50813567ffffffffffffffff81111561181d578182fd5b602083019150836020808302850101111561183757600080fd5b9250929050565b803580151581146104b557600080fd5b60008083601f84011261185f578182fd5b50813567ffffffffffffffff811115611876578182fd5b60208301915083602082850101111561183757600080fd5b600080600080600080600060a0888a0312156118a8578283fd5b87356118b3816122da565b965060208801356118c3816122da565b9550604088013567ffffffffffffffff808211156118df578485fd5b6118eb8b838c0161184e565b909750955060608a0135915080821115611903578485fd5b506119108a828b0161184e565b90945092505060808801358015158114611928578182fd5b8091505092959891949750929550565b600080600080600080600080600080600060e08c8e031215611958578384fd5b6119628d8d6117d1565b9a506119718d60208e016117d1565b995067ffffffffffffffff8060408e0135111561198c578485fd5b61199c8e60408f01358f0161184e565b909a50985060608d01358110156119b1578485fd5b6119c18e60608f01358f0161184e565b90985096506119d38e60808f0161183e565b95508060a08e013511156119e5578485fd5b6119f58e60a08f01358f016117f5565b909550935060c08d0135811015611a0a578283fd5b50611a1b8d60c08e01358e0161184e565b81935080925050509295989b509295989b9093969950565b60008060408385031215611a45578182fd5b611a4f84846117d1565b946020939093013593505050565b600080600080600080600080600080600060e08c8e031215611a7d578081fd5b611a878d8d6117d1565b9a5060208c0135995067ffffffffffffffff8060408e01351115611aa9578182fd5b611ab98e60408f01358f0161184e565b909a50985060608d0135811015611ace578182fd5b611ade8e60608f01358f0161184e565b9098509650611af08e60808f0161183e565b95508060a08e01351115611b02578182fd5b611b128e60a08f01358f016117f5565b909550935060c08d0135811015611a0a578182fd5b60008060008060408587031215611b3c578384fd5b843567ffffffffffffffff80821115611b53578586fd5b611b5f888389016117f5565b90965094506020870135915080821115611b77578384fd5b50611b84878288016117f5565b95989497509550505050565b600060208284031215611ba1578081fd5b815167ffffffffffffffff80821115611bb8578283fd5b818401915084601f830112611bcb578283fd5b815181811115611bd9578384fd5b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715611c17578586fd5b604052818152838201602001871015611c2e578485fd5b611c3f8260208301602087016122aa565b9695505050505050565b600060208284031215611c5a578081fd5b5035919050565b60008284526020808501945082825b85811015611cab5782820173ffffffffffffffffffffffffffffffffffffffff611c9a82856117d1565b168852968301969150600101611c70565b509495945050505050565b60008151808452611cce8160208601602086016122aa565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fff0000000000000000000000000000000000000000000000000000000000000094909416845260609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660018401526015830152603582015260550190565b60008251611d768184602087016122aa565b9190910192915050565b60008451611d928184602089016122aa565b60609490941b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001691909301908152601481019190915260340192915050565b60008451611de48184602089016122aa565b91909101928352506020820152604001919050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525060806040830152611eab6080830185611cb6565b82810360608401526116748185611cb6565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b600073ffffffffffffffffffffffffffffffffffffffff808716835260806020840152611f136080840187611cb6565b941660408301525090151560609091015292915050565b6000602082526112e7602083018486611c61565b6020808252825182820181905260009190848201906040850190845b81811015611f8c57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101611f5a565b50909695505050505050565b901515815260200190565b90815260200190565b96875273ffffffffffffffffffffffffffffffffffffffff95861660208801526040870194909452919093166060850152608084019290925290151560a083015260c082015260e00190565b94855260208501939093526040840191909152606083015273ffffffffffffffffffffffffffffffffffffffff16608082015260a00190565b6000838252604060208301526112e76040830184611cb6565b93845260ff9290921660208401526040830152606082015260800190565b60006020825261075e6020830184611cb6565b600073ffffffffffffffffffffffffffffffffffffffff85168252604060208301526120ab604083018486611c61565b95945050505050565b60208082526015908201527f454d5054595f454e535f4e4f545f414c4c4f5745440000000000000000000000604082015260600190565b6020808252600d908201527f494e56414c49445f41444f424500000000000000000000000000000000000000604082015260600190565b6020808252600d908201527f454d5054595f4d4f44554c455300000000000000000000000000000000000000604082015260600190565b60208082526011908201527f494e56414c49445f5349474e4154555245000000000000000000000000000000604082015260600190565b6020808252600d908201527f5355425f554e444552464c4f5700000000000000000000000000000000000000604082015260600190565b6020808252600d908201527f494e56414c49445f4f574e455200000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f435245415445325f4641494c4544000000000000000000000000000000000000604082015260600190565b6020808252601a908201527f494e56414c49445f4c4142454c5f4f525f5349474e4154555245000000000000604082015260600190565b600060ff8616825273ffffffffffffffffffffffffffffffffffffffff8516602083015283604083015260806060830152611c3f6080830184611cb6565b60005b838110156122c55781810151838201526020016122ad565b838111156122d4576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff811681146122fc57600080fd5b5056fea264697066735822122018e0b1a9e386d36c68810d375ae38a7033129f3bb1bc1e9bc3a81cf6bf8f0ded64736f6c63430007000033000000000000000000000000b39e09279d4035c0f92307741d9dd8ed66e74de0000000000000000000000000e5857440bbff64c98ceb70d650805e1e96adde7a0000000000000000000000000000000000000000000000000000000000000001
Deployed Bytecode
0x6080604052600436106100f35760003560e01c8063a6d868b61161008a578063b72de7fc11610059578063b72de7fc14610252578063ce15861214610265578063d19050ee14610285578063f77c47911461029a576100f3565b8063a6d868b6146101f5578063adce1c5f1461020a578063b15776821461021f578063b6dffa3f1461023f576100f3565b80636c77ecd4116100c65780636c77ecd41461017c5780638117abc11461019e57806390610b0e146101b35780639d318d66146101d5576100f3565b80630df63210146100f8578063486525c9146101235780634c30d6c9146101455780635a6971f91461015a575b600080fd5b34801561010457600080fd5b5061010d6102af565b60405161011a9190611fa3565b60405180910390f35b34801561012f57600080fd5b5061014361013e366004611b27565b6102d3565b005b34801561015157600080fd5b5061010d61030b565b34801561016657600080fd5b5061016f61032f565b60405161011a9190611e2a565b34801561018857600080fd5b50610191610353565b60405161011a9190611f98565b3480156101aa57600080fd5b5061016f610377565b3480156101bf57600080fd5b506101c861039b565b60405161011a9190612068565b3480156101e157600080fd5b506101436101f036600461188e565b6103d4565b34801561020157600080fd5b506101c8610454565b34801561021657600080fd5b5061016f610484565b34801561022b57600080fd5b5061016f61023a366004611c49565b6104a8565b61016f61024d366004611a5d565b6104bb565b61016f610260366004611938565b61060d565b34801561027157600080fd5b5061016f610280366004611a33565b610752565b34801561029157600080fd5b5061016f610765565b3480156102a657600080fd5b5061016f610789565b7f294121595e45ce2f595cc5d8c53809eed55034713b3781938f2c25ea2f7ed9df81565b60005b81811015610304576102fb85858585858181106102ef57fe5b90506020020135610824565b506001016102d6565b5050505050565b7f955c17f8655850cf80e8446390a2bd7ba809a4af212a3b8fe68b04e3f03af21781565b7f000000000000000000000000f61f3c9cecb8d206dea1faed99a693e6d3baaef281565b7f000000000000000000000000000000000000000000000000000000000000000181565b7f000000000000000000000000e5857440bbff64c98ceb70d650805e1e96adde7a81565b6040518060400160405280600f81526020017f57414c4c45545f4352454154494f4e000000000000000000000000000000000081525081565b61044b878787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b0181900481028201810190925289815292508991508890819084018382808284376000920191909152508892506108e7915050565b50505050505050565b606061047f7f000000000000000000000000e5857440bbff64c98ceb70d650805e1e96adde7a610b93565b905090565b7f000000000000000000000000f58d55f06bb92f083e78bb5063a2dd3544f9b6a381565b60006104b5600083610bf9565b92915050565b60006105688c8c60008d8d8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020808e0282810182019093528d82528f94509092508d918d9182919085019084908082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b9081908401838280828437600092019190915250610c8c92505050565b61057485858e8e610e35565b90506105fe818d8c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052508e93509150610f7b9050565b9b9a5050505050505050505050565b60006106ba8c60008d8d8d8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020808e0282810182019093528d82528f94509092508d918d9182919085019084908082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b9081908401838280828437600092019190915250610c8c92505050565b6106c58b86866110bc565b90506105fe818d8c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d925060019150610f7b9050565b600061075e8383610bf9565b9392505050565b7f000000000000000000000000084b1c3c81545d370f3634392de611caabff814881565b7f000000000000000000000000b39e09279d4035c0f92307741d9dd8ed66e74de081565b6000804690507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f836000015180519060200120846020015180519060200120838660400151604051602001610806959493929190611ff8565b60405160208183030381529060405280519060200120915050919050565b60006108338484600085610e35565b90506000848460405160200161084a929190611f2a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012073ffffffffffffffffffffffffffffffffffffffff861660009081529182905291902081905591507f4dc3e5ea78260cf367afeb08d05f788d6af83c2c6db8117694a31ec0e26b3efd906108d79084908490611ebd565b60405180910390a1509392505050565b600083511180156108f9575060008251115b610938576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f90612235565b60405180910390fd5b6040517f76d6497400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000f61f3c9cecb8d206dea1faed99a693e6d3baaef216906376d64974906109b0908890889088908890600401611e72565b600060405180830381600087803b1580156109ca57600080fd5b505af11580156109de573d6000803e3d6000fd5b505050508015610304576060630f5a546660e01b60007f000000000000000000000000f58d55f06bb92f083e78bb5063a2dd3544f9b6a3604051602401610a26929190611e4b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290517f7122b74c00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff871690637122b74c90610b1f906001907f000000000000000000000000084b1c3c81545d370f3634392de611caabff814890600090879060040161226c565b600060405180830381600087803b158015610b3957600080fd5b505af1158015610b4d573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261044b9190810190611b90565b60408051603781527f3d602d80600a3d3981f3363d3d373d3d3d363d730000000000000000000000006020820152606092831b60348201527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006048820152918201905290565b600061075e6040518060400160405280600f81526020017f57414c4c45545f4352454154494f4e00000000000000000000000000000000008152508484604051602001610c4893929190611d80565b60405160208183030381529060405280519060200120610c877f000000000000000000000000e5857440bbff64c98ceb70d650805e1e96adde7a610b93565b6111cf565b73ffffffffffffffffffffffffffffffffffffffff871615801590610ccd5750610ccb8773ffffffffffffffffffffffffffffffffffffffff166111dc565b155b610d03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f906121c7565b6000825111610d3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f90612122565b60607f955c17f8655850cf80e8446390a2bd7ba809a4af212a3b8fe68b04e3f03af21788888888805190602001208888604051602001610d7e9190611f3e565b60405160208183030381529060405280519060200120604051602001610daa9796959493929190611fac565b60405160208183030381529060405290506000610de77f294121595e45ce2f595cc5d8c53809eed55034713b3781938f2c25ea2f7ed9df83611213565b9050610df4818a85611284565b610e2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f90612159565b505050505050505050565b6000610ec86040518060400160405280600f81526020017f57414c4c45545f4352454154494f4e00000000000000000000000000000000008152508484604051602001610e8493929190611d80565b60405160208183030381529060405280519060200120610ec37f000000000000000000000000e5857440bbff64c98ceb70d650805e1e96adde7a610b93565b6112ef565b6040517f3c5a3cea00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff821690633c5a3cea90610f41907f000000000000000000000000b39e09279d4035c0f92307741d9dd8ed66e74de0908990899060040161207b565b600060405180830381600087803b158015610f5b57600080fd5b505af1158015610f6f573d6000803e3d6000fd5b50505050949350505050565b610f9a8673ffffffffffffffffffffffffffffffffffffffff1661134b565b73ffffffffffffffffffffffffffffffffffffffff16630d009297866040518263ffffffff1660e01b8152600401610fd29190611e2a565b600060405180830381600087803b158015610fec57600080fd5b505af1158015611000573d6000803e3d6000fd5b505050506000845111156110205761101b86868686866108e7565b611077565b7f0000000000000000000000000000000000000000000000000000000000000001611077576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f906120b4565b7f60488568340cbdf60d672f6b1b896cde221bdcd9062bdd6a95cfded547013d13868587846040516110ac9493929190611ee3565b60405180910390a1505050505050565b60008083836040516020016110d2929190611f2a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012073ffffffffffffffffffffffffffffffffffffffff88166000908152928390529120549091508114611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f906120eb565b73ffffffffffffffffffffffffffffffffffffffff851660009081526020819052604080822091909155517fd722f65e2020c25177252b959d040ad8f01463b4c6bb7ca601cb72e3188b9aef906111be908790611e2a565b60405180910390a150929392505050565b600061075e83833061134e565b6000813f801580159061075e57507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470141592915050565b60006040518060400160405280600281526020017f190100000000000000000000000000000000000000000000000000000000000081525083838051906020012060405160200161126693929190611dd2565b60405160208183030381529060405280519060200120905092915050565b600073ffffffffffffffffffffffffffffffffffffffff83166112a95750600061075e565b6112c88373ffffffffffffffffffffffffffffffffffffffff166111dc565b6112dc576112d78484846113e9565b6112e7565b6112e7848484611523565b949350505050565b600080838351602085016000f5905073ffffffffffffffffffffffffffffffffffffffff811661075e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f906121fe565b90565b81516020808401919091206040516000928391611393917fff000000000000000000000000000000000000000000000000000000000000009187918a91879101611d00565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018152919052805160209091012073ffffffffffffffffffffffffffffffffffffffff169695505050505050565b600073ffffffffffffffffffffffffffffffffffffffff831661140e5750600061075e565b815160009061141e90600161167f565b9050600061142c84836116c1565b60ff16600481111561143a57fe5b8285529050600281600481111561144d57fe5b14156114925761145d86856116dd565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16149250611516565b60038160048111156114a057fe5b1415611511576000866040516020016114b99190611df9565b6040516020818303038152906040528051906020012090506114db81866116dd565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614935050611516565b600092505b5060010182529392505050565b60006060631626ba7e60e01b8584604051602401611542929190612031565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600060608573ffffffffffffffffffffffffffffffffffffffff16836040516115ca9190611d64565b600060405180830381855afa9150503d8060008114611605576040519150601f19603f3d011682016040523d82523d6000602084013e61160a565b606091505b509150915081801561161d575080516020145b801561167457507f1626ba7e000000000000000000000000000000000000000000000000000000006116508260006117b5565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b979650505050505050565b6000828211156116bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f90612190565b50900390565b600081600101835110156116d457600080fd5b50016001015190565b600081516041146116f0575060006104b5565b60208201516040830151604184015160ff167f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a082111561173657600093505050506104b5565b8060ff16601b148061174b57508060ff16601c145b156117a95760018682858560405160008152602001604052604051611773949392919061204a565b6020604051602081039080840390855afa158015611795573d6000803e3d6000fd5b5050506020604051035193505050506104b5565b600093505050506104b5565b600081600401835110156117c857600080fd5b50016020015190565b803573ffffffffffffffffffffffffffffffffffffffff811681146104b557600080fd5b60008083601f840112611806578182fd5b50813567ffffffffffffffff81111561181d578182fd5b602083019150836020808302850101111561183757600080fd5b9250929050565b803580151581146104b557600080fd5b60008083601f84011261185f578182fd5b50813567ffffffffffffffff811115611876578182fd5b60208301915083602082850101111561183757600080fd5b600080600080600080600060a0888a0312156118a8578283fd5b87356118b3816122da565b965060208801356118c3816122da565b9550604088013567ffffffffffffffff808211156118df578485fd5b6118eb8b838c0161184e565b909750955060608a0135915080821115611903578485fd5b506119108a828b0161184e565b90945092505060808801358015158114611928578182fd5b8091505092959891949750929550565b600080600080600080600080600080600060e08c8e031215611958578384fd5b6119628d8d6117d1565b9a506119718d60208e016117d1565b995067ffffffffffffffff8060408e0135111561198c578485fd5b61199c8e60408f01358f0161184e565b909a50985060608d01358110156119b1578485fd5b6119c18e60608f01358f0161184e565b90985096506119d38e60808f0161183e565b95508060a08e013511156119e5578485fd5b6119f58e60a08f01358f016117f5565b909550935060c08d0135811015611a0a578283fd5b50611a1b8d60c08e01358e0161184e565b81935080925050509295989b509295989b9093969950565b60008060408385031215611a45578182fd5b611a4f84846117d1565b946020939093013593505050565b600080600080600080600080600080600060e08c8e031215611a7d578081fd5b611a878d8d6117d1565b9a5060208c0135995067ffffffffffffffff8060408e01351115611aa9578182fd5b611ab98e60408f01358f0161184e565b909a50985060608d0135811015611ace578182fd5b611ade8e60608f01358f0161184e565b9098509650611af08e60808f0161183e565b95508060a08e01351115611b02578182fd5b611b128e60a08f01358f016117f5565b909550935060c08d0135811015611a0a578182fd5b60008060008060408587031215611b3c578384fd5b843567ffffffffffffffff80821115611b53578586fd5b611b5f888389016117f5565b90965094506020870135915080821115611b77578384fd5b50611b84878288016117f5565b95989497509550505050565b600060208284031215611ba1578081fd5b815167ffffffffffffffff80821115611bb8578283fd5b818401915084601f830112611bcb578283fd5b815181811115611bd9578384fd5b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715611c17578586fd5b604052818152838201602001871015611c2e578485fd5b611c3f8260208301602087016122aa565b9695505050505050565b600060208284031215611c5a578081fd5b5035919050565b60008284526020808501945082825b85811015611cab5782820173ffffffffffffffffffffffffffffffffffffffff611c9a82856117d1565b168852968301969150600101611c70565b509495945050505050565b60008151808452611cce8160208601602086016122aa565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fff0000000000000000000000000000000000000000000000000000000000000094909416845260609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660018401526015830152603582015260550190565b60008251611d768184602087016122aa565b9190910192915050565b60008451611d928184602089016122aa565b60609490941b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001691909301908152601481019190915260340192915050565b60008451611de48184602089016122aa565b91909101928352506020820152604001919050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525060806040830152611eab6080830185611cb6565b82810360608401526116748185611cb6565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b600073ffffffffffffffffffffffffffffffffffffffff808716835260806020840152611f136080840187611cb6565b941660408301525090151560609091015292915050565b6000602082526112e7602083018486611c61565b6020808252825182820181905260009190848201906040850190845b81811015611f8c57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101611f5a565b50909695505050505050565b901515815260200190565b90815260200190565b96875273ffffffffffffffffffffffffffffffffffffffff95861660208801526040870194909452919093166060850152608084019290925290151560a083015260c082015260e00190565b94855260208501939093526040840191909152606083015273ffffffffffffffffffffffffffffffffffffffff16608082015260a00190565b6000838252604060208301526112e76040830184611cb6565b93845260ff9290921660208401526040830152606082015260800190565b60006020825261075e6020830184611cb6565b600073ffffffffffffffffffffffffffffffffffffffff85168252604060208301526120ab604083018486611c61565b95945050505050565b60208082526015908201527f454d5054595f454e535f4e4f545f414c4c4f5745440000000000000000000000604082015260600190565b6020808252600d908201527f494e56414c49445f41444f424500000000000000000000000000000000000000604082015260600190565b6020808252600d908201527f454d5054595f4d4f44554c455300000000000000000000000000000000000000604082015260600190565b60208082526011908201527f494e56414c49445f5349474e4154555245000000000000000000000000000000604082015260600190565b6020808252600d908201527f5355425f554e444552464c4f5700000000000000000000000000000000000000604082015260600190565b6020808252600d908201527f494e56414c49445f4f574e455200000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f435245415445325f4641494c4544000000000000000000000000000000000000604082015260600190565b6020808252601a908201527f494e56414c49445f4c4142454c5f4f525f5349474e4154555245000000000000604082015260600190565b600060ff8616825273ffffffffffffffffffffffffffffffffffffffff8516602083015283604083015260806060830152611c3f6080830184611cb6565b60005b838110156122c55781810151838201526020016122ad565b838111156122d4576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff811681146122fc57600080fd5b5056fea264697066735822122018e0b1a9e386d36c68810d375ae38a7033129f3bb1bc1e9bc3a81cf6bf8f0ded64736f6c63430007000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b39e09279d4035c0f92307741d9dd8ed66e74de0000000000000000000000000e5857440bbff64c98ceb70d650805e1e96adde7a0000000000000000000000000000000000000000000000000000000000000001
-----Decoded View---------------
Arg [0] : _controller (address): 0xb39e09279D4035c0F92307741d9dd8ed66e74de0
Arg [1] : _walletImplementation (address): 0xE5857440BBFF64C98CEb70d650805E1E96addE7A
Arg [2] : _allowEmptyENS (bool): True
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000b39e09279d4035c0f92307741d9dd8ed66e74de0
Arg [1] : 000000000000000000000000e5857440bbff64c98ceb70d650805e1e96adde7a
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001
Deployed Bytecode Sourcemap
114600:9825:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;115218:53;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;116497:244;;;;;;;;;;-1:-1:-1;116497:244:0;;;;;:::i;:::-;;:::i;:::-;;114969:197;;;;;;;;;;;;;:::i;115486:47::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;115396:50::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;115332:57::-;;;;;;;;;;;;;:::i;114902:58::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;119490:337::-;;;;;;;;;;-1:-1:-1;119490:337:0;;;;;:::i;:::-;;:::i;120184:172::-;;;;;;;;;;;;;:::i;115540:48::-;;;;;;;;;;;;;:::i;120015:161::-;;;;;;;;;;-1:-1:-1;120015:161:0;;;;;:::i;:::-;;:::i;117258:849::-;;;;;;:::i;:::-;;:::i;118641:841::-;;;;;;:::i;:::-;;:::i;119835:172::-;;;;;;;;;;-1:-1:-1;119835:172:0;;;;;:::i;:::-;;:::i;115595:56::-;;;;;;;;;;;;;:::i;115278:47::-;;;;;;;;;;;;;:::i;115218:53::-;;;:::o;116497:244::-;116641:6;116636:98;116653:16;;;116636:98;;;116691:31;116704:7;;116713:5;;116719:1;116713:8;;;;;;;;;;;;;116691:12;:31::i;:::-;-1:-1:-1;116671:3:0;;116636:98;;;;116497:244;;;;:::o;114969:197::-;115018:148;114969:197;:::o;115486:47::-;;;:::o;115396:50::-;;;:::o;115332:57::-;;;:::o;114902:58::-;;;;;;;;;;;;;;;;;;;:::o;119490:337::-;119744:75;119757:7;119766:6;119774:9;;119744:75;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;119744:75:0;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;119785:12:0;;-1:-1:-1;119785:12:0;;;;119744:75;;119785:12;;;;119744:75;;;;;;;;;-1:-1:-1;119799:19:0;;-1:-1:-1;119744:12:0;;-1:-1:-1;;119744:75:0:i;:::-;119490:337;;;;;;;:::o;120184:172::-;120265:12;120302:46;120327:20;120302:24;:46::i;:::-;120295:53;;120184:172;:::o;115540:48::-;;;:::o;120015:161::-;120103:7;120135:33;120159:1;120163:4;120135:15;:33::i;:::-;120128:40;120015:161;-1:-1:-1;;120015:161:0:o;117258:849::-;117623:15;117656:199;117687:6;117708:5;117736:1;117753:9;;117656:199;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;117656:199:0;;;;;;;;;;;;;;;;;;117777:19;;-1:-1:-1;117656:199:0;;-1:-1:-1;117811:8:0;;;;;;117656:199;;;;117811:8;;117656:199;117811:8;117656:199;;;;;;;;;-1:-1:-1;;117656:199:0;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;117834:10:0;;-1:-1:-1;117834:10:0;;;;117656:199;;117834:10;;;;117656:199;;;;;;;;;-1:-1:-1;117656:16:0;;-1:-1:-1;;;117656:199:0:i;:::-;117878:32;117886:8;;117896:6;117904:5;117878:7;:32::i;:::-;117868:42;;117923:176;117955:7;117977:6;117998:9;;117923:176;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;118022:12;;117923:176;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;118049:19:0;;-1:-1:-1;117923:176:0;-1:-1:-1;117923:17:0;;-1:-1:-1;117923:176:0:i;:::-;117258:849;;;;;;;;;;;;;:::o;118641:841::-;119008:15;119041:191;119072:6;119093:1;119109:6;119130:9;;119041:191;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;119041:191:0;;;;;;;;;;;;;;;;;;119154:19;;-1:-1:-1;119041:191:0;;-1:-1:-1;119188:8:0;;;;;;119041:191;;;;119188:8;;119041:191;119188:8;119041:191;;;;;;;;;-1:-1:-1;;119041:191:0;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;119211:10:0;;-1:-1:-1;119211:10:0;;;;119041:191;;119211:10;;;;119041:191;;;;;;;;;-1:-1:-1;119041:16:0;;-1:-1:-1;;;119041:191:0:i;:::-;119255:31;119269:6;119277:8;;119255:13;:31::i;:::-;119245:41;;119299:175;119331:7;119353:6;119374:9;;119299:175;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;119398:12;;119299:175;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;119425:19:0;;-1:-1:-1;119459:4:0;;-1:-1:-1;119299:17:0;;-1:-1:-1;119299:175:0:i;119835:172::-;119939:7;119971:28;119987:5;119994:4;119971:15;:28::i;:::-;119964:35;119835:172;-1:-1:-1;;;119835:172:0:o;115595:56::-;;;:::o;115278:47::-;;;:::o;26233:466::-;26319:7;26344:13;26391:9;26379:21;;26053:111;26531:6;:11;;;26515:29;;;;;;26579:6;:14;;;26563:32;;;;;;26614:8;26641:6;:24;;;26445:235;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;26421:270;;;;;;26414:277;;;26233:466;;;:::o;120735:352::-;120866:13;120905:34;120913:7;;120930:1;120934:4;120905:7;:34::i;:::-;120897:42;;120950:15;120989:7;;120978:19;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;120968:30;;120978:19;120968:30;;;;121009:13;;;:6;:13;;;;;;;;;;:23;;;120968:30;-1:-1:-1;121050:29:0;;;;121016:5;;120968:30;;121050:29;:::i;:::-;;;;;;;;120735:352;;;;;;:::o;123504:918::-;123790:1;123771:8;123765:22;:26;:65;;;;;123829:1;123808:11;:18;:22;123765:65;123743:141;;;;;;;;;;;;:::i;:::-;;;;;;;;;123897:57;;;;;:19;:10;:19;;;;:57;;123917:6;;123925:5;;123932:8;;123942:11;;123897:57;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;123971:18;123967:448;;;124006:17;124067:46;;;124140:1;124196:11;124026:196;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;124239:164;;;;;124026:196;;-1:-1:-1;124239:23:0;;;;;;:164;;124287:1;;124316:19;;-1:-1:-1;;124026:196:0;;124239:164;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;79522:536::-;79692:4;79686:11;;79722:4;79705:22;;79791:66;79764:4;79750:19;;79777:81;79582:21;79634:15;;;79873:16;;;79866:37;79936:66;79918:16;;;79911:92;80026:19;;;80013:33;;79686:11;79665:388::o;123158:338::-;123290:7;123322:166;123386:15;;;;;;;;;;;;;;;;;123403:5;123410:4;123369:46;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;123359:57;;;;;;123431:46;123456:20;123431:24;:46::i;:::-;123322:22;:166::i;121545:958::-;121917:20;;;;;;;:44;;;121942:19;:6;:17;;;:19::i;:::-;121941:20;121917:44;121909:70;;;;;;;;;;;;:::i;:::-;122016:1;121998:8;:15;:19;121990:45;;;;;;;;;;;;:::i;:::-;122048:27;115018:148;122140:6;122161:5;122181:13;122225:9;122209:27;;;;;;122251:19;122306:8;122295:20;;;;;;;;:::i;:::-;;;;;;;;;;;;;122285:31;;;;;;122078:249;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;122048:279;;122340:16;122359:51;122377:16;122395:14;122359:17;:51::i;:::-;122340:70;-1:-1:-1;122429:44:0;122340:70;122454:6;122462:10;122429:24;:44::i;:::-;122421:74;;;;;;;;;;;;:::i;:::-;121545:958;;;;;;;;;:::o;121095:442::-;121265:22;121314:158;121370:15;;;;;;;;;;;;;;;;;121387:5;121394:4;121353:46;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;121343:57;;;;;;121415:46;121440:20;121415:24;:46::i;:::-;121314:14;:158::i;:::-;121485:44;;;;;121305:167;;-1:-1:-1;121485:23:0;;;;;;:44;;121509:10;;121521:7;;;;121485:44;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;121095:442;;;;;;:::o;122511:639::-;122806:19;:7;:17;;;:19::i;:::-;122795:41;;;122837:6;122795:49;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;122887:1;122867:9;122861:23;:27;122857:215;;;122905:75;122918:7;122927:6;122935:9;122946:12;122960:19;122905:12;:75::i;:::-;122857:215;;;123021:13;123013:47;;;;;;;;;;;;:::i;:::-;123089:53;123103:7;123112:9;123123:6;123131:10;123089:53;;;;;;;;;:::i;:::-;;;;;;;;122511:639;;;;;;:::o;120364:363::-;120495:7;120520:15;120559:7;;120548:19;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;120538:30;;120548:19;120538:30;;;;120587:13;;;:6;:13;;;;;;;;;;120538:30;;-1:-1:-1;120587:24:0;;120579:50;;;;;;;;;;;;:::i;:::-;120647:13;;;:6;:13;;;;;;;;;;;120640:20;;;;120676;;;;;120654:5;;120676:20;:::i;:::-;;;;;;;;-1:-1:-1;120714:5:0;;120364:363;-1:-1:-1;;;120364:363:0:o;28426:164::-;28510:7;28537:45;28552:4;28558:8;28576:4;28537:14;:45::i;22579:638::-;22683:4;23057:17;;23094:15;;;;;:114;;-1:-1:-1;23142:66:0;23130:78;;;23086:123;-1:-1:-1;;22579:638:0:o;26707:299::-;26859:7;26932:13;;;;;;;;;;;;;;;;;26947:15;26974:11;26964:22;;;;;;26915:72;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;26891:107;;;;;;26884:114;;26707:299;;;;:::o;68150:448::-;68337:4;68363:20;;;68359:65;;-1:-1:-1;68407:5:0;68400:12;;68359:65;68443:19;:6;:17;;;:19::i;:::-;:147;;68543:47;68562:8;68572:6;68580:9;68543:18;:47::i;:::-;68443:147;;;68477:51;68500:8;68510:6;68518:9;68477:22;:51::i;:::-;68436:154;68150:448;-1:-1:-1;;;;68150:448:0:o;27851:369::-;27922:15;27950:20;28119:4;28108:8;28102:15;28095:4;28085:8;28081:19;28078:1;28070:54;28062:62;-1:-1:-1;28153:18:0;;;28145:45;;;;;;;;;;;;:::i;23225:164::-;23376:4;23225:164::o;28839:357::-;28992:23;;;;;;;;;;29066:64;;28945:7;;;;29066:64;;29083:12;;29097:8;;29107:4;;28992:23;;29066:64;;:::i;:::-;;;;;;;;;;;;;;29042:99;;29066:64;29042:99;;;;29159:29;;;28839:357;-1:-1:-1;;;;;;28839:357:0:o;69730:1232::-;69919:12;69953:20;;;69949:65;;-1:-1:-1;69997:5:0;69990:12;;69949:65;70053:16;;70026:24;;70053:23;;70074:1;70053:20;:23::i;:::-;70026:50;-1:-1:-1;70087:27:0;70131:38;:9;70026:50;70131:17;:38::i;:::-;70117:53;;;;;;;;;;70283:38;;;70087:83;-1:-1:-1;70365:21:0;70348:13;:38;;;;;;;;;70344:450;;;70424:39;70443:8;70453:9;70424:18;:39::i;:::-;70414:49;;:6;:49;;;70403:61;;70344:450;;;70503:22;70486:13;:39;;;;;;;;;70482:312;;;70542:12;70638:8;70585:62;;;;;;;;:::i;:::-;;;;;;;;;;;;;70557:105;;;;;;70542:120;;70698:35;70717:4;70723:9;70698:18;:35::i;:::-;70688:45;;:6;:45;;;70677:57;;70482:312;;;;70777:5;70767:15;;70482:312;-1:-1:-1;70914:1:0;70889:27;70871:46;;69730:1232;;;;;:::o;70970:581::-;71149:4;71171:21;71232:33;;;71280:8;71303:9;71195:128;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;71171:152;;71335:12;71349:19;71372:6;:17;;71390:8;71372:27;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;71334:65;;;;71432:7;:43;;;;;71456:6;:13;71473:2;71456:19;71432:43;:100;;;;-1:-1:-1;71514:18:0;71492;:6;71508:1;71492:15;:18::i;:::-;:40;;;71432:100;71410:133;70970:581;-1:-1:-1;;;;;;;70970:581:0:o;66461:193::-;66569:4;66604:1;66599;:6;;66591:32;;;;;;;;;;;;:::i;:::-;-1:-1:-1;66641:5:0;;;66461:193::o;62157:287::-;62232:5;62276:6;62285:1;62276:10;62258:6;:13;:29;;62250:38;;;;;;-1:-1:-1;62368:29:0;62384:3;62368:29;62362:36;;62157:287::o;68606:1116::-;68760:7;68789:9;:16;68809:2;68789:22;68785:72;;-1:-1:-1;68843:1:0;68828:17;;68785:72;69194:4;69179:20;;69173:27;69240:4;69225:20;;69219:27;69290:4;69275:20;;69269:27;69298:4;69265:38;69457:66;69444:79;;69440:129;;;69555:1;69540:17;;;;;;;69440:129;69583:1;:7;;69588:2;69583:7;:18;;;;69594:1;:7;;69599:2;69594:7;69583:18;69579:136;;;69625:28;69635:8;69645:1;69648;69651;69625:28;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;69618:35;;;;;;;69579:136;69701:1;69686:17;;;;;;;64546:297;64622:6;64667;64676:1;64667:10;64649:6;:13;:29;;64641:38;;;;;;-1:-1:-1;64764:30:0;64780:4;64764:30;64758:37;;64546:297::o;5:130:-1:-;72:20;;34087:42;34076:54;;36366:35;;36356:2;;36415:1;;36405:12;160:352;;;290:3;283:4;275:6;271:17;267:27;257:2;;-1:-1;;298:12;257:2;-1:-1;328:20;;368:18;357:30;;354:2;;;-1:-1;;390:12;354:2;434:4;426:6;422:17;410:29;;485:3;434:4;;469:6;465:17;426:6;451:32;;448:41;445:2;;;502:1;;492:12;445:2;250:262;;;;;:::o;898:124::-;962:20;;33758:13;;33751:21;36487:32;;36477:2;;36533:1;;36523:12;1043:336;;;1157:3;1150:4;1142:6;1138:17;1134:27;1124:2;;-1:-1;;1165:12;1124:2;-1:-1;1195:20;;1235:18;1224:30;;1221:2;;;-1:-1;;1257:12;1221:2;1301:4;1293:6;1289:17;1277:29;;1352:3;1301:4;1332:17;1293:6;1318:32;;1315:41;1312:2;;;1369:1;;1359:12;2335:987;;;;;;;;2543:3;2531:9;2522:7;2518:23;2514:33;2511:2;;;-1:-1;;2550:12;2511:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;2602:63;-1:-1;2702:2;2741:22;;72:20;97:33;72:20;97:33;:::i;:::-;2710:63;-1:-1;2838:2;2823:18;;2810:32;2862:18;2851:30;;;2848:2;;;-1:-1;;2884:12;2848:2;2922:65;2979:7;2970:6;2959:9;2955:22;2922:65;:::i;:::-;2904:83;;-1:-1;2904:83;-1:-1;3052:2;3037:18;;3024:32;;-1:-1;3065:30;;;3062:2;;;-1:-1;;3098:12;3062:2;;3136:64;3192:7;3183:6;3172:9;3168:22;3136:64;:::i;:::-;3118:82;;-1:-1;3118:82;-1:-1;;3237:3;3274:22;;962:20;33758:13;;33751:21;36487:32;;36477:2;;-1:-1;;36523:12;36477:2;3246:60;;;;2505:817;;;;;;;;;;:::o;3329:1521::-;;;;;;;;;;;;3626:3;3614:9;3605:7;3601:23;3597:33;3594:2;;;-1:-1;;3633:12;3594:2;3695:53;3740:7;3716:22;3695:53;:::i;:::-;3685:63;;3803:53;3848:7;3785:2;3828:9;3824:22;3803:53;:::i;:::-;3793:63;;3945:18;;3921:2;3910:9;3906:18;3893:32;3934:30;3931:2;;;-1:-1;;3967:12;3931:2;4005:65;4062:7;3921:2;3910:9;3906:18;3893:32;4042:9;4038:22;4005:65;:::i;:::-;3987:83;;-1:-1;3987:83;-1:-1;4135:2;4120:18;;4107:32;4148:30;-1:-1;4145:2;;;-1:-1;;4181:12;4145:2;4219:64;4275:7;4135:2;4124:9;4120:18;4107:32;4255:9;4251:22;4219:64;:::i;:::-;4201:82;;-1:-1;4201:82;-1:-1;4339:50;4381:7;4320:3;4357:22;;4339:50;:::i;:::-;4329:60;;3945:18;4454:3;4443:9;4439:19;4426:33;4468:30;4465:2;;;-1:-1;;4501:12;4465:2;4539:80;4611:7;4454:3;4443:9;4439:19;4426:33;4591:9;4587:22;4539:80;:::i;:::-;4521:98;;-1:-1;4521:98;-1:-1;4684:3;4669:19;;4656:33;4698:30;-1:-1;4695:2;;;-1:-1;;4731:12;4695:2;;4770:64;4826:7;4684:3;4673:9;4669:19;4656:33;4806:9;4802:22;4770:64;:::i;:::-;4751:83;;;;;;;;3588:1262;;;;;;;;;;;;;;:::o;4857:366::-;;;4978:2;4966:9;4957:7;4953:23;4949:32;4946:2;;;-1:-1;;4984:12;4946:2;5046:53;5091:7;5067:22;5046:53;:::i;:::-;5036:63;5136:2;5175:22;;;;2265:20;;-1:-1;;;4940:283::o;5230:1521::-;;;;;;;;;;;;5527:3;5515:9;5506:7;5502:23;5498:33;5495:2;;;-1:-1;;5534:12;5495:2;5596:53;5641:7;5617:22;5596:53;:::i;:::-;5586:63;;5686:2;5729:9;5725:22;2265:20;5694:63;;5846:18;;5822:2;5811:9;5807:18;5794:32;5835:30;5832:2;;;-1:-1;;5868:12;5832:2;5906:65;5963:7;5822:2;5811:9;5807:18;5794:32;5943:9;5939:22;5906:65;:::i;:::-;5888:83;;-1:-1;5888:83;-1:-1;6036:2;6021:18;;6008:32;6049:30;-1:-1;6046:2;;;-1:-1;;6082:12;6046:2;6120:64;6176:7;6036:2;6025:9;6021:18;6008:32;6156:9;6152:22;6120:64;:::i;:::-;6102:82;;-1:-1;6102:82;-1:-1;6240:50;6282:7;6221:3;6258:22;;6240:50;:::i;:::-;6230:60;;5846:18;6355:3;6344:9;6340:19;6327:33;6369:30;6366:2;;;-1:-1;;6402:12;6366:2;6440:80;6512:7;6355:3;6344:9;6340:19;6327:33;6492:9;6488:22;6440:80;:::i;:::-;6422:98;;-1:-1;6422:98;-1:-1;6585:3;6570:19;;6557:33;6599:30;-1:-1;6596:2;;;-1:-1;;6632:12;6758:678;;;;;6949:2;6937:9;6928:7;6924:23;6920:32;6917:2;;;-1:-1;;6955:12;6917:2;7013:17;7000:31;7051:18;;7043:6;7040:30;7037:2;;;-1:-1;;7073:12;7037:2;7111:80;7183:7;7174:6;7163:9;7159:22;7111:80;:::i;:::-;7093:98;;-1:-1;7093:98;-1:-1;7256:2;7241:18;;7228:32;;-1:-1;7269:30;;;7266:2;;;-1:-1;;7302:12;7266:2;;7340:80;7412:7;7403:6;7392:9;7388:22;7340:80;:::i;:::-;6911:525;;;;-1:-1;7322:98;-1:-1;;;;6911:525::o;7443:360::-;;7567:2;7555:9;7546:7;7542:23;7538:32;7535:2;;;-1:-1;;7573:12;7535:2;7624:17;7618:24;7662:18;;7654:6;7651:30;7648:2;;;-1:-1;;7684:12;7648:2;7770:6;7759:9;7755:22;;;1500:3;1493:4;1485:6;1481:17;1477:27;1467:2;;-1:-1;;1508:12;1467:2;1548:6;1542:13;7662:18;31414:6;31411:30;31408:2;;;-1:-1;;31444:12;31408:2;31078;31072:9;7567:2;31517:9;1493:4;31502:6;31498:17;31494:33;31108:6;31104:17;;31215:6;31203:10;31200:22;7662:18;31167:10;31164:34;31161:62;31158:2;;;-1:-1;;31226:12;31158:2;31078;31245:22;1640:21;;;1740:16;;;7567:2;1740:16;1737:25;-1:-1;1734:2;;;-1:-1;;1765:12;1734:2;1785:39;1817:6;7567:2;1716:5;1712:16;7567:2;1682:6;1678:17;1785:39;:::i;:::-;7704:83;7529:274;-1:-1;;;;;;7529:274::o;7810:241::-;;7914:2;7902:9;7893:7;7889:23;7885:32;7882:2;;;-1:-1;;7920:12;7882:2;-1:-1;2265:20;;7876:175;-1:-1;7876:175::o;8804:665::-;;32654:6;32649:3;32642:19;32691:4;;32686:3;32682:14;8951:93;;9129:21;-1:-1;9156:291;9181:6;9178:1;9175:13;9156:291;;;32691:4;9277:6;33461:12;34087:42;33435:39;33461:12;9277:6;33435:39;:::i;:::-;34076:54;8327:45;;8212:14;;;;9368:72;-1:-1;9203:1;9196:9;9156:291;;;-1:-1;9453:10;;8938:531;-1:-1;;;;;8938:531::o;10751:343::-;;10893:5;31993:12;32654:6;32649:3;32642:19;10986:52;11031:6;32691:4;32686:3;32682:14;32691:4;11012:5;11008:16;10986:52;:::i;:::-;36188:2;36168:14;36184:7;36164:28;11050:39;;;;32691:4;11050:39;;10841:253;-1:-1;;10841:253::o;16285:665::-;33856:66;33845:78;;;;10404:56;;36279:2;36275:14;;;;;;16590:1;16581:11;;8703:58;16691:12;;;10543:37;16802:12;;;10543:37;16913:12;;;16483:467::o;16957:271::-;;11261:5;31993:12;11372:52;11417:6;11412:3;11405:4;11398:5;11394:16;11372:52;:::i;:::-;11436:16;;;;;17091:137;-1:-1;;17091:137::o;17235:553::-;;11261:5;31993:12;11372:52;11417:6;11412:3;11405:4;11398:5;11394:16;11372:52;:::i;:::-;36279:2;36275:14;;;;;;11436:16;;;;8703:58;;;17649:2;17640:12;;10543:37;;;;17751:12;;;17427:361;-1:-1;;17427:361::o;17795:553::-;;11261:5;31993:12;11372:52;11417:6;11412:3;11405:4;11398:5;11394:16;11372:52;:::i;:::-;11436:16;;;;10543:37;;;-1:-1;11405:4;18200:12;;10543:37;18311:12;;;17987:361;-1:-1;17987:361::o;18355:520::-;13178:66;13158:87;;13142:2;13264:12;;10543:37;;;;18838:12;;;18572:303::o;18882:222::-;34087:42;34076:54;;;;8327:45;;19009:2;18994:18;;18980:124::o;19111:365::-;34087:42;34076:54;;;8327:45;;34076:54;;19462:2;19447:18;;8327:45;19282:2;19267:18;;19253:223::o;19483:728::-;;34087:42;;8365:5;34076:54;8334:3;8327:45;34087:42;8365:5;34076:54;19897:2;19886:9;19882:18;8327:45;;19732:3;19934:2;19923:9;19919:18;19912:48;19974:78;19732:3;19721:9;19717:19;20038:6;19974:78;:::i;:::-;20100:9;20094:4;20090:20;20085:2;20074:9;20070:18;20063:48;20125:76;20196:4;20187:6;20125:76;:::i;20218:333::-;34087:42;34076:54;;;;8327:45;;20537:2;20522:18;;10543:37;20373:2;20358:18;;20344:207::o;20558:632::-;;34087:42;;8365:5;34076:54;8334:3;8327:45;20783:3;20902:2;20891:9;20887:18;20880:48;20942:78;20783:3;20772:9;20768:19;21006:6;20942:78;:::i;:::-;34076:54;;21099:2;21084:18;;8327:45;-1:-1;33758:13;;33751:21;21176:2;21161:18;;;10271:34;20934:86;20754:436;-1:-1;;20754:436::o;21197:390::-;;21384:2;21405:17;21398:47;21459:118;21384:2;21373:9;21369:18;21563:6;21555;21459:118;:::i;21594:370::-;21771:2;21785:47;;;31993:12;;21756:18;;;32642:19;;;21594:370;;21771:2;31847:14;;;;32682;;;;21594:370;9916:260;9941:6;9938:1;9935:13;9916:260;;;10002:13;;34087:42;34076:54;8327:45;;32382:14;;;;8212;;;;9963:1;9956:9;9916:260;;;-1:-1;21838:116;;21742:222;-1:-1;;;;;;21742:222::o;21971:210::-;33758:13;;33751:21;10271:34;;22092:2;22077:18;;22063:118::o;22188:222::-;10543:37;;;22315:2;22300:18;;22286:124::o;22417:880::-;10543:37;;;34087:42;34076:54;;;22871:2;22856:18;;8327:45;22954:2;22939:18;;10543:37;;;;34076:54;;;;23037:2;23022:18;;8327:45;23120:3;23105:19;;10543:37;;;;33758:13;;33751:21;23198:3;23183:19;;10271:34;23282:3;23267:19;;10543:37;22706:3;22691:19;;22677:620::o;23304:668::-;10543:37;;;23708:2;23693:18;;10543:37;;;;23791:2;23776:18;;10543:37;;;;23874:2;23859:18;;10543:37;34087:42;34076:54;23957:3;23942:19;;8327:45;23543:3;23528:19;;23514:458::o;23979:417::-;;10573:5;10550:3;10543:37;24152:2;24270;24259:9;24255:18;24248:48;24310:76;24152:2;24141:9;24137:18;24372:6;24310:76;:::i;24403:548::-;10543:37;;;34292:4;34281:16;;;;24771:2;24756:18;;16238:35;24854:2;24839:18;;10543:37;24937:2;24922:18;;10543:37;24610:3;24595:19;;24581:370::o;24958:306::-;;25103:2;25124:17;25117:47;25178:76;25103:2;25092:9;25088:18;25240:6;25178:76;:::i;25821:547::-;;34087:42;33568:5;34076:54;11565:3;11558:73;26059:2;26200;26189:9;26185:18;26178:48;26240:118;26059:2;26048:9;26044:18;26344:6;26336;26240:118;:::i;:::-;26232:126;26030:338;-1:-1;;;;;26030:338::o;26977:416::-;27177:2;27191:47;;;13515:2;27162:18;;;32642:19;13551:23;32682:14;;;13531:44;13594:12;;;27148:245::o;27400:416::-;27600:2;27614:47;;;13845:2;27585:18;;;32642:19;13881:15;32682:14;;;13861:36;13916:12;;;27571:245::o;27823:416::-;28023:2;28037:47;;;14167:2;28008:18;;;32642:19;14203:15;32682:14;;;14183:36;14238:12;;;27994:245::o;28246:416::-;28446:2;28460:47;;;14489:2;28431:18;;;32642:19;14525;32682:14;;;14505:40;14564:12;;;28417:245::o;28669:416::-;28869:2;28883:47;;;14815:2;28854:18;;;32642:19;14851:15;32682:14;;;14831:36;14886:12;;;28840:245::o;29092:416::-;29292:2;29306:47;;;15137:2;29277:18;;;32642:19;15173:15;32682:14;;;15153:36;15208:12;;;29263:245::o;29515:416::-;29715:2;29729:47;;;15459:2;29700:18;;;32642:19;15495:16;32682:14;;;15475:37;15531:12;;;29686:245::o;29938:416::-;30138:2;30152:47;;;15782:2;30123:18;;;32642:19;15818:28;32682:14;;;15798:49;15866:12;;;30109:245::o;30361:648::-;;34292:4;16266:5;34281:16;16245:3;16238:35;34087:42;8365:5;34076:54;30755:2;30744:9;30740:18;8327:45;35347:24;30846:2;30835:9;30831:18;12090:58;30594:3;30883:2;30872:9;30868:18;30861:48;30923:76;30594:3;30583:9;30579:19;30985:6;30923:76;:::i;35384:268::-;35449:1;35456:101;35470:6;35467:1;35464:13;35456:101;;;35537:11;;;35531:18;35518:11;;;35511:39;35492:2;35485:10;35456:101;;;35572:6;35569:1;35566:13;35563:2;;;35449:1;35628:6;35623:3;35619:16;35612:27;35563:2;;35433:219;;;:::o;36307:117::-;34087:42;36394:5;34076:54;36369:5;36366:35;36356:2;;36415:1;;36405:12;36356:2;36350:74;:::o
Swarm Source
ipfs://18e0b1a9e386d36c68810d375ae38a7033129f3bb1bc1e9bc3a81cf6bf8f0ded
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.