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
Contract Name:
Whitelist
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 300 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.21; import { Ownable2Step } from "@openzeppelin/contracts/access/Ownable2Step.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { MerkleProof } from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; /** * @notice An external Whitelist module that Ion's system-wide contracts can use * to verify that a user is permitted to borrow or lend. * * A merkle whitelist is used to allow for a large number of addresses to be * whitelisted without consuming infordinate amounts of gas for the updates. * * There is also a protocol whitelist that can be used to allow for a protocol * controlled address to bypass the merkle proof check. These * protocol-controlled contract are expected to perform whitelist checks * themsleves on their own entrypoints. * * @dev The full merkle tree is stored off-chain and only the root is stored * on-chain. * * @custom:security-contact [email protected] */ contract Whitelist is Ownable2Step { mapping(address protocolControlledAddress => bool) public protocolWhitelist; // peripheral addresses that can bypass // the merkle proof check mapping(uint8 ilkIndex => bytes32) public borrowersRoot; // root of the merkle tree of borrowers for each ilk bytes32 public lendersRoot; // root of the merkle tree of lenders for each ilk // --- Errors --- error NotWhitelistedBorrower(uint8 ilkIndex, address addr); error NotWhitelistedLender(address addr); /** * @notice Creates a new `Whitelist` instance. * @param _borrowersRoots List borrower merkle roots for each ilk. * @param _lendersRoot The lender merkle root. */ constructor(bytes32[] memory _borrowersRoots, bytes32 _lendersRoot) Ownable(msg.sender) { for (uint8 i = 0; i < _borrowersRoots.length; i++) { borrowersRoot[i] = _borrowersRoots[i]; } lendersRoot = _lendersRoot; } /** * @notice Updates the borrower merkle root for a specific ilk. * @param ilkIndex of the ilk. * @param _borrowersRoot The new borrower merkle root. */ function updateBorrowersRoot(uint8 ilkIndex, bytes32 _borrowersRoot) external onlyOwner { borrowersRoot[ilkIndex] = _borrowersRoot; } /** * @notice Updates the lender merkle root. * @param _lendersRoot The new lender merkle root. */ function updateLendersRoot(bytes32 _lendersRoot) external onlyOwner { lendersRoot = _lendersRoot; } /** * @notice Approves a protocol controlled address to bypass the merkle proof check. * @param addr The address to approve. */ function approveProtocolWhitelist(address addr) external onlyOwner { protocolWhitelist[addr] = true; } /** * @notice Revokes a protocol controlled address to bypass the merkle proof check. * @param addr The address to revoke approval for. */ function revokeProtocolWhitelist(address addr) external onlyOwner { protocolWhitelist[addr] = false; } /** * @notice Called by external modifiers to prove inclusion as a borrower. * @dev If the root is just zero, then the whitelist is effectively turned * off as every address will be allowed. * @return True if the addr is part of the borrower whitelist or the * protocol whitelist. False otherwise. */ function isWhitelistedBorrower( uint8 ilkIndex, address poolCaller, address addr, bytes32[] calldata proof ) external view returns (bool) { if (protocolWhitelist[poolCaller]) return true; bytes32 root = borrowersRoot[ilkIndex]; if (root == 0) return true; bytes32 leaf = keccak256(bytes.concat(keccak256(abi.encode(addr)))); if (MerkleProof.verify(proof, root, leaf)) { return true; } else { revert NotWhitelistedBorrower(ilkIndex, addr); } } /** * @notice Called by external modifiers to prove inclusion as a lender. * @dev If the root is just zero, then the whitelist is effectively turned * off as every address will be allowed. * @return True if the addr is part of the lender whitelist or the protocol * whitelist. False otherwise. */ function isWhitelistedLender( address poolCaller, address addr, bytes32[] calldata proof ) external view returns (bool) { if (protocolWhitelist[poolCaller]) return true; bytes32 root = lendersRoot; if (root == bytes32(0)) return true; bytes32 leaf = keccak256(bytes.concat(keccak256(abi.encode(addr)))); if (MerkleProof.verify(proof, root, leaf)) { return true; } else { revert NotWhitelistedLender(addr); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol) pragma solidity ^0.8.20; import {Ownable} from "./Ownable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is specified at deployment time in the constructor for `Ownable`. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); if (pendingOwner() != sender) { revert OwnableUnauthorizedAccount(sender); } _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.20; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the Merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates Merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** *@dev The multiproof provided is not valid. */ error MerkleProofInvalidMultiproof(); /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} */ function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the Merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { if (proofPos != proofLen) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the Merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { if (proofPos != proofLen) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Sorts the pair (a, b) and hashes the result. */ function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } /** * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory. */ function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@balancer-labs/v2-interfaces/=lib/balancer-v2-monorepo/pkg/interfaces/", "@balancer-labs/v2-pool-stable/=lib/balancer-v2-monorepo/pkg/pool-stable/", "@chainlink/contracts/=lib/chainlink/contracts/", "@uniswap/v3-periphery/=lib/v3-periphery/", "@uniswap/v3-core/=lib/v3-core/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "balancer-v2-monorepo/=lib/balancer-v2-monorepo/", "chainlink/=lib/chainlink/", "ds-test/=lib/forge-safe/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "forge-safe/=lib/forge-safe/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "solady/=lib/solady/", "solidity-stringutils/=lib/forge-safe/lib/surl/lib/solidity-stringutils/", "solmate/=lib/forge-safe/lib/solmate/src/", "surl/=lib/forge-safe/lib/surl/", "v3-core/=lib/v3-core/", "v3-periphery/=lib/v3-periphery/contracts/", "solarray/=lib/solarray/src/" ], "optimizer": { "enabled": true, "runs": 300 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"bytes32[]","name":"_borrowersRoots","type":"bytes32[]"},{"internalType":"bytes32","name":"_lendersRoot","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint8","name":"ilkIndex","type":"uint8"},{"internalType":"address","name":"addr","type":"address"}],"name":"NotWhitelistedBorrower","type":"error"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"NotWhitelistedLender","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"approveProtocolWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"ilkIndex","type":"uint8"}],"name":"borrowersRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"ilkIndex","type":"uint8"},{"internalType":"address","name":"poolCaller","type":"address"},{"internalType":"address","name":"addr","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"isWhitelistedBorrower","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"poolCaller","type":"address"},{"internalType":"address","name":"addr","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"isWhitelistedLender","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lendersRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"protocolControlledAddress","type":"address"}],"name":"protocolWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"revokeProtocolWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"ilkIndex","type":"uint8"},{"internalType":"bytes32","name":"_borrowersRoot","type":"bytes32"}],"name":"updateBorrowersRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_lendersRoot","type":"bytes32"}],"name":"updateLendersRoot","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162000b7b38038062000b7b833981016040819052620000349162000153565b33806200005b57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200006681620000cf565b5060005b82518160ff161015620000c457828160ff16815181106200008f576200008f62000224565b60209081029190910181015160ff83166000908152600390925260409091205580620000bb816200023a565b9150506200006a565b506004555062000268565b600180546001600160a01b0319169055620000ea81620000ed565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156200016757600080fd5b82516001600160401b03808211156200017f57600080fd5b818501915085601f8301126200019457600080fd5b8151602082821115620001ab57620001ab6200013d565b8160051b604051601f19603f83011681018181108682111715620001d357620001d36200013d565b604052928352818301935084810182019289841115620001f257600080fd5b948201945b838610156200021257855185529482019493820193620001f7565b97909101519698969750505050505050565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff81036200025f57634e487b7160e01b600052601160045260246000fd5b60010192915050565b61090380620002786000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638c7a0cbd1161008c578063b5406b3d11610066578063b5406b3d146101d4578063bd818a59146101e7578063e30c397814610207578063f2fde38b1461021857600080fd5b80638c7a0cbd146101895780638da5cb5b1461019c57806396ffa8d5146101c157600080fd5b80636067268c116100c85780636067268c1461013f578063612cb2b514610156578063715018a61461017957806379ba50971461018157600080fd5b80631db48665146100ef5780633dfd140b1461011757806358278ab61461012c575b600080fd5b6101026100fd36600461072f565b61022b565b60405190151581526020015b60405180910390f35b61012a610125366004610790565b610333565b005b61012a61013a3660046107a9565b610340565b61014860045481565b60405190815260200161010e565b6101026101643660046107a9565b60026020526000908152604090205460ff1681565b61012a61036c565b61012a610380565b61012a6101973660046107d5565b6103c4565b6000546001600160a01b03165b6040516001600160a01b03909116815260200161010e565b61012a6101cf3660046107a9565b6103e2565b6101026101e23660046107ff565b61040b565b6101486101f5366004610875565b60036020526000908152604090205481565b6001546001600160a01b03166101a9565b61012a6102263660046107a9565b61052b565b6001600160a01b03841660009081526002602052604081205460ff16156102545750600161032b565b6004548061026657600191505061032b565b604080516001600160a01b03871660208201526000910160408051601f19818403018152828252805160209182012090830152016040516020818303038152906040528051906020012090506102f285858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525086925085915061059c9050565b156103025760019250505061032b565b60405163a2a93fd360e01b81526001600160a01b03871660048201526024015b60405180910390fd5b949350505050565b61033b6105b2565b600455565b6103486105b2565b6001600160a01b03166000908152600260205260409020805460ff19166001179055565b6103746105b2565b61037e60006105df565b565b60015433906001600160a01b031681146103b85760405163118cdaa760e01b81526001600160a01b0382166004820152602401610322565b6103c1816105df565b50565b6103cc6105b2565b60ff909116600090815260036020526040902055565b6103ea6105b2565b6001600160a01b03166000908152600260205260409020805460ff19169055565b6001600160a01b03841660009081526002602052604081205460ff161561043457506001610522565b60ff861660009081526003602052604081205490819003610459576001915050610522565b604080516001600160a01b03871660208201526000910160408051601f19818403018152828252805160209182012090830152016040516020818303038152906040528051906020012090506104e585858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525086925085915061059c9050565b156104f557600192505050610522565b604051631fef5d1160e21b815260ff891660048201526001600160a01b0387166024820152604401610322565b95945050505050565b6105336105b2565b600180546001600160a01b0383166001600160a01b031990911681179091556105646000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000826105a985846105f8565b14949350505050565b6000546001600160a01b0316331461037e5760405163118cdaa760e01b8152336004820152602401610322565b600180546001600160a01b03191690556103c181610645565b600081815b845181101561063d576106298286838151811061061c5761061c610890565b6020026020010151610695565b915080610635816108a6565b9150506105fd565b509392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008183106106b15760008281526020849052604090206106c0565b60008381526020839052604090205b9392505050565b80356001600160a01b03811681146106de57600080fd5b919050565b60008083601f8401126106f557600080fd5b50813567ffffffffffffffff81111561070d57600080fd5b6020830191508360208260051b850101111561072857600080fd5b9250929050565b6000806000806060858703121561074557600080fd5b61074e856106c7565b935061075c602086016106c7565b9250604085013567ffffffffffffffff81111561077857600080fd5b610784878288016106e3565b95989497509550505050565b6000602082840312156107a257600080fd5b5035919050565b6000602082840312156107bb57600080fd5b6106c0826106c7565b803560ff811681146106de57600080fd5b600080604083850312156107e857600080fd5b6107f1836107c4565b946020939093013593505050565b60008060008060006080868803121561081757600080fd5b610820866107c4565b945061082e602087016106c7565b935061083c604087016106c7565b9250606086013567ffffffffffffffff81111561085857600080fd5b610864888289016106e3565b969995985093965092949392505050565b60006020828403121561088757600080fd5b6106c0826107c4565b634e487b7160e01b600052603260045260246000fd5b6000600182016108c657634e487b7160e01b600052601160045260246000fd5b506001019056fea26469706673582212204f9e2c584921426e7c6bfd08f4658dfb718d43141dcdf1fa5389e788a1b5127864736f6c6343000815003300000000000000000000000000000000000000000000000000000000000000405fd5e04c84849edd133ef9e95292ed7406196ee3d6af1b76a999958c4ccd522c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638c7a0cbd1161008c578063b5406b3d11610066578063b5406b3d146101d4578063bd818a59146101e7578063e30c397814610207578063f2fde38b1461021857600080fd5b80638c7a0cbd146101895780638da5cb5b1461019c57806396ffa8d5146101c157600080fd5b80636067268c116100c85780636067268c1461013f578063612cb2b514610156578063715018a61461017957806379ba50971461018157600080fd5b80631db48665146100ef5780633dfd140b1461011757806358278ab61461012c575b600080fd5b6101026100fd36600461072f565b61022b565b60405190151581526020015b60405180910390f35b61012a610125366004610790565b610333565b005b61012a61013a3660046107a9565b610340565b61014860045481565b60405190815260200161010e565b6101026101643660046107a9565b60026020526000908152604090205460ff1681565b61012a61036c565b61012a610380565b61012a6101973660046107d5565b6103c4565b6000546001600160a01b03165b6040516001600160a01b03909116815260200161010e565b61012a6101cf3660046107a9565b6103e2565b6101026101e23660046107ff565b61040b565b6101486101f5366004610875565b60036020526000908152604090205481565b6001546001600160a01b03166101a9565b61012a6102263660046107a9565b61052b565b6001600160a01b03841660009081526002602052604081205460ff16156102545750600161032b565b6004548061026657600191505061032b565b604080516001600160a01b03871660208201526000910160408051601f19818403018152828252805160209182012090830152016040516020818303038152906040528051906020012090506102f285858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525086925085915061059c9050565b156103025760019250505061032b565b60405163a2a93fd360e01b81526001600160a01b03871660048201526024015b60405180910390fd5b949350505050565b61033b6105b2565b600455565b6103486105b2565b6001600160a01b03166000908152600260205260409020805460ff19166001179055565b6103746105b2565b61037e60006105df565b565b60015433906001600160a01b031681146103b85760405163118cdaa760e01b81526001600160a01b0382166004820152602401610322565b6103c1816105df565b50565b6103cc6105b2565b60ff909116600090815260036020526040902055565b6103ea6105b2565b6001600160a01b03166000908152600260205260409020805460ff19169055565b6001600160a01b03841660009081526002602052604081205460ff161561043457506001610522565b60ff861660009081526003602052604081205490819003610459576001915050610522565b604080516001600160a01b03871660208201526000910160408051601f19818403018152828252805160209182012090830152016040516020818303038152906040528051906020012090506104e585858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525086925085915061059c9050565b156104f557600192505050610522565b604051631fef5d1160e21b815260ff891660048201526001600160a01b0387166024820152604401610322565b95945050505050565b6105336105b2565b600180546001600160a01b0383166001600160a01b031990911681179091556105646000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000826105a985846105f8565b14949350505050565b6000546001600160a01b0316331461037e5760405163118cdaa760e01b8152336004820152602401610322565b600180546001600160a01b03191690556103c181610645565b600081815b845181101561063d576106298286838151811061061c5761061c610890565b6020026020010151610695565b915080610635816108a6565b9150506105fd565b509392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008183106106b15760008281526020849052604090206106c0565b60008381526020839052604090205b9392505050565b80356001600160a01b03811681146106de57600080fd5b919050565b60008083601f8401126106f557600080fd5b50813567ffffffffffffffff81111561070d57600080fd5b6020830191508360208260051b850101111561072857600080fd5b9250929050565b6000806000806060858703121561074557600080fd5b61074e856106c7565b935061075c602086016106c7565b9250604085013567ffffffffffffffff81111561077857600080fd5b610784878288016106e3565b95989497509550505050565b6000602082840312156107a257600080fd5b5035919050565b6000602082840312156107bb57600080fd5b6106c0826106c7565b803560ff811681146106de57600080fd5b600080604083850312156107e857600080fd5b6107f1836107c4565b946020939093013593505050565b60008060008060006080868803121561081757600080fd5b610820866107c4565b945061082e602087016106c7565b935061083c604087016106c7565b9250606086013567ffffffffffffffff81111561085857600080fd5b610864888289016106e3565b969995985093965092949392505050565b60006020828403121561088757600080fd5b6106c0826107c4565b634e487b7160e01b600052603260045260246000fd5b6000600182016108c657634e487b7160e01b600052601160045260246000fd5b506001019056fea26469706673582212204f9e2c584921426e7c6bfd08f4658dfb718d43141dcdf1fa5389e788a1b5127864736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000405fd5e04c84849edd133ef9e95292ed7406196ee3d6af1b76a999958c4ccd522c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001
-----Decoded View---------------
Arg [0] : _borrowersRoots (bytes32[]): System.Byte[]
Arg [1] : _lendersRoot (bytes32): 0x5fd5e04c84849edd133ef9e95292ed7406196ee3d6af1b76a999958c4ccd522c
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 5fd5e04c84849edd133ef9e95292ed7406196ee3d6af1b76a999958c4ccd522c
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000001
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.