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
|
|||||
---|---|---|---|---|---|---|---|---|---|
Initialize | 12918328 | 1274 days ago | IN | 0 ETH | 0.0005439 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
19317920 | 331 days ago | 0.001 ETH | ||||
19317920 | 331 days ago | 0.001 ETH | ||||
19317920 | 331 days ago | 0.001 ETH | ||||
19317920 | 331 days ago | 0.001 ETH | ||||
19317838 | 331 days ago | 0.001 ETH | ||||
19317838 | 331 days ago | 0.001 ETH | ||||
19317838 | 331 days ago | 0.001 ETH | ||||
19317838 | 331 days ago | 0.001 ETH | ||||
18400824 | 460 days ago | 0.001 ETH | ||||
18400824 | 460 days ago | 0.001 ETH | ||||
18400824 | 460 days ago | 0.001 ETH | ||||
18400824 | 460 days ago | 0.001 ETH | ||||
18399924 | 460 days ago | 0.001 ETH | ||||
18399924 | 460 days ago | 0.001 ETH | ||||
18397436 | 460 days ago | 0.001 ETH | ||||
18397436 | 460 days ago | 0.001 ETH | ||||
18397436 | 460 days ago | 0.001 ETH | ||||
18397436 | 460 days ago | 0.001 ETH | ||||
18298552 | 474 days ago | 0.01 ETH | ||||
18298552 | 474 days ago | 0.01 ETH | ||||
14395564 | 1044 days ago | 0.001 ETH | ||||
14395564 | 1044 days ago | 0.001 ETH | ||||
14395541 | 1044 days ago | 0.001 ETH | ||||
14395541 | 1044 days ago | 0.001 ETH | ||||
14371684 | 1048 days ago | 0.001 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
CoFiXController
Compiler Version
v0.8.6+commit.11564f7e
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-07-29 */ // Sources flattened with hardhat v2.3.0 https://hardhat.org // File contracts/interfaces/INestPriceFacade.sol // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.6; /// @dev This interface defines the methods for price call entry interface INestPriceFacade { // /// @dev Set the address flag. Only the address flag equals to config.normalFlag can the price be called // /// @param addr Destination address // /// @param flag Address flag // function setAddressFlag(address addr, uint flag) external; // /// @dev Get the flag. Only the address flag equals to config.normalFlag can the price be called // /// @param addr Destination address // /// @return Address flag // function getAddressFlag(address addr) external view returns(uint); // /// @dev Set INestQuery implementation contract address for token // /// @param tokenAddress Destination token address // /// @param nestQueryAddress INestQuery implementation contract address, 0 means delete // function setNestQuery(address tokenAddress, address nestQueryAddress) external; // /// @dev Get INestQuery implementation contract address for token // /// @param tokenAddress Destination token address // /// @return INestQuery implementation contract address, 0 means use default // function getNestQuery(address tokenAddress) external view returns (address); // /// @dev Get the latest trigger price // /// @param tokenAddress Destination token address // /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, and the excess fees will be returned through this address // /// @return blockNumber The block number of price // /// @return price The token price. (1eth equivalent to (price) token) // function triggeredPrice(address tokenAddress, address payback) external payable returns (uint blockNumber, uint price); // /// @dev Get the full information of latest trigger price // /// @param tokenAddress Destination token address // /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, and the excess fees will be returned through this address // /// @return blockNumber The block number of price // /// @return price The token price. (1eth equivalent to (price) token) // /// @return avgPrice Average price // /// @return sigmaSQ The square of the volatility (18 decimal places). The current implementation assumes that // /// the volatility cannot exceed 1. Correspondingly, when the return value is equal to 999999999999996447, // /// it means that the volatility has exceeded the range that can be expressed // function triggeredPriceInfo(address tokenAddress, address payback) external payable returns (uint blockNumber, uint price, uint avgPrice, uint sigmaSQ); // /// @dev Find the price at block number // /// @param tokenAddress Destination token address // /// @param height Destination block number // /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, and the excess fees will be returned through this address // /// @return blockNumber The block number of price // /// @return price The token price. (1eth equivalent to (price) token) // function findPrice(address tokenAddress, uint height, address payback) external payable returns (uint blockNumber, uint price); /// @dev Get the latest effective price /// @param tokenAddress Destination token address /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, and the excess fees will be returned through this address /// @return blockNumber The block number of price /// @return price The token price. (1eth equivalent to (price) token) function latestPrice(address tokenAddress, address payback) external payable returns (uint blockNumber, uint price); // /// @dev Get the last (num) effective price // /// @param tokenAddress Destination token address // /// @param count The number of prices that want to return // /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, and the excess fees will be returned through this address // /// @return An array which length is num * 2, each two element expresses one price like blockNumber|price // function lastPriceList(address tokenAddress, uint count, address payback) external payable returns (uint[] memory); /// @dev Returns the results of latestPrice() and triggeredPriceInfo() /// @param tokenAddress Destination token address /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, and the excess fees will be returned through this address /// @return latestPriceBlockNumber The block number of latest price /// @return latestPriceValue The token latest price. (1eth equivalent to (price) token) /// @return triggeredPriceBlockNumber The block number of triggered price /// @return triggeredPriceValue The token triggered price. (1eth equivalent to (price) token) /// @return triggeredAvgPrice Average price /// @return triggeredSigmaSQ The square of the volatility (18 decimal places). The current implementation assumes that /// the volatility cannot exceed 1. Correspondingly, when the return value is equal to 999999999999996447, /// it means that the volatility has exceeded the range that can be expressed function latestPriceAndTriggeredPriceInfo(address tokenAddress, address payback) external payable returns ( uint latestPriceBlockNumber, uint latestPriceValue, uint triggeredPriceBlockNumber, uint triggeredPriceValue, uint triggeredAvgPrice, uint triggeredSigmaSQ ); /// @dev Returns lastPriceList and triggered price info /// @param tokenAddress Destination token address /// @param count The number of prices that want to return /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, and the excess fees will be returned through this address /// @return prices An array which length is num * 2, each two element expresses one price like blockNumber|price /// @return triggeredPriceBlockNumber The block number of triggered price /// @return triggeredPriceValue The token triggered price. (1eth equivalent to (price) token) /// @return triggeredAvgPrice Average price /// @return triggeredSigmaSQ The square of the volatility (18 decimal places). The current implementation assumes that /// the volatility cannot exceed 1. Correspondingly, when the return value is equal to 999999999999996447, /// it means that the volatility has exceeded the range that can be expressed function lastPriceListAndTriggeredPriceInfo( address tokenAddress, uint count, address payback ) external payable returns ( uint[] memory prices, uint triggeredPriceBlockNumber, uint triggeredPriceValue, uint triggeredAvgPrice, uint triggeredSigmaSQ ); // /// @dev Get the latest trigger price. (token and ntoken) // /// @param tokenAddress Destination token address // /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, and the excess fees will be returned through this address // /// @return blockNumber The block number of price // /// @return price The token price. (1eth equivalent to (price) token) // /// @return ntokenBlockNumber The block number of ntoken price // /// @return ntokenPrice The ntoken price. (1eth equivalent to (price) ntoken) // function triggeredPrice2(address tokenAddress, address payback) external payable returns (uint blockNumber, uint price, uint ntokenBlockNumber, uint ntokenPrice); // /// @dev Get the full information of latest trigger price. (token and ntoken) // /// @param tokenAddress Destination token address // /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, and the excess fees will be returned through this address // /// @return blockNumber The block number of price // /// @return price The token price. (1eth equivalent to (price) token) // /// @return avgPrice Average price // /// @return sigmaSQ The square of the volatility (18 decimal places). The current implementation assumes that // /// the volatility cannot exceed 1. Correspondingly, when the return value is equal to 999999999999996447, // /// it means that the volatility has exceeded the range that can be expressed // /// @return ntokenBlockNumber The block number of ntoken price // /// @return ntokenPrice The ntoken price. (1eth equivalent to (price) ntoken) // /// @return ntokenAvgPrice Average price of ntoken // /// @return ntokenSigmaSQ The square of the volatility (18 decimal places). The current implementation assumes that // /// the volatility cannot exceed 1. Correspondingly, when the return value is equal to 999999999999996447, // /// it means that the volatility has exceeded the range that can be expressed // function triggeredPriceInfo2(address tokenAddress, address payback) external payable returns (uint blockNumber, uint price, uint avgPrice, uint sigmaSQ, uint ntokenBlockNumber, uint ntokenPrice, uint ntokenAvgPrice, uint ntokenSigmaSQ); // /// @dev Get the latest effective price. (token and ntoken) // /// @param tokenAddress Destination token address // /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, and the excess fees will be returned through this address // /// @return blockNumber The block number of price // /// @return price The token price. (1eth equivalent to (price) token) // /// @return ntokenBlockNumber The block number of ntoken price // /// @return ntokenPrice The ntoken price. (1eth equivalent to (price) ntoken) // function latestPrice2(address tokenAddress, address payback) external payable returns (uint blockNumber, uint price, uint ntokenBlockNumber, uint ntokenPrice); } // File contracts/interfaces/ICoFiXController.sol // GPL-3.0-or-later pragma solidity ^0.8.6; /// @dev This interface defines the methods for price call entry interface ICoFiXController { // Calc variance of price and K in CoFiX is very expensive // We use expected value of K based on statistical calculations here to save gas // In the near future, NEST could provide the variance of price directly. We will adopt it then. // We can make use of `data` bytes in the future /// @dev Query price /// @param tokenAddress Target address of token /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, /// and the excess fees will be returned through this address /// @return ethAmount Oracle price - eth amount /// @return tokenAmount Oracle price - token amount /// @return blockNumber Block number of price function queryPrice( address tokenAddress, address payback ) external payable returns ( uint ethAmount, uint tokenAmount, uint blockNumber ); /// @dev Calc variance of price and K in CoFiX is very expensive /// We use expected value of K based on statistical calculations here to save gas /// In the near future, NEST could provide the variance of price directly. We will adopt it then. /// We can make use of `data` bytes in the future /// @param tokenAddress Target address of token /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, /// and the excess fees will be returned through this address /// @return k The K value(18 decimal places). /// @return ethAmount Oracle price - eth amount /// @return tokenAmount Oracle price - token amount /// @return blockNumber Block number of price function queryOracle( address tokenAddress, address payback ) external payable returns ( uint k, uint ethAmount, uint tokenAmount, uint blockNumber ); /// @dev K value is calculated by revised volatility /// @param sigmaSQ The square of the volatility (18 decimal places). /// @param p0 Last price (number of tokens equivalent to 1 ETH) /// @param bn0 Block number of the last price /// @param p Latest price (number of tokens equivalent to 1 ETH) /// @param bn The block number when (ETH, TOKEN) price takes into effective function calcRevisedK(uint sigmaSQ, uint p0, uint bn0, uint p, uint bn) external view returns (uint k); /// @dev Query latest price info /// @param tokenAddress Target address of token /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, /// and the excess fees will be returned through this address /// @return blockNumber Block number of price /// @return priceEthAmount Oracle price - eth amount /// @return priceTokenAmount Oracle price - token amount /// @return avgPriceEthAmount Avg price - eth amount /// @return avgPriceTokenAmount Avg price - token amount /// @return sigmaSQ The square of the volatility (18 decimal places) function latestPriceInfo(address tokenAddress, address payback) external payable returns ( uint blockNumber, uint priceEthAmount, uint priceTokenAmount, uint avgPriceEthAmount, uint avgPriceTokenAmount, uint sigmaSQ ); } // File contracts/CoFiXController.sol // GPL-3.0-or-later pragma solidity ^0.8.6; /// @dev This interface defines the methods for price call entry contract CoFiXController is ICoFiXController { uint constant BLOCK_TIME = 14; // Address of NestPriceFacade contract address constant NEST_PRICE_FACADE = 0xB5D2890c061c321A5B6A4a4254bb1522425BAF0A; /// @dev To support open-zeppelin/upgrades function initialize(address nestPriceFacade) external { //NEST_PRICE_FACADE = nestPriceFacade; } /// @dev Query latest price info /// @param tokenAddress Target address of token /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, /// and the excess fees will be returned through this address /// @return blockNumber Block number of price /// @return priceEthAmount Oracle price - eth amount /// @return priceTokenAmount Oracle price - token amount /// @return avgPriceEthAmount Avg price - eth amount /// @return avgPriceTokenAmount Avg price - token amount /// @return sigmaSQ The square of the volatility (18 decimal places) function latestPriceInfo(address tokenAddress, address payback) public payable override returns ( uint blockNumber, uint priceEthAmount, uint priceTokenAmount, uint avgPriceEthAmount, uint avgPriceTokenAmount, uint sigmaSQ ) { ( blockNumber, priceTokenAmount, ,//uint triggeredPriceBlockNumber, ,//uint triggeredPriceValue, avgPriceTokenAmount, sigmaSQ ) = INestPriceFacade(NEST_PRICE_FACADE).latestPriceAndTriggeredPriceInfo { value: msg.value } (tokenAddress, payback); _checkPrice(priceTokenAmount, avgPriceTokenAmount); priceEthAmount = 1 ether; avgPriceEthAmount = 1 ether; } // Calc variance of price and K in CoFiX is very expensive // We use expected value of K based on statistical calculations here to save gas // In the near future, NEST could provide the variance of price directly. We will adopt it then. // We can make use of `data` bytes in the future /// @dev Query price /// @param tokenAddress Target address of token /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, /// and the excess fees will be returned through this address /// @return ethAmount Oracle price - eth amount /// @return tokenAmount Oracle price - token amount /// @return blockNumber Block number of price function queryPrice( address tokenAddress, address payback ) external payable override returns ( uint ethAmount, uint tokenAmount, uint blockNumber ) { (blockNumber, tokenAmount) = INestPriceFacade(NEST_PRICE_FACADE).latestPrice { value: msg.value } (tokenAddress, payback); ethAmount = 1 ether; // ( // uint latestPriceBlockNumber, // uint latestPriceValue, // ,//uint triggeredPriceBlockNumber, // ,//uint triggeredPriceValue, // uint triggeredAvgPrice, // //uint triggeredSigmaSQ // ) = INestPriceFacade(NEST_PRICE_FACADE).latestPriceAndTriggeredPriceInfo { // value: msg.value // } (tokenAddress, payback); // _checkPrice(latestPriceValue, triggeredAvgPrice); // ethAmount = 1 ether; // tokenAmount = latestPriceValue; // blockNumber = latestPriceBlockNumber; } /// @dev Calc variance of price and K in CoFiX is very expensive /// We use expected value of K based on statistical calculations here to save gas /// In the near future, NEST could provide the variance of price directly. We will adopt it then. /// We can make use of `data` bytes in the future /// @param tokenAddress Target address of token /// @param payback As the charging fee may change, it is suggested that the caller pay more fees, /// and the excess fees will be returned through this address /// @return k The K value(18 decimal places). /// @return ethAmount Oracle price - eth amount /// @return tokenAmount Oracle price - token amount /// @return blockNumber Block number of price function queryOracle( address tokenAddress, address payback ) external override payable returns ( uint k, uint ethAmount, uint tokenAmount, uint blockNumber ) { ( uint[] memory prices, ,//uint triggeredPriceBlockNumber, ,//uint triggeredPriceValue, uint triggeredAvgPrice, uint triggeredSigmaSQ ) = INestPriceFacade(NEST_PRICE_FACADE).lastPriceListAndTriggeredPriceInfo { value: msg.value } (tokenAddress, 2, payback); tokenAmount = prices[1]; _checkPrice(tokenAmount, triggeredAvgPrice); blockNumber = prices[0]; ethAmount = 1 ether; k = calcRevisedK(triggeredSigmaSQ, prices[3], prices[2], tokenAmount, blockNumber); } /// @dev K value is calculated by revised volatility /// @param sigmaSQ The square of the volatility (18 decimal places). /// @param p0 Last price (number of tokens equivalent to 1 ETH) /// @param bn0 Block number of the last price /// @param p Latest price (number of tokens equivalent to 1 ETH) /// @param bn The block number when (ETH, TOKEN) price takes into effective function calcRevisedK(uint sigmaSQ, uint p0, uint bn0, uint p, uint bn) public view override returns (uint k) { k = _calcK(_calcRevisedSigmaSQ(sigmaSQ, p0, bn0, p, bn), bn); } // Calculate the corrected volatility function _calcRevisedSigmaSQ( uint sigmaSQ, uint p0, uint bn0, uint p, uint bn ) private pure returns (uint revisedSigmaSQ) { // sq2 = sq1 * 0.9 + rq2 * dt * 0.1 // sq1 = (sq2 - rq2 * dt * 0.1) / 0.9 // 1. // rq2 <= 4 * dt * sq1 // sqt = sq2 // 2. rq2 > 4 * dt * sq1 && rq2 <= 9 * dt * sq1 // sqt = (sq1 + rq2 * dt) / 2 // 3. rq2 > 9 * dt * sq1 // sqt = sq1 * 0.2 + rq2 * dt * 0.8 uint rq2 = p * 1 ether / p0; if (rq2 > 1 ether) { rq2 -= 1 ether; } else { rq2 = 1 ether - rq2; } rq2 = rq2 * rq2 / 1 ether; uint dt = (bn - bn0) * BLOCK_TIME; uint sq1 = 0; uint rq2dt = rq2 / dt; if (sigmaSQ * 10 > rq2dt) { sq1 = (sigmaSQ * 10 - rq2dt) / 9; } uint dds = dt * dt * dt * sq1; if (rq2 <= (dds << 2)) { revisedSigmaSQ = sigmaSQ; } else if (rq2 <= 9 * dds) { revisedSigmaSQ = (sq1 + rq2dt) >> 1; } else { revisedSigmaSQ = (sq1 + (rq2dt << 2)) / 5; } } /// @dev Calc K value /// @param sigmaSQ The square of the volatility (18 decimal places). /// @param bn The block number when (ETH, TOKEN) price takes into effective /// @return k The K value function _calcK(uint sigmaSQ, uint bn) private view returns (uint k) { k = 0.002 ether + _sqrt((block.number - bn) * BLOCK_TIME * sigmaSQ / 1e4) * 2e11; } // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) function _sqrt(uint y) private pure returns (uint z) { if (y > 3) { z = y; uint x = (y >> 1) + 1; while (x < z) { z = x; x = (y / x + x) >> 1; } } else if (y != 0) { z = 1; } } // Check price function _checkPrice(uint price, uint avgPrice) private pure { require( price <= avgPrice * 11 / 10 && price >= avgPrice * 9 / 10, "CoFiXController: price deviation" ); } /// @return adm The admin slot. function getAdmin() external view returns (address adm) { assembly { adm := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103) } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"sigmaSQ","type":"uint256"},{"internalType":"uint256","name":"p0","type":"uint256"},{"internalType":"uint256","name":"bn0","type":"uint256"},{"internalType":"uint256","name":"p","type":"uint256"},{"internalType":"uint256","name":"bn","type":"uint256"}],"name":"calcRevisedK","outputs":[{"internalType":"uint256","name":"k","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAdmin","outputs":[{"internalType":"address","name":"adm","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nestPriceFacade","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"address","name":"payback","type":"address"}],"name":"latestPriceInfo","outputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"uint256","name":"priceEthAmount","type":"uint256"},{"internalType":"uint256","name":"priceTokenAmount","type":"uint256"},{"internalType":"uint256","name":"avgPriceEthAmount","type":"uint256"},{"internalType":"uint256","name":"avgPriceTokenAmount","type":"uint256"},{"internalType":"uint256","name":"sigmaSQ","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"address","name":"payback","type":"address"}],"name":"queryOracle","outputs":[{"internalType":"uint256","name":"k","type":"uint256"},{"internalType":"uint256","name":"ethAmount","type":"uint256"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"address","name":"payback","type":"address"}],"name":"queryPrice","outputs":[{"internalType":"uint256","name":"ethAmount","type":"uint256"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"stateMutability":"payable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50610ba9806100206000396000f3fe6080604052600436106100655760003560e01c80636e9960c3116100435780636e9960c3146101105780637c0bcdae14610164578063c4d66de81461019257600080fd5b80631486ea471461006a5780631a78f96d1461009d5780633c72db4c146100d0575b600080fd5b34801561007657600080fd5b5061008a6100853660046109ba565b6101b2565b6040519081526020015b60405180910390f35b6100b06100ab36600461085b565b6101d4565b604080519485526020850193909352918301526060820152608001610094565b6100e36100de36600461085b565b61036f565b604080519687526020870195909552938501929092526060840152608083015260a082015260c001610094565b34801561011c57600080fd5b507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610094565b61017761017236600461085b565b610473565b60408051938452602084019290925290820152606001610094565b34801561019e57600080fd5b506101b06101ad366004610840565b50565b005b60006101ca6101c4878787878761054c565b836106b3565b9695505050505050565b6040517f2078404800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600260248301528216604482015260009081908190819081908190819073b5d2890c061c321a5b6a4a4254bb1522425baf0a9063207840489034906064016000604051808303818588803b15801561026e57600080fd5b505af1158015610282573d6000803e3d6000fd5b50505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526102c9919081019061088e565b9450945050509250826001815181106102e4576102e4610b15565b602002602001015194506102f88583610712565b8260008151811061030b5761030b610b15565b60200260200101519350670de0b6b3a76400009550610361818460038151811061033757610337610b15565b60200260200101518560028151811061035257610352610b15565b602002602001015188886101b2565b965050505092959194509250565b6040517ffe0103e200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152821660248201526000908190819081908190819073b5d2890c061c321a5b6a4a4254bb1522425baf0a9063fe0103e290349060440160c0604051808303818588803b15801561040057600080fd5b505af1158015610414573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061043991906109f5565b949a50929750919450919250610453915085905083610712565b670de0b6b3a76400009450670de0b6b3a764000092509295509295509295565b6040517f7c2d656b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152821660248201526000908190819073b5d2890c061c321a5b6a4a4254bb1522425baf0a90637c2d656b90349060440160408051808303818588803b1580156104fd57600080fd5b505af1158015610511573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906105369190610996565b670de0b6b3a76400009790965090945092505050565b6000808561056285670de0b6b3a7640000610a92565b61056c9190610a57565b9050670de0b6b3a764000081111561059757610590670de0b6b3a764000082610acf565b90506105ac565b6105a981670de0b6b3a7640000610acf565b90505b670de0b6b3a76400006105bf8280610a92565b6105c99190610a57565b90506000600e6105d98786610acf565b6105e39190610a92565b90506000806105f28385610a57565b9050806106008b600a610a92565b111561062b576009816106148c600a610a92565b61061e9190610acf565b6106289190610a57565b91505b600082846106398180610a92565b6106439190610a92565b61064d9190610a92565b9050600281901b8511610662578a95506106a5565b61066d816009610a92565b851161068857600161067f8385610a3f565b901c95506106a5565b6005610698600284901b85610a3f565b6106a29190610a57565b95505b505050505095945050505050565b60006106eb61271084600e6106c88643610acf565b6106d29190610a92565b6106dc9190610a92565b6106e69190610a57565b6107bc565b6106fa90642e90edd000610a92565b61070b9066071afd498d0000610a3f565b9392505050565b600a61071f82600b610a92565b6107299190610a57565b821115801561074e5750600a610740826009610a92565b61074a9190610a57565b8210155b6107b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f436f466958436f6e74726f6c6c65723a20707269636520646576696174696f6e604482015260640160405180910390fd5b5050565b6000600382111561080d57508060006107d9600183811c90610a3f565b90505b81811015610807579050806001816107f48186610a57565b6107fe9190610a3f565b901c90506107dc565b50919050565b8115610817575060015b919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461081757600080fd5b60006020828403121561085257600080fd5b61070b8261081c565b6000806040838503121561086e57600080fd5b6108778361081c565b91506108856020840161081c565b90509250929050565b600080600080600060a086880312156108a657600080fd5b855167ffffffffffffffff808211156108be57600080fd5b818801915088601f8301126108d257600080fd5b81516020828211156108e6576108e6610b44565b8160051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110868211171561092957610929610b44565b604052838152828101945085830182870184018e101561094857600080fd5b600096505b8487101561096b57805186526001969096019594830194830161094d565b50918b015160408c015160608d01516080909d0151939e919d509b9a50919850909650505050505050565b600080604083850312156109a957600080fd5b505080516020909101519092909150565b600080600080600060a086880312156109d257600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060008060008060c08789031215610a0e57600080fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b60008219821115610a5257610a52610ae6565b500190565b600082610a8d577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610aca57610aca610ae6565b500290565b600082821015610ae157610ae1610ae6565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea264697066735822122009c0c53e48f210498cc8fed0d8a76127a60d7edf7c9ff0cd8f28737246a08c2364736f6c63430008060033
Deployed Bytecode
0x6080604052600436106100655760003560e01c80636e9960c3116100435780636e9960c3146101105780637c0bcdae14610164578063c4d66de81461019257600080fd5b80631486ea471461006a5780631a78f96d1461009d5780633c72db4c146100d0575b600080fd5b34801561007657600080fd5b5061008a6100853660046109ba565b6101b2565b6040519081526020015b60405180910390f35b6100b06100ab36600461085b565b6101d4565b604080519485526020850193909352918301526060820152608001610094565b6100e36100de36600461085b565b61036f565b604080519687526020870195909552938501929092526060840152608083015260a082015260c001610094565b34801561011c57600080fd5b507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610094565b61017761017236600461085b565b610473565b60408051938452602084019290925290820152606001610094565b34801561019e57600080fd5b506101b06101ad366004610840565b50565b005b60006101ca6101c4878787878761054c565b836106b3565b9695505050505050565b6040517f2078404800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600260248301528216604482015260009081908190819081908190819073b5d2890c061c321a5b6a4a4254bb1522425baf0a9063207840489034906064016000604051808303818588803b15801561026e57600080fd5b505af1158015610282573d6000803e3d6000fd5b50505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526102c9919081019061088e565b9450945050509250826001815181106102e4576102e4610b15565b602002602001015194506102f88583610712565b8260008151811061030b5761030b610b15565b60200260200101519350670de0b6b3a76400009550610361818460038151811061033757610337610b15565b60200260200101518560028151811061035257610352610b15565b602002602001015188886101b2565b965050505092959194509250565b6040517ffe0103e200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152821660248201526000908190819081908190819073b5d2890c061c321a5b6a4a4254bb1522425baf0a9063fe0103e290349060440160c0604051808303818588803b15801561040057600080fd5b505af1158015610414573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061043991906109f5565b949a50929750919450919250610453915085905083610712565b670de0b6b3a76400009450670de0b6b3a764000092509295509295509295565b6040517f7c2d656b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152821660248201526000908190819073b5d2890c061c321a5b6a4a4254bb1522425baf0a90637c2d656b90349060440160408051808303818588803b1580156104fd57600080fd5b505af1158015610511573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906105369190610996565b670de0b6b3a76400009790965090945092505050565b6000808561056285670de0b6b3a7640000610a92565b61056c9190610a57565b9050670de0b6b3a764000081111561059757610590670de0b6b3a764000082610acf565b90506105ac565b6105a981670de0b6b3a7640000610acf565b90505b670de0b6b3a76400006105bf8280610a92565b6105c99190610a57565b90506000600e6105d98786610acf565b6105e39190610a92565b90506000806105f28385610a57565b9050806106008b600a610a92565b111561062b576009816106148c600a610a92565b61061e9190610acf565b6106289190610a57565b91505b600082846106398180610a92565b6106439190610a92565b61064d9190610a92565b9050600281901b8511610662578a95506106a5565b61066d816009610a92565b851161068857600161067f8385610a3f565b901c95506106a5565b6005610698600284901b85610a3f565b6106a29190610a57565b95505b505050505095945050505050565b60006106eb61271084600e6106c88643610acf565b6106d29190610a92565b6106dc9190610a92565b6106e69190610a57565b6107bc565b6106fa90642e90edd000610a92565b61070b9066071afd498d0000610a3f565b9392505050565b600a61071f82600b610a92565b6107299190610a57565b821115801561074e5750600a610740826009610a92565b61074a9190610a57565b8210155b6107b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f436f466958436f6e74726f6c6c65723a20707269636520646576696174696f6e604482015260640160405180910390fd5b5050565b6000600382111561080d57508060006107d9600183811c90610a3f565b90505b81811015610807579050806001816107f48186610a57565b6107fe9190610a3f565b901c90506107dc565b50919050565b8115610817575060015b919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461081757600080fd5b60006020828403121561085257600080fd5b61070b8261081c565b6000806040838503121561086e57600080fd5b6108778361081c565b91506108856020840161081c565b90509250929050565b600080600080600060a086880312156108a657600080fd5b855167ffffffffffffffff808211156108be57600080fd5b818801915088601f8301126108d257600080fd5b81516020828211156108e6576108e6610b44565b8160051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110868211171561092957610929610b44565b604052838152828101945085830182870184018e101561094857600080fd5b600096505b8487101561096b57805186526001969096019594830194830161094d565b50918b015160408c015160608d01516080909d0151939e919d509b9a50919850909650505050505050565b600080604083850312156109a957600080fd5b505080516020909101519092909150565b600080600080600060a086880312156109d257600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060008060008060c08789031215610a0e57600080fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b60008219821115610a5257610a52610ae6565b500190565b600082610a8d577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610aca57610aca610ae6565b500290565b600082821015610ae157610ae1610ae6565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea264697066735822122009c0c53e48f210498cc8fed0d8a76127a60d7edf7c9ff0cd8f28737246a08c2364736f6c63430008060033
Deployed Bytecode Sourcemap
14223:8388:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19851:189;;;;;;;;;;-1:-1:-1;19851:189:0;;;;;:::i;:::-;;:::i;:::-;;;4786:25:1;;;4774:2;4759:18;19851:189:0;;;;;;;;18592:848;;;;;;:::i;:::-;;:::i;:::-;;;;5377:25:1;;;5433:2;5418:18;;5411:34;;;;5461:18;;;5454:34;5519:2;5504:18;;5497:34;5364:3;5349:19;18592:848:0;5331:206:1;15240:826:0;;;;;;:::i;:::-;;:::i;:::-;;;;5829:25:1;;;5885:2;5870:18;;5863:34;;;;5913:18;;;5906:34;;;;5971:2;5956:18;;5949:34;6014:3;5999:19;;5992:35;6058:3;6043:19;;6036:35;5816:3;5801:19;15240:826:0;5783:294:1;22419:189:0;;;;;;;;;;-1:-1:-1;22523:66:0;22517:73;22419:189;;3481:42:1;3469:55;;;3451:74;;3439:2;3424:18;22419:189:0;3406:125:1;16793:1040:0;;;;;;:::i;:::-;;:::i;:::-;;;;5024:25:1;;;5080:2;5065:18;;5058:34;;;;5108:18;;;5101:34;5012:2;4997:18;16793:1040:0;4979:162:1;14495:110:0;;;;;;;;;;-1:-1:-1;14495:110:0;;;;;:::i;:::-;;;;;19851:189;19953:6;19976:56;19983:44;20003:7;20012:2;20016:3;20021:1;20024:2;19983:19;:44::i;:::-;20029:2;19976:6;:56::i;:::-;19972:60;19851:189;-1:-1:-1;;;;;;19851:189:0:o;18592:848::-;19041:142;;;;;:70;4157:15:1;;;19041:142:0;;;4139:34:1;19172:1:0;4189:18:1;;;4182:34;4252:15;;4232:18;;;4225:43;18722:6:0;;;;;;;;;;;;;;14396:42;;19041:70;;19134:9;;4051:18:1;;19041:142:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;18829:354;;;;;;;;19210:6;19217:1;19210:9;;;;;;;;:::i;:::-;;;;;;;19196:23;;19230:43;19242:11;19255:17;19230:11;:43::i;:::-;19298:6;19305:1;19298:9;;;;;;;;:::i;:::-;;;;;;;19284:23;;19330:7;19318:19;;19354:78;19367:16;19385:6;19392:1;19385:9;;;;;;;;:::i;:::-;;;;;;;19396:6;19403:1;19396:9;;;;;;;;:::i;:::-;;;;;;;19407:11;19420;19354:12;:78::i;:::-;19350:82;;18818:622;;;18592:848;;;;;;;:::o;15240:826::-;15777:137;;;;;:68;3789:15:1;;;15777:137:0;;;3771:34:1;3841:15;;3821:18;;;3814:43;15370:16:0;;;;;;;;;;;;14396:42;;15777:68;;15869:9;;3683:18:1;;15777:137:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;15559:355;;-1:-1:-1;15559:355:0;;-1:-1:-1;15559:355:0;;-1:-1:-1;15559:355:0;;-1:-1:-1;15935:50:0;;-1:-1:-1;15559:355:0;;-1:-1:-1;15559:355:0;15935:11;:50::i;:::-;16013:7;15996:24;;16051:7;16031:27;;15240:826;;;;;;;;:::o;16793:1040::-;17040:116;;;;;:47;3789:15:1;;;17040:116:0;;;3771:34:1;3841:15;;3821:18;;;3814:43;16922:14:0;;;;;;14396:42;;17040:47;;17111:9;;3683:18:1;;17040:116:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;17179:7;;17011:145;;-1:-1:-1;17011:145:0;;-1:-1:-1;16793:1040:0;-1:-1:-1;;;16793:1040:0:o;20091:1204::-;20247:19;;20643:2;20629:11;:1;20633:7;20629:11;:::i;:::-;:16;;;;:::i;:::-;20618:27;;20666:7;20660:3;:13;20656:112;;;20690:14;20697:7;20690:14;;:::i;:::-;;;20656:112;;;20743:13;20753:3;20743:7;:13;:::i;:::-;20737:19;;20656:112;20796:7;20784:9;20790:3;;20784:9;:::i;:::-;:19;;;;:::i;:::-;20778:25;-1:-1:-1;20816:7:0;14304:2;20827:8;20832:3;20827:2;:8;:::i;:::-;20826:23;;;;:::i;:::-;20816:33;-1:-1:-1;20860:8:0;;20896;20816:33;20896:3;:8;:::i;:::-;20883:21;-1:-1:-1;20883:21:0;20919:12;:7;20929:2;20919:12;:::i;:::-;:20;20915:85;;;20987:1;20978:5;20963:12;:7;20973:2;20963:12;:::i;:::-;:20;;;;:::i;:::-;20962:26;;;;:::i;:::-;20956:32;;20915:85;21012:8;21038:3;21033:2;21023:7;21033:2;;21023:7;:::i;:::-;:12;;;;:::i;:::-;:18;;;;:::i;:::-;21012:29;;21071:1;21064:3;:8;;21056:3;:17;21052:236;;21107:7;21090:24;;21052:236;;;21143:7;21147:3;21143:1;:7;:::i;:::-;21136:3;:14;21132:156;;21201:1;21185:11;21191:5;21185:3;:11;:::i;:::-;21184:18;;21167:35;;21132:156;;;21275:1;21253:18;21269:1;21260:10;;;21253:3;:18;:::i;:::-;21252:24;;;;:::i;:::-;21235:41;;21132:156;20268:1027;;;;;20091:1204;;;;;;;:::o;21516:168::-;21577:6;21614:55;21665:3;21655:7;14304:2;21621:17;21636:2;21621:12;:17;:::i;:::-;21620:32;;;;:::i;:::-;:42;;;;:::i;:::-;:48;;;;:::i;:::-;21614:5;:55::i;:::-;:62;;21672:4;21614:62;:::i;:::-;21600:76;;:11;:76;:::i;:::-;21596:80;21516:168;-1:-1:-1;;;21516:168:0:o;22137:233::-;22256:2;22240:13;:8;22251:2;22240:13;:::i;:::-;:18;;;;:::i;:::-;22231:5;:27;;:70;;;;-1:-1:-1;22299:2:0;22284:12;:8;22295:1;22284:12;:::i;:::-;:17;;;;:::i;:::-;22275:5;:26;;22231:70;22209:153;;;;;;;4481:2:1;22209:153:0;;;4463:21:1;;;4500:18;;;4493:30;4559:34;4539:18;;;4532:62;4611:18;;22209:153:0;;;;;;;;22137:233;;:::o;21802:307::-;21847:6;21874:1;21870;:5;21866:236;;;-1:-1:-1;21896:1:0;21912:6;21921:12;21927:1;21922:6;;;;21921:12;:::i;:::-;21912:21;;21948:93;21959:1;21955;:5;21948:93;;;21985:1;-1:-1:-1;21985:1:0;22024;21985;22010:5;21985:1;22010;:5;:::i;:::-;:9;;;;:::i;:::-;22009:16;;22005:20;;21948:93;;;21877:175;21802:307;;;:::o;21866:236::-;22062:6;;22058:44;;-1:-1:-1;22089:1:0;22058:44;21802:307;;;:::o;14:196:1:-;82:20;;142:42;131:54;;121:65;;111:2;;200:1;197;190:12;215:186;274:6;327:2;315:9;306:7;302:23;298:32;295:2;;;343:1;340;333:12;295:2;366:29;385:9;366:29;:::i;406:260::-;474:6;482;535:2;523:9;514:7;510:23;506:32;503:2;;;551:1;548;541:12;503:2;574:29;593:9;574:29;:::i;:::-;564:39;;622:38;656:2;645:9;641:18;622:38;:::i;:::-;612:48;;493:173;;;;;:::o;671:1423::-;802:6;810;818;826;834;887:3;875:9;866:7;862:23;858:33;855:2;;;904:1;901;894:12;855:2;937:9;931:16;966:18;1007:2;999:6;996:14;993:2;;;1023:1;1020;1013:12;993:2;1061:6;1050:9;1046:22;1036:32;;1106:7;1099:4;1095:2;1091:13;1087:27;1077:2;;1128:1;1125;1118:12;1077:2;1157;1151:9;1179:4;1202:2;1198;1195:10;1192:2;;;1208:18;;:::i;:::-;1254:2;1251:1;1247:10;1286:2;1280:9;1345:66;1340:2;1336;1332:11;1328:84;1320:6;1316:97;1463:6;1451:10;1448:22;1443:2;1431:10;1428:18;1425:46;1422:2;;;1474:18;;:::i;:::-;1510:2;1503:22;1560:18;;;1594:15;;;;-1:-1:-1;1629:11:1;;;1659;;;1655:20;;1652:33;-1:-1:-1;1649:2:1;;;1698:1;1695;1688:12;1649:2;1720:1;1711:10;;1730:156;1744:2;1741:1;1738:9;1730:156;;;1801:10;;1789:23;;1762:1;1755:9;;;;;1832:12;;;;1864;;1730:156;;;-1:-1:-1;1936:18:1;;;1930:25;1995:2;1980:18;;1974:25;2039:2;2024:18;;2018:25;2083:3;2068:19;;;2062:26;1905:6;;1930:25;;-1:-1:-1;1974:25:1;2018;-1:-1:-1;2062:26:1;;-1:-1:-1;845:1249:1;;-1:-1:-1;;;;;;;845:1249:1:o;2099:245::-;2178:6;2186;2239:2;2227:9;2218:7;2214:23;2210:32;2207:2;;;2255:1;2252;2245:12;2207:2;-1:-1:-1;;2278:16:1;;2334:2;2319:18;;;2313:25;2278:16;;2313:25;;-1:-1:-1;2197:147:1:o;2349:454::-;2444:6;2452;2460;2468;2476;2529:3;2517:9;2508:7;2504:23;2500:33;2497:2;;;2546:1;2543;2536:12;2497:2;-1:-1:-1;;2569:23:1;;;2639:2;2624:18;;2611:32;;-1:-1:-1;2690:2:1;2675:18;;2662:32;;2741:2;2726:18;;2713:32;;-1:-1:-1;2792:3:1;2777:19;2764:33;;-1:-1:-1;2487:316:1;-1:-1:-1;2487:316:1:o;2808:492::-;2923:6;2931;2939;2947;2955;2963;3016:3;3004:9;2995:7;2991:23;2987:33;2984:2;;;3033:1;3030;3023:12;2984:2;3062:9;3056:16;3046:26;;3112:2;3101:9;3097:18;3091:25;3081:35;;3156:2;3145:9;3141:18;3135:25;3125:35;;3200:2;3189:9;3185:18;3179:25;3169:35;;3244:3;3233:9;3229:19;3223:26;3213:36;;3289:3;3278:9;3274:19;3268:26;3258:36;;2974:326;;;;;;;;:::o;6082:128::-;6122:3;6153:1;6149:6;6146:1;6143:13;6140:2;;;6159:18;;:::i;:::-;-1:-1:-1;6195:9:1;;6130:80::o;6215:274::-;6255:1;6281;6271:2;;6316:77;6313:1;6306:88;6417:4;6414:1;6407:15;6445:4;6442:1;6435:15;6271:2;-1:-1:-1;6474:9:1;;6261:228::o;6494:::-;6534:7;6660:1;6592:66;6588:74;6585:1;6582:81;6577:1;6570:9;6563:17;6559:105;6556:2;;;6667:18;;:::i;:::-;-1:-1:-1;6707:9:1;;6546:176::o;6727:125::-;6767:4;6795:1;6792;6789:8;6786:2;;;6800:18;;:::i;:::-;-1:-1:-1;6837:9:1;;6776:76::o;6857:184::-;6909:77;6906:1;6899:88;7006:4;7003:1;6996:15;7030:4;7027:1;7020:15;7046:184;7098:77;7095:1;7088:88;7195:4;7192:1;7185:15;7219:4;7216:1;7209:15;7235:184;7287:77;7284:1;7277:88;7384:4;7381:1;7374:15;7408:4;7405:1;7398:15
Swarm Source
ipfs://09c0c53e48f210498cc8fed0d8a76127a60d7edf7c9ff0cd8f28737246a08c23
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.