Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
16824890 | 715 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
StrategyCollectionOffer
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 888888 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; // Libraries import {OrderStructs} from "../libraries/OrderStructs.sol"; // OpenZeppelin's library for verifying Merkle proofs import {MerkleProofMemory} from "../libraries/OpenZeppelin/MerkleProofMemory.sol"; // Enums import {QuoteType} from "../enums/QuoteType.sol"; // Shared errors import {OrderInvalid, FunctionSelectorInvalid, MerkleProofInvalid, QuoteTypeInvalid} from "../errors/SharedErrors.sol"; // Base strategy contracts import {BaseStrategy, IStrategy} from "./BaseStrategy.sol"; /** * @title StrategyCollectionOffer * @notice This contract offers execution strategies for users to create maker bid offers for items in a collection. * There are two available functions: * 1. executeCollectionStrategyWithTakerAsk --> it applies to all itemIds in a collection * 2. executeCollectionStrategyWithTakerAskWithProof --> it allows adding merkle proof criteria. * @notice The bidder can only bid on 1 item id at a time. * 1. If ERC721, the amount must be 1. * 2. If ERC1155, the amount can be greater than 1. * @dev Use cases can include trait-based offers or rarity score offers. * @author LooksRare protocol team (👀,💎) */ contract StrategyCollectionOffer is BaseStrategy { /** * @notice This function validates the order under the context of the chosen strategy and * returns the fulfillable items/amounts/price/nonce invalidation status. * This strategy executes a collection offer against a taker ask order without the need of merkle proofs. * @param takerAsk Taker ask struct (taker ask-specific parameters for the execution) * @param makerBid Maker bid struct (maker bid-specific parameters for the execution) */ function executeCollectionStrategyWithTakerAsk( OrderStructs.Taker calldata takerAsk, OrderStructs.Maker calldata makerBid ) external pure returns (uint256 price, uint256[] memory itemIds, uint256[] calldata amounts, bool isNonceInvalidated) { price = makerBid.price; amounts = makerBid.amounts; // A collection order can only be executable for 1 itemId but quantity to fill can vary if (amounts.length != 1) { revert OrderInvalid(); } uint256 offeredItemId = abi.decode(takerAsk.additionalParameters, (uint256)); itemIds = new uint256[](1); itemIds[0] = offeredItemId; isNonceInvalidated = true; } /** * @notice This function validates the order under the context of the chosen strategy * and returns the fulfillable items/amounts/price/nonce invalidation status. * This strategy executes a collection offer against a taker ask order with the need of a merkle proof. * @param takerAsk Taker ask struct (taker ask-specific parameters for the execution) * @param makerBid Maker bid struct (maker bid-specific parameters for the execution) * @dev The transaction reverts if the maker does not include a merkle root in the additionalParameters. */ function executeCollectionStrategyWithTakerAskWithProof( OrderStructs.Taker calldata takerAsk, OrderStructs.Maker calldata makerBid ) external pure returns (uint256 price, uint256[] memory itemIds, uint256[] calldata amounts, bool isNonceInvalidated) { price = makerBid.price; amounts = makerBid.amounts; // A collection order can only be executable for 1 itemId but the actual quantity to fill can vary if (amounts.length != 1) { revert OrderInvalid(); } (uint256 offeredItemId, bytes32[] memory proof) = abi.decode( takerAsk.additionalParameters, (uint256, bytes32[]) ); itemIds = new uint256[](1); itemIds[0] = offeredItemId; isNonceInvalidated = true; bytes32 root = abi.decode(makerBid.additionalParameters, (bytes32)); bytes32 node = keccak256(abi.encodePacked(offeredItemId)); // Verify the merkle root for the given merkle proof if (!MerkleProofMemory.verify(proof, root, node)) { revert MerkleProofInvalid(); } } /** * @inheritdoc IStrategy */ function isMakerOrderValid( OrderStructs.Maker calldata makerBid, bytes4 functionSelector ) external pure override returns (bool isValid, bytes4 errorSelector) { if ( functionSelector != StrategyCollectionOffer.executeCollectionStrategyWithTakerAskWithProof.selector && functionSelector != StrategyCollectionOffer.executeCollectionStrategyWithTakerAsk.selector ) { return (isValid, FunctionSelectorInvalid.selector); } if (makerBid.quoteType != QuoteType.Bid) { return (isValid, QuoteTypeInvalid.selector); } if (makerBid.amounts.length != 1) { return (isValid, OrderInvalid.selector); } _validateAmountNoRevert(makerBid.amounts[0], makerBid.collectionType); // If no root is provided or invalid length, it should be invalid. // @dev It does not mean the merkle root is valid against a specific itemId that exists in the collection. if ( functionSelector == StrategyCollectionOffer.executeCollectionStrategyWithTakerAskWithProof.selector && makerBid.additionalParameters.length != 32 ) { return (isValid, OrderInvalid.selector); } isValid = true; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /* * @dev error OrderInvalid() * Memory layout: * - 0x00: Left-padded selector (data begins at 0x1c) * Revert buffer is memory[0x1c:0x20] */ uint256 constant OrderInvalid_error_selector = 0x2e0c0f71; uint256 constant OrderInvalid_error_length = 0x04; /* * @dev error CurrencyInvalid() * Memory layout: * - 0x00: Left-padded selector (data begins at 0x1c) * Revert buffer is memory[0x1c:0x20] */ uint256 constant CurrencyInvalid_error_selector = 0x4f795487; uint256 constant CurrencyInvalid_error_length = 0x04; /* * @dev error OutsideOfTimeRange() * Memory layout: * - 0x00: Left-padded selector (data begins at 0x1c) * Revert buffer is memory[0x1c:0x20] */ uint256 constant OutsideOfTimeRange_error_selector = 0x7476320f; uint256 constant OutsideOfTimeRange_error_length = 0x04; /* * @dev error NoSelectorForStrategy() * Memory layout: * - 0x00: Left-padded selector (data begins at 0x1c) * Revert buffer is memory[0x1c:0x20] */ uint256 constant NoSelectorForStrategy_error_selector = 0xab984846; uint256 constant NoSelectorForStrategy_error_length = 0x04; uint256 constant Error_selector_offset = 0x1c; uint256 constant OneWord = 0x20;
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /** * @notice CollectionType is used in OrderStructs.Maker's collectionType to determine the collection type being traded. */ enum CollectionType { ERC721, ERC1155 }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /** * @notice QuoteType is used in OrderStructs.Maker's quoteType to determine whether the maker order is a bid or an ask. */ enum QuoteType { Bid, Ask }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /** * @notice It is returned if the amount is invalid. * For ERC721, any number that is not 1. For ERC1155, if amount is 0. */ error AmountInvalid(); /** * @notice It is returned if the ask price is too high for the bid user. */ error AskTooHigh(); /** * @notice It is returned if the bid price is too low for the ask user. */ error BidTooLow(); /** * @notice It is returned if the function cannot be called by the sender. */ error CallerInvalid(); /** * @notice It is returned if the currency is invalid. */ error CurrencyInvalid(); /** * @notice The function selector is invalid for this strategy implementation. */ error FunctionSelectorInvalid(); /** * @notice It is returned if there is either a mismatch or an error in the length of the array(s). */ error LengthsInvalid(); /** * @notice It is returned if the merkle proof provided is invalid. */ error MerkleProofInvalid(); /** * @notice It is returned if the length of the merkle proof provided is greater than tolerated. * @param length Proof length */ error MerkleProofTooLarge(uint256 length); /** * @notice It is returned if the order is permanently invalid. * There may be an issue with the order formatting. */ error OrderInvalid(); /** * @notice It is returned if the maker quote type is invalid. */ error QuoteTypeInvalid();
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; // Interfaces import {IStrategy} from "../interfaces/IStrategy.sol"; // Assembly constants import {OrderInvalid_error_selector} from "../constants/AssemblyConstants.sol"; // Libraries import {OrderStructs} from "../libraries/OrderStructs.sol"; // Enums import {CollectionType} from "../enums/CollectionType.sol"; /** * @title BaseStrategy * @author LooksRare protocol team (👀,💎) */ abstract contract BaseStrategy is IStrategy { /** * @inheritdoc IStrategy */ function isLooksRareV2Strategy() external pure override returns (bool) { return true; } /** * @dev This is equivalent to * if (amount == 0 || (amount != 1 && collectionType == 0)) { * return (0, OrderInvalid.selector); * } * @dev OrderInvalid_error_selector is a left-padded 4 bytes. If the error selector is returned * instead of reverting, the error selector needs to be right-padded by * 28 bytes. Therefore it needs to be left shifted by 28 x 8 = 224 bits. */ function _validateAmountNoRevert(uint256 amount, CollectionType collectionType) internal pure { assembly { if or(iszero(amount), and(xor(amount, 1), iszero(collectionType))) { mstore(0x00, 0x00) mstore(0x20, shl(224, OrderInvalid_error_selector)) return(0, 0x40) } } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; // Libraries import {OrderStructs} from "../libraries/OrderStructs.sol"; /** * @title IStrategy * @author LooksRare protocol team (👀,💎) */ interface IStrategy { /** * @notice Validate *only the maker* order under the context of the chosen strategy. It does not revert if * the maker order is invalid. Instead it returns false and the error's 4 bytes selector. * @param makerOrder Maker struct (maker specific parameters for the execution) * @param functionSelector Function selector for the strategy * @return isValid Whether the maker struct is valid * @return errorSelector If isValid is false, it returns the error's 4 bytes selector */ function isMakerOrderValid( OrderStructs.Maker calldata makerOrder, bytes4 functionSelector ) external view returns (bool isValid, bytes4 errorSelector); /** * @notice This function acts as a safety check for the protocol's owner when adding new execution strategies. * @return isStrategy Whether it is a LooksRare V2 protocol strategy */ function isLooksRareV2Strategy() external pure returns (bool isStrategy); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /** * @title MerkleProofMemory * @notice This library is adjusted from the work of OpenZeppelin. * It is based on the 4.7.0 (utils/cryptography/MerkleProof.sol). * @author OpenZeppelin (adjusted by LooksRare) */ library MerkleProofMemory { /** * @notice This returns true if a `leaf` can be proved to be a part of a Merkle tree defined by `root`. * For this, a `proof` must be provided, containing sibling hashes on the branch from the leaf to the * root of the tree. Each pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @notice This returns the rebuilt hash obtained by traversing a Merkle tree up from `leaf` using `proof`. * A `proof` is valid if and only if the rebuilt hash matches the root of the tree. * When processing the proof, the pairs of leafs & pre-images are assumed to be sorted. */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; uint256 length = proof.length; for (uint256 i = 0; i < length; ) { computedHash = _hashPair(computedHash, proof[i]); unchecked { ++i; } } return computedHash; } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; // Enums import {CollectionType} from "../enums/CollectionType.sol"; import {QuoteType} from "../enums/QuoteType.sol"; /** * @title OrderStructs * @notice This library contains all order struct types for the LooksRare protocol (v2). * @author LooksRare protocol team (👀,💎) */ library OrderStructs { /** * 1. Maker struct */ /** * @notice Maker is the struct for a maker order. * @param quoteType Quote type (i.e. 0 = BID, 1 = ASK) * @param globalNonce Global user order nonce for maker orders * @param subsetNonce Subset nonce (shared across bid/ask maker orders) * @param orderNonce Order nonce (it can be shared across bid/ask maker orders) * @param strategyId Strategy id * @param collectionType Collection type (i.e. 0 = ERC721, 1 = ERC1155) * @param collection Collection address * @param currency Currency address (@dev address(0) = ETH) * @param signer Signer address * @param startTime Start timestamp * @param endTime End timestamp * @param price Minimum price for maker ask, maximum price for maker bid * @param itemIds Array of itemIds * @param amounts Array of amounts * @param additionalParameters Extra data specific for the order */ struct Maker { QuoteType quoteType; uint256 globalNonce; uint256 subsetNonce; uint256 orderNonce; uint256 strategyId; CollectionType collectionType; address collection; address currency; address signer; uint256 startTime; uint256 endTime; uint256 price; uint256[] itemIds; uint256[] amounts; bytes additionalParameters; } /** * 2. Taker struct */ /** * @notice Taker is the struct for a taker ask/bid order. It contains the parameters required for a direct purchase. * @dev Taker struct is matched against MakerAsk/MakerBid structs at the protocol level. * @param recipient Recipient address (to receive NFTs or non-fungible tokens) * @param additionalParameters Extra data specific for the order */ struct Taker { address recipient; bytes additionalParameters; } /** * 3. Merkle tree struct */ enum MerkleTreeNodePosition { Left, Right } /** * @notice MerkleTreeNode is a MerkleTree's node. * @param value It can be an order hash or a proof * @param position The node's position in its branch. * It can be left or right or none * (before the tree is sorted). */ struct MerkleTreeNode { bytes32 value; MerkleTreeNodePosition position; } /** * @notice MerkleTree is the struct for a merkle tree of order hashes. * @dev A Merkle tree can be computed with order hashes. * It can contain order hashes from both maker bid and maker ask structs. * @param root Merkle root * @param proof Array containing the merkle proof */ struct MerkleTree { bytes32 root; MerkleTreeNode[] proof; } /** * 4. Constants */ /** * @notice This is the type hash constant used to compute the maker order hash. */ bytes32 internal constant _MAKER_TYPEHASH = keccak256( "Maker(" "uint8 quoteType," "uint256 globalNonce," "uint256 subsetNonce," "uint256 orderNonce," "uint256 strategyId," "uint8 collectionType," "address collection," "address currency," "address signer," "uint256 startTime," "uint256 endTime," "uint256 price," "uint256[] itemIds," "uint256[] amounts," "bytes additionalParameters" ")" ); /** * 5. Hash functions */ /** * @notice This function is used to compute the order hash for a maker struct. * @param maker Maker order struct * @return makerHash Hash of the maker struct */ function hash(Maker memory maker) internal pure returns (bytes32) { // Encoding is done into two parts to avoid stack too deep issues return keccak256( bytes.concat( abi.encode( _MAKER_TYPEHASH, maker.quoteType, maker.globalNonce, maker.subsetNonce, maker.orderNonce, maker.strategyId, maker.collectionType, maker.collection, maker.currency ), abi.encode( maker.signer, maker.startTime, maker.endTime, maker.price, keccak256(abi.encodePacked(maker.itemIds)), keccak256(abi.encodePacked(maker.amounts)), keccak256(maker.additionalParameters) ) ) ); } }
{ "remappings": [ "@chainlink/=node_modules/@chainlink/", "@ensdomains/=node_modules/@ensdomains/", "@eth-optimism/=node_modules/@eth-optimism/", "@looksrare/=node_modules/@looksrare/", "@openzeppelin/=node_modules/@openzeppelin/", "ds-test/=lib/forge-std/lib/ds-test/src/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "forge-std/=lib/forge-std/src/", "hardhat/=node_modules/hardhat/", "murky/=lib/murky/src/", "openzeppelin-contracts/=lib/murky/lib/openzeppelin-contracts/", "solmate/=node_modules/solmate/" ], "optimizer": { "enabled": true, "runs": 888888 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"MerkleProofInvalid","type":"error"},{"inputs":[],"name":"OrderInvalid","type":"error"},{"inputs":[{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bytes","name":"additionalParameters","type":"bytes"}],"internalType":"struct OrderStructs.Taker","name":"takerAsk","type":"tuple"},{"components":[{"internalType":"enum QuoteType","name":"quoteType","type":"uint8"},{"internalType":"uint256","name":"globalNonce","type":"uint256"},{"internalType":"uint256","name":"subsetNonce","type":"uint256"},{"internalType":"uint256","name":"orderNonce","type":"uint256"},{"internalType":"uint256","name":"strategyId","type":"uint256"},{"internalType":"enum CollectionType","name":"collectionType","type":"uint8"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256[]","name":"itemIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"additionalParameters","type":"bytes"}],"internalType":"struct OrderStructs.Maker","name":"makerBid","type":"tuple"}],"name":"executeCollectionStrategyWithTakerAsk","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256[]","name":"itemIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bool","name":"isNonceInvalidated","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bytes","name":"additionalParameters","type":"bytes"}],"internalType":"struct OrderStructs.Taker","name":"takerAsk","type":"tuple"},{"components":[{"internalType":"enum QuoteType","name":"quoteType","type":"uint8"},{"internalType":"uint256","name":"globalNonce","type":"uint256"},{"internalType":"uint256","name":"subsetNonce","type":"uint256"},{"internalType":"uint256","name":"orderNonce","type":"uint256"},{"internalType":"uint256","name":"strategyId","type":"uint256"},{"internalType":"enum CollectionType","name":"collectionType","type":"uint8"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256[]","name":"itemIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"additionalParameters","type":"bytes"}],"internalType":"struct OrderStructs.Maker","name":"makerBid","type":"tuple"}],"name":"executeCollectionStrategyWithTakerAskWithProof","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256[]","name":"itemIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bool","name":"isNonceInvalidated","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"isLooksRareV2Strategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"enum QuoteType","name":"quoteType","type":"uint8"},{"internalType":"uint256","name":"globalNonce","type":"uint256"},{"internalType":"uint256","name":"subsetNonce","type":"uint256"},{"internalType":"uint256","name":"orderNonce","type":"uint256"},{"internalType":"uint256","name":"strategyId","type":"uint256"},{"internalType":"enum CollectionType","name":"collectionType","type":"uint8"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256[]","name":"itemIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"additionalParameters","type":"bytes"}],"internalType":"struct OrderStructs.Maker","name":"makerBid","type":"tuple"},{"internalType":"bytes4","name":"functionSelector","type":"bytes4"}],"name":"isMakerOrderValid","outputs":[{"internalType":"bool","name":"isValid","type":"bool"},{"internalType":"bytes4","name":"errorSelector","type":"bytes4"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50610a5d806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806345b2b381146100515780637e8971471461006557806384ad8c47146100895780639e97d1931461009c575b600080fd5b604051600181526020015b60405180910390f35b610078610073366004610617565b6100e7565b60405161005c959493929190610683565b610078610097366004610617565b6101ad565b6100af6100aa366004610728565b610306565b6040805192151583527fffffffff0000000000000000000000000000000000000000000000000000000090911660208301520161005c565b6101608101356060366000806101016101a087018761079f565b909350915060018214610140576040517f2e0c0f7100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061014f6020890189610807565b81019061015c919061086c565b604080516001808252818301909252919250602080830190803683370190505094508085600081518110610192576101926108b4565b60200260200101818152505060019150509295509295909350565b6101608101356060366000806101c76101a087018761079f565b909350915060018214610206576040517f2e0c0f7100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061021660208a018a610807565b81019061022391906108e3565b60408051600180825281830190925292945090925060208083019080368337019050509550818660008151811061025c5761025c6108b4565b602090810291909101015260019250600061027b6101c08a018a610807565b810190610288919061086c565b905060008360405160200161029f91815260200190565b6040516020818303038152906040528051906020012090506102c283838361052d565b6102f8576040517fc8ac23c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050509295509295909350565b6000807fffffffff0000000000000000000000000000000000000000000000000000000083167f84ad8c47000000000000000000000000000000000000000000000000000000001480159061039d57507fffffffff0000000000000000000000000000000000000000000000000000000083167f7e8971470000000000000000000000000000000000000000000000000000000014155b156103c957507f6314f89900000000000000000000000000000000000000000000000000000000610526565b60006103d86020860186610a0a565b60018111156103e9576103e96109cb565b1461041557507fd641ac7b00000000000000000000000000000000000000000000000000000000610526565b6104236101a085018561079f565b905060011461045357507f2e0c0f7100000000000000000000000000000000000000000000000000000000610526565b6104946104646101a086018661079f565b6000818110610475576104756108b4565b905060200201358560a001602081019061048f9190610a0a565b610543565b7fffffffff0000000000000000000000000000000000000000000000000000000083167f84ad8c47000000000000000000000000000000000000000000000000000000001480156104f557506104ee6101c0850185610807565b9050602014155b1561052157507f2e0c0f7100000000000000000000000000000000000000000000000000000000610526565b600191505b9250929050565b60008261053a8584610584565b14949350505050565b80156001831816821517156105805760008080527f2e0c0f7100000000000000000000000000000000000000000000000000000000602052604090f35b5050565b81516000908290825b818110156105c2576105b8838783815181106105ab576105ab6108b4565b60200260200101516105cc565b925060010161058d565b5090949350505050565b60008183106105e85760008281526020849052604090206105f7565b60008381526020839052604090205b9392505050565b60006101e0828403121561061157600080fd5b50919050565b6000806040838503121561062a57600080fd5b823567ffffffffffffffff8082111561064257600080fd5b908401906040828703121561065657600080fd5b9092506020840135908082111561066c57600080fd5b50610679858286016105fe565b9150509250929050565b600060808201878352602060808185015281885180845260a086019150828a01935060005b818110156106c4578451835293830193918301916001016106a8565b505084810360408601528681527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8711156106fe57600080fd5b8660051b925082888383013790910101905061071e606083018415159052565b9695505050505050565b6000806040838503121561073b57600080fd5b823567ffffffffffffffff81111561075257600080fd5b61075e858286016105fe565b92505060208301357fffffffff000000000000000000000000000000000000000000000000000000008116811461079457600080fd5b809150509250929050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126107d457600080fd5b83018035915067ffffffffffffffff8211156107ef57600080fd5b6020019150600581901b360382131561052657600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261083c57600080fd5b83018035915067ffffffffffffffff82111561085757600080fd5b60200191503681900382131561052657600080fd5b60006020828403121561087e57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080604083850312156108f657600080fd5b8235915060208084013567ffffffffffffffff8082111561091657600080fd5b818601915086601f83011261092a57600080fd5b81358181111561093c5761093c610885565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110858211171561097f5761097f610885565b60405291825284820192508381018501918983111561099d57600080fd5b938501935b828510156109bb578435845293850193928501926109a2565b8096505050505050509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028110610a0757600080fd5b50565b600060208284031215610a1c57600080fd5b81356105f7816109fa56fea2646970667358221220cbc2cc49434b05bd6dfbbf2c3793a4b543c4af794a489e6a4b613ec4e68613d864736f6c63430008110033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806345b2b381146100515780637e8971471461006557806384ad8c47146100895780639e97d1931461009c575b600080fd5b604051600181526020015b60405180910390f35b610078610073366004610617565b6100e7565b60405161005c959493929190610683565b610078610097366004610617565b6101ad565b6100af6100aa366004610728565b610306565b6040805192151583527fffffffff0000000000000000000000000000000000000000000000000000000090911660208301520161005c565b6101608101356060366000806101016101a087018761079f565b909350915060018214610140576040517f2e0c0f7100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061014f6020890189610807565b81019061015c919061086c565b604080516001808252818301909252919250602080830190803683370190505094508085600081518110610192576101926108b4565b60200260200101818152505060019150509295509295909350565b6101608101356060366000806101c76101a087018761079f565b909350915060018214610206576040517f2e0c0f7100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061021660208a018a610807565b81019061022391906108e3565b60408051600180825281830190925292945090925060208083019080368337019050509550818660008151811061025c5761025c6108b4565b602090810291909101015260019250600061027b6101c08a018a610807565b810190610288919061086c565b905060008360405160200161029f91815260200190565b6040516020818303038152906040528051906020012090506102c283838361052d565b6102f8576040517fc8ac23c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050509295509295909350565b6000807fffffffff0000000000000000000000000000000000000000000000000000000083167f84ad8c47000000000000000000000000000000000000000000000000000000001480159061039d57507fffffffff0000000000000000000000000000000000000000000000000000000083167f7e8971470000000000000000000000000000000000000000000000000000000014155b156103c957507f6314f89900000000000000000000000000000000000000000000000000000000610526565b60006103d86020860186610a0a565b60018111156103e9576103e96109cb565b1461041557507fd641ac7b00000000000000000000000000000000000000000000000000000000610526565b6104236101a085018561079f565b905060011461045357507f2e0c0f7100000000000000000000000000000000000000000000000000000000610526565b6104946104646101a086018661079f565b6000818110610475576104756108b4565b905060200201358560a001602081019061048f9190610a0a565b610543565b7fffffffff0000000000000000000000000000000000000000000000000000000083167f84ad8c47000000000000000000000000000000000000000000000000000000001480156104f557506104ee6101c0850185610807565b9050602014155b1561052157507f2e0c0f7100000000000000000000000000000000000000000000000000000000610526565b600191505b9250929050565b60008261053a8584610584565b14949350505050565b80156001831816821517156105805760008080527f2e0c0f7100000000000000000000000000000000000000000000000000000000602052604090f35b5050565b81516000908290825b818110156105c2576105b8838783815181106105ab576105ab6108b4565b60200260200101516105cc565b925060010161058d565b5090949350505050565b60008183106105e85760008281526020849052604090206105f7565b60008381526020839052604090205b9392505050565b60006101e0828403121561061157600080fd5b50919050565b6000806040838503121561062a57600080fd5b823567ffffffffffffffff8082111561064257600080fd5b908401906040828703121561065657600080fd5b9092506020840135908082111561066c57600080fd5b50610679858286016105fe565b9150509250929050565b600060808201878352602060808185015281885180845260a086019150828a01935060005b818110156106c4578451835293830193918301916001016106a8565b505084810360408601528681527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8711156106fe57600080fd5b8660051b925082888383013790910101905061071e606083018415159052565b9695505050505050565b6000806040838503121561073b57600080fd5b823567ffffffffffffffff81111561075257600080fd5b61075e858286016105fe565b92505060208301357fffffffff000000000000000000000000000000000000000000000000000000008116811461079457600080fd5b809150509250929050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126107d457600080fd5b83018035915067ffffffffffffffff8211156107ef57600080fd5b6020019150600581901b360382131561052657600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261083c57600080fd5b83018035915067ffffffffffffffff82111561085757600080fd5b60200191503681900382131561052657600080fd5b60006020828403121561087e57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080604083850312156108f657600080fd5b8235915060208084013567ffffffffffffffff8082111561091657600080fd5b818601915086601f83011261092a57600080fd5b81358181111561093c5761093c610885565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110858211171561097f5761097f610885565b60405291825284820192508381018501918983111561099d57600080fd5b938501935b828510156109bb578435845293850193928501926109a2565b8096505050505050509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028110610a0757600080fd5b50565b600060208284031215610a1c57600080fd5b81356105f7816109fa56fea2646970667358221220cbc2cc49434b05bd6dfbbf2c3793a4b543c4af794a489e6a4b613ec4e68613d864736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 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.