Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 24 from a total of 24 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Withdraw WETH | 17754313 | 347 days ago | IN | 0 ETH | 0.0007798 | ||||
Pause | 17691455 | 356 days ago | IN | 0 ETH | 0.00066166 | ||||
Withdraw WETH | 17619672 | 366 days ago | IN | 0 ETH | 0.00089088 | ||||
Withdraw WETH | 17563314 | 374 days ago | IN | 0 ETH | 0.00049397 | ||||
Withdraw WETH | 17477728 | 386 days ago | IN | 0 ETH | 0.00067018 | ||||
Deposit WETH | 17311534 | 410 days ago | IN | 0 ETH | 0.00130139 | ||||
Withdraw WETH | 17311515 | 410 days ago | IN | 0 ETH | 0.00116268 | ||||
Set Terms For Co... | 17263666 | 416 days ago | IN | 0 ETH | 0.00299033 | ||||
Set Terms For Co... | 17144833 | 433 days ago | IN | 0 ETH | 0.00146259 | ||||
Set Terms For Co... | 17128861 | 435 days ago | IN | 0 ETH | 0.00137944 | ||||
Withdraw WETH | 17128692 | 435 days ago | IN | 0 ETH | 0.00158308 | ||||
Set Terms For Co... | 17031216 | 449 days ago | IN | 0 ETH | 0.00710138 | ||||
Set Terms For Co... | 16968389 | 458 days ago | IN | 0 ETH | 0.0010556 | ||||
Withdraw WETH | 16968353 | 458 days ago | IN | 0 ETH | 0.00110806 | ||||
Withdraw WETH | 16968339 | 458 days ago | IN | 0 ETH | 0.00094334 | ||||
Set Terms For Co... | 16965913 | 459 days ago | IN | 0 ETH | 0.00062536 | ||||
Set Terms For Co... | 16869609 | 472 days ago | IN | 0 ETH | 0.00220358 | ||||
Deposit WETH | 16862370 | 473 days ago | IN | 0 ETH | 0.00071012 | ||||
Deposit WETH | 16780454 | 485 days ago | IN | 0 ETH | 0.00130979 | ||||
Set Terms For Co... | 16780445 | 485 days ago | IN | 0 ETH | 0.03730571 | ||||
Deposit WETH | 16777559 | 485 days ago | IN | 0 ETH | 0.00244748 | ||||
Set Terms For Co... | 16777436 | 485 days ago | IN | 0 ETH | 0.01338854 | ||||
Transfer Ownersh... | 16776211 | 485 days ago | IN | 0 ETH | 0.00068397 | ||||
0x60806040 | 16776200 | 485 days ago | IN | Create: SodiumFreePool | 0 ETH | 0.07196989 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
SodiumFreePool
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 35500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/ISodiumFreePool.sol"; import "./interfaces/ISodiumManager.sol"; import "./interfaces/IWETH.sol"; contract SodiumFreePool is ISodiumFreePool, Initializable, Pausable { // LTV = 0 indicates collection is not supported mapping(address => BorrowingTerms) private borrowingTermsForCollection; mapping(address => uint256) private fixedFloorPrice; address private sodiumPass; address private sodiumManagerERC721; address private sodiumManagerERC1155; address private owner; address private weth; address public oracle; uint128 public maxLoanLength; uint256 public floorPriceLifetime; uint256 public twap = 86400; modifier onlyOwner() { require(owner == msg.sender, "Ownable: caller is not the owner"); _; } constructor( InitializeStruct memory initializeStruct_, uint128 floorPriceLifetime_, address[] memory collections_, BorrowingTerms[] memory borrowingTerms_, uint256[] memory fixedValues_ ) { sodiumPass = initializeStruct_.sodiumPass; weth = initializeStruct_.weth; oracle = initializeStruct_.oracle; sodiumManagerERC721 = initializeStruct_.manager721; sodiumManagerERC1155 = initializeStruct_.manager1155; owner = msg.sender; maxLoanLength = 30 days; floorPriceLifetime = floorPriceLifetime_; uint256 i = 0; for (; i < collections_.length; ) { require(borrowingTerms_[i].LTV < 10000, "Sodium: APR is more than 10000"); require(collections_[i] != address(0), "Sodium: address is zero"); borrowingTermsForCollection[collections_[i]] = borrowingTerms_[i]; if (0 != fixedValues_[i]) { fixedFloorPrice[collections_[i]] = fixedValues_[i]; } unchecked { ++i; } } } function borrow( address collectionCollateral_, address borrower_, uint256 amount_, uint256 amountBorrowed_, uint256 loanLength_, Message calldata message_ ) external whenNotPaused returns (uint256) { require(sodiumManagerERC1155 == msg.sender || sodiumManagerERC721 == msg.sender, "Sodium: manager only"); require(maxLoanLength >= loanLength_, "Sodium: length is too long"); BorrowingTerms storage bt = borrowingTermsForCollection[collectionCollateral_]; require(bt.LTV != 0, "Sodium: collection is not supported"); uint256 price = _getPriceAndVerify(collectionCollateral_, message_); uint256 allowedToBorrow = _ltvByPrice(bt.LTV, price); require(amount_ <= allowedToBorrow, "Sodium: liquidity limit passed"); _transferWETH(address(this), borrower_, amount_); amountBorrowed_ += amount_; require(amountBorrowed_ <= allowedToBorrow, "Sodium: pool ltv exceeded"); if (IERC721(sodiumPass).balanceOf(tx.origin) == 1) { return 0; } else { return bt.APR; } } function bidERC721( uint256 auctionId_, uint256 amount_, uint256 index_ ) external onlyOwner { _updateAllowanceERC721(amount_); ISodiumManager(sodiumManagerERC721).bid(auctionId_, amount_, index_); } function bidERC1155( uint256 auctionId_, uint256 amount_, uint256 index_ ) external onlyOwner { _updateAllowanceERC1155(amount_); ISodiumManager(sodiumManagerERC1155).bid(auctionId_, amount_, index_); } function purchaseERC721(uint256 auctionId_, uint256 amount_) external onlyOwner { _updateAllowanceERC721(amount_); ISodiumManager(sodiumManagerERC721).purchase(auctionId_); } function purchaseERC1155(uint256 auctionId_, uint256 amount_) external onlyOwner { _updateAllowanceERC1155(amount_); ISodiumManager(sodiumManagerERC1155).purchase(auctionId_); } function resolveAuctionERC721(uint256 auctionId_, uint256 amount_) external onlyOwner { _updateAllowanceERC721(amount_); ISodiumManager(sodiumManagerERC721).resolveAuction(auctionId_); } function resolveAuctionERC1155(uint256 auctionId_, uint256 amount_) external onlyOwner { _updateAllowanceERC1155(amount_); ISodiumManager(sodiumManagerERC1155).resolveAuction(auctionId_); } function depositETH() external payable onlyOwner { (bool sent, ) = address(weth).call{value: msg.value}(abi.encodeWithSignature("deposit()")); require(sent, "Sodium: failed to send"); emit PoolLiquidityAdded(msg.value); } function depositWETH(uint256 amount_) external onlyOwner { _transferWETH(msg.sender, address(this), amount_); emit PoolLiquidityAdded(amount_); } function withdrawWETH(uint256 amount_) external onlyOwner { _transferWETH(address(this), msg.sender, amount_); emit PoolLiquidityWithdrawn(amount_); } function setFixedValue(address[] calldata collections_, uint256[] calldata fixedValues_) external onlyOwner { require(collections_.length == fixedValues_.length, "Sodium: length is different"); uint256 i = 0; for (; i < collections_.length; ) { require(collections_[i] != address(0), "Sodium: address is zero"); fixedFloorPrice[collections_[i]] = fixedValues_[i]; unchecked { ++i; } } emit FixedValueSet(collections_, fixedValues_); } function getFixedValue(address collection_) external view returns (uint256) { return fixedFloorPrice[collection_]; } function setTermsForCollection( address[] calldata collectionsToRemove_, address[] calldata collections_, BorrowingTerms[] calldata borrowingTerms_ ) external onlyOwner { uint256 i = 0; for (; i < collections_.length; ) { require(borrowingTerms_[i].LTV <= 10000, "Sodium: LTV is more than 10000"); require(borrowingTerms_[i].APR <= 10000, "Sodium: APR is more than 10000"); borrowingTermsForCollection[collections_[i]] = borrowingTerms_[i]; unchecked { ++i; } } i = 0; for (; i < collectionsToRemove_.length; ) { delete borrowingTermsForCollection[collectionsToRemove_[i]]; unchecked { ++i; } } emit PoolBorrowingTermsAdded(collections_, borrowingTerms_); emit PoolBorrowingTermsRemoved(collectionsToRemove_); } function setfloorPriceLifetime(uint256 floorPriceLifetime_) external onlyOwner { floorPriceLifetime = floorPriceLifetime_; } function onERC721Received( address, address, uint256 tokenId, bytes calldata data ) external returns (bytes4) { IERC721(msg.sender).safeTransferFrom(address(this), owner, tokenId, data); return this.onERC721Received.selector; } function onERC1155Received( address, address, uint256 tokenId, uint256 value, bytes calldata data ) external returns (bytes4) { IERC1155(msg.sender).safeTransferFrom(address(this), owner, tokenId, value, data); return this.onERC1155Received.selector; } function _getPriceAndVerify(address collectionCollateral_, Message calldata message_) internal view returns (uint256) { if (fixedFloorPrice[collectionCollateral_] != 0) { return fixedFloorPrice[collectionCollateral_]; } bytes32 id = keccak256( abi.encode( keccak256("ContractWideCollectionPrice(uint8 kind,uint256 twapSeconds,address contract)"), 1, twap, collectionCollateral_ ) ); require(_verifyMessage(id, message_), "Sodium: payload is not signed by oracle"); (address currency, uint256 price) = abi.decode(message_.payload, (address, uint256)); require(address(0) == currency, "Sodium: currency should be ETH"); return price; } function _verifyMessage(bytes32 id, Message memory message) internal view virtual returns (bool success) { // Ensure the message matches the requested id if (id != message.id) { return false; } // Ensure the message timestamp is valid if (message.timestamp > block.timestamp || message.timestamp + floorPriceLifetime < block.timestamp) { return false; } bytes32 r; bytes32 s; uint8 v; // Extract the individual signature fields from the signature bytes memory signature = message.signature; if (signature.length == 64) { // EIP-2098 compact signature bytes32 vs; assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } } else if (signature.length == 65) { // ECDSA signature assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } } else { return false; } address signerAddress = ecrecover( keccak256( abi.encodePacked( "\x19Ethereum Signed Message:\n32", // EIP-712 structured-data hash keccak256( abi.encode( keccak256("Message(bytes32 id,bytes payload,uint256 timestamp)"), message.id, keccak256(message.payload), message.timestamp ) ) ) ), v, r, s ); // Ensure the signer matches the designated oracle address return signerAddress == oracle; } function _ltvByPrice(uint256 ltv, uint256 price) internal pure returns (uint256) { return (price * ltv) / 10000; } function _updateAllowanceERC1155(uint256 amount_) internal { require(IWETH(weth).approve(sodiumManagerERC1155, amount_), "Sodium: failed to set allowance"); } function _updateAllowanceERC721(uint256 amount_) internal { require(IWETH(weth).approve(sodiumManagerERC721, amount_), "Sodium: failed to set allowance"); } function _transferWETH( address from_, address to_, uint256 amount_ ) internal { bool sent; if (from_ == address(this)) { sent = IERC20(weth).transfer(to_, amount_); } else { sent = IERC20(weth).transferFrom(from_, to_, amount_); } require(sent, "Sodium: failed to send"); } function pause() external onlyOwner { Pausable._pause(); } function unpause() external onlyOwner { Pausable._unpause(); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); address oldOwner = owner; owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Internal function that returns the initialized version. Returns `_initialized` */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Internal function that returns the initialized version. Returns `_initializing` */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../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. * * By default, the owner account will be the one that deploys the contract. 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; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @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 { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing 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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _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 v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface ISodiumFreePool { struct InitializeStruct { address sodiumPass; address oracle; address manager721; address manager1155; address weth; } struct BorrowingTerms { uint256 APR; uint256 LTV; // percentage which is allowed for a loan; should be expressed in thousands; if LTV - 70% => 7000 or LTV - 5% => 500 } struct Message { bytes32 id; bytes payload; uint256 timestamp; // The UNIX timestamp when the message was signed by the oracle bytes signature; // ECDSA signature or EIP-2098 compact signature } event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event FixedValueSet(address[] collections, uint256[] values); event PoolLiquidityAdded(uint256 amount); event PoolLiquidityWithdrawn(uint256 amount); event PoolBorrowingTermsAdded(address[] collections, BorrowingTerms[] borrowingTerms); event PoolBorrowingTermsRemoved(address[] collections); /// @notice Borrow from pools; can be called only by erc721Manager or erc1155Manager /// @param collectionCollateral_ nft which will be used as a collateral /// @param borrower_ borrower address /// @param amount_ amount to borrow /// @param amountBorrowed_ total liquidity added to a loan, /// @param loanLength_ loan length /// @param message_ oracle message function borrow( address collectionCollateral_, address borrower_, uint256 amount_, uint256 amountBorrowed_, uint256 loanLength_, Message calldata message_ ) external returns (uint256); /// @notice Makes a bid through a pool to erc721 manager /// @param auctionId_ auction id /// @param amount_ bid size /// @param index_ index of a pool in the lender queue inside the manager; if used a bid will be boosted with liquidity added to a loan function bidERC721( uint256 auctionId_, uint256 amount_, uint256 index_ ) external; /// @notice Makes a bid through a pool to erc1155 manager /// @param auctionId_ auction id /// @param amount_ bid size /// @param index_ index of a pool in the lender queue inside the manager; if used a bid will be boosted with liquidity added to a loan function bidERC1155( uint256 auctionId_, uint256 amount_, uint256 index_ ) external; /// @notice Makes a purchase through a pool to erc721 manager /// @param auctionId_ auction id /// @param amount_ which will be spent function purchaseERC721(uint256 auctionId_, uint256 amount_) external; /// @notice Makes a purchase through a pool to erc1155 manager /// @param auctionId_ auction id /// @param amount_ which will be spent function purchaseERC1155(uint256 auctionId_, uint256 amount_) external; /// @notice Makes an auction resolution through a pool to erc721 manager /// @param auctionId_ auction id /// @param amount_ which will be spent function resolveAuctionERC721(uint256 auctionId_, uint256 amount_) external; /// @notice Makes an auction resolution through a pool to erc1155 manager /// @param auctionId_ auction id /// @param amount_ which will be spent function resolveAuctionERC1155(uint256 auctionId_, uint256 amount_) external; /// @notice Used to set fixed floor price for a collection /// @param collections_ array of collections /// @param fixedValues_ array of floor price values function setFixedValue(address[] calldata collections_, uint256[] calldata fixedValues_) external; /// @notice Used to set fixed floor price for a collection /// @param collection_ collection function getFixedValue(address collection_) external view returns (uint256); function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); function onERC1155Received( address operator, address from, uint256 tokenId, uint256 value, bytes calldata data ) external returns (bytes4); function depositETH() external payable; function withdrawWETH(uint256 amount_) external; function depositWETH(uint256 amount_) external; function setTermsForCollection( address[] calldata collectionsToRemove_, address[] calldata collections_, BorrowingTerms[] calldata borrowingTerms_ ) external; function setfloorPriceLifetime(uint256 floorPriceLifetime_) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./ISodiumPrivatePool.sol"; interface ISodiumManager { struct PoolRequest { address pool; uint256 amount; ISodiumPrivatePool.Message oracleMessage; } struct Loan { uint256 length; uint256 endDate; uint256 auctionEndDate; uint256 tokenId; uint256 totalLiquidityAdded; address tokenAddress; address borrower; uint256 repayment; // Corresponding parameters should have the same ids in the arrays uint8[] orderTypes; // 1 => pool, 0 => metalener address[] lenders; uint256[] principals; uint256[] APRs; uint256[] timestamps; } struct MetaContribution { bytes32 r; bytes32 s; uint8 v; uint256 totalFundsOffered; uint256 APR; // APR which can be upto 10000; 7000 => 70%; 450 => 4,5% uint256 liquidityLimit; uint256 nonce; } struct Auction { address highestBidder; uint256 bid; uint256 boostedBid; } struct Validation { uint256 deadline; uint8 v; bytes32 r; bytes32 s; } /// @notice internal struct which is used in borrowFromPoolsAndMetalenders /// @notice method to avoid stack is too deep error struct Indexes { uint256 counter; uint256 poolArrayIndex; uint256 metaContributionArrayIndex; } event RequestMade( uint256 indexed id, address indexed requester, address tokenAddress, uint256 tokenId, uint256 length ); event RequestWithdrawn(uint256 indexed requestId); event FundsAdded(uint256 indexed loanId, address lender, uint256 amount, uint256 APR); event RepaymentMade( uint256 indexed loanId, address indexed lender, uint256 principal, uint256 interest, uint256 fee ); event BidMade(uint256 indexed id, address indexed bidder, uint256 bid, uint256 boost, uint256 index); event PurchaseMade(uint256 indexed id); event AuctionRepaymentMade(uint256 indexed auctionId, address indexed lender, uint256 amount); event AuctionConcluded(uint256 indexed id, address indexed winner); event FeeUpdated(uint256 feeInBasisPoints); event AuctionLengthUpdated(uint256 auctionLength); event WalletFactoryUpdated(address walletFactory); event TreasuryUpdated(address treasury); event ValidatorUpdated(address validator); event BorrowFromPoolMade(uint256 indexed loanId, address indexed lender, uint256 amount, uint256 APR); /// @notice Withdraws a request if there is no lenders /// @param requestId_ id of a request which is being withdrawn function withdraw(uint256 requestId_) external; /// @notice Borrow from pools /// @param loanId_ loanId /// @param poolRequests_ array of pool requests function borrowFromPools(uint256 loanId_, PoolRequest[] calldata poolRequests_) external; /// @notice Borrow from metalendes and pools /// @param loanId_ loanId /// @param poolRequests_ array of pool requests /// @param metaContributions_ array of metacontributions /// @param metacontributionAmounts_ array of amounts to use in a corresponding metacontribution /// @param validation_ signature which is used to validate meta contibutions /// @param orderTypes_ array of order types to distinguish whether lender in the loan struct is a pool of a meta-lender: 1 => pool, 0 => metalener function borrowFromPoolsAndMetalenders( uint256 loanId_, PoolRequest[] calldata poolRequests_, MetaContribution[] calldata metaContributions_, Validation calldata validation_, uint256[] calldata metacontributionAmounts_, uint8[] calldata orderTypes_ ) external; /// @notice Borrow from metalenders /// @param loanId_ loanId /// @param metaContributions_ array of meta contributions /// @param amount_ array of amounts /// @param validation_ signature which is used to validate meta contibutions function borrowFromMetaLenders( uint256 loanId_, MetaContribution[] calldata metaContributions_, uint256[] calldata amount_, Validation calldata validation_ ) external; /// @notice repay is used to repay loan partially or wholly /// @param loanId_ loan id whivh is being repaid /// @param amount_ amount which is used for repayment function repay(uint256 loanId_, uint256 amount_) external; /// @notice bid is used to place a bid during the auction /// @param auctionId_ id of an auctions which corresponds to the same loanId /// @param amount_ bid amount /// @param index_ index of msg.sender in the lenders array inside Loan structure function bid( uint256 auctionId_, uint256 amount_, uint256 index_ ) external; /// @notice purchase loan collateral /// @param auctionId_ id of an auctions which corresponds to the same loanId function purchase(uint256 auctionId_) external; /// @notice resolve auction /// @param auctionId_ id of an auctions which corresponds to the same loanId function resolveAuction(uint256 auctionId_) external; function setFee(uint256 feeInBasisPoints_) external; function setAuctionLength(uint256 length) external; function setWalletFactory(address factory) external; function setTreasury(address treasury) external; function setValidator(address validator_) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface ISodiumPrivatePool { struct BorrowingTerms { uint256 APR; uint256 LTV; // percentage which is allowed for a loan; should be expressed in thousands; if LTV - 70% => 7000 or LTV - 5% => 500 } struct Message { bytes32 id; bytes payload; uint256 timestamp; // The UNIX timestamp when the message was signed by the oracle bytes signature; // ECDSA signature or EIP-2098 compact signature } event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event FixedValueSet(address[] collections, uint256[] values); event PoolLiquidityAdded(uint256 amount); event PoolLiquidityWithdrawn(uint256 amount); event PoolBorrowingTermsAdded(address[] collections, ISodiumPrivatePool.BorrowingTerms[] borrowingTerms); event PoolBorrowingTermsRemoved(address[] collections); function initialize( address oracle_, address manager721_, address manager1155_, address weth_, address poolOwner_, uint128 floorPriceLifetime_, address[] calldata collections_, BorrowingTerms[] calldata borrowingTerms_, uint256[] calldata fixedValues_ ) external; /// @notice Borrow from pools; can be called only by erc721Manager or erc1155Manager /// @param collectionCollateral_ nft which will be used as a collateral /// @param borrower_ borrower address /// @param amountBorrowed_ amount which was borrowed /// @param loanLength_ loan length /// @param message_ oracle message function borrow( address collectionCollateral_, address borrower_, uint256 amount_, uint256 amountBorrowed_, uint256 loanLength_, Message calldata message_ ) external returns (uint256); /// @notice Makes a bid through a pool to erc721 manager /// @param auctionId_ auction id /// @param amount_ bid size /// @param index_ index of a pool in the lender queue inside the manager; if used a bid will be boosted with liquidity added to a loan function bidERC721( uint256 auctionId_, uint256 amount_, uint256 index_ ) external; /// @notice Makes a bid through a pool to erc1155 manager /// @param auctionId_ auction id /// @param amount_ bid size /// @param index_ index of a pool in the lender queue inside the manager; if used a bid will be boosted with liquidity added to a loan function bidERC1155( uint256 auctionId_, uint256 amount_, uint256 index_ ) external; /// @notice Makes a purchase through a pool to erc721 manager /// @param auctionId_ auction id /// @param amount_ which will be spent function purchaseERC721(uint256 auctionId_, uint256 amount_) external; /// @notice Makes a purchase through a pool to erc1155 manager /// @param auctionId_ auction id /// @param amount_ which will be spent function purchaseERC1155(uint256 auctionId_, uint256 amount_) external; /// @notice Makes an auction resolution through a pool to erc721 manager /// @param auctionId_ auction id /// @param amount_ which will be spent function resolveAuctionERC721(uint256 auctionId_, uint256 amount_) external; /// @notice Makes an auction resolution through a pool to erc1155 manager /// @param auctionId_ auction id /// @param amount_ which will be spent function resolveAuctionERC1155(uint256 auctionId_, uint256 amount_) external; /// @notice Used to set fixed floor price for a collection /// @param collections_ array of collections /// @param fixedValues_ array of floor price values function setFixedValue(address[] calldata collections_, uint256[] calldata fixedValues_) external; /// @notice Used to set fixed floor price for a collection /// @param collection_ collection function getFixedValue(address collection_) external view returns (uint256); function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); function onERC1155Received( address operator, address from, uint256 tokenId, uint256 value, bytes calldata data ) external returns (bytes4); function depositETH() external payable; function withdrawWETH(uint256 amount_) external; function depositWETH(uint256 amount_) external; function setTermsForCollection( address[] calldata collectionsToRemove_, address[] calldata collections_, BorrowingTerms[] calldata borrowingTerms_ ) external; function setfloorPriceLifetime(uint256 floorPriceLifetime_) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; interface IWETH { function deposit() external payable; function balanceOf(address) external returns (uint256); function transferFrom( address src, address dst, uint256 wad ) external returns (bool); function approve(address guy, uint256 wad) external returns (bool); function transfer(address dst, uint256 wad) external returns (bool); function withdraw(uint256 wad) external; }
{ "optimizer": { "enabled": true, "runs": 35500 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"components":[{"internalType":"address","name":"sodiumPass","type":"address"},{"internalType":"address","name":"oracle","type":"address"},{"internalType":"address","name":"manager721","type":"address"},{"internalType":"address","name":"manager1155","type":"address"},{"internalType":"address","name":"weth","type":"address"}],"internalType":"struct ISodiumFreePool.InitializeStruct","name":"initializeStruct_","type":"tuple"},{"internalType":"uint128","name":"floorPriceLifetime_","type":"uint128"},{"internalType":"address[]","name":"collections_","type":"address[]"},{"components":[{"internalType":"uint256","name":"APR","type":"uint256"},{"internalType":"uint256","name":"LTV","type":"uint256"}],"internalType":"struct ISodiumFreePool.BorrowingTerms[]","name":"borrowingTerms_","type":"tuple[]"},{"internalType":"uint256[]","name":"fixedValues_","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"collections","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"FixedValueSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"collections","type":"address[]"},{"components":[{"internalType":"uint256","name":"APR","type":"uint256"},{"internalType":"uint256","name":"LTV","type":"uint256"}],"indexed":false,"internalType":"struct ISodiumFreePool.BorrowingTerms[]","name":"borrowingTerms","type":"tuple[]"}],"name":"PoolBorrowingTermsAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"collections","type":"address[]"}],"name":"PoolBorrowingTermsRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PoolLiquidityAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PoolLiquidityWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"uint256","name":"auctionId_","type":"uint256"},{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"uint256","name":"index_","type":"uint256"}],"name":"bidERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId_","type":"uint256"},{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"uint256","name":"index_","type":"uint256"}],"name":"bidERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collectionCollateral_","type":"address"},{"internalType":"address","name":"borrower_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"uint256","name":"amountBorrowed_","type":"uint256"},{"internalType":"uint256","name":"loanLength_","type":"uint256"},{"components":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"bytes","name":"payload","type":"bytes"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct ISodiumFreePool.Message","name":"message_","type":"tuple"}],"name":"borrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"depositWETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"floorPriceLifetime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection_","type":"address"}],"name":"getFixedValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxLoanLength","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId_","type":"uint256"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"purchaseERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId_","type":"uint256"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"purchaseERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId_","type":"uint256"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"resolveAuctionERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId_","type":"uint256"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"resolveAuctionERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"collections_","type":"address[]"},{"internalType":"uint256[]","name":"fixedValues_","type":"uint256[]"}],"name":"setFixedValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"collectionsToRemove_","type":"address[]"},{"internalType":"address[]","name":"collections_","type":"address[]"},{"components":[{"internalType":"uint256","name":"APR","type":"uint256"},{"internalType":"uint256","name":"LTV","type":"uint256"}],"internalType":"struct ISodiumFreePool.BorrowingTerms[]","name":"borrowingTerms_","type":"tuple[]"}],"name":"setTermsForCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"floorPriceLifetime_","type":"uint256"}],"name":"setfloorPriceLifetime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"twap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"withdrawWETH","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405262015180600b553480156200001857600080fd5b50604051620035b4380380620035b48339810160408190526200003b9162000557565b6000805462ff0000191681558551600380546001600160a01b039283166001600160a01b03199182161790915560808801516007805491841691831691909117905560208801516008805491841691831691909117905560408801516004805491841691831691909117905560608801516005805491909316908216179091556006805490911633179055600980546001600160801b03191662278d001790556001600160801b038516600a555b8351811015620002f0576127108382815181106200010b576200010b6200067a565b602002602001015160200151106200016a5760405162461bcd60e51b815260206004820152601e60248201527f536f6469756d3a20415052206973206d6f7265207468616e203130303030000060448201526064015b60405180910390fd5b60006001600160a01b03168482815181106200018a576200018a6200067a565b60200260200101516001600160a01b031603620001ea5760405162461bcd60e51b815260206004820152601760248201527f536f6469756d3a2061646472657373206973207a65726f000000000000000000604482015260640162000161565b828181518110620001ff57620001ff6200067a565b6020026020010151600160008684815181106200022057620002206200067a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060008201518160000155602082015181600101559050508181815181106200027457620002746200067a565b6020026020010151600014620002e7578181815181106200029957620002996200067a565b602002602001015160026000868481518110620002ba57620002ba6200067a565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055505b600101620000e9565b50505050505062000690565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715620003375762000337620002fc565b60405290565b60405160a081016001600160401b0381118282101715620003375762000337620002fc565b604051601f8201601f191681016001600160401b03811182821017156200038d576200038d620002fc565b604052919050565b80516001600160a01b0381168114620003ad57600080fd5b919050565b80516001600160801b0381168114620003ad57600080fd5b60006001600160401b03821115620003e657620003e6620002fc565b5060051b60200190565b600082601f8301126200040257600080fd5b815160206200041b6200041583620003ca565b62000362565b82815260059290921b840181019181810190868411156200043b57600080fd5b8286015b848110156200046157620004538162000395565b83529183019183016200043f565b509695505050505050565b600082601f8301126200047e57600080fd5b81516020620004916200041583620003ca565b82815260069290921b84018101918181019086841115620004b157600080fd5b8286015b84811015620004615760408189031215620004d05760008081fd5b620004da62000312565b815181528482015185820152835291830191604001620004b5565b600082601f8301126200050757600080fd5b815160206200051a6200041583620003ca565b82815260059290921b840181019181810190868411156200053a57600080fd5b8286015b848110156200046157805183529183019183016200053e565b60008060008060008587036101208112156200057257600080fd5b60a08112156200058157600080fd5b506200058c6200033d565b620005978762000395565b8152620005a76020880162000395565b6020820152620005ba6040880162000395565b6040820152620005cd6060880162000395565b6060820152620005e06080880162000395565b60808201529450620005f560a08701620003b2565b60c08701519094506001600160401b03808211156200061357600080fd5b6200062189838a01620003f0565b945060e08801519150808211156200063857600080fd5b6200064689838a016200046c565b93506101008801519150808211156200065e57600080fd5b506200066d88828901620004f5565b9150509295509295909350565b634e487b7160e01b600052603260045260246000fd5b612f1480620006a06000396000f3fe60806040526004361061018b5760003560e01c8063723d5126116100d6578063df4703791161007f578063f2fde38b11610059578063f2fde38b146104d4578063f6326fb3146104f4578063fc4dd333146104fc57600080fd5b8063df47037914610474578063edf839f614610494578063f23a6e61146104b457600080fd5b80638af9a58c116100b05780638af9a58c1461041457806396b7a83f14610434578063d5e0d5021461045457600080fd5b8063723d5126146103635780637dc0d1d0146103ad5780638456cb59146103ff57600080fd5b806347f054b71161013857806360dd45761161011257806360dd4576146102e057806366dd0f24146103005780636b5d02991461032057600080fd5b806347f054b7146102775780634c02c610146102975780635c975abb146102b757600080fd5b8063328e306211610169578063328e30621461022c5780633f4ba83a1461024c57806345969f651461026157600080fd5b80631208aa1814610190578063150b7a02146101b957806323506a3c1461020a575b600080fd5b34801561019c57600080fd5b506101a6600b5481565b6040519081526020015b60405180910390f35b3480156101c557600080fd5b506101d96101d43660046125fb565b61051c565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101b0565b34801561021657600080fd5b5061022a6102253660046126b3565b6105d8565b005b34801561023857600080fd5b5061022a61024736600461271f565b61082f565b34801561025857600080fd5b5061022a6108b5565b34801561026d57600080fd5b506101a6600a5481565b34801561028357600080fd5b5061022a610292366004612738565b610940565b3480156102a357600080fd5b5061022a6102b2366004612764565b610a62565b3480156102c357600080fd5b5060005462010000900460ff1660405190151581526020016101b0565b3480156102ec57600080fd5b5061022a6102fb366004612786565b610b73565b34801561030c57600080fd5b5061022a61031b36600461271f565b610e7a565b34801561032c57600080fd5b506101a661033b36600461284f565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b34801561036f57600080fd5b5060095461038c906fffffffffffffffffffffffffffffffff1681565b6040516fffffffffffffffffffffffffffffffff90911681526020016101b0565b3480156103b957600080fd5b506008546103da9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b0565b34801561040b57600080fd5b5061022a610f3d565b34801561042057600080fd5b506101a661042f36600461286c565b610fc6565b34801561044057600080fd5b5061022a61044f366004612764565b61136b565b34801561046057600080fd5b5061022a61046f366004612738565b61144c565b34801561048057600080fd5b5061022a61048f366004612764565b611539565b3480156104a057600080fd5b5061022a6104af366004612764565b61161a565b3480156104c057600080fd5b506101d96104cf3660046128f1565b6116f9565b3480156104e057600080fd5b5061022a6104ef36600461284f565b6117b8565b61022a611953565b34801561050857600080fd5b5061022a61051736600461271f565b611b32565b6006546040517fb88d4fde000000000000000000000000000000000000000000000000000000008152600091339163b88d4fde9161057b91309173ffffffffffffffffffffffffffffffffffffffff16908990899089906004016129b6565b600060405180830381600087803b15801561059557600080fd5b505af11580156105a9573d6000803e3d6000fd5b507f150b7a02000000000000000000000000000000000000000000000000000000009998505050505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff16331461065e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b8281146106c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536f6469756d3a206c656e67746820697320646966666572656e7400000000006044820152606401610655565b60005b838110156107eb5760008585838181106106e6576106e6612a01565b90506020020160208101906106fb919061284f565b73ffffffffffffffffffffffffffffffffffffffff1603610778576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f536f6469756d3a2061646472657373206973207a65726f0000000000000000006044820152606401610655565b82828281811061078a5761078a612a01565b90506020020135600260008787858181106107a7576107a7612a01565b90506020020160208101906107bc919061284f565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020556001016106ca565b7fa0013a8bc1eae5ca3a45ea92da758e961613b5a459a15e462887277e939beabc858585856040516108209493929190612a86565b60405180910390a15050505050565b60065473ffffffffffffffffffffffffffffffffffffffff1633146108b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b600a55565b60065473ffffffffffffffffffffffffffffffffffffffff163314610936576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b61093e611bee565b565b60065473ffffffffffffffffffffffffffffffffffffffff1633146109c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b6109ca82611c6b565b6005546040517f2ac9bf0900000000000000000000000000000000000000000000000000000000815260048101859052602481018490526044810183905273ffffffffffffffffffffffffffffffffffffffff90911690632ac9bf09906064015b600060405180830381600087803b158015610a4557600080fd5b505af1158015610a59573d6000803e3d6000fd5b50505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff163314610ae3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b610aec81611d74565b600480546040517f199de1e200000000000000000000000000000000000000000000000000000000815291820184905273ffffffffffffffffffffffffffffffffffffffff169063199de1e2906024015b600060405180830381600087803b158015610b5757600080fd5b505af1158015610b6b573d6000803e3d6000fd5b505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff163314610bf4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b60005b83811015610d8a57612710838383818110610c1457610c14612a01565b905060400201602001351115610c86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536f6469756d3a204c5456206973206d6f7265207468616e20313030303000006044820152606401610655565b612710838383818110610c9b57610c9b612a01565b905060400201600001351115610d0d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536f6469756d3a20415052206973206d6f7265207468616e20313030303000006044820152606401610655565b828282818110610d1f57610d1f612a01565b90506040020160016000878785818110610d3b57610d3b612a01565b9050602002016020810190610d50919061284f565b73ffffffffffffffffffffffffffffffffffffffff1681526020808201929092526040016000208235815591013560019182015501610bf7565b5060005b85811015610dfb5760016000888884818110610dac57610dac612a01565b9050602002016020810190610dc1919061284f565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600090812081815560019081019190915501610d8e565b7f8f5f98ff0cb9cdd1a2c940ee7df8a54ea1ad774411824abf6a1bb289ebc9b6c085858585604051610e309493929190612aeb565b60405180910390a17f9d2f2f70f0fee3ff057432a51c9a7acf0001eb192c5e83fac018821e1cd907028787604051610e69929190612b47565b60405180910390a150505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff163314610efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b610f06333083611dd9565b6040518181527fb717f334fd9397b0ca63334c6c40e78d87ceded8e3f1c094884a74bd0e126720906020015b60405180910390a150565b60065473ffffffffffffffffffffffffffffffffffffffff163314610fbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b61093e611fb1565b6000610fd061200e565b60055473ffffffffffffffffffffffffffffffffffffffff1633148061100d575060045473ffffffffffffffffffffffffffffffffffffffff1633145b611073576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f536f6469756d3a206d616e61676572206f6e6c790000000000000000000000006044820152606401610655565b6009546fffffffffffffffffffffffffffffffff168311156110f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536f6469756d3a206c656e67746820697320746f6f206c6f6e670000000000006044820152606401610655565b73ffffffffffffffffffffffffffffffffffffffff871660009081526001602081905260408220908101549091036111ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f536f6469756d3a20636f6c6c656374696f6e206973206e6f7420737570706f7260448201527f74656400000000000000000000000000000000000000000000000000000000006064820152608401610655565b60006111b78985612081565b905060006111c983600101548361229a565b905080881115611235576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536f6469756d3a206c6971756964697479206c696d69742070617373656400006044820152606401610655565b611240308a8a611dd9565b61124a8888612b92565b9650808711156112b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f536f6469756d3a20706f6f6c206c7476206578636565646564000000000000006044820152606401610655565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815232600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa158015611324573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113489190612ba5565b60010361135b5760009350505050611361565b50505490505b9695505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff1633146113ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b6113f581611c6b565b6005546040517f199de1e20000000000000000000000000000000000000000000000000000000081526004810184905273ffffffffffffffffffffffffffffffffffffffff9091169063199de1e290602401610b3d565b60065473ffffffffffffffffffffffffffffffffffffffff1633146114cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b6114d682611d74565b600480546040517f2ac9bf09000000000000000000000000000000000000000000000000000000008152918201859052602482018490526044820183905273ffffffffffffffffffffffffffffffffffffffff1690632ac9bf0990606401610a2b565b60065473ffffffffffffffffffffffffffffffffffffffff1633146115ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b6115c381611c6b565b6005546040517fefef39a10000000000000000000000000000000000000000000000000000000081526004810184905273ffffffffffffffffffffffffffffffffffffffff9091169063efef39a190602401610b3d565b60065473ffffffffffffffffffffffffffffffffffffffff16331461169b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b6116a481611d74565b600480546040517fefef39a100000000000000000000000000000000000000000000000000000000815291820184905273ffffffffffffffffffffffffffffffffffffffff169063efef39a190602401610b3d565b6006546040517ff242432a000000000000000000000000000000000000000000000000000000008152600091339163f242432a9161175a91309173ffffffffffffffffffffffffffffffffffffffff16908a908a908a908a90600401612bbe565b600060405180830381600087803b15801561177457600080fd5b505af1158015611788573d6000803e3d6000fd5b507ff23a6e61000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff163314611839576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b73ffffffffffffffffffffffffffffffffffffffff81166118dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610655565b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60065473ffffffffffffffffffffffffffffffffffffffff1633146119d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b60075460408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd0e30db000000000000000000000000000000000000000000000000000000000179052905160009273ffffffffffffffffffffffffffffffffffffffff16913491611a559190612c10565b60006040518083038185875af1925050503d8060008114611a92576040519150601f19603f3d011682016040523d82523d6000602084013e611a97565b606091505b5050905080611b02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f536f6469756d3a206661696c656420746f2073656e64000000000000000000006044820152606401610655565b6040513481527fb717f334fd9397b0ca63334c6c40e78d87ceded8e3f1c094884a74bd0e12672090602001610f32565b60065473ffffffffffffffffffffffffffffffffffffffff163314611bb3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b611bbe303383611dd9565b6040518181527f1555eeab2cac0e5647edfaaccf2c080684af90cab5c582fbd5fa6e4da218e97890602001610f32565b611bf66122ba565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6007546005546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201526024810184905291169063095ea7b3906044015b6020604051808303816000875af1158015611ce7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0b9190612c3f565b611d71576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f536f6469756d3a206661696c656420746f2073657420616c6c6f77616e6365006044820152606401610655565b50565b600754600480546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821692810192909252602482018490529091169063095ea7b390604401611cc8565b60003073ffffffffffffffffffffffffffffffffffffffff851603611e9c576007546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529091169063a9059cbb906044016020604051808303816000875af1158015611e71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e959190612c3f565b9050611f44565b6007546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152858116602483015260448201859052909116906323b872dd906064016020604051808303816000875af1158015611f1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f419190612c3f565b90505b80611fab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f536f6469756d3a206661696c656420746f2073656e64000000000000000000006044820152606401610655565b50505050565b611fb961200e565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff16620100001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611c413390565b60005462010000900460ff161561093e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610655565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040812054156120d8575073ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902054612294565b600b54604080517f62dbd10a8cc75566a581b428054327e66bbbfb7507580500ddf135686a04fc0d6020820152600191810191909152606081019190915273ffffffffffffffffffffffffffffffffffffffff8416608082015260009060a001604051602081830303815290604052805190602001209050612163818461215e90612d3b565b61232c565b6121ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f536f6469756d3a207061796c6f6164206973206e6f74207369676e656420627960448201527f206f7261636c65000000000000000000000000000000000000000000000000006064820152608401610655565b6000806121ff6020860186612dd5565b81019061220c9190612e3a565b909250905073ffffffffffffffffffffffffffffffffffffffff82161561228f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536f6469756d3a2063757272656e63792073686f756c642062652045544800006044820152606401610655565b925050505b92915050565b60006127106122a98484612e66565b6122b39190612ea3565b9392505050565b60005462010000900460ff1661093e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610655565b8051600090831461233f57506000612294565b4282604001511180612361575042600a54836040015161235f9190612b92565b105b1561236e57506000612294565b6000806000808560600151905080516040036123c357602081015160408201519094507f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116935060ff1c601b0191506123f6565b80516041036123e9576020810151935060408101519250606081015160001a91506123f6565b6000945050505050612294565b600060017f395537e76dcb230984fc10f328a95df716a3205146e2e10a6b1405dc0a67059388600001518960200151805190602001208a6040015160405160200161245a949392919093845260208401929092526040830152606082015260800190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff861690820152606081018790526080810186905260a0016020604051602081039080840390855afa15801561253d573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015160085473ffffffffffffffffffffffffffffffffffffffff9081169116149998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114611d7157600080fd5b60008083601f8401126125c457600080fd5b50813567ffffffffffffffff8111156125dc57600080fd5b6020830191508360208285010111156125f457600080fd5b9250929050565b60008060008060006080868803121561261357600080fd5b853561261e81612590565b9450602086013561262e81612590565b935060408601359250606086013567ffffffffffffffff81111561265157600080fd5b61265d888289016125b2565b969995985093965092949392505050565b60008083601f84011261268057600080fd5b50813567ffffffffffffffff81111561269857600080fd5b6020830191508360208260051b85010111156125f457600080fd5b600080600080604085870312156126c957600080fd5b843567ffffffffffffffff808211156126e157600080fd5b6126ed8883890161266e565b9096509450602087013591508082111561270657600080fd5b506127138782880161266e565b95989497509550505050565b60006020828403121561273157600080fd5b5035919050565b60008060006060848603121561274d57600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561277757600080fd5b50508035926020909101359150565b6000806000806000806060878903121561279f57600080fd5b863567ffffffffffffffff808211156127b757600080fd5b6127c38a838b0161266e565b909850965060208901359150808211156127dc57600080fd5b6127e88a838b0161266e565b9096509450604089013591508082111561280157600080fd5b818901915089601f83011261281557600080fd5b81358181111561282457600080fd5b8a60208260061b850101111561283957600080fd5b6020830194508093505050509295509295509295565b60006020828403121561286157600080fd5b81356122b381612590565b60008060008060008060c0878903121561288557600080fd5b863561289081612590565b955060208701356128a081612590565b945060408701359350606087013592506080870135915060a087013567ffffffffffffffff8111156128d157600080fd5b87016080818a0312156128e357600080fd5b809150509295509295509295565b60008060008060008060a0878903121561290a57600080fd5b863561291581612590565b9550602087013561292581612590565b94506040870135935060608701359250608087013567ffffffffffffffff81111561294f57600080fd5b61295b89828a016125b2565b979a9699509497509295939492505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600073ffffffffffffffffffffffffffffffffffffffff8088168352808716602084015250846040830152608060608301526129f660808301848661296d565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8183526000602080850194508260005b85811015612a7b578135612a5381612590565b73ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101612a40565b509495945050505050565b604081526000612a9a604083018688612a30565b82810360208401528381527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff841115612ad257600080fd5b8360051b80866020840137016020019695505050505050565b60006040808352612aff8184018789612a30565b8381036020858101919091528582528691810160005b87811015612b39578335825282840135838301529284019290840190600101612b15565b509998505050505050505050565b602081526000612b5b602083018486612a30565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561229457612294612b63565b600060208284031215612bb757600080fd5b5051919050565b600073ffffffffffffffffffffffffffffffffffffffff808916835280881660208401525085604083015284606083015260a06080830152612c0460a08301848661296d565b98975050505050505050565b6000825160005b81811015612c315760208186018101518583015201612c17565b506000920191825250919050565b600060208284031215612c5157600080fd5b815180151581146122b357600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112612ca157600080fd5b813567ffffffffffffffff80821115612cbc57612cbc612c61565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715612d0257612d02612c61565b81604052838152866020858801011115612d1b57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060808236031215612d4d57600080fd5b6040516080810167ffffffffffffffff8282108183111715612d7157612d71612c61565b81604052843583526020850135915080821115612d8d57600080fd5b612d9936838701612c90565b6020840152604085013560408401526060850135915080821115612dbc57600080fd5b50612dc936828601612c90565b60608301525092915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612e0a57600080fd5b83018035915067ffffffffffffffff821115612e2557600080fd5b6020019150368190038213156125f457600080fd5b60008060408385031215612e4d57600080fd5b8235612e5881612590565b946020939093013593505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612e9e57612e9e612b63565b500290565b600082612ed9577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea26469706673582212208b147ba9ebfd893ef3db96312562d3de02ee7a7b3beb16dc6d4cd30cc6c2462d64736f6c63430008100033000000000000000000000000fefe4eeff35e3f9488388dd56b645cc90303b574000000000000000000000000aeb1d03929bf87f69888f381e73fbf75753d75af000000000000000000000000616b179c6fbc931f2d3b9b6d5b4e107ec8c713df000000000000000000000000270bf28dfb9088f0656311ada8e230d929a50766000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000015180000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061018b5760003560e01c8063723d5126116100d6578063df4703791161007f578063f2fde38b11610059578063f2fde38b146104d4578063f6326fb3146104f4578063fc4dd333146104fc57600080fd5b8063df47037914610474578063edf839f614610494578063f23a6e61146104b457600080fd5b80638af9a58c116100b05780638af9a58c1461041457806396b7a83f14610434578063d5e0d5021461045457600080fd5b8063723d5126146103635780637dc0d1d0146103ad5780638456cb59146103ff57600080fd5b806347f054b71161013857806360dd45761161011257806360dd4576146102e057806366dd0f24146103005780636b5d02991461032057600080fd5b806347f054b7146102775780634c02c610146102975780635c975abb146102b757600080fd5b8063328e306211610169578063328e30621461022c5780633f4ba83a1461024c57806345969f651461026157600080fd5b80631208aa1814610190578063150b7a02146101b957806323506a3c1461020a575b600080fd5b34801561019c57600080fd5b506101a6600b5481565b6040519081526020015b60405180910390f35b3480156101c557600080fd5b506101d96101d43660046125fb565b61051c565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101b0565b34801561021657600080fd5b5061022a6102253660046126b3565b6105d8565b005b34801561023857600080fd5b5061022a61024736600461271f565b61082f565b34801561025857600080fd5b5061022a6108b5565b34801561026d57600080fd5b506101a6600a5481565b34801561028357600080fd5b5061022a610292366004612738565b610940565b3480156102a357600080fd5b5061022a6102b2366004612764565b610a62565b3480156102c357600080fd5b5060005462010000900460ff1660405190151581526020016101b0565b3480156102ec57600080fd5b5061022a6102fb366004612786565b610b73565b34801561030c57600080fd5b5061022a61031b36600461271f565b610e7a565b34801561032c57600080fd5b506101a661033b36600461284f565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b34801561036f57600080fd5b5060095461038c906fffffffffffffffffffffffffffffffff1681565b6040516fffffffffffffffffffffffffffffffff90911681526020016101b0565b3480156103b957600080fd5b506008546103da9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b0565b34801561040b57600080fd5b5061022a610f3d565b34801561042057600080fd5b506101a661042f36600461286c565b610fc6565b34801561044057600080fd5b5061022a61044f366004612764565b61136b565b34801561046057600080fd5b5061022a61046f366004612738565b61144c565b34801561048057600080fd5b5061022a61048f366004612764565b611539565b3480156104a057600080fd5b5061022a6104af366004612764565b61161a565b3480156104c057600080fd5b506101d96104cf3660046128f1565b6116f9565b3480156104e057600080fd5b5061022a6104ef36600461284f565b6117b8565b61022a611953565b34801561050857600080fd5b5061022a61051736600461271f565b611b32565b6006546040517fb88d4fde000000000000000000000000000000000000000000000000000000008152600091339163b88d4fde9161057b91309173ffffffffffffffffffffffffffffffffffffffff16908990899089906004016129b6565b600060405180830381600087803b15801561059557600080fd5b505af11580156105a9573d6000803e3d6000fd5b507f150b7a02000000000000000000000000000000000000000000000000000000009998505050505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff16331461065e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b8281146106c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536f6469756d3a206c656e67746820697320646966666572656e7400000000006044820152606401610655565b60005b838110156107eb5760008585838181106106e6576106e6612a01565b90506020020160208101906106fb919061284f565b73ffffffffffffffffffffffffffffffffffffffff1603610778576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f536f6469756d3a2061646472657373206973207a65726f0000000000000000006044820152606401610655565b82828281811061078a5761078a612a01565b90506020020135600260008787858181106107a7576107a7612a01565b90506020020160208101906107bc919061284f565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020556001016106ca565b7fa0013a8bc1eae5ca3a45ea92da758e961613b5a459a15e462887277e939beabc858585856040516108209493929190612a86565b60405180910390a15050505050565b60065473ffffffffffffffffffffffffffffffffffffffff1633146108b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b600a55565b60065473ffffffffffffffffffffffffffffffffffffffff163314610936576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b61093e611bee565b565b60065473ffffffffffffffffffffffffffffffffffffffff1633146109c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b6109ca82611c6b565b6005546040517f2ac9bf0900000000000000000000000000000000000000000000000000000000815260048101859052602481018490526044810183905273ffffffffffffffffffffffffffffffffffffffff90911690632ac9bf09906064015b600060405180830381600087803b158015610a4557600080fd5b505af1158015610a59573d6000803e3d6000fd5b50505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff163314610ae3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b610aec81611d74565b600480546040517f199de1e200000000000000000000000000000000000000000000000000000000815291820184905273ffffffffffffffffffffffffffffffffffffffff169063199de1e2906024015b600060405180830381600087803b158015610b5757600080fd5b505af1158015610b6b573d6000803e3d6000fd5b505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff163314610bf4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b60005b83811015610d8a57612710838383818110610c1457610c14612a01565b905060400201602001351115610c86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536f6469756d3a204c5456206973206d6f7265207468616e20313030303000006044820152606401610655565b612710838383818110610c9b57610c9b612a01565b905060400201600001351115610d0d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536f6469756d3a20415052206973206d6f7265207468616e20313030303000006044820152606401610655565b828282818110610d1f57610d1f612a01565b90506040020160016000878785818110610d3b57610d3b612a01565b9050602002016020810190610d50919061284f565b73ffffffffffffffffffffffffffffffffffffffff1681526020808201929092526040016000208235815591013560019182015501610bf7565b5060005b85811015610dfb5760016000888884818110610dac57610dac612a01565b9050602002016020810190610dc1919061284f565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600090812081815560019081019190915501610d8e565b7f8f5f98ff0cb9cdd1a2c940ee7df8a54ea1ad774411824abf6a1bb289ebc9b6c085858585604051610e309493929190612aeb565b60405180910390a17f9d2f2f70f0fee3ff057432a51c9a7acf0001eb192c5e83fac018821e1cd907028787604051610e69929190612b47565b60405180910390a150505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff163314610efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b610f06333083611dd9565b6040518181527fb717f334fd9397b0ca63334c6c40e78d87ceded8e3f1c094884a74bd0e126720906020015b60405180910390a150565b60065473ffffffffffffffffffffffffffffffffffffffff163314610fbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b61093e611fb1565b6000610fd061200e565b60055473ffffffffffffffffffffffffffffffffffffffff1633148061100d575060045473ffffffffffffffffffffffffffffffffffffffff1633145b611073576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f536f6469756d3a206d616e61676572206f6e6c790000000000000000000000006044820152606401610655565b6009546fffffffffffffffffffffffffffffffff168311156110f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536f6469756d3a206c656e67746820697320746f6f206c6f6e670000000000006044820152606401610655565b73ffffffffffffffffffffffffffffffffffffffff871660009081526001602081905260408220908101549091036111ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f536f6469756d3a20636f6c6c656374696f6e206973206e6f7420737570706f7260448201527f74656400000000000000000000000000000000000000000000000000000000006064820152608401610655565b60006111b78985612081565b905060006111c983600101548361229a565b905080881115611235576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536f6469756d3a206c6971756964697479206c696d69742070617373656400006044820152606401610655565b611240308a8a611dd9565b61124a8888612b92565b9650808711156112b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f536f6469756d3a20706f6f6c206c7476206578636565646564000000000000006044820152606401610655565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815232600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa158015611324573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113489190612ba5565b60010361135b5760009350505050611361565b50505490505b9695505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff1633146113ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b6113f581611c6b565b6005546040517f199de1e20000000000000000000000000000000000000000000000000000000081526004810184905273ffffffffffffffffffffffffffffffffffffffff9091169063199de1e290602401610b3d565b60065473ffffffffffffffffffffffffffffffffffffffff1633146114cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b6114d682611d74565b600480546040517f2ac9bf09000000000000000000000000000000000000000000000000000000008152918201859052602482018490526044820183905273ffffffffffffffffffffffffffffffffffffffff1690632ac9bf0990606401610a2b565b60065473ffffffffffffffffffffffffffffffffffffffff1633146115ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b6115c381611c6b565b6005546040517fefef39a10000000000000000000000000000000000000000000000000000000081526004810184905273ffffffffffffffffffffffffffffffffffffffff9091169063efef39a190602401610b3d565b60065473ffffffffffffffffffffffffffffffffffffffff16331461169b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b6116a481611d74565b600480546040517fefef39a100000000000000000000000000000000000000000000000000000000815291820184905273ffffffffffffffffffffffffffffffffffffffff169063efef39a190602401610b3d565b6006546040517ff242432a000000000000000000000000000000000000000000000000000000008152600091339163f242432a9161175a91309173ffffffffffffffffffffffffffffffffffffffff16908a908a908a908a90600401612bbe565b600060405180830381600087803b15801561177457600080fd5b505af1158015611788573d6000803e3d6000fd5b507ff23a6e61000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff163314611839576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b73ffffffffffffffffffffffffffffffffffffffff81166118dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610655565b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60065473ffffffffffffffffffffffffffffffffffffffff1633146119d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b60075460408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd0e30db000000000000000000000000000000000000000000000000000000000179052905160009273ffffffffffffffffffffffffffffffffffffffff16913491611a559190612c10565b60006040518083038185875af1925050503d8060008114611a92576040519150601f19603f3d011682016040523d82523d6000602084013e611a97565b606091505b5050905080611b02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f536f6469756d3a206661696c656420746f2073656e64000000000000000000006044820152606401610655565b6040513481527fb717f334fd9397b0ca63334c6c40e78d87ceded8e3f1c094884a74bd0e12672090602001610f32565b60065473ffffffffffffffffffffffffffffffffffffffff163314611bb3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b611bbe303383611dd9565b6040518181527f1555eeab2cac0e5647edfaaccf2c080684af90cab5c582fbd5fa6e4da218e97890602001610f32565b611bf66122ba565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6007546005546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201526024810184905291169063095ea7b3906044015b6020604051808303816000875af1158015611ce7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0b9190612c3f565b611d71576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f536f6469756d3a206661696c656420746f2073657420616c6c6f77616e6365006044820152606401610655565b50565b600754600480546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821692810192909252602482018490529091169063095ea7b390604401611cc8565b60003073ffffffffffffffffffffffffffffffffffffffff851603611e9c576007546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529091169063a9059cbb906044016020604051808303816000875af1158015611e71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e959190612c3f565b9050611f44565b6007546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152858116602483015260448201859052909116906323b872dd906064016020604051808303816000875af1158015611f1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f419190612c3f565b90505b80611fab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f536f6469756d3a206661696c656420746f2073656e64000000000000000000006044820152606401610655565b50505050565b611fb961200e565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff16620100001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611c413390565b60005462010000900460ff161561093e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610655565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040812054156120d8575073ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902054612294565b600b54604080517f62dbd10a8cc75566a581b428054327e66bbbfb7507580500ddf135686a04fc0d6020820152600191810191909152606081019190915273ffffffffffffffffffffffffffffffffffffffff8416608082015260009060a001604051602081830303815290604052805190602001209050612163818461215e90612d3b565b61232c565b6121ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f536f6469756d3a207061796c6f6164206973206e6f74207369676e656420627960448201527f206f7261636c65000000000000000000000000000000000000000000000000006064820152608401610655565b6000806121ff6020860186612dd5565b81019061220c9190612e3a565b909250905073ffffffffffffffffffffffffffffffffffffffff82161561228f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536f6469756d3a2063757272656e63792073686f756c642062652045544800006044820152606401610655565b925050505b92915050565b60006127106122a98484612e66565b6122b39190612ea3565b9392505050565b60005462010000900460ff1661093e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610655565b8051600090831461233f57506000612294565b4282604001511180612361575042600a54836040015161235f9190612b92565b105b1561236e57506000612294565b6000806000808560600151905080516040036123c357602081015160408201519094507f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116935060ff1c601b0191506123f6565b80516041036123e9576020810151935060408101519250606081015160001a91506123f6565b6000945050505050612294565b600060017f395537e76dcb230984fc10f328a95df716a3205146e2e10a6b1405dc0a67059388600001518960200151805190602001208a6040015160405160200161245a949392919093845260208401929092526040830152606082015260800190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff861690820152606081018790526080810186905260a0016020604051602081039080840390855afa15801561253d573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015160085473ffffffffffffffffffffffffffffffffffffffff9081169116149998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114611d7157600080fd5b60008083601f8401126125c457600080fd5b50813567ffffffffffffffff8111156125dc57600080fd5b6020830191508360208285010111156125f457600080fd5b9250929050565b60008060008060006080868803121561261357600080fd5b853561261e81612590565b9450602086013561262e81612590565b935060408601359250606086013567ffffffffffffffff81111561265157600080fd5b61265d888289016125b2565b969995985093965092949392505050565b60008083601f84011261268057600080fd5b50813567ffffffffffffffff81111561269857600080fd5b6020830191508360208260051b85010111156125f457600080fd5b600080600080604085870312156126c957600080fd5b843567ffffffffffffffff808211156126e157600080fd5b6126ed8883890161266e565b9096509450602087013591508082111561270657600080fd5b506127138782880161266e565b95989497509550505050565b60006020828403121561273157600080fd5b5035919050565b60008060006060848603121561274d57600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561277757600080fd5b50508035926020909101359150565b6000806000806000806060878903121561279f57600080fd5b863567ffffffffffffffff808211156127b757600080fd5b6127c38a838b0161266e565b909850965060208901359150808211156127dc57600080fd5b6127e88a838b0161266e565b9096509450604089013591508082111561280157600080fd5b818901915089601f83011261281557600080fd5b81358181111561282457600080fd5b8a60208260061b850101111561283957600080fd5b6020830194508093505050509295509295509295565b60006020828403121561286157600080fd5b81356122b381612590565b60008060008060008060c0878903121561288557600080fd5b863561289081612590565b955060208701356128a081612590565b945060408701359350606087013592506080870135915060a087013567ffffffffffffffff8111156128d157600080fd5b87016080818a0312156128e357600080fd5b809150509295509295509295565b60008060008060008060a0878903121561290a57600080fd5b863561291581612590565b9550602087013561292581612590565b94506040870135935060608701359250608087013567ffffffffffffffff81111561294f57600080fd5b61295b89828a016125b2565b979a9699509497509295939492505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600073ffffffffffffffffffffffffffffffffffffffff8088168352808716602084015250846040830152608060608301526129f660808301848661296d565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8183526000602080850194508260005b85811015612a7b578135612a5381612590565b73ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101612a40565b509495945050505050565b604081526000612a9a604083018688612a30565b82810360208401528381527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff841115612ad257600080fd5b8360051b80866020840137016020019695505050505050565b60006040808352612aff8184018789612a30565b8381036020858101919091528582528691810160005b87811015612b39578335825282840135838301529284019290840190600101612b15565b509998505050505050505050565b602081526000612b5b602083018486612a30565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561229457612294612b63565b600060208284031215612bb757600080fd5b5051919050565b600073ffffffffffffffffffffffffffffffffffffffff808916835280881660208401525085604083015284606083015260a06080830152612c0460a08301848661296d565b98975050505050505050565b6000825160005b81811015612c315760208186018101518583015201612c17565b506000920191825250919050565b600060208284031215612c5157600080fd5b815180151581146122b357600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112612ca157600080fd5b813567ffffffffffffffff80821115612cbc57612cbc612c61565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715612d0257612d02612c61565b81604052838152866020858801011115612d1b57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060808236031215612d4d57600080fd5b6040516080810167ffffffffffffffff8282108183111715612d7157612d71612c61565b81604052843583526020850135915080821115612d8d57600080fd5b612d9936838701612c90565b6020840152604085013560408401526060850135915080821115612dbc57600080fd5b50612dc936828601612c90565b60608301525092915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612e0a57600080fd5b83018035915067ffffffffffffffff821115612e2557600080fd5b6020019150368190038213156125f457600080fd5b60008060408385031215612e4d57600080fd5b8235612e5881612590565b946020939093013593505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612e9e57612e9e612b63565b500290565b600082612ed9577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea26469706673582212208b147ba9ebfd893ef3db96312562d3de02ee7a7b3beb16dc6d4cd30cc6c2462d64736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000fefe4eeff35e3f9488388dd56b645cc90303b574000000000000000000000000aeb1d03929bf87f69888f381e73fbf75753d75af000000000000000000000000616b179c6fbc931f2d3b9b6d5b4e107ec8c713df000000000000000000000000270bf28dfb9088f0656311ada8e230d929a50766000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000015180000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : initializeStruct_ (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [1] : floorPriceLifetime_ (uint128): 86400
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 000000000000000000000000fefe4eeff35e3f9488388dd56b645cc90303b574
Arg [1] : 000000000000000000000000aeb1d03929bf87f69888f381e73fbf75753d75af
Arg [2] : 000000000000000000000000616b179c6fbc931f2d3b9b6d5b4e107ec8c713df
Arg [3] : 000000000000000000000000270bf28dfb9088f0656311ada8e230d929a50766
Arg [4] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [5] : 0000000000000000000000000000000000000000000000000000000000015180
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000000
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.