Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
8753007 | 1838 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
DharmaKeyRingImplementationV1
Compiler Version
v0.5.11+commit.c082d0b4
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-10-16 */ pragma solidity 0.5.11; // optimization runs: 200, evm version: petersburg interface DharmaKeyRingImplementationV0Interface { event KeyModified(address indexed key, bool standard, bool admin); enum KeyType { None, Standard, Admin, Dual } enum AdminActionType { AddStandardKey, RemoveStandardKey, SetStandardThreshold, AddAdminKey, RemoveAdminKey, SetAdminThreshold, AddDualKey, RemoveDualKey, SetDualThreshold } struct AdditionalKeyCount { uint128 standard; uint128 admin; } function takeAdminAction( AdminActionType adminActionType, uint160 argument, bytes calldata signatures ) external; function getAdminActionID( AdminActionType adminActionType, uint160 argument, uint256 nonce ) external view returns (bytes32 adminActionID); function getNextAdminActionID( AdminActionType adminActionType, uint160 argument ) external view returns (bytes32 adminActionID); function getKeyCount() external view returns ( uint256 standardKeyCount, uint256 adminKeyCount ); function getKeyType( address key ) external view returns (bool standard, bool admin); function getNonce() external returns (uint256 nonce); function getVersion() external pure returns (uint256 version); } interface ERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param data Arbitrary length data signed on the behalf of address(this) * @param signature Signature byte array associated with data * * MUST return the bytes4 magic value 0x20c13b0b when function passes. * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5) * MUST allow external calls */ function isValidSignature( bytes calldata data, bytes calldata signature ) external view returns (bytes4 magicValue); } library ECDSA { function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { if (signature.length != 65) { return (address(0)); } bytes32 r; bytes32 s; uint8 v; assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return address(0); } if (v != 27 && v != 28) { return address(0); } return ecrecover(hash, v, r, s); } function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } } /** * @title DharmaKeyRingImplementationV1 * @author 0age * @notice The Dharma Key Ring is a smart contract that implements ERC-1271 and * can be used in place of an externally-owned account for the user signing key * on the Dharma Smart Wallet to support multiple user signing keys. For this V1 * implementation, new Dual keys (standard + admin) can be added, but cannot be * removed, and the action threshold is fixed at one. Upgrades are managed by an * upgrade beacon, similar to the one utilized by the Dharma Smart Wallet. Note * that this implementation only implements the minimum feature set required to * support multiple user signing keys on the current Dharma Smart Wallet, and * that it will likely be replaced with a new, more full-featured implementation * relatively soon. V1 differs from V0 in that it requires that an adminActionID * must be prefixed (according to EIP-191 0x45) and hashed in order to construct * a valid signature (note that the message hash given to `isValidSignature` is * assumed to have already been appropriately constructed to fit the caller's * requirements and so does not apply an additional prefix). */ contract DharmaKeyRingImplementationV1 is DharmaKeyRingImplementationV0Interface, ERC1271 { using ECDSA for bytes32; // WARNING: DO NOT REMOVE OR REORDER STORAGE WHEN WRITING NEW IMPLEMENTATIONS! // Track all keys as an address (as uint160) => key type mapping in slot zero. mapping (uint160 => KeyType) private _keys; // Track the nonce in slot 1 so that actions cannot be replayed. Note that // proper nonce management must be managed by the implementing contract when // using `isValidSignature`, as it is a static method and cannot change state. uint256 private _nonce; // Track the total number of standard and admin keys in storage slot 2. AdditionalKeyCount private _additionalKeyCounts; // Track the required threshold standard and admin actions in storage slot 3. // AdditionalThreshold private _additionalThresholds; // END STORAGE DECLARATIONS - DO NOT REMOVE OR REORDER STORAGE ABOVE HERE! // The key ring version will be used when constructing valid signatures. uint256 internal constant _DHARMA_KEY_RING_VERSION = 1; // ERC-1271 must return this magic value when `isValidSignature` is called. bytes4 internal constant _ERC_1271_MAGIC_VALUE = bytes4(0x20c13b0b); /** * @notice In initializer, set up an initial user signing key. For V1, the * adminThreshold and executorThreshold arguments must both be equal to 1 and * exactly one key with a key type of 3 (Dual key) must be supplied. Note that * this initializer is only callable while the key ring instance is still in * the contract creation phase. * @param adminThreshold uint128 Must be equal to 1 in V1. * @param executorThreshold uint128 Must be equal to 1 in V1. * @param keys address[] The initial user signing key for the key ring. Must * have exactly one non-null key in V1. * @param keyTypes uint8[] Must be equal to [3]. */ function initialize( uint128 adminThreshold, uint128 executorThreshold, address[] calldata keys, uint8[] calldata keyTypes // must all be 3 (Dual) for V1 ) external { // Ensure that this function is only callable during contract construction. assembly { if extcodesize(address) { revert(0, 0) } } // V1 only allows setting a singly Dual key with thresholds both set to 1. require(keys.length == 1, "Must supply exactly one key in V1."); require(keys[0] != address(0), "Cannot supply the null address as a key."); require( keyTypes.length == 1 && keyTypes[0] == uint8(3), "Must supply exactly one Dual keyType (3) in V1." ); require(adminThreshold == 1, "Admin threshold must be exactly one in V1."); require( executorThreshold == 1, "Executor threshold must be exactly one in V1." ); // Set the key and emit a corresponding event. _keys[uint160(keys[0])] = KeyType.Dual; emit KeyModified(keys[0], true, true); // Note: skip additional key counts + thresholds setup in V1 (only one key). } /** * @notice Supply a signature from one of the existing keys on the keyring in * order to add a new key. * @param adminActionType uint8 Must be equal to 6 in V1. * @param argument uint160 The signing address to add to the key ring. * @param signatures bytes A signature from an existing key on the key ring. */ function takeAdminAction( AdminActionType adminActionType, uint160 argument, bytes calldata signatures ) external { // Only Admin Action Type 6 (AddDualKey) is supported in V1. require( adminActionType == AdminActionType.AddDualKey, "Only adding new Dual key types (admin action type 6) is supported in V1." ); require(argument != uint160(0), "Cannot supply the null address as a key."); require(_keys[argument] == KeyType.None, "Key already exists."); // Verify signature against a hash of the prefixed admin admin actionID. _verifySignature( _getAdminActionID(argument, _nonce).toEthSignedMessageHash(), signatures ); // Increment the key count for both standard and admin keys. _additionalKeyCounts.standard++; _additionalKeyCounts.admin++; // Set the key and emit a corresponding event. _keys[argument] = KeyType.Dual; emit KeyModified(address(argument), true, true); // Increment the nonce. _nonce++; } /** * @notice View function that implements ERC-1271 and validates a signature * against one of the keys on the keyring based on the supplied data. The data * must be ABI encoded as (bytes32, uint8, bytes) - in V1, only the first * bytes32 parameter is used to validate the supplied signature. * @param data bytes The data used to validate the signature. * @param signature bytes A signature from an existing key on the key ring. * @return The 4-byte magic value to signify a valid signature in ERC-1271, if * the signature is valid. */ function isValidSignature( bytes calldata data, bytes calldata signature ) external view returns (bytes4 magicValue) { (bytes32 hash, , ) = abi.decode(data, (bytes32, uint8, bytes)); _verifySignature(hash, signature); magicValue = _ERC_1271_MAGIC_VALUE; } /** * @notice View function that returns the message hash that must be signed in * order to add a new key to the key ring based on the supplied parameters. * @param adminActionType uint8 Unused in V1, as only action type 6 is valid. * @param argument uint160 The signing address to add to the key ring. * @param nonce uint256 The nonce to use when deriving the message hash. * @return The message hash to sign. */ function getAdminActionID( AdminActionType adminActionType, uint160 argument, uint256 nonce ) external view returns (bytes32 adminActionID) { adminActionType; adminActionID = _getAdminActionID(argument, nonce); } /** * @notice View function that returns the message hash that must be signed in * order to add a new key to the key ring based on the supplied parameters and * using the current nonce of the key ring. * @param adminActionType uint8 Unused in V1, as only action type 6 is valid. * @param argument uint160 The signing address to add to the key ring. * @return The message hash to sign. */ function getNextAdminActionID( AdminActionType adminActionType, uint160 argument ) external view returns (bytes32 adminActionID) { adminActionType; adminActionID = _getAdminActionID(argument, _nonce); } /** * @notice Pure function for getting the current Dharma Key Ring version. * @return The current Dharma Key Ring version. */ function getVersion() external pure returns (uint256 version) { version = _DHARMA_KEY_RING_VERSION; } /** * @notice View function for getting the current number of both standard and * admin keys that are set on the Dharma Key Ring. For V1, these should be the * same value as one another. * @return The number of standard and admin keys set on the Dharma Key Ring. */ function getKeyCount() external view returns ( uint256 standardKeyCount, uint256 adminKeyCount ) { AdditionalKeyCount memory additionalKeyCount = _additionalKeyCounts; standardKeyCount = uint256(additionalKeyCount.standard) + 1; adminKeyCount = uint256(additionalKeyCount.admin) + 1; } /** * @notice View function for getting standard and admin key status of a given * address. For V1, these should both be true, or both be false (i.e. the key * is not set). * @param key address An account to check for key type information. * @return Booleans for standard and admin key status for the given address. */ function getKeyType( address key ) external view returns (bool standard, bool admin) { KeyType keyType = _keys[uint160(key)]; standard = (keyType == KeyType.Standard || keyType == KeyType.Dual); admin = (keyType == KeyType.Admin || keyType == KeyType.Dual); } /** * @notice View function for getting the current nonce of the Dharma Key Ring. * @return The current nonce set on the Dharma Key Ring. */ function getNonce() external returns (uint256 nonce) { nonce = _nonce; } /** * @notice Internal view function to derive an action ID that is prefixed, * hashed, and signed by an existing key in order to add a new key to the key * ring. * @param argument uint160 The signing address to add to the key ring. * @param nonce uint256 The nonce to use when deriving the adminActionID. * @return The message hash to sign. */ function _getAdminActionID( uint160 argument, uint256 nonce ) internal view returns (bytes32 adminActionID) { adminActionID = keccak256( abi.encodePacked( address(this), _DHARMA_KEY_RING_VERSION, nonce, argument ) ); } /** * @notice Internal view function for verifying a signature and a message hash * against the mapping of keys currently stored on the key ring. For V1, all * stored keys are the Dual key type, and only a single signature is provided * for verification at once since the threshold is fixed at one signature. */ function _verifySignature( bytes32 hash, bytes memory signature ) internal view { require( _keys[uint160(hash.recover(signature))] == KeyType.Dual, "Supplied signature does not have a signer with the required key type." ); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"getVersion","outputs":[{"internalType":"uint256","name":"version","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"magicValue","type":"bytes4"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"enum DharmaKeyRingImplementationV0Interface.AdminActionType","name":"adminActionType","type":"uint8"},{"internalType":"uint160","name":"argument","type":"uint160"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"takeAdminAction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint128","name":"adminThreshold","type":"uint128"},{"internalType":"uint128","name":"executorThreshold","type":"uint128"},{"internalType":"address[]","name":"keys","type":"address[]"},{"internalType":"uint8[]","name":"keyTypes","type":"uint8[]"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"key","type":"address"}],"name":"getKeyType","outputs":[{"internalType":"bool","name":"standard","type":"bool"},{"internalType":"bool","name":"admin","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"enum DharmaKeyRingImplementationV0Interface.AdminActionType","name":"adminActionType","type":"uint8"},{"internalType":"uint160","name":"argument","type":"uint160"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"getAdminActionID","outputs":[{"internalType":"bytes32","name":"adminActionID","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"enum DharmaKeyRingImplementationV0Interface.AdminActionType","name":"adminActionType","type":"uint8"},{"internalType":"uint160","name":"argument","type":"uint160"}],"name":"getNextAdminActionID","outputs":[{"internalType":"bytes32","name":"adminActionID","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getKeyCount","outputs":[{"internalType":"uint256","name":"standardKeyCount","type":"uint256"},{"internalType":"uint256","name":"adminKeyCount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"key","type":"address"},{"indexed":false,"internalType":"bool","name":"standard","type":"bool"},{"indexed":false,"internalType":"bool","name":"admin","type":"bool"}],"name":"KeyModified","type":"event"}]
Contract Creation Code
608060405234801561001057600080fd5b50610db5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80634b24fd0d116100665780634b24fd0d146102ec578063cc59200e1461032d578063d087d28814610362578063e6b14fe41461036a578063ee1ce8411461039957610093565b80630d8e6e2c1461009857806320c13b0b146100b25780632b6b3e6f1461018d57806330fc201f14610215575b600080fd5b6100a06103ba565b60408051918252519081900360200190f35b610170600480360360408110156100c857600080fd5b810190602081018135600160201b8111156100e257600080fd5b8201836020820111156100f457600080fd5b803590602001918460018302840111600160201b8311171561011557600080fd5b919390929091602081019035600160201b81111561013257600080fd5b82018360208201111561014457600080fd5b803590602001918460018302840111600160201b8311171561016557600080fd5b5090925090506103bf565b604080516001600160e01b03199092168252519081900360200190f35b610213600480360360608110156101a357600080fd5b60ff823516916001600160a01b0360208201351691810190606081016040820135600160201b8111156101d557600080fd5b8201836020820111156101e757600080fd5b803590602001918460018302840111600160201b8311171561020857600080fd5b5090925090506104c0565b005b6102136004803603608081101561022b57600080fd5b6001600160801b038235811692602081013590911691810190606081016040820135600160201b81111561025e57600080fd5b82018360208201111561027057600080fd5b803590602001918460208302840111600160201b8311171561029157600080fd5b919390929091602081019035600160201b8111156102ae57600080fd5b8201836020820111156102c057600080fd5b803590602001918460208302840111600160201b831117156102e157600080fd5b5090925090506106c7565b6103126004803603602081101561030257600080fd5b50356001600160a01b0316610916565b60408051921515835290151560208301528051918290030190f35b6100a06004803603606081101561034357600080fd5b5060ff813516906001600160a01b036020820135169060400135610988565b6100a061099c565b6100a06004803603604081101561038057600080fd5b50803560ff1690602001356001600160a01b03166109a2565b6103a16109b7565b6040805192835260208301919091528051918290030190f35b600190565b600080858560608110156103d257600080fd5b81359160ff60208201351691810190606081016040820135600160201b8111156103fb57600080fd5b82018360208201111561040d57600080fd5b803590602001918460018302840111600160201b8311171561042e57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c81529899506104ae988a985096508c95508b94508493508601915084905082808284376000920191909152506109fc92505050565b506320c13b0b60e01b95945050505050565b60068460088111156104ce57fe5b1461050a5760405162461bcd60e51b8152600401808060200182810382526048815260200180610ce06048913960600191505060405180910390fd5b6001600160a01b03831661054f5760405162461bcd60e51b8152600401808060200182810382526028815260200180610cb86028913960400191505060405180910390fd5b6001600160a01b03831660009081526020819052604081205460ff16600381111561057657fe5b146105be576040805162461bcd60e51b815260206004820152601360248201527225b2bc9030b63932b0b23c9032bc34b9ba399760691b604482015290519081900360640190fd5b6106116105d56105d085600154610a79565b610acc565b83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506109fc92505050565b600280546fffffffffffffffffffffffffffffffff19811660016001600160801b039283168101831691909117808316600160801b918290048416830190931602919091179091556001600160a01b03841660008181526020818152604091829020805460ff19166003179055815184815290810193909352805191927f9b8fd8d3e4664d16ad91e3fdcfad1ec6c2e46c2002dfd8e0b6bda36599f1ba59929081900390910190a2505060018054810190555050565b303b156106d357600080fd5b600183146107125760405162461bcd60e51b8152600401808060200182810382526022815260200180610c246022913960400191505060405180910390fd5b60008484828161071e57fe5b905060200201356001600160a01b03166001600160a01b031614156107745760405162461bcd60e51b8152600401808060200182810382526028815260200180610cb86028913960400191505060405180910390fd5b60018114801561079b57506003828260008161078c57fe5b9050602002013560ff1660ff16145b6107d65760405162461bcd60e51b815260040180806020018281038252602f815260200180610d28602f913960400191505060405180910390fd5b856001600160801b031660011461081e5760405162461bcd60e51b815260040180806020018281038252602a815260200180610d57602a913960400191505060405180910390fd5b846001600160801b03166001146108665760405162461bcd60e51b815260040180806020018281038252602d815260200180610c46602d913960400191505060405180910390fd5b60036000808686600081811061087857fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff191660018360038111156108ae57fe5b0217905550838360008181106108c057fe5b6040805160018082526020808301919091528251930294909401356001600160a01b0316937f9b8fd8d3e4664d16ad91e3fdcfad1ec6c2e46c2002dfd8e0b6bda36599f1ba5993508290030190a2505050505050565b6001600160a01b038116600090815260208190526040812054819060ff16600181600381111561094257fe5b14806109595750600381600381111561095757fe5b145b9250600281600381111561096957fe5b14806109805750600381600381111561097e57fe5b145b915050915091565b60006109948383610a79565b949350505050565b60015490565b60006109b082600154610a79565b9392505050565b6000806109c2610c0c565b5050604080518082019091526002546001600160801b03808216808452600160801b90920416602090920182905260019081019391019150565b6003600080610a11858563ffffffff610b1d16565b6001600160a01b0316815260208101919091526040016000205460ff166003811115610a3957fe5b14610a755760405162461bcd60e51b8152600401808060200182810382526045815260200180610c736045913960600191505060405180910390fd5b5050565b6040805130606090811b6020808401919091526001603484015260548301949094529390931b6bffffffffffffffffffffffff191660748401528051808403606801815260889093019052815191012090565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b60008151604114610b3057506000610c06565b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610b765760009350505050610c06565b8060ff16601b14158015610b8e57508060ff16601c14155b15610b9f5760009350505050610c06565b6040805160008152602080820180845289905260ff8416828401526060820186905260808201859052915160019260a0808401939192601f1981019281900390910190855afa158015610bf6573d6000803e3d6000fd5b5050506020604051035193505050505b92915050565b60408051808201909152600080825260208201529056fe4d75737420737570706c792065786163746c79206f6e65206b657920696e2056312e4578656375746f72207468726573686f6c64206d7573742062652065786163746c79206f6e6520696e2056312e537570706c696564207369676e617475726520646f6573206e6f7420686176652061207369676e6572207769746820746865207265717569726564206b657920747970652e43616e6e6f7420737570706c7920746865206e756c6c20616464726573732061732061206b65792e4f6e6c7920616464696e67206e6577204475616c206b6579207479706573202861646d696e20616374696f6e207479706520362920697320737570706f7274656420696e2056312e4d75737420737570706c792065786163746c79206f6e65204475616c206b6579547970652028332920696e2056312e41646d696e207468726573686f6c64206d7573742062652065786163746c79206f6e6520696e2056312ea265627a7a7231582020446861726d614b657952696e67496d706c656d656e746174696f6e5631202064736f6c634300050b0032
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100935760003560e01c80634b24fd0d116100665780634b24fd0d146102ec578063cc59200e1461032d578063d087d28814610362578063e6b14fe41461036a578063ee1ce8411461039957610093565b80630d8e6e2c1461009857806320c13b0b146100b25780632b6b3e6f1461018d57806330fc201f14610215575b600080fd5b6100a06103ba565b60408051918252519081900360200190f35b610170600480360360408110156100c857600080fd5b810190602081018135600160201b8111156100e257600080fd5b8201836020820111156100f457600080fd5b803590602001918460018302840111600160201b8311171561011557600080fd5b919390929091602081019035600160201b81111561013257600080fd5b82018360208201111561014457600080fd5b803590602001918460018302840111600160201b8311171561016557600080fd5b5090925090506103bf565b604080516001600160e01b03199092168252519081900360200190f35b610213600480360360608110156101a357600080fd5b60ff823516916001600160a01b0360208201351691810190606081016040820135600160201b8111156101d557600080fd5b8201836020820111156101e757600080fd5b803590602001918460018302840111600160201b8311171561020857600080fd5b5090925090506104c0565b005b6102136004803603608081101561022b57600080fd5b6001600160801b038235811692602081013590911691810190606081016040820135600160201b81111561025e57600080fd5b82018360208201111561027057600080fd5b803590602001918460208302840111600160201b8311171561029157600080fd5b919390929091602081019035600160201b8111156102ae57600080fd5b8201836020820111156102c057600080fd5b803590602001918460208302840111600160201b831117156102e157600080fd5b5090925090506106c7565b6103126004803603602081101561030257600080fd5b50356001600160a01b0316610916565b60408051921515835290151560208301528051918290030190f35b6100a06004803603606081101561034357600080fd5b5060ff813516906001600160a01b036020820135169060400135610988565b6100a061099c565b6100a06004803603604081101561038057600080fd5b50803560ff1690602001356001600160a01b03166109a2565b6103a16109b7565b6040805192835260208301919091528051918290030190f35b600190565b600080858560608110156103d257600080fd5b81359160ff60208201351691810190606081016040820135600160201b8111156103fb57600080fd5b82018360208201111561040d57600080fd5b803590602001918460018302840111600160201b8311171561042e57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c81529899506104ae988a985096508c95508b94508493508601915084905082808284376000920191909152506109fc92505050565b506320c13b0b60e01b95945050505050565b60068460088111156104ce57fe5b1461050a5760405162461bcd60e51b8152600401808060200182810382526048815260200180610ce06048913960600191505060405180910390fd5b6001600160a01b03831661054f5760405162461bcd60e51b8152600401808060200182810382526028815260200180610cb86028913960400191505060405180910390fd5b6001600160a01b03831660009081526020819052604081205460ff16600381111561057657fe5b146105be576040805162461bcd60e51b815260206004820152601360248201527225b2bc9030b63932b0b23c9032bc34b9ba399760691b604482015290519081900360640190fd5b6106116105d56105d085600154610a79565b610acc565b83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506109fc92505050565b600280546fffffffffffffffffffffffffffffffff19811660016001600160801b039283168101831691909117808316600160801b918290048416830190931602919091179091556001600160a01b03841660008181526020818152604091829020805460ff19166003179055815184815290810193909352805191927f9b8fd8d3e4664d16ad91e3fdcfad1ec6c2e46c2002dfd8e0b6bda36599f1ba59929081900390910190a2505060018054810190555050565b303b156106d357600080fd5b600183146107125760405162461bcd60e51b8152600401808060200182810382526022815260200180610c246022913960400191505060405180910390fd5b60008484828161071e57fe5b905060200201356001600160a01b03166001600160a01b031614156107745760405162461bcd60e51b8152600401808060200182810382526028815260200180610cb86028913960400191505060405180910390fd5b60018114801561079b57506003828260008161078c57fe5b9050602002013560ff1660ff16145b6107d65760405162461bcd60e51b815260040180806020018281038252602f815260200180610d28602f913960400191505060405180910390fd5b856001600160801b031660011461081e5760405162461bcd60e51b815260040180806020018281038252602a815260200180610d57602a913960400191505060405180910390fd5b846001600160801b03166001146108665760405162461bcd60e51b815260040180806020018281038252602d815260200180610c46602d913960400191505060405180910390fd5b60036000808686600081811061087857fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff191660018360038111156108ae57fe5b0217905550838360008181106108c057fe5b6040805160018082526020808301919091528251930294909401356001600160a01b0316937f9b8fd8d3e4664d16ad91e3fdcfad1ec6c2e46c2002dfd8e0b6bda36599f1ba5993508290030190a2505050505050565b6001600160a01b038116600090815260208190526040812054819060ff16600181600381111561094257fe5b14806109595750600381600381111561095757fe5b145b9250600281600381111561096957fe5b14806109805750600381600381111561097e57fe5b145b915050915091565b60006109948383610a79565b949350505050565b60015490565b60006109b082600154610a79565b9392505050565b6000806109c2610c0c565b5050604080518082019091526002546001600160801b03808216808452600160801b90920416602090920182905260019081019391019150565b6003600080610a11858563ffffffff610b1d16565b6001600160a01b0316815260208101919091526040016000205460ff166003811115610a3957fe5b14610a755760405162461bcd60e51b8152600401808060200182810382526045815260200180610c736045913960600191505060405180910390fd5b5050565b6040805130606090811b6020808401919091526001603484015260548301949094529390931b6bffffffffffffffffffffffff191660748401528051808403606801815260889093019052815191012090565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b60008151604114610b3057506000610c06565b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610b765760009350505050610c06565b8060ff16601b14158015610b8e57508060ff16601c14155b15610b9f5760009350505050610c06565b6040805160008152602080820180845289905260ff8416828401526060820186905260808201859052915160019260a0808401939192601f1981019281900390910190855afa158015610bf6573d6000803e3d6000fd5b5050506020604051035193505050505b92915050565b60408051808201909152600080825260208201529056fe4d75737420737570706c792065786163746c79206f6e65206b657920696e2056312e4578656375746f72207468726573686f6c64206d7573742062652065786163746c79206f6e6520696e2056312e537570706c696564207369676e617475726520646f6573206e6f7420686176652061207369676e6572207769746820746865207265717569726564206b657920747970652e43616e6e6f7420737570706c7920746865206e756c6c20616464726573732061732061206b65792e4f6e6c7920616464696e67206e6577204475616c206b6579207479706573202861646d696e20616374696f6e207479706520362920697320737570706f7274656420696e2056312e4d75737420737570706c792065786163746c79206f6e65204475616c206b6579547970652028332920696e2056312e41646d696e207468726573686f6c64206d7573742062652065786163746c79206f6e6520696e2056312ea265627a7a7231582020446861726d614b657952696e67496d706c656d656e746174696f6e5631202064736f6c634300050b0032
Deployed Bytecode Sourcemap
3947:9608:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3947:9608:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10714:109;;;:::i;:::-;;;;;;;;;;;;;;;;8949:285;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;8949:285:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;8949:285:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8949:285:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;8949:285:0;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;8949:285:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8949:285:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;8949:285:0;;-1:-1:-1;8949:285:0;-1:-1:-1;8949:285:0;:::i;:::-;;;;-1:-1:-1;;;;;;8949:285:0;;;;;;;;;;;;;;7336:1031;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;7336:1031:0;;;;;-1:-1:-1;;;;;7336:1031:0;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;7336:1031:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;7336:1031:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;7336:1031:0;;-1:-1:-1;7336:1031:0;-1:-1:-1;7336:1031:0;:::i;:::-;;5871:1119;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;5871:1119:0;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;5871:1119:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;5871:1119:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;5871:1119:0;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;5871:1119:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;5871:1119:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;-1:-1;5871:1119:0;;-1:-1:-1;5871:1119:0;-1:-1:-1;5871:1119:0;:::i;11781:285::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;11781:285:0;-1:-1:-1;;;;;11781:285:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;9685:233;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9685:233:0;;;;;-1:-1:-1;;;;;9685:233:0;;;;;;;;;;:::i;12228:80::-;;;:::i;10343:223::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10343:223:0;;;;;;;;-1:-1:-1;;;;;10343:223:0;;:::i;11118:311::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;10714:109;5038:1;;10714:109::o;8949:285::-;9055:17;9082:12;9113:4;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9102:41:0;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;9102:41:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;9102:41:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;9102:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;;9152:33:0;;;;137:4:-1;9152:33:0;;;;;;;;;;;;;;;;;9081:62;;-1:-1:-1;9152:33:0;;9081:62;;-1:-1:-1;9152:33:0;-1:-1:-1;9175:9:0;;-1:-1:-1;9175:9:0;;-1:-1:-1;9175:9:0;;-1:-1:-1;9152:33:0;;;-1:-1:-1;9175:9:0;;-1:-1:-1;9175:9:0;;;9152:33;1::-1;99:1;81:16;;74:27;;;;-1:-1;9152:16:0;;-1:-1:-1;;;9152:33:0:i;:::-;-1:-1:-1;;;;5174:18:0;8949:285;-1:-1:-1;;;;;8949:285:0:o;7336:1031::-;7566:26;7547:15;:45;;;;;;;;;7531:151;;;;-1:-1:-1;;;7531:151:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7699:22:0;;7691:75;;;;-1:-1:-1;;;7691:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7783:15:0;;7802:12;7783:15;;;;;;;;;;;;;:31;;;;;;;;;7775:63;;;;;-1:-1:-1;;;7775:63:0;;;;;;;;;;;;-1:-1:-1;;;7775:63:0;;;;;;;;;;;;;;;7925:104;7950:60;:35;7968:8;7978:6;;7950:17;:35::i;:::-;:58;:60::i;:::-;8012:10;;7925:104;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;7925:16:0;;-1:-1:-1;;;7925:104:0:i;:::-;8104:20;:31;;-1:-1:-1;;8104:31:0;;;-1:-1:-1;;;;;8104:31:0;;;;;;;;;;;8142:28;;;-1:-1:-1;;;8142:28:0;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8231:15:0;;-1:-1:-1;8231:15:0;;;;;;;;;;;;:30;;-1:-1:-1;;8231:30:0;8249:12;8231:30;;;8273:42;;;;;;;;;;;;;;8231:15;;8273:42;;;;;;;;;;;-1:-1:-1;;8353:6:0;:8;;;;;;-1:-1:-1;;7336:1031:0:o;5871:1119::-;6173:7;6161:20;6158:2;;;6194:1;6191;6184:12;6158:2;6311:1;6296:16;;6288:63;;;;-1:-1:-1;;;6288:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6387:1;6368:4;;6387:1;6368:7;;;;;;;;;;;-1:-1:-1;;;;;6368:7:0;-1:-1:-1;;;;;6368:21:0;;;6360:74;;;;-1:-1:-1;;;6360:74:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6478:1;6459:20;;:47;;;;-1:-1:-1;6504:1:0;6483:8;;6492:1;6483:11;;;;;;;;;;;;;:23;;;6459:47;6443:128;;;;-1:-1:-1;;;6443:128:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6588:14;-1:-1:-1;;;;;6588:19:0;6606:1;6588:19;6580:74;;;;-1:-1:-1;;;6580:74:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6679:17;-1:-1:-1;;;;;6679:22:0;6700:1;6679:22;6663:94;;;;-1:-1:-1;;;6663:94:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6844:12;6818:5;:23;6832:4;;6837:1;6832:7;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6832:7:0;6818:23;;-1:-1:-1;6818:23:0;;;;;;;;-1:-1:-1;6818:23:0;:38;;-1:-1:-1;;6818:38:0;;;;;;;;;;;;;;;;6880:4;;6885:1;6880:7;;;;;;;6868:32;;;6889:4;6868:32;;;6880:7;6868:32;;;;;;;;;6880:7;;;;;;;-1:-1:-1;;;;;6880:7:0;;6868:32;;-1:-1:-1;6868:32:0;;;;;;5871:1119;;;;;;:::o;11781:285::-;-1:-1:-1;;;;;11899:19:0;;11847:13;11899:19;;;;;;;;;;;11847:13;;11899:19;;;11937:7;:27;;;;;;;;;:54;;;-1:-1:-1;11979:12:0;11968:7;:23;;;;;;;;;11937:54;11925:67;-1:-1:-1;12019:13:0;12008:7;:24;;;;;;;;;:51;;;-1:-1:-1;12047:12:0;12036:7;:23;;;;;;;;;12008:51;11999:61;;11781:285;;;;:::o;9685:233::-;9810:21;9878:34;9896:8;9906:5;9878:17;:34::i;:::-;9862:50;9685:233;-1:-1:-1;;;;9685:233:0:o;12228:80::-;12296:6;;;12228:80::o;10343:223::-;10457:21;10525:35;10543:8;10553:6;;10525:17;:35::i;:::-;10509:51;10343:223;-1:-1:-1;;;10343:223:0:o;11118:311::-;11170:24;11196:21;11230:44;;:::i;:::-;-1:-1:-1;;11230:67:0;;;;;;;;;11277:20;11230:67;-1:-1:-1;;;;;11230:67:0;;;;;;-1:-1:-1;;;11230:67:0;;;;;;;;;;;;11323:40;;;;11386:37;;;-1:-1:-1;11118:311:0:o;13293:259::-;13447:12;13404:5;;13418:23;:4;13431:9;13418:23;:12;:23;:::i;:::-;-1:-1:-1;;;;;13404:39:0;;;;;;;;;;;;-1:-1:-1;13404:39:0;;;;:55;;;;;;;;;13388:158;;;;-1:-1:-1;;;13388:158:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13293:259;;:::o;12690:262::-;12847:92;;;12882:4;12847:92;;;;;;;;;;;;5038:1;12847:92;;;;;;;;;;;;;;;-1:-1:-1;;12847:92:0;;;;;;;26:21:-1;;;22:32;;6:49;;12847:92:0;;;;;;12829:117;;;;;;12690:262::o;2587:167::-;2689:58;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2689:58:0;;;;;;;2679:69;;;;;;2587:167::o;1983:598::-;2061:7;2081:9;:16;2101:2;2081:22;2077:64;;-1:-1:-1;2130:1:0;2114:19;;2077:64;2241:4;2226:20;;2220:27;2281:4;2266:20;;2260:27;2329:4;2314:20;;2308:27;2149:9;2300:36;2368:66;2355:79;;2351:119;;;2460:1;2445:17;;;;;;;2351:119;2482:1;:7;;2487:2;2482:7;;:18;;;;;2493:1;:7;;2498:2;2493:7;;2482:18;2478:58;;;2526:1;2511:17;;;;;;;2478:58;2551:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2551:24:0;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2551:24:0;;;;;;;;2544:31;;;;;1983:598;;;;;:::o;3947:9608::-;;;;;;;;;;-1:-1:-1;3947:9608:0;;;;;;;;:::o
Swarm Source
bzzr://20446861726d614b657952696e67496d706c656d656e746174696f6e56312020
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.