Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
SortedTroves
Compiler Version
v0.8.19+commit.7dd6d404
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "ITroveManager.sol"; /** @title Prisma Sorted Troves @notice Based on Liquity's `SortedTroves`: https://github.com/liquity/dev/blob/main/packages/contracts/contracts/SortedTroves.sol Originally derived from `SortedDoublyLinkedList`: https://github.com/livepeer/protocol/blob/master/contracts/libraries/SortedDoublyLL.sol */ contract SortedTroves { ITroveManager public troveManager; Data public data; // Information for a node in the list struct Node { bool exists; address nextId; // Id of next node (smaller NICR) in the list address prevId; // Id of previous node (larger NICR) in the list } // Information for the list struct Data { address head; // Head of the list. Also the node in the list with the largest NICR address tail; // Tail of the list. Also the node in the list with the smallest NICR uint256 size; // Current size of the list mapping(address => Node) nodes; // Track the corresponding ids for each node in the list } event NodeAdded(address _id, uint256 _NICR); event NodeRemoved(address _id); function setAddresses(address _troveManagerAddress) external { require(address(troveManager) == address(0), "Already set"); troveManager = ITroveManager(_troveManagerAddress); } /* * @dev Add a node to the list * @param _id Node's id * @param _NICR Node's NICR * @param _prevId Id of previous node for the insert position * @param _nextId Id of next node for the insert position */ function insert(address _id, uint256 _NICR, address _prevId, address _nextId) external { ITroveManager troveManagerCached = troveManager; _requireCallerIsTroveManager(troveManagerCached); Node storage node = data.nodes[_id]; // List must not already contain node require(!node.exists, "SortedTroves: List already contains the node"); // Node id must not be null require(_id != address(0), "SortedTroves: Id cannot be zero"); _insert(node, troveManagerCached, _id, _NICR, _prevId, _nextId); } function _insert( Node storage node, ITroveManager _troveManager, address _id, uint256 _NICR, address _prevId, address _nextId ) internal { // NICR must be non-zero require(_NICR > 0, "SortedTroves: NICR must be positive"); address prevId = _prevId; address nextId = _nextId; if (!_validInsertPosition(_troveManager, _NICR, prevId, nextId)) { // Sender's hint was not a valid insert position // Use sender's hint to find a valid insert position (prevId, nextId) = _findInsertPosition(_troveManager, _NICR, prevId, nextId); } node.exists = true; if (prevId == address(0) && nextId == address(0)) { // Insert as head and tail data.head = _id; data.tail = _id; } else if (prevId == address(0)) { // Insert before `prevId` as the head address head = data.head; node.nextId = head; data.nodes[head].prevId = _id; data.head = _id; } else if (nextId == address(0)) { // Insert after `nextId` as the tail address tail = data.tail; node.prevId = tail; data.nodes[tail].nextId = _id; data.tail = _id; } else { // Insert at insert position between `prevId` and `nextId` node.nextId = nextId; node.prevId = prevId; data.nodes[prevId].nextId = _id; data.nodes[nextId].prevId = _id; } data.size = data.size + 1; emit NodeAdded(_id, _NICR); } function remove(address _id) external { _requireCallerIsTroveManager(troveManager); _remove(data.nodes[_id], _id); } /* * @dev Remove a node from the list * @param _id Node's id */ function _remove(Node storage node, address _id) internal { // List must contain the node require(node.exists, "SortedTroves: List does not contain the id"); if (data.size > 1) { // List contains more than a single node if (_id == data.head) { // The removed node is the head // Set head to next node address head = node.nextId; data.head = head; // Set prev pointer of new head to null data.nodes[head].prevId = address(0); } else if (_id == data.tail) { address tail = node.prevId; // The removed node is the tail // Set tail to previous node data.tail = tail; // Set next pointer of new tail to null data.nodes[tail].nextId = address(0); } else { address prevId = node.prevId; address nextId = node.nextId; // The removed node is neither the head nor the tail // Set next pointer of previous node to the next node data.nodes[prevId].nextId = nextId; // Set prev pointer of next node to the previous node data.nodes[nextId].prevId = prevId; } } else { // List contains a single node // Set the head and tail to null data.head = address(0); data.tail = address(0); } delete data.nodes[_id]; data.size = data.size - 1; emit NodeRemoved(_id); } /* * @dev Re-insert the node at a new position, based on its new NICR * @param _id Node's id * @param _newNICR Node's new NICR * @param _prevId Id of previous node for the new insert position * @param _nextId Id of next node for the new insert position */ function reInsert(address _id, uint256 _newNICR, address _prevId, address _nextId) external { ITroveManager troveManagerCached = troveManager; _requireCallerIsTroveManager(troveManagerCached); Node storage node = data.nodes[_id]; // Remove node from the list _remove(node, _id); _insert(node, troveManagerCached, _id, _newNICR, _prevId, _nextId); } /* * @dev Checks if the list contains a node */ function contains(address _id) public view returns (bool) { return data.nodes[_id].exists; } /* * @dev Checks if the list is empty */ function isEmpty() public view returns (bool) { return data.size == 0; } /* * @dev Returns the current size of the list */ function getSize() external view returns (uint256) { return data.size; } /* * @dev Returns the first node in the list (node with the largest NICR) */ function getFirst() external view returns (address) { return data.head; } /* * @dev Returns the last node in the list (node with the smallest NICR) */ function getLast() external view returns (address) { return data.tail; } /* * @dev Returns the next node (with a smaller NICR) in the list for a given node * @param _id Node's id */ function getNext(address _id) external view returns (address) { return data.nodes[_id].nextId; } /* * @dev Returns the previous node (with a larger NICR) in the list for a given node * @param _id Node's id */ function getPrev(address _id) external view returns (address) { return data.nodes[_id].prevId; } /* * @dev Check if a pair of nodes is a valid insertion point for a new node with the given NICR * @param _NICR Node's NICR * @param _prevId Id of previous node for the insert position * @param _nextId Id of next node for the insert position */ function validInsertPosition(uint256 _NICR, address _prevId, address _nextId) external view returns (bool) { return _validInsertPosition(troveManager, _NICR, _prevId, _nextId); } function _validInsertPosition( ITroveManager _troveManager, uint256 _NICR, address _prevId, address _nextId ) internal view returns (bool) { if (_prevId == address(0) && _nextId == address(0)) { // `(null, null)` is a valid insert position if the list is empty return isEmpty(); } else if (_prevId == address(0)) { // `(null, _nextId)` is a valid insert position if `_nextId` is the head of the list return data.head == _nextId && _NICR >= _troveManager.getNominalICR(_nextId); } else if (_nextId == address(0)) { // `(_prevId, null)` is a valid insert position if `_prevId` is the tail of the list return data.tail == _prevId && _NICR <= _troveManager.getNominalICR(_prevId); } else { // `(_prevId, _nextId)` is a valid insert position if they are adjacent nodes and `_NICR` falls between the two nodes' NICRs return data.nodes[_prevId].nextId == _nextId && _troveManager.getNominalICR(_prevId) >= _NICR && _NICR >= _troveManager.getNominalICR(_nextId); } } /* * @dev Descend the list (larger NICRs to smaller NICRs) to find a valid insert position * @param _troveManager TroveManager contract, passed in as param to save SLOAD’s * @param _NICR Node's NICR * @param _startId Id of node to start descending the list from */ function _descendList( ITroveManager _troveManager, uint256 _NICR, address _startId ) internal view returns (address, address) { // If `_startId` is the head, check if the insert position is before the head if (data.head == _startId && _NICR >= _troveManager.getNominalICR(_startId)) { return (address(0), _startId); } address prevId = _startId; address nextId = data.nodes[prevId].nextId; // Descend the list until we reach the end or until we find a valid insert position while (prevId != address(0) && !_validInsertPosition(_troveManager, _NICR, prevId, nextId)) { prevId = data.nodes[prevId].nextId; nextId = data.nodes[prevId].nextId; } return (prevId, nextId); } /* * @dev Ascend the list (smaller NICRs to larger NICRs) to find a valid insert position * @param _troveManager TroveManager contract, passed in as param to save SLOAD’s * @param _NICR Node's NICR * @param _startId Id of node to start ascending the list from */ function _ascendList( ITroveManager _troveManager, uint256 _NICR, address _startId ) internal view returns (address, address) { // If `_startId` is the tail, check if the insert position is after the tail if (data.tail == _startId && _NICR <= _troveManager.getNominalICR(_startId)) { return (_startId, address(0)); } address nextId = _startId; address prevId = data.nodes[nextId].prevId; // Ascend the list until we reach the end or until we find a valid insertion point while (nextId != address(0) && !_validInsertPosition(_troveManager, _NICR, prevId, nextId)) { nextId = data.nodes[nextId].prevId; prevId = data.nodes[nextId].prevId; } return (prevId, nextId); } /* * @dev Find the insert position for a new node with the given NICR * @param _NICR Node's NICR * @param _prevId Id of previous node for the insert position * @param _nextId Id of next node for the insert position */ function findInsertPosition( uint256 _NICR, address _prevId, address _nextId ) external view returns (address, address) { return _findInsertPosition(troveManager, _NICR, _prevId, _nextId); } function _findInsertPosition( ITroveManager _troveManager, uint256 _NICR, address _prevId, address _nextId ) internal view returns (address, address) { address prevId = _prevId; address nextId = _nextId; if (prevId != address(0)) { if (!contains(prevId) || _NICR > _troveManager.getNominalICR(prevId)) { // `prevId` does not exist anymore or now has a smaller NICR than the given NICR prevId = address(0); } } if (nextId != address(0)) { if (!contains(nextId) || _NICR < _troveManager.getNominalICR(nextId)) { // `nextId` does not exist anymore or now has a larger NICR than the given NICR nextId = address(0); } } if (prevId == address(0) && nextId == address(0)) { // No hint - descend list starting from head return _descendList(_troveManager, _NICR, data.head); } else if (prevId == address(0)) { // No `prevId` for hint - ascend list starting from `nextId` return _ascendList(_troveManager, _NICR, nextId); } else if (nextId == address(0)) { // No `nextId` for hint - descend list starting from `prevId` return _descendList(_troveManager, _NICR, prevId); } else { // Descend list starting from `prevId` return _descendList(_troveManager, _NICR, prevId); } } function _requireCallerIsTroveManager(ITroveManager _troveManager) internal view { require(msg.sender == address(_troveManager), "SortedTroves: Caller is not the TroveManager"); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ITroveManager { event BaseRateUpdated(uint256 _baseRate); event CollateralSent(address _to, uint256 _amount); event LTermsUpdated(uint256 _L_collateral, uint256 _L_debt); event LastFeeOpTimeUpdated(uint256 _lastFeeOpTime); event Redemption( uint256 _attemptedDebtAmount, uint256 _actualDebtAmount, uint256 _collateralSent, uint256 _collateralFee ); event RewardClaimed(address indexed account, address indexed recipient, uint256 claimed); event SystemSnapshotsUpdated(uint256 _totalStakesSnapshot, uint256 _totalCollateralSnapshot); event TotalStakesUpdated(uint256 _newTotalStakes); event TroveIndexUpdated(address _borrower, uint256 _newIndex); event TroveSnapshotsUpdated(uint256 _L_collateral, uint256 _L_debt); event TroveUpdated(address indexed _borrower, uint256 _debt, uint256 _coll, uint256 _stake, uint8 _operation); function addCollateralSurplus(address borrower, uint256 collSurplus) external; function applyPendingRewards(address _borrower) external returns (uint256 coll, uint256 debt); function claimCollateral(address _receiver) external; function claimReward(address receiver) external returns (uint256); function closeTrove(address _borrower, address _receiver, uint256 collAmount, uint256 debtAmount) external; function closeTroveByLiquidation(address _borrower) external; function collectInterests() external; function decayBaseRateAndGetBorrowingFee(uint256 _debt) external returns (uint256); function decreaseDebtAndSendCollateral(address account, uint256 debt, uint256 coll) external; function fetchPrice() external returns (uint256); function finalizeLiquidation( address _liquidator, uint256 _debt, uint256 _coll, uint256 _collSurplus, uint256 _debtGasComp, uint256 _collGasComp ) external; function getEntireSystemBalances() external returns (uint256, uint256, uint256); function movePendingTroveRewardsToActiveBalances(uint256 _debt, uint256 _collateral) external; function notifyRegisteredId(uint256[] calldata _assignedIds) external returns (bool); function openTrove( address _borrower, uint256 _collateralAmount, uint256 _compositeDebt, uint256 NICR, address _upperHint, address _lowerHint, bool _isRecoveryMode ) external returns (uint256 stake, uint256 arrayIndex); function redeemCollateral( uint256 _debtAmount, address _firstRedemptionHint, address _upperPartialRedemptionHint, address _lowerPartialRedemptionHint, uint256 _partialRedemptionHintNICR, uint256 _maxIterations, uint256 _maxFeePercentage ) external; function setAddresses(address _priceFeedAddress, address _sortedTrovesAddress, address _collateralToken) external; function setParameters( uint256 _minuteDecayFactor, uint256 _redemptionFeeFloor, uint256 _maxRedemptionFee, uint256 _borrowingFeeFloor, uint256 _maxBorrowingFee, uint256 _interestRateInBPS, uint256 _maxSystemDebt, uint256 _MCR ) external; function setPaused(bool _paused) external; function setPriceFeed(address _priceFeedAddress) external; function startSunset() external; function updateBalances() external; function updateTroveFromAdjustment( bool _isRecoveryMode, bool _isDebtIncrease, uint256 _debtChange, uint256 _netDebtChange, bool _isCollIncrease, uint256 _collChange, address _upperHint, address _lowerHint, address _borrower, address _receiver ) external returns (uint256, uint256, uint256); function vaultClaimReward(address claimant, address) external returns (uint256); function BOOTSTRAP_PERIOD() external view returns (uint256); function CCR() external view returns (uint256); function DEBT_GAS_COMPENSATION() external view returns (uint256); function DECIMAL_PRECISION() external view returns (uint256); function L_collateral() external view returns (uint256); function L_debt() external view returns (uint256); function MAX_INTEREST_RATE_IN_BPS() external view returns (uint256); function MCR() external view returns (uint256); function PERCENT_DIVISOR() external view returns (uint256); function PRISMA_CORE() external view returns (address); function SUNSETTING_INTEREST_RATE() external view returns (uint256); function Troves( address ) external view returns ( uint256 debt, uint256 coll, uint256 stake, uint8 status, uint128 arrayIndex, uint256 activeInterestIndex ); function accountLatestMint(address) external view returns (uint32 amount, uint32 week, uint32 day); function activeInterestIndex() external view returns (uint256); function baseRate() external view returns (uint256); function borrowerOperationsAddress() external view returns (address); function borrowingFeeFloor() external view returns (uint256); function claimableReward(address account) external view returns (uint256); function collateralToken() external view returns (address); function dailyMintReward(uint256) external view returns (uint256); function debtToken() external view returns (address); function defaultedCollateral() external view returns (uint256); function defaultedDebt() external view returns (uint256); function emissionId() external view returns (uint16 debt, uint16 minting); function getBorrowingFee(uint256 _debt) external view returns (uint256); function getBorrowingFeeWithDecay(uint256 _debt) external view returns (uint256); function getBorrowingRate() external view returns (uint256); function getBorrowingRateWithDecay() external view returns (uint256); function getCurrentICR(address _borrower, uint256 _price) external view returns (uint256); function getEntireDebtAndColl( address _borrower ) external view returns (uint256 debt, uint256 coll, uint256 pendingDebtReward, uint256 pendingCollateralReward); function getEntireSystemColl() external view returns (uint256); function getEntireSystemDebt() external view returns (uint256); function getNominalICR(address _borrower) external view returns (uint256); function getPendingCollAndDebtRewards(address _borrower) external view returns (uint256, uint256); function getRedemptionFeeWithDecay(uint256 _collateralDrawn) external view returns (uint256); function getRedemptionRate() external view returns (uint256); function getRedemptionRateWithDecay() external view returns (uint256); function getTotalActiveCollateral() external view returns (uint256); function getTotalActiveDebt() external view returns (uint256); function getTotalMints(uint256 week) external view returns (uint32[7] memory); function getTroveCollAndDebt(address _borrower) external view returns (uint256 coll, uint256 debt); function getTroveFromTroveOwnersArray(uint256 _index) external view returns (address); function getTroveOwnersCount() external view returns (uint256); function getTroveStake(address _borrower) external view returns (uint256); function getTroveStatus(address _borrower) external view returns (uint256); function getWeek() external view returns (uint256 week); function getWeekAndDay() external view returns (uint256, uint256); function guardian() external view returns (address); function hasPendingRewards(address _borrower) external view returns (bool); function interestPayable() external view returns (uint256); function interestRate() external view returns (uint256); function lastActiveIndexUpdate() external view returns (uint256); function lastCollateralError_Redistribution() external view returns (uint256); function lastDebtError_Redistribution() external view returns (uint256); function lastFeeOperationTime() external view returns (uint256); function lastUpdate() external view returns (uint32); function liquidationManager() external view returns (address); function maxBorrowingFee() external view returns (uint256); function maxRedemptionFee() external view returns (uint256); function maxSystemDebt() external view returns (uint256); function minuteDecayFactor() external view returns (uint256); function owner() external view returns (address); function paused() external view returns (bool); function periodFinish() external view returns (uint32); function priceFeed() external view returns (address); function redemptionFeeFloor() external view returns (uint256); function rewardIntegral() external view returns (uint256); function rewardIntegralFor(address) external view returns (uint256); function rewardRate() external view returns (uint128); function rewardSnapshots(address) external view returns (uint256 collateral, uint256 debt); function sortedTroves() external view returns (address); function sunsetting() external view returns (bool); function surplusBalances(address) external view returns (uint256); function systemDeploymentTime() external view returns (uint256); function totalCollateralSnapshot() external view returns (uint256); function totalStakes() external view returns (uint256); function totalStakesSnapshot() external view returns (uint256); function vault() external view returns (address); }
{ "evmVersion": "paris", "optimizer": { "enabled": true, "runs": 200 }, "libraries": { "SortedTroves.sol": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_id","type":"address"},{"indexed":false,"internalType":"uint256","name":"_NICR","type":"uint256"}],"name":"NodeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_id","type":"address"}],"name":"NodeRemoved","type":"event"},{"inputs":[{"internalType":"address","name":"_id","type":"address"}],"name":"contains","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"data","outputs":[{"internalType":"address","name":"head","type":"address"},{"internalType":"address","name":"tail","type":"address"},{"internalType":"uint256","name":"size","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_NICR","type":"uint256"},{"internalType":"address","name":"_prevId","type":"address"},{"internalType":"address","name":"_nextId","type":"address"}],"name":"findInsertPosition","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFirst","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLast","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_id","type":"address"}],"name":"getNext","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_id","type":"address"}],"name":"getPrev","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_id","type":"address"},{"internalType":"uint256","name":"_NICR","type":"uint256"},{"internalType":"address","name":"_prevId","type":"address"},{"internalType":"address","name":"_nextId","type":"address"}],"name":"insert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isEmpty","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_id","type":"address"},{"internalType":"uint256","name":"_newNICR","type":"uint256"},{"internalType":"address","name":"_prevId","type":"address"},{"internalType":"address","name":"_nextId","type":"address"}],"name":"reInsert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_id","type":"address"}],"name":"remove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_troveManagerAddress","type":"address"}],"name":"setAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"troveManager","outputs":[{"internalType":"contract ITroveManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_NICR","type":"uint256"},{"internalType":"address","name":"_prevId","type":"address"},{"internalType":"address","name":"_nextId","type":"address"}],"name":"validInsertPosition","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506111ce806100206000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80634d62283111610097578063765e015911610066578063765e01591461025257806381d3c43514610283578063b72703ac14610296578063de8fa431146102c557600080fd5b80634d622831146101c85780635dbe47e8146101d9578063681fe70c1461020557806373d4a13a1461020e57600080fd5b80633d83908a116100d35780633d83908a1461014c5780633fce12d51461015f578063416980dc1461018257806346f7cf87146101b557600080fd5b80631e223143146100fa57806329092d0e146101245780632be2126014610139575b600080fd5b6001546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b610137610132366004611092565b6102d6565b005b6101376101473660046110b4565b610310565b600054610107906001600160a01b031681565b61017261016d366004611101565b61035d565b604051901515815260200161011b565b610195610190366004611101565b61037e565b604080516001600160a01b0393841681529290911660208301520161011b565b6101376101c33660046110b4565b6103a6565b6002546001600160a01b0316610107565b6101726101e7366004611092565b6001600160a01b031660009081526004602052604090205460ff1690565b60035415610172565b60015460025460035461022c926001600160a01b0390811692169083565b604080516001600160a01b0394851681529390921660208401529082015260600161011b565b610107610260366004611092565b6001600160a01b0390811660009081526004602052604090205461010090041690565b610137610291366004611092565b610495565b6101076102a4366004611092565b6001600160a01b039081166000908152600460205260409020600101541690565b60035460405190815260200161011b565b6000546102eb906001600160a01b03166104fe565b6001600160a01b038116600090815260046020526040902061030d908261056b565b50565b6000546001600160a01b0316610325816104fe565b6001600160a01b0385166000908152600460205260409020610347818761056b565b610355818388888888610793565b505050505050565b60008054610376906001600160a01b0316858585610a10565b949350505050565b600080548190610399906001600160a01b0316868686610c47565b915091505b935093915050565b6000546001600160a01b03166103bb816104fe565b6001600160a01b0385166000908152600460205260409020805460ff161561043f5760405162461bcd60e51b815260206004820152602c60248201527f536f7274656454726f7665733a204c69737420616c726561647920636f6e746160448201526b696e7320746865206e6f646560a01b60648201526084015b60405180910390fd5b6001600160a01b0386166103475760405162461bcd60e51b815260206004820152601f60248201527f536f7274656454726f7665733a2049642063616e6e6f74206265207a65726f006044820152606401610436565b6000546001600160a01b0316156104dc5760405162461bcd60e51b815260206004820152600b60248201526a105b1c9958591e481cd95d60aa1b6044820152606401610436565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b336001600160a01b0382161461030d5760405162461bcd60e51b815260206004820152602c60248201527f536f7274656454726f7665733a2043616c6c6572206973206e6f74207468652060448201526b2a3937bb32a6b0b730b3b2b960a11b6064820152608401610436565b815460ff166105cf5760405162461bcd60e51b815260206004820152602a60248201527f536f7274656454726f7665733a204c69737420646f6573206e6f7420636f6e74604482015269185a5b881d1a19481a5960b21b6064820152608401610436565b600354600110156106ed576001546001600160a01b0390811690821603610630578154600180546101009092046001600160a01b03166001600160a01b0319928316811782556000908152600460205260409020018054909116905561070a565b6002546001600160a01b039081169082160361068b576001820154600280546001600160a01b0319166001600160a01b03909216918217905560009081526004602052604090208054610100600160a81b031916905561070a565b60018281015483546001600160a01b039182166000818152600460205260408082208054610100600160a81b031916610100958690049096169485029590951790945591825291902090910180546001600160a01b031916909117905561070a565b600180546001600160a01b03199081169091556002805490911690555b6001600160a01b038116600090815260046020526040902080546001600160a81b0319168155600190810180546001600160a01b03191690556003546107509190611153565b6003556040516001600160a01b03821681527fcfc24166db4bb677e857cacabd1541fb2b30645021b27c5130419589b84db52b9060200160405180910390a15050565b600083116107ef5760405162461bcd60e51b815260206004820152602360248201527f536f7274656454726f7665733a204e494352206d75737420626520706f73697460448201526269766560e81b6064820152608401610436565b81816107fd87868484610a10565b6108135761080d87868484610c47565b90925090505b875460ff191660011788556001600160a01b03821615801561083c57506001600160a01b038116155b1561087157600180546001600160a01b0388166001600160a01b031991821681179092556002805490911690911790556109b3565b6001600160a01b0382166108d957600180548954610100600160a81b0319166101006001600160a01b03928316908102919091178b556000908152600460205260409020820180546001600160a01b0319908116928a169283179091558254161790556109b3565b6001600160a01b038116610940576002805460018a0180546001600160a01b039283166001600160a01b031991821681179092556000918252600460205260409091208054610100600160a81b031916610100938b169384021790558254161790556109b3565b87546001600160a01b03808316610100818102610100600160a81b0319948516178c556001808d0180548886166001600160a01b031991821681179092556000918252600460205260408083208054978f1695860297909816969096179096559283529290912090910180549092161790555b6003546109c190600161116c565b600355604080516001600160a01b0388168152602081018790527fe02b43adbee0c123de070a04554a71877a0007e2fc161466299cae3c094fe82f910160405180910390a15050505050505050565b60006001600160a01b038316158015610a3057506001600160a01b038216155b15610a4157600354155b9050610376565b6001600160a01b038316610adc576001546001600160a01b038381169116148015610a3a575060405163b0d8e18160e01b81526001600160a01b03838116600483015286169063b0d8e181906024015b602060405180830381865afa158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad2919061117f565b8410159050610376565b6001600160a01b038216610b76576002546001600160a01b038481169116148015610a3a575060405163b0d8e18160e01b81526001600160a01b03848116600483015286169063b0d8e18190602401602060405180830381865afa158015610b48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6c919061117f565b8411159050610376565b6001600160a01b0383811660009081526004602052604090205461010090048116908316148015610c12575060405163b0d8e18160e01b81526001600160a01b03848116600483015285919087169063b0d8e18190602401602060405180830381865afa158015610beb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0f919061117f565b10155b8015610a3a575060405163b0d8e18160e01b81526001600160a01b03838116600483015286169063b0d8e18190602401610a91565b60008083836001600160a01b03821615610cf5576001600160a01b03821660009081526004602052604090205460ff161580610ceb575060405163b0d8e18160e01b81526001600160a01b03838116600483015289169063b0d8e18190602401602060405180830381865afa158015610cc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce8919061117f565b87115b15610cf557600091505b6001600160a01b03811615610d9d576001600160a01b03811660009081526004602052604090205460ff161580610d94575060405163b0d8e18160e01b81526001600160a01b03828116600483015289169063b0d8e18190602401602060405180830381865afa158015610d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d91919061117f565b87105b15610d9d575060005b6001600160a01b038216158015610dbb57506001600160a01b038116155b15610de457600154610dd990899089906001600160a01b0316610e2a565b935093505050610e21565b6001600160a01b038216610dfd57610dd9888883610f53565b6001600160a01b038116610e1657610dd9888884610e2a565b610dd9888884610e2a565b94509492505050565b60015460009081906001600160a01b038481169116148015610eb5575060405163b0d8e18160e01b81526001600160a01b03848116600483015286169063b0d8e18190602401602060405180830381865afa158015610e8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb1919061117f565b8410155b15610ec55750600090508161039e565b6001600160a01b038084166000908152600460205260409020548491610100909104165b6001600160a01b03821615801590610f0a5750610f0887878484610a10565b155b15610f4757506001600160a01b03908116600090815260046020526040808220546101009081900484168084529190922054909291900416610ee9565b90969095509350505050565b60025460009081906001600160a01b038481169116148015610fde575060405163b0d8e18160e01b81526001600160a01b03848116600483015286169063b0d8e18190602401602060405180830381865afa158015610fb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fda919061117f565b8411155b15610fee5750819050600061039e565b6001600160a01b038084166000908152600460205260409020600101548491165b6001600160a01b03821615801590611030575061102e87878385610a10565b155b1561106b57506001600160a01b039081166000908152600460205260408082206001908101548416808452919092209091015490911661100f565b969095509350505050565b80356001600160a01b038116811461108d57600080fd5b919050565b6000602082840312156110a457600080fd5b6110ad82611076565b9392505050565b600080600080608085870312156110ca57600080fd5b6110d385611076565b9350602085013592506110e860408601611076565b91506110f660608601611076565b905092959194509250565b60008060006060848603121561111657600080fd5b8335925061112660208501611076565b915061113460408501611076565b90509250925092565b634e487b7160e01b600052601160045260246000fd5b818103818111156111665761116661113d565b92915050565b808201808211156111665761116661113d565b60006020828403121561119157600080fd5b505191905056fea264697066735822122052e97db9f23ba1429c54baa6edeb6b9cd0921b19dd72a8a246dc927d8f785af464736f6c63430008130033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80634d62283111610097578063765e015911610066578063765e01591461025257806381d3c43514610283578063b72703ac14610296578063de8fa431146102c557600080fd5b80634d622831146101c85780635dbe47e8146101d9578063681fe70c1461020557806373d4a13a1461020e57600080fd5b80633d83908a116100d35780633d83908a1461014c5780633fce12d51461015f578063416980dc1461018257806346f7cf87146101b557600080fd5b80631e223143146100fa57806329092d0e146101245780632be2126014610139575b600080fd5b6001546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b610137610132366004611092565b6102d6565b005b6101376101473660046110b4565b610310565b600054610107906001600160a01b031681565b61017261016d366004611101565b61035d565b604051901515815260200161011b565b610195610190366004611101565b61037e565b604080516001600160a01b0393841681529290911660208301520161011b565b6101376101c33660046110b4565b6103a6565b6002546001600160a01b0316610107565b6101726101e7366004611092565b6001600160a01b031660009081526004602052604090205460ff1690565b60035415610172565b60015460025460035461022c926001600160a01b0390811692169083565b604080516001600160a01b0394851681529390921660208401529082015260600161011b565b610107610260366004611092565b6001600160a01b0390811660009081526004602052604090205461010090041690565b610137610291366004611092565b610495565b6101076102a4366004611092565b6001600160a01b039081166000908152600460205260409020600101541690565b60035460405190815260200161011b565b6000546102eb906001600160a01b03166104fe565b6001600160a01b038116600090815260046020526040902061030d908261056b565b50565b6000546001600160a01b0316610325816104fe565b6001600160a01b0385166000908152600460205260409020610347818761056b565b610355818388888888610793565b505050505050565b60008054610376906001600160a01b0316858585610a10565b949350505050565b600080548190610399906001600160a01b0316868686610c47565b915091505b935093915050565b6000546001600160a01b03166103bb816104fe565b6001600160a01b0385166000908152600460205260409020805460ff161561043f5760405162461bcd60e51b815260206004820152602c60248201527f536f7274656454726f7665733a204c69737420616c726561647920636f6e746160448201526b696e7320746865206e6f646560a01b60648201526084015b60405180910390fd5b6001600160a01b0386166103475760405162461bcd60e51b815260206004820152601f60248201527f536f7274656454726f7665733a2049642063616e6e6f74206265207a65726f006044820152606401610436565b6000546001600160a01b0316156104dc5760405162461bcd60e51b815260206004820152600b60248201526a105b1c9958591e481cd95d60aa1b6044820152606401610436565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b336001600160a01b0382161461030d5760405162461bcd60e51b815260206004820152602c60248201527f536f7274656454726f7665733a2043616c6c6572206973206e6f74207468652060448201526b2a3937bb32a6b0b730b3b2b960a11b6064820152608401610436565b815460ff166105cf5760405162461bcd60e51b815260206004820152602a60248201527f536f7274656454726f7665733a204c69737420646f6573206e6f7420636f6e74604482015269185a5b881d1a19481a5960b21b6064820152608401610436565b600354600110156106ed576001546001600160a01b0390811690821603610630578154600180546101009092046001600160a01b03166001600160a01b0319928316811782556000908152600460205260409020018054909116905561070a565b6002546001600160a01b039081169082160361068b576001820154600280546001600160a01b0319166001600160a01b03909216918217905560009081526004602052604090208054610100600160a81b031916905561070a565b60018281015483546001600160a01b039182166000818152600460205260408082208054610100600160a81b031916610100958690049096169485029590951790945591825291902090910180546001600160a01b031916909117905561070a565b600180546001600160a01b03199081169091556002805490911690555b6001600160a01b038116600090815260046020526040902080546001600160a81b0319168155600190810180546001600160a01b03191690556003546107509190611153565b6003556040516001600160a01b03821681527fcfc24166db4bb677e857cacabd1541fb2b30645021b27c5130419589b84db52b9060200160405180910390a15050565b600083116107ef5760405162461bcd60e51b815260206004820152602360248201527f536f7274656454726f7665733a204e494352206d75737420626520706f73697460448201526269766560e81b6064820152608401610436565b81816107fd87868484610a10565b6108135761080d87868484610c47565b90925090505b875460ff191660011788556001600160a01b03821615801561083c57506001600160a01b038116155b1561087157600180546001600160a01b0388166001600160a01b031991821681179092556002805490911690911790556109b3565b6001600160a01b0382166108d957600180548954610100600160a81b0319166101006001600160a01b03928316908102919091178b556000908152600460205260409020820180546001600160a01b0319908116928a169283179091558254161790556109b3565b6001600160a01b038116610940576002805460018a0180546001600160a01b039283166001600160a01b031991821681179092556000918252600460205260409091208054610100600160a81b031916610100938b169384021790558254161790556109b3565b87546001600160a01b03808316610100818102610100600160a81b0319948516178c556001808d0180548886166001600160a01b031991821681179092556000918252600460205260408083208054978f1695860297909816969096179096559283529290912090910180549092161790555b6003546109c190600161116c565b600355604080516001600160a01b0388168152602081018790527fe02b43adbee0c123de070a04554a71877a0007e2fc161466299cae3c094fe82f910160405180910390a15050505050505050565b60006001600160a01b038316158015610a3057506001600160a01b038216155b15610a4157600354155b9050610376565b6001600160a01b038316610adc576001546001600160a01b038381169116148015610a3a575060405163b0d8e18160e01b81526001600160a01b03838116600483015286169063b0d8e181906024015b602060405180830381865afa158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad2919061117f565b8410159050610376565b6001600160a01b038216610b76576002546001600160a01b038481169116148015610a3a575060405163b0d8e18160e01b81526001600160a01b03848116600483015286169063b0d8e18190602401602060405180830381865afa158015610b48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6c919061117f565b8411159050610376565b6001600160a01b0383811660009081526004602052604090205461010090048116908316148015610c12575060405163b0d8e18160e01b81526001600160a01b03848116600483015285919087169063b0d8e18190602401602060405180830381865afa158015610beb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0f919061117f565b10155b8015610a3a575060405163b0d8e18160e01b81526001600160a01b03838116600483015286169063b0d8e18190602401610a91565b60008083836001600160a01b03821615610cf5576001600160a01b03821660009081526004602052604090205460ff161580610ceb575060405163b0d8e18160e01b81526001600160a01b03838116600483015289169063b0d8e18190602401602060405180830381865afa158015610cc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce8919061117f565b87115b15610cf557600091505b6001600160a01b03811615610d9d576001600160a01b03811660009081526004602052604090205460ff161580610d94575060405163b0d8e18160e01b81526001600160a01b03828116600483015289169063b0d8e18190602401602060405180830381865afa158015610d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d91919061117f565b87105b15610d9d575060005b6001600160a01b038216158015610dbb57506001600160a01b038116155b15610de457600154610dd990899089906001600160a01b0316610e2a565b935093505050610e21565b6001600160a01b038216610dfd57610dd9888883610f53565b6001600160a01b038116610e1657610dd9888884610e2a565b610dd9888884610e2a565b94509492505050565b60015460009081906001600160a01b038481169116148015610eb5575060405163b0d8e18160e01b81526001600160a01b03848116600483015286169063b0d8e18190602401602060405180830381865afa158015610e8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb1919061117f565b8410155b15610ec55750600090508161039e565b6001600160a01b038084166000908152600460205260409020548491610100909104165b6001600160a01b03821615801590610f0a5750610f0887878484610a10565b155b15610f4757506001600160a01b03908116600090815260046020526040808220546101009081900484168084529190922054909291900416610ee9565b90969095509350505050565b60025460009081906001600160a01b038481169116148015610fde575060405163b0d8e18160e01b81526001600160a01b03848116600483015286169063b0d8e18190602401602060405180830381865afa158015610fb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fda919061117f565b8411155b15610fee5750819050600061039e565b6001600160a01b038084166000908152600460205260409020600101548491165b6001600160a01b03821615801590611030575061102e87878385610a10565b155b1561106b57506001600160a01b039081166000908152600460205260408082206001908101548416808452919092209091015490911661100f565b969095509350505050565b80356001600160a01b038116811461108d57600080fd5b919050565b6000602082840312156110a457600080fd5b6110ad82611076565b9392505050565b600080600080608085870312156110ca57600080fd5b6110d385611076565b9350602085013592506110e860408601611076565b91506110f660608601611076565b905092959194509250565b60008060006060848603121561111657600080fd5b8335925061112660208501611076565b915061113460408501611076565b90509250925092565b634e487b7160e01b600052601160045260246000fd5b818103818111156111665761116661113d565b92915050565b808201808211156111665761116661113d565b60006020828403121561119157600080fd5b505191905056fea264697066735822122052e97db9f23ba1429c54baa6edeb6b9cd0921b19dd72a8a246dc927d8f785af464736f6c63430008130033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.