Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Chronicle_Aggor_BTC_USD
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 10000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import {IChronicle} from "./IChronicle.sol"; import {OracleAggregator, IOracleAggregator} from "./OracleAggregator.sol"; /** * @title Chronicle_Aggor_BTC_USD * @notice A concrete implementation of the OracleAggregator designed specifically for BTC/USD. */ contract Chronicle_Aggor_BTC_USD is OracleAggregator { /// @notice Thrown when a caller is not an authorized data consumer. error UnathorisedDataConsumer(address consumer); /** * @notice Returns a brief description of this price feed. * @dev For compatibility with Chainlink’s AggregatorV3Interface. * @return description A human-readable description of the aggregator. */ function description() public view virtual override returns (string memory) { return "Aggregated price feed BTC/USD from Chronicle, Chainlink, and RedStone oracles"; } /// @inheritdoc IOracleAggregator function chronicle() public pure virtual override returns (IChronicle) { return IChronicle(0x24C392CDbF32Cf911B258981a66d5541d85269ce); } /// @inheritdoc IOracleAggregator function chainlink() public pure virtual override returns (AggregatorV3Interface) { return AggregatorV3Interface(0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c); } /// @inheritdoc IOracleAggregator function redstone() public pure virtual override returns (AggregatorV3Interface) { return AggregatorV3Interface(0xAB7f623fb2F6fea6601D4350FA0E2290663C28Fc); } /// @inheritdoc IOracleAggregator function checkAuthorisedDataConsumer(address consumer) public pure virtual override { // Open for everyone } /// @inheritdoc IOracleAggregator function getAgeThreshold() public pure virtual override returns (uint32) { return 25 hours; // in seconds } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface AggregatorV3Interface { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); function getRoundData(uint80 _roundId) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; /** * @title IChronicle * * @notice Interface for Chronicle Protocol's oracle products */ interface IChronicle { /// @notice Returns the oracle's identifier. /// @return wat The oracle's identifier. function wat() external view returns (bytes32 wat); /// @notice Returns the oracle's current value. /// @dev Reverts if no value set. /// @return value The oracle's current value. function read() external view returns (uint value); /// @notice Returns the oracle's current value and its age. /// @dev Reverts if no value set. /// @return value The oracle's current value. /// @return age The value's age. function readWithAge() external view returns (uint value, uint age); /// @notice Returns the oracle's current value. /// @return isValid True if value exists, false otherwise. /// @return value The oracle's current value if it exists, zero otherwise. function tryRead() external view returns (bool isValid, uint value); /// @notice Returns the oracle's current value and its age. /// @return isValid True if value exists, false otherwise. /// @return value The oracle's current value if it exists, zero otherwise. /// @return age The value's age if value exists, zero otherwise. function tryReadWithAge() external view returns (bool isValid, uint value, uint age); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import {IChronicle} from "./IChronicle.sol"; /** * @title IOracleAggregator * @notice Interface for a contract that aggregates data from multiple oracle sources. */ interface IOracleAggregator { /** * @notice Fetches the aggregated oracle value from multiple sources. * @return value The median price from all valid oracles. * @return goodOraclesCount The number of oracles that returned a valid, non-stale value. */ function getAggregatedOracleValue() external view returns (uint256 value, uint8 goodOraclesCount); // Immutable Configurations /** * @notice Returns the Chronicle oracle contract. * @dev Must be configured to return 18-decimals price data. * @return chronicle The chronicle oracle contract address. */ function chronicle() external view returns (IChronicle chronicle); /** * @notice Returns the Chainlink oracle contract. * @dev Must be a price feed with 8 decimals. * @return chainlink The Chainlink PriceFeed address. */ function chainlink() external view returns (AggregatorV3Interface chainlink); /** * @notice Returns the RedStone oracle contract. * @dev Must be a price feed with 8 decimals. * @return redstone The RedStone PriceFeed address. */ function redstone() external view returns (AggregatorV3Interface redstone); /** * @notice Returns the maximum allowed age of price data (in seconds) for it to be considered valid. * @dev The age threshold is used to prevent stale prices from being counted. * @return ageThreshold The age threshold, in seconds. */ function getAgeThreshold() external view returns(uint32); /** * @notice Checks whether a given address is authorized to consume price data. * @dev Reverts if the consumer is not authorized. This check is used only in * the `latestAnswer` and the `latestRoundData` functions. The `getAggregatedOracleValue` * function is open for everyone * @param consumer The address for which to check authorization. */ function checkAuthorisedDataConsumer(address consumer) external view; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; library NumericArrayLib { uint256 constant UINT256_SHIFT = 5; // 2 ** 5 == 32 uint256 constant BYTES_ARR_LEN_VAR_BS = 32; uint256 constant UINT256_VALUE_BS = 32; error CanNotPickMedianOfEmptyArray(); // This function modifies the array if it has more than 3 elements // We handle cases for up to 3 elements manually to optimise gas cost (~700 gas) function pickMedian(uint256[] memory arr) internal pure returns (uint256) { if (arr.length == 3) { if (arr[0] < arr[1]) { if (arr[1] < arr[2]) { return arr[1]; // arr[0] < arr[1] < arr[2] } else { return arr[0] > arr[2] ? arr[0] : arr[2]; } } else { // arr[0] >= arr[1] if (arr[0] < arr[2]) { return arr[0]; // arr[1] <= arr[0] < arr[2] } else { return arr[1] > arr[2] ? arr[1] : arr[2]; } } } if (arr.length == 2) return (arr[0] + arr[1]) / 2; if (arr.length == 1) return arr[0]; if (arr.length == 0) revert CanNotPickMedianOfEmptyArray(); // For arr.length > 3 sort(arr); uint256 middleIndex = arr.length / 2; if (arr.length % 2 == 0) { uint256 sum = arr[middleIndex - 1] + arr[middleIndex]; return sum / 2; } else { return arr[middleIndex]; } } // This function sorts an array in memory using a simple sort algorithm, // which performs even better than quick sort for small arrays function sort(uint256[] memory arr) internal pure { assembly { let arrLength := mload(arr) let valuesPtr := add(arr, BYTES_ARR_LEN_VAR_BS) // memory location of arr[0] let endPtr := add(valuesPtr, shl(UINT256_SHIFT, arrLength)) // shl(UINT256_SHIFT, arrLength) == UINT256_VALUE_BS * arrLength for { let arrIPtr := add(valuesPtr, UINT256_VALUE_BS) // starting from arr[1] } lt(arrIPtr, endPtr) { arrIPtr := add(arrIPtr, UINT256_VALUE_BS) // arrIPtr += 32 } { for { let arrJPtr := valuesPtr } lt(arrJPtr, arrIPtr) { arrJPtr := add(arrJPtr, UINT256_VALUE_BS) // arrJPtr += 32 } { let arrI := mload(arrIPtr) let arrJ := mload(arrJPtr) if lt(arrI, arrJ) { mstore(arrIPtr, arrJ) mstore(arrJPtr, arrI) } } } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import {NumericArrayLib} from "./libs/NumericArrayLib.sol"; import {IChronicle} from "./IChronicle.sol"; import {IOracleAggregator} from "./IOracleAggregator.sol"; /** * @title OracleAggregator * @notice This contract aggregates price data from multiple blockchain oracles: Chainlink, Chronicle, and RedStone. * * Important note: This aggregator does not check the decimals of the configured feeds. * Ensure `redstone()` and `chainlink()` return values with 8 decimals, and `chronicle()` returns 18 decimals internally. * * ## Key Principles: * - **Simplicity:** The contract is designed to be as simple as possible to minimize the risk of bugs. * - **Immutable Configuration:** There are no in-contract authorization mechanisms for admin wallets. Any changes require deploying a new version of the contract. * - **Partial AggregatorV3Interface Implementation:** The contract implements only `latestRoundData` and `latestAnswer` functions to reduce complexity. * - **Whitelisted Reads:** Only authorized addresses can call `latestRoundData` and `latestAnswer`. Access is configured in the `checkAuthorisedDataConsumer` method. * - **Gas Optimization:** Uses low-level calls and avoids unnecessary storage reads to reduce gas consumption. * - **Oracle Isolation:** Each oracle call has a gas limit and low-level error handling to isolate failures. This ensures that a malfunction or compromise of one oracle won't impact the aggregator's reliability. * - **Separation of Concerns:** The core logic resides in this contract (`OracleAggregator.sol`), while the configuration is handled in separate contracts (e.g. `Chronicle_Aggor_BTC_USD.sol`). */ abstract contract OracleAggregator is AggregatorV3Interface, IOracleAggregator { /// @notice Thrown when a function is called that is not supported by this aggregator. error UnsupportedFunction(); /// @notice The number of decimals for the final aggregated price. uint8 public constant decimals = 8; // Internal constants uint256 internal constant _CHRONICLE_DECIMALS = 18; uint256 internal constant _CHRONICLE_SCALE_FAKTOR = 10 ** (_CHRONICLE_DECIMALS - decimals); uint256 internal constant _GAS_LIMIT_PER_ORACLE_READ = 500_000; // Average gas cost for oracle calls is ~20K. It's quite safe, but in case of ethereum hardforks (with signifncant changes in gas calculation) we would need to deploy a new version of this contract uint256 internal constant _LATEST_ROUND_DATA_RETURN_SIZE = 160; uint256 internal constant _TRY_READ_WITH_AGE_RETURN_SIZE = 96; /// @inheritdoc IOracleAggregator function chainlink() public view virtual returns (AggregatorV3Interface); /// @inheritdoc IOracleAggregator function redstone() public view virtual returns (AggregatorV3Interface); /// @inheritdoc IOracleAggregator function chronicle() public view virtual returns (IChronicle); /// @inheritdoc IOracleAggregator function checkAuthorisedDataConsumer(address consumer) public view virtual; /// @inheritdoc IOracleAggregator function getAgeThreshold() public view virtual returns (uint32); /// @inheritdoc IOracleAggregator function getAggregatedOracleValue() public view returns (uint256 value, uint8 goodOraclesCount) { (bool okChronicle, uint256 valChronicle) = _safeReadFromChronicle(); (bool okChainlink, uint256 valChainlink) = _safeLatestRoundData(chainlink()); (bool okRedstone, uint256 valRedstone) = _safeLatestRoundData(redstone()); assembly { goodOraclesCount := add(add(okChronicle, okChainlink), okRedstone) // ((okChronicle ? 1 : 0) + (okChainlink ? 1 : 0)) + (okRedstone ? 1 : 0) } uint256 insertIndex = 0; uint256[] memory values = new uint256[](goodOraclesCount); if (okChronicle) values[insertIndex++] = valChronicle; if (okChainlink) values[insertIndex++] = valChainlink; if (okRedstone) values[insertIndex++] = valRedstone; value = NumericArrayLib.pickMedian(values); } /** * @notice Safely calls `latestRoundData` on a Chainlink-compatible Price Feed contract * @dev The priceFeed must have use 8 decimals * @param priceFeed The address of the Chainlink Price Feed contract * @return success If the call succeeded and is not stale * @return value The oracle value (with 8 decimals) */ function _safeLatestRoundData(AggregatorV3Interface priceFeed) internal view returns (bool success, uint256 value) { bytes memory data = abi.encodeWithSelector(AggregatorV3Interface.latestRoundData.selector); bytes memory returnData; (success, returnData) = address(priceFeed).staticcall{gas: _GAS_LIMIT_PER_ORACLE_READ}(data); if (success && returnData.length == _LATEST_ROUND_DATA_RETURN_SIZE) { // Checking returnData.length to avoid failures in abi.decode ( /* roundId */ , int256 answer, /* startedAt */, uint256 updatedAt, /* answeredInRound */ ) = abi.decode(returnData, (uint80, int256, uint256, uint256, uint80)); bool isStale; unchecked { isStale = updatedAt < block.timestamp - getAgeThreshold(); } if (isStale || answer <= 0 || uint256(answer) > uint256(type(uint128).max)) { return (false, 0); } return (true, uint256(answer)); } return (false, 0); } /** * @notice Safely calls `tryReadWithAge` on the Chronicle Oracle contract. * @return success True if the call was successful and the data is valid and not stale. * @return value The oracle's returned price value, scaled to 8 decimals. */ function _safeReadFromChronicle() internal view returns (bool success, uint256 value) { bytes memory data = abi.encodeWithSelector(IChronicle.tryReadWithAge.selector); (bool callSuccess, bytes memory returnData) = address(chronicle()).staticcall{gas: _GAS_LIMIT_PER_ORACLE_READ}(data); if (callSuccess && returnData.length == _TRY_READ_WITH_AGE_RETURN_SIZE) { // Checking returnData.length to avoid failures in abi.decode (bool isValid, uint256 chronicleValue, uint256 age) = abi.decode(returnData, (bool, uint256, uint256)); if (!isValid) { return (false, 0); } bool isStale; unchecked { isStale = age < block.timestamp - getAgeThreshold(); } if (isStale) { // We don't do assertions for the size of the number here, because we will divide the value by 10**10 below return (false, 0); } chronicleValue /= _CHRONICLE_SCALE_FAKTOR; return (true, chronicleValue); } return (false, 0); } /** * @notice Returns the latest round data as defined by `AggregatorV3Interface`. * @dev Only authorized data consumers can read the data. * @return roundId A fixed round ID (always 1 in this implementation). * @return answer The aggregated price as an `int256`. * @return startedAt The current block timestamp (we don't aggregate timestamps from different oracles). * @return updatedAt The current block timestamp (we don't aggregate timestamps from different oracles). * @return answeredInRound Equal to `roundId`. */ function latestRoundData() external view virtual returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound) { checkAuthorisedDataConsumer(msg.sender); (uint256 value, /* goodOraclesCount */ ) = getAggregatedOracleValue(); roundId = 1; answer = int256(value); startedAt = block.timestamp; updatedAt = block.timestamp; answeredInRound = 1; } /** * @notice Returns the latest aggregated answer as defined by `AggregatorV3Interface`. * @dev Only authorized data consumers can read the data. * @return The aggregated price as an `int256`. */ function latestAnswer() external view returns (int256) { checkAuthorisedDataConsumer(msg.sender); (uint256 value, /* goodOraclesCount */ ) = getAggregatedOracleValue(); return int256(value); } /// @notice This function is not supported. function latestRound() external pure virtual returns (uint80) { revert UnsupportedFunction(); } /// @notice This function is not supported. function getRoundData(uint80 /* requestedRoundId */ ) external pure override returns (uint80, int256, uint256, uint256, uint80) { revert UnsupportedFunction(); } /** * @notice Returns the version of this aggregator * @return version */ function version() external pure virtual override returns (uint256) { return 1; } }
{ "optimizer": { "enabled": true, "runs": 10000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"CanNotPickMedianOfEmptyArray","type":"error"},{"inputs":[{"internalType":"address","name":"consumer","type":"address"}],"name":"UnathorisedDataConsumer","type":"error"},{"inputs":[],"name":"UnsupportedFunction","type":"error"},{"inputs":[],"name":"chainlink","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"consumer","type":"address"}],"name":"checkAuthorisedDataConsumer","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"chronicle","outputs":[{"internalType":"contract IChronicle","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAgeThreshold","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getAggregatedOracleValue","outputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint8","name":"goodOraclesCount","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"","type":"uint80"},{"internalType":"int256","name":"","type":"int256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRound","outputs":[{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redstone","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50610f8d806100206000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c80637284e4161161008c5780639c3feeb7116100665780639c3feeb714610201578063a34fa0921461021b578063b3efeddf14610235578063feaf968c1461025457600080fd5b80637284e416146101675780638617b2af1461017c5780639a6fc8f5146101b757600080fd5b806350d25bcd116100bd57806350d25bcd1461012757806354fd4d501461013d578063668a0f021461014457600080fd5b806313cac0a3146100e4578063313ce567146100fa57806333b325d314610114575b600080fd5b60405162015f9081526020015b60405180910390f35b610102600881565b60405160ff90911681526020016100f1565b610125610122366004610b05565b50565b005b61012f61025c565b6040519081526020016100f1565b600161012f565b61014c61026e565b60405169ffffffffffffffffffff90911681526020016100f1565b61016f6102a2565b6040516100f19190610b66565b73ab7f623fb2f6fea6601d4350fa0e2290663c28fc5b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f1565b6101ca6101c5366004610bcf565b6102c2565b6040805169ffffffffffffffffffff968716815260208101959095528401929092526060830152909116608082015260a0016100f1565b73f4030086522a5beea4988f8ca5b36dbc97bee88c610192565b7324c392cdbf32cf911b258981a66d5541d85269ce610192565b61023d6102fc565b6040805192835260ff9091166020830152016100f1565b6101ca610459565b6000806102676102fc565b5092915050565b60006040517fea1c702e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60606040518060800160405280604d8152602001610f0b604d9139905090565b60008060008060006040517fea1c702e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008061030a61047f565b9150915060008061033461032f73f4030086522a5beea4988f8ca5b36dbc97bee88c90565b610628565b9150915060008061035961032f73ab7f623fb2f6fea6601d4350fa0e2290663c28fc90565b91509150818487010196506000808860ff1667ffffffffffffffff81111561038357610383610bec565b6040519080825280602002602001820160405280156103ac578160200160208202803683370190505b50905087156103e0578681836103c181610c4a565b9450815181106103d3576103d3610c82565b6020026020010181815250505b8515610411578481836103f281610c4a565b94508151811061040457610404610c82565b6020026020010181815250505b83156104425782818361042381610c4a565b94508151811061043557610435610c82565b6020026020010181815250505b61044b8161078c565b995050505050505050509091565b60008060008060008061046a6102fc565b50600197909650429550859450879350915050565b6040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fceed3ef200000000000000000000000000000000000000000000000000000000179052600090819081806104f87324c392cdbf32cf911b258981a66d5541d85269ce90565b73ffffffffffffffffffffffffffffffffffffffff166207a120846040516105209190610cb1565b6000604051808303818686fa925050503d806000811461055c576040519150601f19603f3d011682016040523d82523d6000602084013e610561565b606091505b5091509150818015610574575060608151145b1561061b576000806000838060200190518101906105929190610ccd565b925092509250826105ad575060009788975095505050505050565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffea0704201811080156105e957506000988998509650505050505050565b6105f560086012610d09565b61060090600a610e3c565b61060a9084610e77565b60019a909950975050505050505050565b5060009485945092505050565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167ffeaf968c000000000000000000000000000000000000000000000000000000001790529051600091829160609073ffffffffffffffffffffffffffffffffffffffff8616906207a120906106b0908590610cb1565b6000604051808303818686fa925050503d80600081146106ec576040519150601f19603f3d011682016040523d82523d6000602084013e6106f1565b606091505b509094509050838015610705575060a08151145b1561061b57600080828060200190518101906107219190610e8b565b50935050925050600061073462015f9090565b63ffffffff16420382109050808061074d575060008313155b8061076757506fffffffffffffffffffffffffffffffff83115b1561077c575060009788975095505050505050565b5060019791965090945050505050565b6000815160030361095557816001815181106107aa576107aa610c82565b6020026020010151826000815181106107c5576107c5610c82565b602002602001015110156108a557816002815181106107e6576107e6610c82565b60200260200101518260018151811061080157610801610c82565b60200260200101511015610831578160018151811061082257610822610c82565b60200260200101519050919050565b8160028151811061084457610844610c82565b60200260200101518260008151811061085f5761085f610c82565b60200260200101511161088c578160028151811061087f5761087f610c82565b602002602001015161089f565b8160008151811061082257610822610c82565b92915050565b816002815181106108b8576108b8610c82565b6020026020010151826000815181106108d3576108d3610c82565b602002602001015110156108f4578160008151811061082257610822610c82565b8160028151811061090757610907610c82565b60200260200101518260018151811061092257610922610c82565b602002602001015111610942578160028151811061087f5761087f610c82565b8160018151811061082257610822610c82565b81516002036109aa5760028260018151811061097357610973610c82565b60200260200101518360008151811061098e5761098e610c82565b60200260200101516109a09190610ee3565b61089f9190610e77565b81516001036109c6578160008151811061082257610822610c82565b8151600003610a01576040517f9e198af900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a0a82610ab4565b600060028351610a1a9190610e77565b905060028351610a2a9190610ef6565b600003610a92576000838281518110610a4557610a45610c82565b602002602001015184600184610a5b9190610d09565b81518110610a6b57610a6b610c82565b6020026020010151610a7d9190610ee3565b9050610a8a600282610e77565b949350505050565b828181518110610aa457610aa4610c82565b6020026020010151915050919050565b8051602082018160051b81019150602081015b82811015610aff57815b81811015610af6578151815180821015610aec578084528183525b5050602001610ad1565b50602001610ac7565b50505050565b600060208284031215610b1757600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610b3b57600080fd5b9392505050565b60005b83811015610b5d578181015183820152602001610b45565b50506000910152565b6020815260008251806020840152610b85816040850160208701610b42565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b69ffffffffffffffffffff8116811461012257600080fd5b600060208284031215610be157600080fd5b8135610b3b81610bb7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610c7b57610c7b610c1b565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008251610cc3818460208701610b42565b9190910192915050565b600080600060608486031215610ce257600080fd5b83518015158114610cf257600080fd5b602085015160409095015190969495509392505050565b8181038181111561089f5761089f610c1b565b600181815b80851115610d7557817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610d5b57610d5b610c1b565b80851615610d6857918102915b93841c9390800290610d21565b509250929050565b600082610d8c5750600161089f565b81610d995750600061089f565b8160018114610daf5760028114610db957610dd5565b600191505061089f565b60ff841115610dca57610dca610c1b565b50506001821b61089f565b5060208310610133831016604e8410600b8410161715610df8575081810a61089f565b610e028383610d1c565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610e3457610e34610c1b565b029392505050565b6000610b3b8383610d7d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082610e8657610e86610e48565b500490565b600080600080600060a08688031215610ea357600080fd5b8551610eae81610bb7565b809550506020860151935060408601519250606086015191506080860151610ed581610bb7565b809150509295509295909350565b8082018082111561089f5761089f610c1b565b600082610f0557610f05610e48565b50069056fe416767726567617465642070726963652066656564204254432f5553442066726f6d204368726f6e69636c652c20436861696e6c696e6b2c20616e642052656453746f6e65206f7261636c6573a264697066735822122024dd4e29755590bd0bc81d115f27709e028e31fadb870524fabf7e64261a7d2864736f6c63430008110033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100df5760003560e01c80637284e4161161008c5780639c3feeb7116100665780639c3feeb714610201578063a34fa0921461021b578063b3efeddf14610235578063feaf968c1461025457600080fd5b80637284e416146101675780638617b2af1461017c5780639a6fc8f5146101b757600080fd5b806350d25bcd116100bd57806350d25bcd1461012757806354fd4d501461013d578063668a0f021461014457600080fd5b806313cac0a3146100e4578063313ce567146100fa57806333b325d314610114575b600080fd5b60405162015f9081526020015b60405180910390f35b610102600881565b60405160ff90911681526020016100f1565b610125610122366004610b05565b50565b005b61012f61025c565b6040519081526020016100f1565b600161012f565b61014c61026e565b60405169ffffffffffffffffffff90911681526020016100f1565b61016f6102a2565b6040516100f19190610b66565b73ab7f623fb2f6fea6601d4350fa0e2290663c28fc5b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f1565b6101ca6101c5366004610bcf565b6102c2565b6040805169ffffffffffffffffffff968716815260208101959095528401929092526060830152909116608082015260a0016100f1565b73f4030086522a5beea4988f8ca5b36dbc97bee88c610192565b7324c392cdbf32cf911b258981a66d5541d85269ce610192565b61023d6102fc565b6040805192835260ff9091166020830152016100f1565b6101ca610459565b6000806102676102fc565b5092915050565b60006040517fea1c702e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60606040518060800160405280604d8152602001610f0b604d9139905090565b60008060008060006040517fea1c702e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008061030a61047f565b9150915060008061033461032f73f4030086522a5beea4988f8ca5b36dbc97bee88c90565b610628565b9150915060008061035961032f73ab7f623fb2f6fea6601d4350fa0e2290663c28fc90565b91509150818487010196506000808860ff1667ffffffffffffffff81111561038357610383610bec565b6040519080825280602002602001820160405280156103ac578160200160208202803683370190505b50905087156103e0578681836103c181610c4a565b9450815181106103d3576103d3610c82565b6020026020010181815250505b8515610411578481836103f281610c4a565b94508151811061040457610404610c82565b6020026020010181815250505b83156104425782818361042381610c4a565b94508151811061043557610435610c82565b6020026020010181815250505b61044b8161078c565b995050505050505050509091565b60008060008060008061046a6102fc565b50600197909650429550859450879350915050565b6040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fceed3ef200000000000000000000000000000000000000000000000000000000179052600090819081806104f87324c392cdbf32cf911b258981a66d5541d85269ce90565b73ffffffffffffffffffffffffffffffffffffffff166207a120846040516105209190610cb1565b6000604051808303818686fa925050503d806000811461055c576040519150601f19603f3d011682016040523d82523d6000602084013e610561565b606091505b5091509150818015610574575060608151145b1561061b576000806000838060200190518101906105929190610ccd565b925092509250826105ad575060009788975095505050505050565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffea0704201811080156105e957506000988998509650505050505050565b6105f560086012610d09565b61060090600a610e3c565b61060a9084610e77565b60019a909950975050505050505050565b5060009485945092505050565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167ffeaf968c000000000000000000000000000000000000000000000000000000001790529051600091829160609073ffffffffffffffffffffffffffffffffffffffff8616906207a120906106b0908590610cb1565b6000604051808303818686fa925050503d80600081146106ec576040519150601f19603f3d011682016040523d82523d6000602084013e6106f1565b606091505b509094509050838015610705575060a08151145b1561061b57600080828060200190518101906107219190610e8b565b50935050925050600061073462015f9090565b63ffffffff16420382109050808061074d575060008313155b8061076757506fffffffffffffffffffffffffffffffff83115b1561077c575060009788975095505050505050565b5060019791965090945050505050565b6000815160030361095557816001815181106107aa576107aa610c82565b6020026020010151826000815181106107c5576107c5610c82565b602002602001015110156108a557816002815181106107e6576107e6610c82565b60200260200101518260018151811061080157610801610c82565b60200260200101511015610831578160018151811061082257610822610c82565b60200260200101519050919050565b8160028151811061084457610844610c82565b60200260200101518260008151811061085f5761085f610c82565b60200260200101511161088c578160028151811061087f5761087f610c82565b602002602001015161089f565b8160008151811061082257610822610c82565b92915050565b816002815181106108b8576108b8610c82565b6020026020010151826000815181106108d3576108d3610c82565b602002602001015110156108f4578160008151811061082257610822610c82565b8160028151811061090757610907610c82565b60200260200101518260018151811061092257610922610c82565b602002602001015111610942578160028151811061087f5761087f610c82565b8160018151811061082257610822610c82565b81516002036109aa5760028260018151811061097357610973610c82565b60200260200101518360008151811061098e5761098e610c82565b60200260200101516109a09190610ee3565b61089f9190610e77565b81516001036109c6578160008151811061082257610822610c82565b8151600003610a01576040517f9e198af900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a0a82610ab4565b600060028351610a1a9190610e77565b905060028351610a2a9190610ef6565b600003610a92576000838281518110610a4557610a45610c82565b602002602001015184600184610a5b9190610d09565b81518110610a6b57610a6b610c82565b6020026020010151610a7d9190610ee3565b9050610a8a600282610e77565b949350505050565b828181518110610aa457610aa4610c82565b6020026020010151915050919050565b8051602082018160051b81019150602081015b82811015610aff57815b81811015610af6578151815180821015610aec578084528183525b5050602001610ad1565b50602001610ac7565b50505050565b600060208284031215610b1757600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610b3b57600080fd5b9392505050565b60005b83811015610b5d578181015183820152602001610b45565b50506000910152565b6020815260008251806020840152610b85816040850160208701610b42565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b69ffffffffffffffffffff8116811461012257600080fd5b600060208284031215610be157600080fd5b8135610b3b81610bb7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610c7b57610c7b610c1b565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008251610cc3818460208701610b42565b9190910192915050565b600080600060608486031215610ce257600080fd5b83518015158114610cf257600080fd5b602085015160409095015190969495509392505050565b8181038181111561089f5761089f610c1b565b600181815b80851115610d7557817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610d5b57610d5b610c1b565b80851615610d6857918102915b93841c9390800290610d21565b509250929050565b600082610d8c5750600161089f565b81610d995750600061089f565b8160018114610daf5760028114610db957610dd5565b600191505061089f565b60ff841115610dca57610dca610c1b565b50506001821b61089f565b5060208310610133831016604e8410600b8410161715610df8575081810a61089f565b610e028383610d1c565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610e3457610e34610c1b565b029392505050565b6000610b3b8383610d7d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082610e8657610e86610e48565b500490565b600080600080600060a08688031215610ea357600080fd5b8551610eae81610bb7565b809550506020860151935060408601519250606086015191506080860151610ed581610bb7565b809150509295509295909350565b8082018082111561089f5761089f610c1b565b600082610f0557610f05610e48565b50069056fe416767726567617465642070726963652066656564204254432f5553442066726f6d204368726f6e69636c652c20436861696e6c696e6b2c20616e642052656453746f6e65206f7261636c6573a264697066735822122024dd4e29755590bd0bc81d115f27709e028e31fadb870524fabf7e64261a7d2864736f6c63430008110033
Loading...
Loading
Loading...
Loading

Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.