Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Grant Role | 14588633 | 1004 days ago | IN | 0 ETH | 0.0025534 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
AccumulatorMultiOracle
Compiler Version
v0.8.6+commit.11564f7e
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.6; import "@yield-protocol/utils-v2/contracts/access/AccessControl.sol"; import "@yield-protocol/utils-v2/contracts/cast/CastBytes32Bytes6.sol"; import "@yield-protocol/utils-v2/contracts/math/WPow.sol"; import "@yield-protocol/vault-interfaces/IOracle.sol"; import "../../constants/Constants.sol"; /** A collection of independent Accumulator Oracles Each Accumulator is simple: it starts when `setSource` is called, and each `get` call returns perSecondRate ^ (time in seconds since oracle creation) */ contract AccumulatorMultiOracle is IOracle, AccessControl, Constants { using CastBytes32Bytes6 for bytes32; using WPow for uint256; struct Accumulator { /// @dev secondly rate uint256 perSecondRate; /// @dev rate accumulated so far - check `get` for details uint256 accumulated; /// @dev time when `accumulated` was last updated uint256 lastUpdated; } mapping(bytes6 => mapping(bytes6 => Accumulator)) public sources; event SourceSet(bytes6 indexed baseId, bytes6 indexed kind, uint256 startRate, uint256 perSecondRate); event PerSecondRateUpdated(bytes6 indexed baseId, bytes6 indexed kind, uint256 perSecondRate); /** @notice Set a source @param baseId: base to set the source for @param kindId: kind of oracle (example: chi/rate) @param startRate: rate the oracle starts with @param perSecondRate: secondly rate */ function setSource( bytes6 baseId, bytes6 kindId, uint256 startRate, uint256 perSecondRate ) external auth { Accumulator memory source = sources[baseId][kindId]; require(source.accumulated == 0, "Source is already set"); sources[baseId][kindId] = Accumulator({ perSecondRate: perSecondRate, accumulated: startRate, lastUpdated: block.timestamp }); emit SourceSet(baseId, kindId, startRate, perSecondRate); } /** @notice Updates accumulation rate The accumulation rate can only be updated on an up-to-date oracle: get() was called in the same block. See get() for more details */ function updatePerSecondRate( bytes6 baseId, bytes6 kindId, uint256 perSecondRate ) external auth { Accumulator memory source = sources[baseId][kindId]; require(source.accumulated != 0, "Source not found"); require(source.lastUpdated == block.timestamp, "stale accumulator"); sources[baseId][kindId].perSecondRate = perSecondRate; emit PerSecondRateUpdated(baseId, kindId, perSecondRate); } /** * @notice Retrieve the latest stored accumulated rate. */ function peek( bytes32 base, bytes32 kind, uint256 ) external view virtual override returns (uint256 accumulated, uint256 updateTime) { Accumulator memory source = sources[base.b6()][kind.b6()]; require(source.accumulated != 0, "Source not found"); accumulated = source.accumulated; require(accumulated > 0, "Accumulated rate is zero"); updateTime = block.timestamp; } /** @notice Retrieve the latest accumulated rate from source, updating it if necessary. Computes baseRate ^ (block.timestamp - creation timestamp) pow() is not O(1), so the naive implementation will become slower as the time passes To workaround that, each time get() is called, we: 1) compute the return value 2) store the return value in `accumulated` field, update lastUpdated timestamp Becase we have `accumulated`, step 1 becomes `accumulated * baseRate ^ (block.timestamp - lastUpdated) */ function get( bytes32 base, bytes32 kind, uint256 ) external virtual override returns (uint256 accumulated, uint256 updateTime) { Accumulator memory accumulator = sources[base.b6()][kind.b6()]; require(accumulator.accumulated != 0, "Source not found"); uint256 secondsSinceLastUpdate = (block.timestamp - accumulator.lastUpdated); if (secondsSinceLastUpdate > 0) { accumulator.accumulated *= accumulator.perSecondRate.wpow(secondsSinceLastUpdate); accumulator.accumulated /= 1e18; accumulator.lastUpdated = block.timestamp; sources[base.b6()][kind.b6()] = accumulator; } accumulated = accumulator.accumulated; require(accumulated > 0, "Accumulated rate is zero"); updateTime = block.timestamp; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes4` identifier. These are expected to be the * signatures for all the functions in the contract. Special roles should be exposed * in the external API and be unique: * * ``` * bytes4 public constant ROOT = 0x00000000; * ``` * * Roles represent restricted access to a function call. For that purpose, use {auth}: * * ``` * function foo() public auth { * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `ROOT`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {setRoleAdmin}. * * WARNING: The `ROOT` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ contract AccessControl { struct RoleData { mapping (address => bool) members; bytes4 adminRole; } mapping (bytes4 => RoleData) private _roles; bytes4 public constant ROOT = 0x00000000; bytes4 public constant ROOT4146650865 = 0x00000000; // Collision protection for ROOT, test with ROOT12007226833() bytes4 public constant LOCK = 0xFFFFFFFF; // Used to disable further permissioning of a function bytes4 public constant LOCK8605463013 = 0xFFFFFFFF; // Collision protection for LOCK, test with LOCK10462387368() /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role * * `ROOT` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes4 indexed role, bytes4 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call. */ event RoleGranted(bytes4 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes4 indexed role, address indexed account, address indexed sender); /** * @dev Give msg.sender the ROOT role and create a LOCK role with itself as the admin role and no members. * Calling setRoleAdmin(msg.sig, LOCK) means no one can grant that msg.sig role anymore. */ constructor () { _grantRole(ROOT, msg.sender); // Grant ROOT to msg.sender _setRoleAdmin(LOCK, LOCK); // Create the LOCK role by setting itself as its own admin, creating an independent role tree } /** * @dev Each function in the contract has its own role, identified by their msg.sig signature. * ROOT can give and remove access to each function, lock any further access being granted to * a specific action, or even create other roles to delegate admin control over a function. */ modifier auth() { require (_hasRole(msg.sig, msg.sender), "Access denied"); _; } /** * @dev Allow only if the caller has been granted the admin role of `role`. */ modifier admin(bytes4 role) { require (_hasRole(_getRoleAdmin(role), msg.sender), "Only admin"); _; } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes4 role, address account) external view returns (bool) { return _hasRole(role, account); } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes4 role) external view returns (bytes4) { return _getRoleAdmin(role); } /** * @dev Sets `adminRole` as ``role``'s admin role. * If ``role``'s admin role is not `adminRole` emits a {RoleAdminChanged} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function setRoleAdmin(bytes4 role, bytes4 adminRole) external virtual admin(role) { _setRoleAdmin(role, adminRole); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes4 role, address account) external virtual admin(role) { _grantRole(role, account); } /** * @dev Grants all of `role` in `roles` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - For each `role` in `roles`, the caller must have ``role``'s admin role. */ function grantRoles(bytes4[] memory roles, address account) external virtual { for (uint256 i = 0; i < roles.length; i++) { require (_hasRole(_getRoleAdmin(roles[i]), msg.sender), "Only admin"); _grantRole(roles[i], account); } } /** * @dev Sets LOCK as ``role``'s admin role. LOCK has no members, so this disables admin management of ``role``. * Emits a {RoleAdminChanged} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function lockRole(bytes4 role) external virtual admin(role) { _setRoleAdmin(role, LOCK); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes4 role, address account) external virtual admin(role) { _revokeRole(role, account); } /** * @dev Revokes all of `role` in `roles` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - For each `role` in `roles`, the caller must have ``role``'s admin role. */ function revokeRoles(bytes4[] memory roles, address account) external virtual { for (uint256 i = 0; i < roles.length; i++) { require (_hasRole(_getRoleAdmin(roles[i]), msg.sender), "Only admin"); _revokeRole(roles[i], account); } } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes4 role, address account) external virtual { require(account == msg.sender, "Renounce only for self"); _revokeRole(role, account); } function _hasRole(bytes4 role, address account) internal view returns (bool) { return _roles[role].members[account]; } function _getRoleAdmin(bytes4 role) internal view returns (bytes4) { return _roles[role].adminRole; } function _setRoleAdmin(bytes4 role, bytes4 adminRole) internal virtual { if (_getRoleAdmin(role) != adminRole) { _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, adminRole); } } function _grantRole(bytes4 role, address account) internal { if (!_hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, msg.sender); } } function _revokeRole(bytes4 role, address account) internal { if (_hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, msg.sender); } } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; library CastBytes32Bytes6 { function b6(bytes32 x) internal pure returns (bytes6 y){ require (bytes32(y = bytes6(x)) == x, "Cast overflow"); } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "./WMul.sol"; library WPow { // Taken from https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol /// @dev $x ^ $n; $x is 18-decimals fixed point number function wpow(uint256 x, uint256 n) internal pure returns (uint256 z) { uint256 baseUnit = 1e18; assembly { switch x case 0 { switch n case 0 { z := baseUnit } default { z := 0 } } default { switch mod(n, 2) case 0 { z := baseUnit } default { z := x } let half := div(baseUnit, 2) for { n := div(n, 2) } n { n := div(n, 2) } { let xx := mul(x, x) if iszero(eq(div(xx, x), x)) { revert(0, 0) } let xxRound := add(xx, half) if lt(xxRound, xx) { revert(0, 0) } x := div(xxRound, baseUnit) if mod(n, 2) { let zx := mul(z, x) if and(iszero(iszero(x)), iszero(eq(div(zx, x), z))) { revert(0, 0) } let zxRound := add(zx, half) if lt(zxRound, zx) { revert(0, 0) } z := div(zxRound, baseUnit) } } } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IOracle { /** * @notice Doesn't refresh the price, but returns the latest value available without doing any transactional operations: * @return value in wei */ function peek( bytes32 base, bytes32 quote, uint256 amount ) external view returns (uint256 value, uint256 updateTime); /** * @notice Does whatever work or queries will yield the most up-to-date price, and returns it. * @return value in wei */ function get( bytes32 base, bytes32 quote, uint256 amount ) external returns (uint256 value, uint256 updateTime); }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.6; contract Constants { bytes32 constant CHI = "CHI"; bytes32 constant RATE = "RATE"; bytes6 constant ETH = "00"; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; library WMul { // Taken from https://github.com/usmfum/USM/blob/master/contracts/WadMath.sol /// @dev Multiply an amount by a fixed point factor with 18 decimals, rounds down. function wmul(uint256 x, uint256 y) internal pure returns (uint256 z) { z = x * y; unchecked { z /= 1e18; } } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes6","name":"baseId","type":"bytes6"},{"indexed":true,"internalType":"bytes6","name":"kind","type":"bytes6"},{"indexed":false,"internalType":"uint256","name":"perSecondRate","type":"uint256"}],"name":"PerSecondRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"role","type":"bytes4"},{"indexed":true,"internalType":"bytes4","name":"newAdminRole","type":"bytes4"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"role","type":"bytes4"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"role","type":"bytes4"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes6","name":"baseId","type":"bytes6"},{"indexed":true,"internalType":"bytes6","name":"kind","type":"bytes6"},{"indexed":false,"internalType":"uint256","name":"startRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"perSecondRate","type":"uint256"}],"name":"SourceSet","type":"event"},{"inputs":[],"name":"LOCK","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCK8605463013","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROOT","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROOT4146650865","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"base","type":"bytes32"},{"internalType":"bytes32","name":"kind","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"get","outputs":[{"internalType":"uint256","name":"accumulated","type":"uint256"},{"internalType":"uint256","name":"updateTime","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4[]","name":"roles","type":"bytes4[]"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRoles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"}],"name":"lockRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"base","type":"bytes32"},{"internalType":"bytes32","name":"kind","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"peek","outputs":[{"internalType":"uint256","name":"accumulated","type":"uint256"},{"internalType":"uint256","name":"updateTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4[]","name":"roles","type":"bytes4[]"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRoles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"},{"internalType":"bytes4","name":"adminRole","type":"bytes4"}],"name":"setRoleAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes6","name":"baseId","type":"bytes6"},{"internalType":"bytes6","name":"kindId","type":"bytes6"},{"internalType":"uint256","name":"startRate","type":"uint256"},{"internalType":"uint256","name":"perSecondRate","type":"uint256"}],"name":"setSource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes6","name":"","type":"bytes6"},{"internalType":"bytes6","name":"","type":"bytes6"}],"name":"sources","outputs":[{"internalType":"uint256","name":"perSecondRate","type":"uint256"},{"internalType":"uint256","name":"accumulated","type":"uint256"},{"internalType":"uint256","name":"lastUpdated","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes6","name":"baseId","type":"bytes6"},{"internalType":"bytes6","name":"kindId","type":"bytes6"},{"internalType":"uint256","name":"perSecondRate","type":"uint256"}],"name":"updatePerSecondRate","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061001c600033610033565b61002e6001600160e01b0319806100ca565b610166565b6001600160e01b031982166000908152602081815260408083206001600160a01b038516845290915290205460ff166100c6576001600160e01b031982166000818152602081815260408083206001600160a01b0386168085529252808320805460ff1916600117905551339391927fe6231789d19137da31d0550f4ba9ee379020a8cfb64cb79bf1790c996d2e616591a45b5050565b6001600160e01b031981166100fb836001600160e01b03191660009081526020819052604090206001015460e01b90565b6001600160e01b031916146100c6576001600160e01b0319828116600081815260208190526040808220600101805463ffffffff191660e087901c17905551928416927fd348e2220a50b4500ec353f6e802d2f14dd1b5d6786148fd1bbcc570bf92d4739190a35050565b611364806101756000396000f3fe608060405234801561001057600080fd5b50600436106101315760003560e01c8063991b5332116100b2578063ae93c1b511610081578063de02cde711610066578063de02cde7146102d1578063effae353146102e4578063ffffffff1461028957600080fd5b8063ae93c1b5146102ab578063aff005e2146102be57600080fd5b8063991b5332146102255780639f1ed3c014610238578063a4f0d7d014610289578063ad82110f1461029857600080fd5b8063559742d9116101095780635ba5e9f0116100ee5780635ba5e9f0146101cf57806368284fd4146101ff578063687f0e4c1461021257600080fd5b8063559742d9146101bc5780635909c12f1461013657600080fd5b801561013657806310ab94321461015c57806344faded01461017f578063462f9a2814610194575b600080fd5b61013e600081565b6040516001600160e01b031990911681526020015b60405180910390f35b61016f61016a366004611174565b6102f7565b6040519015158152602001610153565b61019261018d366004611174565b61032e565b005b6101a76101a236600461112d565b6103cd565b60408051928352602083019190915201610153565b6101926101ca366004611159565b6105c2565b61013e6101dd366004611159565b6001600160e01b03191660009081526020819052604090206001015460e01b90565b6101a761020d36600461112d565b61063b565b610192610220366004611174565b61075f565b610192610233366004611237565b6107c1565b61026e6102463660046111d1565b6001602081815260009384526040808520909152918352912080549181015460029091015483565b60408051938452602084019290925290820152606001610153565b61013e6001600160e01b031981565b6101926102a636600461104f565b610953565b6101926102b93660046111a7565b610a0f565b6101926102cc3660046111fb565b610a7c565b6101926102df366004611174565b610c1d565b6101926102f236600461104f565b610c8a565b6001600160e01b031982166000908152602081815260408083206001600160a01b038516845290915281205460ff165b9392505050565b81610380610358826001600160e01b03191660009081526020819052604090206001015460e01b90565b6001600160e01b03191660009081526020818152604080832033845290915290205460ff1690565b6103be5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9030b236b4b760b11b60448201526064015b60405180910390fd5b6103c88383610d1c565b505050565b6000806000600160006103df88610db0565b6001600160d01b0319166001600160d01b0319168152602001908152602001600020600061040c87610db0565b6001600160d01b03191681526020808201929092526040908101600020815160608101835281548152600182015493810184905260029091015491810191909152915061048e5760405162461bcd60e51b815260206004820152601060248201526f14dbdd5c98d9481b9bdd08199bdd5b9960821b60448201526064016103b5565b60008160400151426104a091906112ba565b9050801561055e5781516104b49082610e0f565b826020018181516104c5919061129b565b905250602082018051670de0b6b3a764000091906104e4908390611279565b90525042604083015281600160006104fb8a610db0565b6001600160d01b0319166001600160d01b0319168152602001908152602001600020600061052889610db0565b6001600160d01b031916815260208082019290925260409081016000208351815591830151600183015591909101516002909101555b81602001519350600084116105b55760405162461bcd60e51b815260206004820152601860248201527f416363756d756c617465642072617465206973207a65726f000000000000000060448201526064016103b5565b4292505050935093915050565b806105ec610358826001600160e01b03191660009081526020819052604090206001015460e01b90565b6106255760405162461bcd60e51b815260206004820152600a60248201526927b7363c9030b236b4b760b11b60448201526064016103b5565b610637826001600160e01b0319610ed6565b5050565b60008060006001600061064d88610db0565b6001600160d01b0319166001600160d01b0319168152602001908152602001600020600061067a87610db0565b6001600160d01b0319168152602080820192909252604090810160002081516060810183528154815260018201549381018490526002909101549181019190915291506106fc5760405162461bcd60e51b815260206004820152601060248201526f14dbdd5c98d9481b9bdd08199bdd5b9960821b60448201526064016103b5565b80602001519250600083116107535760405162461bcd60e51b815260206004820152601860248201527f416363756d756c617465642072617465206973207a65726f000000000000000060448201526064016103b5565b42915050935093915050565b6001600160a01b03811633146107b75760405162461bcd60e51b815260206004820152601660248201527f52656e6f756e6365206f6e6c7920666f722073656c660000000000000000000060448201526064016103b5565b6106378282610d1c565b600080356001600160e01b03191681526020818152604080832033845290915290205460ff166108235760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b60448201526064016103b5565b6001600160d01b03198085166000908152600160208181526040808420948816845293815291839020835160608101855281548152918101549282018390526002015492810192909252156108ba5760405162461bcd60e51b815260206004820152601560248201527f536f7572636520697320616c726561647920736574000000000000000000000060448201526064016103b5565b604080516060810182528381526020808201868152428385019081526001600160d01b03198a811660008181526001808752888220938d1680835293875290889020965187559351938601939093559051600290940193909355835187815291820186905291927f7525ef17ef84c7973b7ae38b0a4d9637fb0795643f2bfcb004c24fd9e13ca3c7910160405180910390a35050505050565b60005b82518110156103c8576109a161035884838151811061097757610977611302565b60200260200101516001600160e01b03191660009081526020819052604090206001015460e01b90565b6109da5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9030b236b4b760b11b60448201526064016103b5565b6109fd8382815181106109ef576109ef611302565b602002602001015183610d1c565b80610a07816112d1565b915050610956565b81610a39610358826001600160e01b03191660009081526020819052604090206001015460e01b90565b610a725760405162461bcd60e51b815260206004820152600a60248201526927b7363c9030b236b4b760b11b60448201526064016103b5565b6103c88383610ed6565b600080356001600160e01b03191681526020818152604080832033845290915290205460ff16610ade5760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b60448201526064016103b5565b6001600160d01b03198084166000908152600160208181526040808420948716845293815291839020835160608101855281548152918101549282018390526002015492810192909252610b675760405162461bcd60e51b815260206004820152601060248201526f14dbdd5c98d9481b9bdd08199bdd5b9960821b60448201526064016103b5565b42816040015114610bba5760405162461bcd60e51b815260206004820152601160248201527f7374616c6520616363756d756c61746f7200000000000000000000000000000060448201526064016103b5565b6001600160d01b031984811660008181526001602090815260408083209488168084529482529182902086905590518581527fbef63427c41a33a90730af317f64e2c514c609f9941a58036a89c50f63d1bbe2910160405180910390a350505050565b81610c47610358826001600160e01b03191660009081526020819052604090206001015460e01b90565b610c805760405162461bcd60e51b815260206004820152600a60248201526927b7363c9030b236b4b760b11b60448201526064016103b5565b6103c88383610f72565b60005b82518110156103c857610cae61035884838151811061097757610977611302565b610ce75760405162461bcd60e51b815260206004820152600a60248201526927b7363c9030b236b4b760b11b60448201526064016103b5565b610d0a838281518110610cfc57610cfc611302565b602002602001015183610f72565b80610d14816112d1565b915050610c8d565b6001600160e01b031982166000908152602081815260408083206001600160a01b038516845290915290205460ff1615610637576001600160e01b031982166000818152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339391927f4ddc7b757e7bdd7254a9cd39452d307a52761bc824625c6a33104a075d8099e691a45050565b806001600160d01b031981168114610e0a5760405162461bcd60e51b815260206004820152600d60248201527f43617374206f766572666c6f770000000000000000000000000000000000000060448201526064016103b5565b919050565b6000670de0b6b3a7640000838015610eb857600184168015610e3357859350610e37565b8293505b50600282046002850494505b8415610eb2578586028687820414610e5a57600080fd5b81810181811015610e6a57600080fd5b8490049650506001851615610ea7578584028487820414158715151615610e9057600080fd5b81810181811015610ea057600080fd5b8490049450505b600285049450610e43565b50610ece565b838015610ec85760009350610ecc565b8293505b505b505092915050565b6001600160e01b03198116610f07836001600160e01b03191660009081526020819052604090206001015460e01b90565b6001600160e01b03191614610637576001600160e01b0319828116600081815260208190526040808220600101805463ffffffff191660e087901c17905551928416927fd348e2220a50b4500ec353f6e802d2f14dd1b5d6786148fd1bbcc570bf92d4739190a35050565b6001600160e01b031982166000908152602081815260408083206001600160a01b038516845290915290205460ff16610637576001600160e01b031982166000818152602081815260408083206001600160a01b0386168085529252808320805460ff1916600117905551339391927fe6231789d19137da31d0550f4ba9ee379020a8cfb64cb79bf1790c996d2e616591a45050565b80356001600160a01b0381168114610e0a57600080fd5b80356001600160e01b031981168114610e0a57600080fd5b80356001600160d01b031981168114610e0a57600080fd5b6000806040838503121561106257600080fd5b823567ffffffffffffffff8082111561107a57600080fd5b818501915085601f83011261108e57600080fd5b81356020828211156110a2576110a2611318565b8160051b604051601f19603f830116810181811086821117156110c7576110c7611318565b604052838152828101945085830182870184018b10156110e657600080fd5b600096505b84871015611110576110fc8161101f565b8652600196909601959483019483016110eb565b5096506111209050878201611008565b9450505050509250929050565b60008060006060848603121561114257600080fd5b505081359360208301359350604090920135919050565b60006020828403121561116b57600080fd5b6103278261101f565b6000806040838503121561118757600080fd5b6111908361101f565b915061119e60208401611008565b90509250929050565b600080604083850312156111ba57600080fd5b6111c38361101f565b915061119e6020840161101f565b600080604083850312156111e457600080fd5b6111ed83611037565b915061119e60208401611037565b60008060006060848603121561121057600080fd5b61121984611037565b925061122760208501611037565b9150604084013590509250925092565b6000806000806080858703121561124d57600080fd5b61125685611037565b935061126460208601611037565b93969395505050506040820135916060013590565b60008261129657634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156112b5576112b56112ec565b500290565b6000828210156112cc576112cc6112ec565b500390565b60006000198214156112e5576112e56112ec565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220fbee2f15e6463d854217c75b9b91065e32a33127a47328b055e796da953dce6f64736f6c63430008060033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101315760003560e01c8063991b5332116100b2578063ae93c1b511610081578063de02cde711610066578063de02cde7146102d1578063effae353146102e4578063ffffffff1461028957600080fd5b8063ae93c1b5146102ab578063aff005e2146102be57600080fd5b8063991b5332146102255780639f1ed3c014610238578063a4f0d7d014610289578063ad82110f1461029857600080fd5b8063559742d9116101095780635ba5e9f0116100ee5780635ba5e9f0146101cf57806368284fd4146101ff578063687f0e4c1461021257600080fd5b8063559742d9146101bc5780635909c12f1461013657600080fd5b801561013657806310ab94321461015c57806344faded01461017f578063462f9a2814610194575b600080fd5b61013e600081565b6040516001600160e01b031990911681526020015b60405180910390f35b61016f61016a366004611174565b6102f7565b6040519015158152602001610153565b61019261018d366004611174565b61032e565b005b6101a76101a236600461112d565b6103cd565b60408051928352602083019190915201610153565b6101926101ca366004611159565b6105c2565b61013e6101dd366004611159565b6001600160e01b03191660009081526020819052604090206001015460e01b90565b6101a761020d36600461112d565b61063b565b610192610220366004611174565b61075f565b610192610233366004611237565b6107c1565b61026e6102463660046111d1565b6001602081815260009384526040808520909152918352912080549181015460029091015483565b60408051938452602084019290925290820152606001610153565b61013e6001600160e01b031981565b6101926102a636600461104f565b610953565b6101926102b93660046111a7565b610a0f565b6101926102cc3660046111fb565b610a7c565b6101926102df366004611174565b610c1d565b6101926102f236600461104f565b610c8a565b6001600160e01b031982166000908152602081815260408083206001600160a01b038516845290915281205460ff165b9392505050565b81610380610358826001600160e01b03191660009081526020819052604090206001015460e01b90565b6001600160e01b03191660009081526020818152604080832033845290915290205460ff1690565b6103be5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9030b236b4b760b11b60448201526064015b60405180910390fd5b6103c88383610d1c565b505050565b6000806000600160006103df88610db0565b6001600160d01b0319166001600160d01b0319168152602001908152602001600020600061040c87610db0565b6001600160d01b03191681526020808201929092526040908101600020815160608101835281548152600182015493810184905260029091015491810191909152915061048e5760405162461bcd60e51b815260206004820152601060248201526f14dbdd5c98d9481b9bdd08199bdd5b9960821b60448201526064016103b5565b60008160400151426104a091906112ba565b9050801561055e5781516104b49082610e0f565b826020018181516104c5919061129b565b905250602082018051670de0b6b3a764000091906104e4908390611279565b90525042604083015281600160006104fb8a610db0565b6001600160d01b0319166001600160d01b0319168152602001908152602001600020600061052889610db0565b6001600160d01b031916815260208082019290925260409081016000208351815591830151600183015591909101516002909101555b81602001519350600084116105b55760405162461bcd60e51b815260206004820152601860248201527f416363756d756c617465642072617465206973207a65726f000000000000000060448201526064016103b5565b4292505050935093915050565b806105ec610358826001600160e01b03191660009081526020819052604090206001015460e01b90565b6106255760405162461bcd60e51b815260206004820152600a60248201526927b7363c9030b236b4b760b11b60448201526064016103b5565b610637826001600160e01b0319610ed6565b5050565b60008060006001600061064d88610db0565b6001600160d01b0319166001600160d01b0319168152602001908152602001600020600061067a87610db0565b6001600160d01b0319168152602080820192909252604090810160002081516060810183528154815260018201549381018490526002909101549181019190915291506106fc5760405162461bcd60e51b815260206004820152601060248201526f14dbdd5c98d9481b9bdd08199bdd5b9960821b60448201526064016103b5565b80602001519250600083116107535760405162461bcd60e51b815260206004820152601860248201527f416363756d756c617465642072617465206973207a65726f000000000000000060448201526064016103b5565b42915050935093915050565b6001600160a01b03811633146107b75760405162461bcd60e51b815260206004820152601660248201527f52656e6f756e6365206f6e6c7920666f722073656c660000000000000000000060448201526064016103b5565b6106378282610d1c565b600080356001600160e01b03191681526020818152604080832033845290915290205460ff166108235760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b60448201526064016103b5565b6001600160d01b03198085166000908152600160208181526040808420948816845293815291839020835160608101855281548152918101549282018390526002015492810192909252156108ba5760405162461bcd60e51b815260206004820152601560248201527f536f7572636520697320616c726561647920736574000000000000000000000060448201526064016103b5565b604080516060810182528381526020808201868152428385019081526001600160d01b03198a811660008181526001808752888220938d1680835293875290889020965187559351938601939093559051600290940193909355835187815291820186905291927f7525ef17ef84c7973b7ae38b0a4d9637fb0795643f2bfcb004c24fd9e13ca3c7910160405180910390a35050505050565b60005b82518110156103c8576109a161035884838151811061097757610977611302565b60200260200101516001600160e01b03191660009081526020819052604090206001015460e01b90565b6109da5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9030b236b4b760b11b60448201526064016103b5565b6109fd8382815181106109ef576109ef611302565b602002602001015183610d1c565b80610a07816112d1565b915050610956565b81610a39610358826001600160e01b03191660009081526020819052604090206001015460e01b90565b610a725760405162461bcd60e51b815260206004820152600a60248201526927b7363c9030b236b4b760b11b60448201526064016103b5565b6103c88383610ed6565b600080356001600160e01b03191681526020818152604080832033845290915290205460ff16610ade5760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b60448201526064016103b5565b6001600160d01b03198084166000908152600160208181526040808420948716845293815291839020835160608101855281548152918101549282018390526002015492810192909252610b675760405162461bcd60e51b815260206004820152601060248201526f14dbdd5c98d9481b9bdd08199bdd5b9960821b60448201526064016103b5565b42816040015114610bba5760405162461bcd60e51b815260206004820152601160248201527f7374616c6520616363756d756c61746f7200000000000000000000000000000060448201526064016103b5565b6001600160d01b031984811660008181526001602090815260408083209488168084529482529182902086905590518581527fbef63427c41a33a90730af317f64e2c514c609f9941a58036a89c50f63d1bbe2910160405180910390a350505050565b81610c47610358826001600160e01b03191660009081526020819052604090206001015460e01b90565b610c805760405162461bcd60e51b815260206004820152600a60248201526927b7363c9030b236b4b760b11b60448201526064016103b5565b6103c88383610f72565b60005b82518110156103c857610cae61035884838151811061097757610977611302565b610ce75760405162461bcd60e51b815260206004820152600a60248201526927b7363c9030b236b4b760b11b60448201526064016103b5565b610d0a838281518110610cfc57610cfc611302565b602002602001015183610f72565b80610d14816112d1565b915050610c8d565b6001600160e01b031982166000908152602081815260408083206001600160a01b038516845290915290205460ff1615610637576001600160e01b031982166000818152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339391927f4ddc7b757e7bdd7254a9cd39452d307a52761bc824625c6a33104a075d8099e691a45050565b806001600160d01b031981168114610e0a5760405162461bcd60e51b815260206004820152600d60248201527f43617374206f766572666c6f770000000000000000000000000000000000000060448201526064016103b5565b919050565b6000670de0b6b3a7640000838015610eb857600184168015610e3357859350610e37565b8293505b50600282046002850494505b8415610eb2578586028687820414610e5a57600080fd5b81810181811015610e6a57600080fd5b8490049650506001851615610ea7578584028487820414158715151615610e9057600080fd5b81810181811015610ea057600080fd5b8490049450505b600285049450610e43565b50610ece565b838015610ec85760009350610ecc565b8293505b505b505092915050565b6001600160e01b03198116610f07836001600160e01b03191660009081526020819052604090206001015460e01b90565b6001600160e01b03191614610637576001600160e01b0319828116600081815260208190526040808220600101805463ffffffff191660e087901c17905551928416927fd348e2220a50b4500ec353f6e802d2f14dd1b5d6786148fd1bbcc570bf92d4739190a35050565b6001600160e01b031982166000908152602081815260408083206001600160a01b038516845290915290205460ff16610637576001600160e01b031982166000818152602081815260408083206001600160a01b0386168085529252808320805460ff1916600117905551339391927fe6231789d19137da31d0550f4ba9ee379020a8cfb64cb79bf1790c996d2e616591a45050565b80356001600160a01b0381168114610e0a57600080fd5b80356001600160e01b031981168114610e0a57600080fd5b80356001600160d01b031981168114610e0a57600080fd5b6000806040838503121561106257600080fd5b823567ffffffffffffffff8082111561107a57600080fd5b818501915085601f83011261108e57600080fd5b81356020828211156110a2576110a2611318565b8160051b604051601f19603f830116810181811086821117156110c7576110c7611318565b604052838152828101945085830182870184018b10156110e657600080fd5b600096505b84871015611110576110fc8161101f565b8652600196909601959483019483016110eb565b5096506111209050878201611008565b9450505050509250929050565b60008060006060848603121561114257600080fd5b505081359360208301359350604090920135919050565b60006020828403121561116b57600080fd5b6103278261101f565b6000806040838503121561118757600080fd5b6111908361101f565b915061119e60208401611008565b90509250929050565b600080604083850312156111ba57600080fd5b6111c38361101f565b915061119e6020840161101f565b600080604083850312156111e457600080fd5b6111ed83611037565b915061119e60208401611037565b60008060006060848603121561121057600080fd5b61121984611037565b925061122760208501611037565b9150604084013590509250925092565b6000806000806080858703121561124d57600080fd5b61125685611037565b935061126460208601611037565b93969395505050506040820135916060013590565b60008261129657634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156112b5576112b56112ec565b500290565b6000828210156112cc576112cc6112ec565b500390565b60006000198214156112e5576112e56112ec565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220fbee2f15e6463d854217c75b9b91065e32a33127a47328b055e796da953dce6f64736f6c63430008060033
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.