Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 712 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Unstake | 20451971 | 17 days ago | IN | 0 ETH | 0.00008913 | ||||
Unstake | 19695439 | 123 days ago | IN | 0 ETH | 0.00070012 | ||||
Stake | 19574470 | 140 days ago | IN | 0 ETH | 0.00295123 | ||||
Stake | 19235777 | 187 days ago | IN | 0 ETH | 0.0069539 | ||||
Unstake | 18386211 | 306 days ago | IN | 0 ETH | 0.00259878 | ||||
Stake | 18283806 | 321 days ago | IN | 0 ETH | 0.00120348 | ||||
Stake | 18149380 | 340 days ago | IN | 0 ETH | 0.00242075 | ||||
Unstake | 18119065 | 344 days ago | IN | 0 ETH | 0.00159418 | ||||
Stake | 18117100 | 344 days ago | IN | 0 ETH | 0.00178193 | ||||
Unstake | 17945069 | 368 days ago | IN | 0 ETH | 0.00125065 | ||||
Stake | 17944944 | 368 days ago | IN | 0 ETH | 0.00236415 | ||||
Stake | 17932664 | 370 days ago | IN | 0 ETH | 0.00188823 | ||||
Stake | 17932540 | 370 days ago | IN | 0 ETH | 0.00236424 | ||||
Unstake | 17927332 | 371 days ago | IN | 0 ETH | 0.0015508 | ||||
Unstake | 17864290 | 379 days ago | IN | 0 ETH | 0.00334285 | ||||
Stake | 17811833 | 387 days ago | IN | 0 ETH | 0.00140717 | ||||
Stake | 17698041 | 403 days ago | IN | 0 ETH | 0.00214215 | ||||
Stake | 17657388 | 408 days ago | IN | 0 ETH | 0.00238672 | ||||
Stake | 17597656 | 417 days ago | IN | 0 ETH | 0.00184767 | ||||
Stake | 17591418 | 418 days ago | IN | 0 ETH | 0.00211862 | ||||
Stake | 17591195 | 418 days ago | IN | 0 ETH | 0.00279575 | ||||
Unstake | 17582330 | 419 days ago | IN | 0 ETH | 0.00251171 | ||||
Stake | 17553955 | 423 days ago | IN | 0 ETH | 0.00216023 | ||||
Stake | 17551591 | 423 days ago | IN | 0 ETH | 0.00135802 | ||||
Stake | 17542859 | 425 days ago | IN | 0 ETH | 0.00565224 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x61ECa711...fF81fC1F5 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
SupremeSkullsStake
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "./tunnel/FxBaseRootTunnel.sol"; /** * Cross-bridge staking contract via fx-portal * Ethereum: source chain * Polygon: destination chain * * @title SupremeSkullsStake * @author @ScottMitchell18 */ contract SupremeSkullsStake is FxBaseRootTunnel, Ownable { IERC721Enumerable public nftAddress; bool public stakingPaused; /** * Users' staked tokens mapped from their address */ mapping(address => mapping(uint256 => bool)) public staked; constructor( address _checkpointManager, address _fxRoot, address _nftAddress ) FxBaseRootTunnel(_checkpointManager, _fxRoot) { nftAddress = IERC721Enumerable(_nftAddress); } /** * Stakes the given token ids, provided the contract is approved to move them. * @param tokenIds - the token ids to stake */ function stake(uint256[] calldata tokenIds) external { require(!stakingPaused, "Staking paused"); for (uint256 i; i < tokenIds.length; i++) { nftAddress.transferFrom(msg.sender, address(this), tokenIds[i]); staked[msg.sender][tokenIds[i]] = true; } _sendChildMessage(msg.sender, tokenIds.length, true); } /** * Unstakes the given token ids. * @param tokenIds - the token ids to unstake */ function unstake(uint256[] calldata tokenIds) external { for (uint256 i; i < tokenIds.length; i++) { require(staked[msg.sender][tokenIds[i]], "Not owned"); nftAddress.transferFrom(address(this), msg.sender, tokenIds[i]); staked[msg.sender][tokenIds[i]] = false; } _sendChildMessage(msg.sender, tokenIds.length, false); } /** * Set active state of staking protocol * @param paused - the state's new value. */ function setStakingPaused(bool paused) external onlyOwner { stakingPaused = paused; } /** * Set FxChildTunnel * @param _fxChildTunnel - the fxChildTunnel address */ function setFxChildTunnel(address _fxChildTunnel) public override onlyOwner { fxChildTunnel = _fxChildTunnel; } /** * Sends message the child contract * @param from - the user that staked/unstaked * @param count - the number staked/unstaked * @param isInbound - true if staking, false if unstaking */ function _sendChildMessage( address from, uint256 count, bool isInbound ) internal { _sendMessageToChild(abi.encode(from, count, isInbound)); } /** * A stub that does nothing. We will not anticipate receiving messages from Polygon, * we will only send messages to Polygon via FX-Portal. */ function _processMessageFromChild(bytes memory) internal override {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { 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.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {RLPReader} from "../lib/RLPReader.sol"; import {MerklePatriciaProof} from "../lib/MerklePatriciaProof.sol"; import {Merkle} from "../lib/Merkle.sol"; import "../lib/ExitPayloadReader.sol"; interface IFxStateSender { function sendMessageToChild(address _receiver, bytes calldata _data) external; } contract ICheckpointManager { struct HeaderBlock { bytes32 root; uint256 start; uint256 end; uint256 createdAt; address proposer; } /** * @notice mapping of checkpoint header numbers to block details * @dev These checkpoints are submited by plasma contracts */ mapping(uint256 => HeaderBlock) public headerBlocks; } abstract contract FxBaseRootTunnel { using RLPReader for RLPReader.RLPItem; using Merkle for bytes32; using ExitPayloadReader for bytes; using ExitPayloadReader for ExitPayloadReader.ExitPayload; using ExitPayloadReader for ExitPayloadReader.Log; using ExitPayloadReader for ExitPayloadReader.LogTopics; using ExitPayloadReader for ExitPayloadReader.Receipt; // keccak256(MessageSent(bytes)) bytes32 public constant SEND_MESSAGE_EVENT_SIG = 0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036; // state sender contract IFxStateSender public fxRoot; // root chain manager ICheckpointManager public checkpointManager; // child tunnel contract which receives and sends messages address public fxChildTunnel; // storage to avoid duplicate exits mapping(bytes32 => bool) public processedExits; constructor(address _checkpointManager, address _fxRoot) { checkpointManager = ICheckpointManager(_checkpointManager); fxRoot = IFxStateSender(_fxRoot); } // set fxChildTunnel if not set already function setFxChildTunnel(address _fxChildTunnel) public virtual { require( fxChildTunnel == address(0x0), "FxBaseRootTunnel: CHILD_TUNNEL_ALREADY_SET" ); fxChildTunnel = _fxChildTunnel; } /** * @notice Send bytes message to Child Tunnel * @param message bytes message that will be sent to Child Tunnel * some message examples - * abi.encode(tokenId); * abi.encode(tokenId, tokenMetadata); * abi.encode(messageType, messageData); */ function _sendMessageToChild(bytes memory message) internal { fxRoot.sendMessageToChild(fxChildTunnel, message); } function _validateAndExtractMessage(bytes memory inputData) internal returns (bytes memory) { ExitPayloadReader.ExitPayload memory payload = inputData .toExitPayload(); bytes memory branchMaskBytes = payload.getBranchMaskAsBytes(); uint256 blockNumber = payload.getBlockNumber(); // checking if exit has already been processed // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex) bytes32 exitHash = keccak256( abi.encodePacked( blockNumber, // first 2 nibbles are dropped while generating nibble array // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only) // so converting to nibble array and then hashing it MerklePatriciaProof._getNibbleArray(branchMaskBytes), payload.getReceiptLogIndex() ) ); require( processedExits[exitHash] == false, "FxRootTunnel: EXIT_ALREADY_PROCESSED" ); processedExits[exitHash] = true; ExitPayloadReader.Receipt memory receipt = payload.getReceipt(); ExitPayloadReader.Log memory log = receipt.getLog(); // check child tunnel require( fxChildTunnel == log.getEmitter(), "FxRootTunnel: INVALID_FX_CHILD_TUNNEL" ); bytes32 receiptRoot = payload.getReceiptRoot(); // verify receipt inclusion require( MerklePatriciaProof.verify( receipt.toBytes(), branchMaskBytes, payload.getReceiptProof(), receiptRoot ), "FxRootTunnel: INVALID_RECEIPT_PROOF" ); // verify checkpoint inclusion _checkBlockMembershipInCheckpoint( blockNumber, payload.getBlockTime(), payload.getTxRoot(), receiptRoot, payload.getHeaderNumber(), payload.getBlockProof() ); ExitPayloadReader.LogTopics memory topics = log.getTopics(); require( bytes32(topics.getField(0).toUint()) == SEND_MESSAGE_EVENT_SIG, // topic0 is event sig "FxRootTunnel: INVALID_SIGNATURE" ); // received message data bytes memory message = abi.decode(log.getData(), (bytes)); // event decodes params again, so decoding bytes to get message return message; } function _checkBlockMembershipInCheckpoint( uint256 blockNumber, uint256 blockTime, bytes32 txRoot, bytes32 receiptRoot, uint256 headerNumber, bytes memory blockProof ) private view returns (uint256) { ( bytes32 headerRoot, uint256 startBlock, , uint256 createdAt, ) = checkpointManager.headerBlocks(headerNumber); require( keccak256( abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot) ).checkMembership(blockNumber - startBlock, headerRoot, blockProof), "FxRootTunnel: INVALID_HEADER" ); return createdAt; } /** * @notice receive message from L2 to L1, validated by proof * @dev This function verifies if the transaction actually happened on child chain * * @param inputData RLP encoded data of the reference tx containing following list of fields * 0 - headerNumber - Checkpoint header block number containing the reference tx * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root * 2 - blockNumber - Block number containing the reference tx on child chain * 3 - blockTime - Reference tx block time * 4 - txRoot - Transactions root of block * 5 - receiptRoot - Receipts root of block * 6 - receipt - Receipt of the reference transaction * 7 - receiptProof - Merkle proof of the reference receipt * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree * 9 - receiptLogIndex - Log Index to read from the receipt */ function receiveMessage(bytes memory inputData) public virtual { bytes memory message = _validateAndExtractMessage(inputData); _processMessageFromChild(message); } /** * @notice Process message received from Child Tunnel * @dev function needs to be implemented to handle message as per requirement * This is called by onStateReceive function. * Since it is called via a system call, any event will not be emitted during its execution. * @param message bytes message that was sent from Child Tunnel */ function _processMessageFromChild(bytes memory message) internal virtual; }
// 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.6.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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * 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 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); }
/* * @author Hamdi Allam [email protected] * Please reach out with any questions or concerns */ pragma solidity ^0.8.0; library RLPReader { uint8 constant STRING_SHORT_START = 0x80; uint8 constant STRING_LONG_START = 0xb8; uint8 constant LIST_SHORT_START = 0xc0; uint8 constant LIST_LONG_START = 0xf8; uint8 constant WORD_SIZE = 32; struct RLPItem { uint256 len; uint256 memPtr; } struct Iterator { RLPItem item; // Item that's being iterated over. uint256 nextPtr; // Position of the next item in the list. } /* * @dev Returns the next element in the iteration. Reverts if it has not next element. * @param self The iterator. * @return The next element in the iteration. */ function next(Iterator memory self) internal pure returns (RLPItem memory) { require(hasNext(self)); uint256 ptr = self.nextPtr; uint256 itemLength = _itemLength(ptr); self.nextPtr = ptr + itemLength; return RLPItem(itemLength, ptr); } /* * @dev Returns true if the iteration has more elements. * @param self The iterator. * @return true if the iteration has more elements. */ function hasNext(Iterator memory self) internal pure returns (bool) { RLPItem memory item = self.item; return self.nextPtr < item.memPtr + item.len; } /* * @param item RLP encoded bytes */ function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) { uint256 memPtr; assembly { memPtr := add(item, 0x20) } return RLPItem(item.length, memPtr); } /* * @dev Create an iterator. Reverts if item is not a list. * @param self The RLP item. * @return An 'Iterator' over the item. */ function iterator(RLPItem memory self) internal pure returns (Iterator memory) { require(isList(self)); uint256 ptr = self.memPtr + _payloadOffset(self.memPtr); return Iterator(self, ptr); } /* * @param item RLP encoded bytes */ function rlpLen(RLPItem memory item) internal pure returns (uint256) { return item.len; } /* * @param item RLP encoded bytes */ function payloadLen(RLPItem memory item) internal pure returns (uint256) { return item.len - _payloadOffset(item.memPtr); } /* * @param item RLP encoded list in bytes */ function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) { require(isList(item)); uint256 items = numItems(item); RLPItem[] memory result = new RLPItem[](items); uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr); uint256 dataLen; for (uint256 i = 0; i < items; i++) { dataLen = _itemLength(memPtr); result[i] = RLPItem(dataLen, memPtr); memPtr = memPtr + dataLen; } return result; } // @return indicator whether encoded payload is a list. negate this function call for isData. function isList(RLPItem memory item) internal pure returns (bool) { if (item.len == 0) return false; uint8 byte0; uint256 memPtr = item.memPtr; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < LIST_SHORT_START) return false; return true; } /* * @dev A cheaper version of keccak256(toRlpBytes(item)) that avoids copying memory. * @return keccak256 hash of RLP encoded bytes. */ function rlpBytesKeccak256(RLPItem memory item) internal pure returns (bytes32) { uint256 ptr = item.memPtr; uint256 len = item.len; bytes32 result; assembly { result := keccak256(ptr, len) } return result; } function payloadLocation(RLPItem memory item) internal pure returns (uint256, uint256) { uint256 offset = _payloadOffset(item.memPtr); uint256 memPtr = item.memPtr + offset; uint256 len = item.len - offset; // data length return (memPtr, len); } /* * @dev A cheaper version of keccak256(toBytes(item)) that avoids copying memory. * @return keccak256 hash of the item payload. */ function payloadKeccak256(RLPItem memory item) internal pure returns (bytes32) { (uint256 memPtr, uint256 len) = payloadLocation(item); bytes32 result; assembly { result := keccak256(memPtr, len) } return result; } /** RLPItem conversions into data types **/ // @returns raw rlp encoding in bytes function toRlpBytes(RLPItem memory item) internal pure returns (bytes memory) { bytes memory result = new bytes(item.len); if (result.length == 0) return result; uint256 ptr; assembly { ptr := add(0x20, result) } copy(item.memPtr, ptr, item.len); return result; } // any non-zero byte is considered true function toBoolean(RLPItem memory item) internal pure returns (bool) { require(item.len == 1); uint256 result; uint256 memPtr = item.memPtr; assembly { result := byte(0, mload(memPtr)) } return result == 0 ? false : true; } function toAddress(RLPItem memory item) internal pure returns (address) { // 1 byte for the length prefix require(item.len == 21); return address(uint160(toUint(item))); } function toUint(RLPItem memory item) internal pure returns (uint256) { require(item.len > 0 && item.len <= 33); uint256 offset = _payloadOffset(item.memPtr); uint256 len = item.len - offset; uint256 result; uint256 memPtr = item.memPtr + offset; assembly { result := mload(memPtr) // shfit to the correct location if neccesary if lt(len, 32) { result := div(result, exp(256, sub(32, len))) } } return result; } // enforces 32 byte length function toUintStrict(RLPItem memory item) internal pure returns (uint256) { // one byte prefix require(item.len == 33); uint256 result; uint256 memPtr = item.memPtr + 1; assembly { result := mload(memPtr) } return result; } function toBytes(RLPItem memory item) internal pure returns (bytes memory) { require(item.len > 0); uint256 offset = _payloadOffset(item.memPtr); uint256 len = item.len - offset; // data length bytes memory result = new bytes(len); uint256 destPtr; assembly { destPtr := add(0x20, result) } copy(item.memPtr + offset, destPtr, len); return result; } /* * Private Helpers */ // @return number of payload items inside an encoded list. function numItems(RLPItem memory item) private pure returns (uint256) { if (item.len == 0) return 0; uint256 count = 0; uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr); uint256 endPtr = item.memPtr + item.len; while (currPtr < endPtr) { currPtr = currPtr + _itemLength(currPtr); // skip over an item count++; } return count; } // @return entire rlp item byte length function _itemLength(uint256 memPtr) private pure returns (uint256) { uint256 itemLen; uint256 byte0; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < STRING_SHORT_START) itemLen = 1; else if (byte0 < STRING_LONG_START) itemLen = byte0 - STRING_SHORT_START + 1; else if (byte0 < LIST_SHORT_START) { assembly { let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is memPtr := add(memPtr, 1) // skip over the first byte /* 32 byte word size */ let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len itemLen := add(dataLen, add(byteLen, 1)) } } else if (byte0 < LIST_LONG_START) { itemLen = byte0 - LIST_SHORT_START + 1; } else { assembly { let byteLen := sub(byte0, 0xf7) memPtr := add(memPtr, 1) let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length itemLen := add(dataLen, add(byteLen, 1)) } } return itemLen; } // @return number of bytes until the data function _payloadOffset(uint256 memPtr) private pure returns (uint256) { uint256 byte0; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < STRING_SHORT_START) return 0; else if (byte0 < STRING_LONG_START || (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)) return 1; else if (byte0 < LIST_SHORT_START) // being explicit return byte0 - (STRING_LONG_START - 1) + 1; else return byte0 - (LIST_LONG_START - 1) + 1; } /* * @param src Pointer to source * @param dest Pointer to destination * @param len Amount of memory to copy from the source */ function copy( uint256 src, uint256 dest, uint256 len ) private pure { if (len == 0) return; // copy as many word sizes as possible for (; len >= WORD_SIZE; len -= WORD_SIZE) { assembly { mstore(dest, mload(src)) } src += WORD_SIZE; dest += WORD_SIZE; } if (len == 0) return; // left over bytes. Mask is used to remove unwanted bytes from the word uint256 mask = 256**(WORD_SIZE - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) // zero out src let destpart := and(mload(dest), mask) // retrieve the bytes mstore(dest, or(destpart, srcpart)) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {RLPReader} from "./RLPReader.sol"; library MerklePatriciaProof { /* * @dev Verifies a merkle patricia proof. * @param value The terminating value in the trie. * @param encodedPath The path in the trie leading to value. * @param rlpParentNodes The rlp encoded stack of nodes. * @param root The root hash of the trie. * @return The boolean validity of the proof. */ function verify( bytes memory value, bytes memory encodedPath, bytes memory rlpParentNodes, bytes32 root ) internal pure returns (bool) { RLPReader.RLPItem memory item = RLPReader.toRlpItem(rlpParentNodes); RLPReader.RLPItem[] memory parentNodes = RLPReader.toList(item); bytes memory currentNode; RLPReader.RLPItem[] memory currentNodeList; bytes32 nodeKey = root; uint256 pathPtr = 0; bytes memory path = _getNibbleArray(encodedPath); if (path.length == 0) { return false; } for (uint256 i = 0; i < parentNodes.length; i++) { if (pathPtr > path.length) { return false; } currentNode = RLPReader.toRlpBytes(parentNodes[i]); if (nodeKey != keccak256(currentNode)) { return false; } currentNodeList = RLPReader.toList(parentNodes[i]); if (currentNodeList.length == 17) { if (pathPtr == path.length) { if (keccak256(RLPReader.toBytes(currentNodeList[16])) == keccak256(value)) { return true; } else { return false; } } uint8 nextPathNibble = uint8(path[pathPtr]); if (nextPathNibble > 16) { return false; } nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[nextPathNibble])); pathPtr += 1; } else if (currentNodeList.length == 2) { uint256 traversed = _nibblesToTraverse(RLPReader.toBytes(currentNodeList[0]), path, pathPtr); if (pathPtr + traversed == path.length) { //leaf node if (keccak256(RLPReader.toBytes(currentNodeList[1])) == keccak256(value)) { return true; } else { return false; } } //extension node if (traversed == 0) { return false; } pathPtr += traversed; nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[1])); } else { return false; } } } function _nibblesToTraverse( bytes memory encodedPartialPath, bytes memory path, uint256 pathPtr ) private pure returns (uint256) { uint256 len = 0; // encodedPartialPath has elements that are each two hex characters (1 byte), but partialPath // and slicedPath have elements that are each one hex character (1 nibble) bytes memory partialPath = _getNibbleArray(encodedPartialPath); bytes memory slicedPath = new bytes(partialPath.length); // pathPtr counts nibbles in path // partialPath.length is a number of nibbles for (uint256 i = pathPtr; i < pathPtr + partialPath.length; i++) { bytes1 pathNibble = path[i]; slicedPath[i - pathPtr] = pathNibble; } if (keccak256(partialPath) == keccak256(slicedPath)) { len = partialPath.length; } else { len = 0; } return len; } // bytes b must be hp encoded function _getNibbleArray(bytes memory b) internal pure returns (bytes memory) { bytes memory nibbles = ""; if (b.length > 0) { uint8 offset; uint8 hpNibble = uint8(_getNthNibbleOfBytes(0, b)); if (hpNibble == 1 || hpNibble == 3) { nibbles = new bytes(b.length * 2 - 1); bytes1 oddNibble = _getNthNibbleOfBytes(1, b); nibbles[0] = oddNibble; offset = 1; } else { nibbles = new bytes(b.length * 2 - 2); offset = 0; } for (uint256 i = offset; i < nibbles.length; i++) { nibbles[i] = _getNthNibbleOfBytes(i - offset + 2, b); } } return nibbles; } function _getNthNibbleOfBytes(uint256 n, bytes memory str) private pure returns (bytes1) { return bytes1(n % 2 == 0 ? uint8(str[n / 2]) / 0x10 : uint8(str[n / 2]) % 0x10); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library Merkle { function checkMembership( bytes32 leaf, uint256 index, bytes32 rootHash, bytes memory proof ) internal pure returns (bool) { require(proof.length % 32 == 0, "Invalid proof length"); uint256 proofHeight = proof.length / 32; // Proof of size n means, height of the tree is n+1. // In a tree of height n+1, max #leafs possible is 2 ^ n require(index < 2**proofHeight, "Leaf index is too big"); bytes32 proofElement; bytes32 computedHash = leaf; for (uint256 i = 32; i <= proof.length; i += 32) { assembly { proofElement := mload(add(proof, i)) } if (index % 2 == 0) { computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } index = index / 2; } return computedHash == rootHash; } }
pragma solidity ^0.8.0; import {RLPReader} from "./RLPReader.sol"; library ExitPayloadReader { using RLPReader for bytes; using RLPReader for RLPReader.RLPItem; uint8 constant WORD_SIZE = 32; struct ExitPayload { RLPReader.RLPItem[] data; } struct Receipt { RLPReader.RLPItem[] data; bytes raw; uint256 logIndex; } struct Log { RLPReader.RLPItem data; RLPReader.RLPItem[] list; } struct LogTopics { RLPReader.RLPItem[] data; } // copy paste of private copy() from RLPReader to avoid changing of existing contracts function copy( uint256 src, uint256 dest, uint256 len ) private pure { if (len == 0) return; // copy as many word sizes as possible for (; len >= WORD_SIZE; len -= WORD_SIZE) { assembly { mstore(dest, mload(src)) } src += WORD_SIZE; dest += WORD_SIZE; } // left over bytes. Mask is used to remove unwanted bytes from the word uint256 mask = 256**(WORD_SIZE - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) // zero out src let destpart := and(mload(dest), mask) // retrieve the bytes mstore(dest, or(destpart, srcpart)) } } function toExitPayload(bytes memory data) internal pure returns (ExitPayload memory) { RLPReader.RLPItem[] memory payloadData = data.toRlpItem().toList(); return ExitPayload(payloadData); } function getHeaderNumber(ExitPayload memory payload) internal pure returns (uint256) { return payload.data[0].toUint(); } function getBlockProof(ExitPayload memory payload) internal pure returns (bytes memory) { return payload.data[1].toBytes(); } function getBlockNumber(ExitPayload memory payload) internal pure returns (uint256) { return payload.data[2].toUint(); } function getBlockTime(ExitPayload memory payload) internal pure returns (uint256) { return payload.data[3].toUint(); } function getTxRoot(ExitPayload memory payload) internal pure returns (bytes32) { return bytes32(payload.data[4].toUint()); } function getReceiptRoot(ExitPayload memory payload) internal pure returns (bytes32) { return bytes32(payload.data[5].toUint()); } function getReceipt(ExitPayload memory payload) internal pure returns (Receipt memory receipt) { receipt.raw = payload.data[6].toBytes(); RLPReader.RLPItem memory receiptItem = receipt.raw.toRlpItem(); if (receiptItem.isList()) { // legacy tx receipt.data = receiptItem.toList(); } else { // pop first byte before parsting receipt bytes memory typedBytes = receipt.raw; bytes memory result = new bytes(typedBytes.length - 1); uint256 srcPtr; uint256 destPtr; assembly { srcPtr := add(33, typedBytes) destPtr := add(0x20, result) } copy(srcPtr, destPtr, result.length); receipt.data = result.toRlpItem().toList(); } receipt.logIndex = getReceiptLogIndex(payload); return receipt; } function getReceiptProof(ExitPayload memory payload) internal pure returns (bytes memory) { return payload.data[7].toBytes(); } function getBranchMaskAsBytes(ExitPayload memory payload) internal pure returns (bytes memory) { return payload.data[8].toBytes(); } function getBranchMaskAsUint(ExitPayload memory payload) internal pure returns (uint256) { return payload.data[8].toUint(); } function getReceiptLogIndex(ExitPayload memory payload) internal pure returns (uint256) { return payload.data[9].toUint(); } // Receipt methods function toBytes(Receipt memory receipt) internal pure returns (bytes memory) { return receipt.raw; } function getLog(Receipt memory receipt) internal pure returns (Log memory) { RLPReader.RLPItem memory logData = receipt.data[3].toList()[receipt.logIndex]; return Log(logData, logData.toList()); } // Log methods function getEmitter(Log memory log) internal pure returns (address) { return RLPReader.toAddress(log.list[0]); } function getTopics(Log memory log) internal pure returns (LogTopics memory) { return LogTopics(log.list[1].toList()); } function getData(Log memory log) internal pure returns (bytes memory) { return log.list[2].toBytes(); } function toRlpBytes(Log memory log) internal pure returns (bytes memory) { return log.data.toRlpBytes(); } // LogTopics methods function getField(LogTopics memory topics, uint256 index) internal pure returns (RLPReader.RLPItem memory) { return topics.data[index]; } }
{ "optimizer": { "enabled": true, "runs": 1000, "details": { "yul": false } }, "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":[{"internalType":"address","name":"_checkpointManager","type":"address"},{"internalType":"address","name":"_fxRoot","type":"address"},{"internalType":"address","name":"_nftAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"SEND_MESSAGE_EVENT_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"checkpointManager","outputs":[{"internalType":"contract ICheckpointManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fxChildTunnel","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fxRoot","outputs":[{"internalType":"contract IFxStateSender","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftAddress","outputs":[{"internalType":"contract IERC721Enumerable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"processedExits","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"inputData","type":"bytes"}],"name":"receiveMessage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fxChildTunnel","type":"address"}],"name":"setFxChildTunnel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"paused","type":"bool"}],"name":"setStakingPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"staked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063972c492811610097578063de9b771f11610066578063de9b771f14610257578063e449f3411461026a578063f2fde38b1461027d578063f953cec71461029057600080fd5b8063972c49281461020a578063aea4e49e1461021d578063bbb781cc14610230578063c0857ba01461024457600080fd5b8063607f2d42116100d3578063607f2d421461018a578063715018a6146101ba5780638da5cb5b146101c25780638f169816146101dc57600080fd5b80630e387de6146101055780630fbf0a931461014257806315b31bbb146101575780635bf8633a1461016a575b600080fd5b61012c7f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03681565b6040516101399190611b8e565b60405180910390f35b610155610150366004611bee565b6102a3565b005b610155610165366004611c50565b6103d2565b60055461017d906001600160a01b031681565b6040516101399190611ca1565b6101ad610198366004611cc0565b60036020526000908152604090205460ff1681565b6040516101399190611ce9565b610155610435565b6004546001600160a01b03165b6040516101399190611d00565b6101ad6101ea366004611d22565b600660209081526000928352604080842090915290825290205460ff1681565b6002546101cf906001600160a01b031681565b61015561022b366004611d5f565b61046b565b6005546101ad90600160a01b900460ff1681565b60015461017d906001600160a01b031681565b60005461017d906001600160a01b031681565b610155610278366004611bee565b6104c4565b61015561028b366004611d5f565b610617565b61015561029e366004611e7b565b610673565b600554600160a01b900460ff16156102d65760405162461bcd60e51b81526004016102cd90611eed565b60405180910390fd5b60005b818110156103c1576005546001600160a01b03166323b872dd333086868681811061030657610306611efd565b905060200201356040518463ffffffff1660e01b815260040161032b93929190611f13565b600060405180830381600087803b15801561034557600080fd5b505af1158015610359573d6000803e3d6000fd5b505033600090815260066020526040812060019350915085858581811061038257610382611efd565b90506020020135815260200190815260200160002060006101000a81548160ff02191690831515021790555080806103b990611f51565b9150506102d9565b506103ce33826001610683565b5050565b6004546001600160a01b031633146103fc5760405162461bcd60e51b81526004016102cd90611f9e565b60058054911515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b6004546001600160a01b0316331461045f5760405162461bcd60e51b81526004016102cd90611f9e565b61046960006106af565b565b6004546001600160a01b031633146104955760405162461bcd60e51b81526004016102cd90611f9e565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60005b8181101561060a57336000908152600660205260408120908484848181106104f1576104f1611efd565b602090810292909201358352508101919091526040016000205460ff1661052a5760405162461bcd60e51b81526004016102cd90611fe2565b6005546001600160a01b03166323b872dd303386868681811061054f5761054f611efd565b905060200201356040518463ffffffff1660e01b815260040161057493929190611f13565b600060405180830381600087803b15801561058e57600080fd5b505af11580156105a2573d6000803e3d6000fd5b50503360009081526006602052604081209092509050818585858181106105cb576105cb611efd565b90506020020135815260200190815260200160002060006101000a81548160ff021916908315150217905550808061060290611f51565b9150506104c7565b506103ce33826000610683565b6004546001600160a01b031633146106415760405162461bcd60e51b81526004016102cd90611f9e565b6001600160a01b0381166106675760405162461bcd60e51b81526004016102cd9061204f565b610670816106af565b50565b600061067e8261070e565b505050565b61067e83838360405160200161069b9392919061205f565b60405160208183030381529060405261090e565b600480546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060600061071b83610992565b90506000610728826109f1565b9050600061073583610a20565b905060008161074384610a49565b61074c86610c07565b60405160200161075e939291906120df565b60408051601f1981840301815291815281516020928301206000818152600390935291205490915060ff16156107a65760405162461bcd60e51b81526004016102cd9061216c565b6000818152600360205260408120805460ff191660011790556107c885610c23565b905060006107d582610d6d565b90506107e081610dfd565b6002546001600160a01b0390811691161461080d5760405162461bcd60e51b81526004016102cd906121d6565b600061081887610e26565b9050610838610828846020015190565b876108328a610e42565b84610e5e565b6108545760405162461bcd60e51b81526004016102cd90612240565b6108828561086189611115565b61086a8a611131565b846108748c61114d565b61087d8d611169565b611185565b50600061088e836112a6565b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b0366108c46108bf8360006112e2565b61131a565b146108e15760405162461bcd60e51b81526004016102cd90612284565b60006108ec84611395565b8060200190518101906108ff91906122ec565b9b9a5050505050505050505050565b6000546002546040517fb47204770000000000000000000000000000000000000000000000000000000081526001600160a01b039283169263b47204779261095d929116908590600401612359565b600060405180830381600087803b15801561097757600080fd5b505af115801561098b573d6000803e3d6000fd5b5050505050565b60408051602081019091526060815260006109dc6109d78460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b6113b1565b60408051602081019091529081529392505050565b6060610a1a8260000151600881518110610a0d57610a0d611efd565b60200260200101516114c7565b92915050565b6000610a1a8260000151600281518110610a3c57610a3c611efd565b602002602001015161131a565b60408051602081019091526000815281516060919015610a1a57600080610a71600086611564565b60f81c90506001811480610a8857508060ff166003145b15610b3057600185516002610a9d9190612379565b610aa79190612398565b67ffffffffffffffff811115610abf57610abf611d80565b6040519080825280601f01601f191660200182016040528015610ae9576020820181803683370190505b5092506000610af9600187611564565b90508084600081518110610b0f57610b0f611efd565b60200101906001600160f81b031916908160001a9053506001925050610b94565b600285516002610b409190612379565b610b4a9190612398565b67ffffffffffffffff811115610b6257610b62611d80565b6040519080825280601f01601f191660200182016040528015610b8c576020820181803683370190505b509250600091505b60ff82165b8351811015610bfe57610bc3610bb260ff851683612398565b610bbd9060026123b3565b87611564565b848281518110610bd557610bd5611efd565b60200101906001600160f81b031916908160001a90535080610bf681611f51565b915050610b99565b50505092915050565b6000610a1a8260000151600981518110610a3c57610a3c611efd565b610c4760405180606001604052806060815260200160608152602001600081525090565b610c618260000151600681518110610a0d57610a0d611efd565b602082810182905260408051808201825260008082529083015280518082019091528251815291810190820152610c97816115e5565b15610cac57610ca5816113b1565b8252610d59565b60208201518051600090610cc290600190612398565b67ffffffffffffffff811115610cda57610cda611d80565b6040519080825280601f01601f191660200182016040528015610d04576020820181803683370190505b509050600080836021019150826020019050610d228282855161161e565b604080518082018252600080825260209182015281518083019092528451825280850190820152610d52906113b1565b8652505050505b610d6283610c07565b604083015250919050565b604080516080810182526000918101828152606080830193909352815260208101919091526000610dbb8360000151600381518110610dae57610dae611efd565b60200260200101516113b1565b836040015181518110610dd057610dd0611efd565b602002602001015190506040518060400160405280828152602001610df4836113b1565b90529392505050565b6000610a1a8260200151600081518110610e1957610e19611efd565b6020026020010151611699565b6000610a1a8260000151600581518110610a3c57610a3c611efd565b6060610a1a8260000151600781518110610a0d57610a0d611efd565b600080610e928460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b90506000610e9f826113b1565b905060608085600080610eb18b610a49565b9050805160001415610ecd57600097505050505050505061110d565b60005b8651811015611104578151831115610ef35760009850505050505050505061110d565b610f15878281518110610f0857610f08611efd565b60200260200101516116b3565b955085805190602001208414610f365760009850505050505050505061110d565b610f4b878281518110610dae57610dae611efd565b9450845160111415611020578151831415610fad578c80519060200120610f7e86601081518110610a0d57610a0d611efd565b805190602001201415610f9c5760019850505050505050505061110d565b60009850505050505050505061110d565b6000828481518110610fc157610fc1611efd565b016020015160f81c90506010811115610fe6576000995050505050505050505061110d565b61100b868260ff1681518110610ffe57610ffe611efd565b6020026020010151611733565b94506110186001856123b3565b9350506110f2565b845160021415610f9c57600061104c61104587600081518110610a0d57610a0d611efd565b8486611761565b835190915061105b82866123b3565b14156110b0578d8051906020012061107f87600181518110610a0d57610a0d611efd565b80519060200120141561109e576001995050505050505050505061110d565b6000995050505050505050505061110d565b806110c7576000995050505050505050505061110d565b6110d181856123b3565b93506110e986600181518110610ffe57610ffe611efd565b94506110f29050565b806110fc81611f51565b915050610ed0565b50505050505050505b949350505050565b6000610a1a8260000151600381518110610a3c57610a3c611efd565b6000610a1a8260000151600481518110610a3c57610a3c611efd565b6000610a1a8260000151600081518110610a3c57610a3c611efd565b6060610a1a8260000151600181518110610a0d57610a0d611efd565b6001546040517f41539d4a0000000000000000000000000000000000000000000000000000000081526000918291829182916001600160a01b03909116906341539d4a906111d7908990600401611b8e565b60a06040518083038186803b1580156111ef57600080fd5b505afa158015611203573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122791906123e1565b509350509250925061127d828b61123e9190612398565b84878d8d8d8d6040516020016112579493929190612459565b60405160208183030381529060405280519060200120611884909392919063ffffffff16565b6112995760405162461bcd60e51b81526004016102cd906124d5565b9998505050505050505050565b60408051602081019091526060815260405180602001604052806112da8460200151600181518110610dae57610dae611efd565b905292915050565b6040805180820190915260008082526020820152825180518390811061130a5761130a611efd565b6020026020010151905092915050565b80516000901580159061132f57508151602110155b61133857600080fd5b60006113478360200151611998565b9050600081846000015161135b9190612398565b905060008083866020015161137091906123b3565b905080519150602083101561138c57826020036101000a820491505b50949350505050565b6060610a1a8260200151600281518110610a0d57610a0d611efd565b60606113bc826115e5565b6113c557600080fd5b60006113d083611a13565b905060008167ffffffffffffffff8111156113ed576113ed611d80565b60405190808252806020026020018201604052801561143257816020015b604080518082019091526000808252602082015281526020019060019003908161140b5790505b50905060006114448560200151611998565b856020015161145391906123b3565b90506000805b848110156114bc5761146a83611a96565b915060405180604001604052808381526020018481525084828151811061149357611493611efd565b60209081029190910101526114a882846123b3565b9250806114b481611f51565b915050611459565b509195945050505050565b80516060906114d557600080fd5b60006114e48360200151611998565b905060008184600001516114f89190612398565b905060008167ffffffffffffffff81111561151557611515611d80565b6040519080825280601f01601f19166020018201604052801561153f576020820181803683370190505b509050600081602001905061138c84876020015161155d91906123b3565b8285611b3a565b60006115716002846124fb565b156115ab57601082611584600286612513565b8151811061159457611594611efd565b01602001516115a6919060f81c61252b565b6115db565b6010826115b9600286612513565b815181106115c9576115c9611efd565b01602001516115db919060f81c61253c565b60f81b9392505050565b80516000906115f657506000919050565b6020820151805160001a9060c0821015611614575060009392505050565b5060019392505050565b8061162857505050565b60208110611660578251825261163f6020846123b3565b925061164c6020836123b3565b9150611659602082612398565b9050611628565b6000600161166f836020612398565b61167b9061010061265b565b6116859190612398565b935183518516941916939093179091525050565b80516000906015146116aa57600080fd5b610a1a8261131a565b60606000826000015167ffffffffffffffff8111156116d4576116d4611d80565b6040519080825280601f01601f1916602001820160405280156116fe576020820181803683370190505b5090508051600014156117115792915050565b600081602001905061172c8460200151828660000151611b3a565b5092915050565b805160009060211461174457600080fd5b6000808360200151600161175891906123b3565b51949350505050565b6000808061176e86610a49565b90506000815167ffffffffffffffff81111561178c5761178c611d80565b6040519080825280601f01601f1916602001820160405280156117b6576020820181803683370190505b509050845b82516117c790876123b3565b8110156118525760008782815181106117e2576117e2611efd565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016905080836118178985612398565b8151811061182757611827611efd565b60200101906001600160f81b031916908160001a90535050808061184a90611f51565b9150506117bb565b508080519060200120828051906020012014156118725781519250611877565b600092505b50909150505b9392505050565b60006020825161189491906124fb565b156118b15760405162461bcd60e51b81526004016102cd9061269e565b6000602083516118c19190612513565b90506118ce81600261265b565b85106118ec5760405162461bcd60e51b81526004016102cd906126e2565b60008660205b8551811161198a5785810151925061190b6002896124fb565b61193f5781836040516020016119229291906126f2565b60405160208183030381529060405280519060200120915061196b565b82826040516020016119529291906126f2565b6040516020818303038152906040528051906020012091505b611976600289612513565b97506119836020826123b3565b90506118f2565b509094149695505050505050565b8051600090811a60808110156119b15750600092915050565b60b88110806119cc575060c081108015906119cc575060f881105b156119da5750600192915050565b60c0811015611a07576119ef600160b8612718565b6119fc9060ff1682612398565b61187d9060016123b3565b6119ef600160f8612718565b8051600090611a2457506000919050565b600080611a348460200151611998565b8460200151611a4391906123b3565b9050600084600001518560200151611a5b91906123b3565b90505b80821015611a8d57611a6f82611a96565b611a7990836123b3565b915082611a8581611f51565b935050611a5e565b50909392505050565b80516000908190811a6080811015611ab1576001915061172c565b60b8811015611ad757611ac5608082612398565b611ad09060016123b3565b915061172c565b60c0811015611b045760b78103600185019450806020036101000a8551046001820181019350505061172c565b60f8811015611b1857611ac560c082612398565b60019390930151602084900360f7016101000a900490920160f5190192915050565b80611b4457505050565b60208110611b7c5782518252611b5b6020846123b3565b9250611b686020836123b3565b9150611b75602082612398565b9050611b44565b8061166057505050565b805b82525050565b60208101610a1a8284611b86565b60008083601f840112611bb157611bb1600080fd5b50813567ffffffffffffffff811115611bcc57611bcc600080fd5b602083019150836020820283011115611be757611be7600080fd5b9250929050565b60008060208385031215611c0457611c04600080fd5b823567ffffffffffffffff811115611c1e57611c1e600080fd5b611c2a85828601611b9c565b92509250509250929050565b8015155b811461067057600080fd5b8035610a1a81611c36565b600060208284031215611c6557611c65600080fd5b600061110d8484611c45565b60006001600160a01b038216610a1a565b6000610a1a82611c71565b6000610a1a82611c82565b611b8881611c8d565b60208101610a1a8284611c98565b80611c3a565b8035610a1a81611caf565b600060208284031215611cd557611cd5600080fd5b600061110d8484611cb5565b801515611b88565b60208101610a1a8284611ce1565b611b8881611c71565b60208101610a1a8284611cf7565b611c3a81611c71565b8035610a1a81611d0e565b60008060408385031215611d3857611d38600080fd5b6000611d448585611d17565b9250506020611d5585828601611cb5565b9150509250929050565b600060208284031215611d7457611d74600080fd5b600061110d8484611d17565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff82111715611dbc57611dbc611d80565b6040525050565b6000611dce60405190565b9050611dda8282611d96565b919050565b600067ffffffffffffffff821115611df957611df9611d80565b601f19601f83011660200192915050565b82818337506000910152565b6000611e29611e2484611ddf565b611dc3565b905082815260208101848484011115611e4457611e44600080fd5b611e4f848285611e0a565b509392505050565b600082601f830112611e6b57611e6b600080fd5b813561110d848260208601611e16565b600060208284031215611e9057611e90600080fd5b813567ffffffffffffffff811115611eaa57611eaa600080fd5b61110d84828501611e57565b600e81526000602082017f5374616b696e6720706175736564000000000000000000000000000000000000815291505b5060200190565b60208082528101610a1a81611eb6565b634e487b7160e01b600052603260045260246000fd5b60608101611f218286611cf7565b611f2e6020830185611cf7565b61110d6040830184611b86565b634e487b7160e01b600052601160045260246000fd5b6000600019821415611f6557611f65611f3b565b5060010190565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081526000611ee6565b60208082528101610a1a81611f6c565b600981526000602082017f4e6f74206f776e6564000000000000000000000000000000000000000000000081529150611ee6565b60208082528101610a1a81611fae565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181527f6464726573730000000000000000000000000000000000000000000000000000602082015291505b5060400190565b60208082528101610a1a81611ff2565b6060810161206d8286611cf7565b61207a6020830185611b86565b61110d6040830184611ce1565b80611b88565b60005b838110156120a8578181015183820152602001612090565b838111156120b7576000848401525b50505050565b60006120c7825190565b6120d581856020860161208d565b9290920192915050565b60006120eb8286612087565b6020820191506120fb82856120bd565b91506121078284612087565b506020019392505050565b602481526000602082017f4678526f6f7454756e6e656c3a20455849545f414c52454144595f50524f434581527f535345440000000000000000000000000000000000000000000000000000000060208201529150612048565b60208082528101610a1a81612112565b602581526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f46585f4348494c445f5481527f554e4e454c00000000000000000000000000000000000000000000000000000060208201529150612048565b60208082528101610a1a8161217c565b602381526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f524543454950545f505281527f4f4f46000000000000000000000000000000000000000000000000000000000060208201529150612048565b60208082528101610a1a816121e6565b601f81526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f5349474e41545552450081529150611ee6565b60208082528101610a1a81612250565b60006122a2611e2484611ddf565b9050828152602081018484840111156122bd576122bd600080fd5b611e4f84828561208d565b600082601f8301126122dc576122dc600080fd5b815161110d848260208601612294565b60006020828403121561230157612301600080fd5b815167ffffffffffffffff81111561231b5761231b600080fd5b61110d848285016122c8565b6000612331825190565b80845260208401935061234881856020860161208d565b601f01601f19169290920192915050565b604081016123678285611cf7565b818103602083015261110d8184612327565b600081600019048311821515161561239357612393611f3b565b500290565b6000825b9250828210156123ae576123ae611f3b565b500390565b600082198211156123c6576123c6611f3b565b500190565b8051610a1a81611caf565b8051610a1a81611d0e565b600080600080600060a086880312156123fc576123fc600080fd5b600061240888886123cb565b9550506020612419888289016123cb565b945050604061242a888289016123cb565b935050606061243b888289016123cb565b925050608061244c888289016123d6565b9150509295509295909350565b60006124658287612087565b6020820191506124758286612087565b6020820191506124858285612087565b6020820191506124958284612087565b50602001949350505050565b601c81526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f4845414445520000000081529150611ee6565b60208082528101610a1a816124a1565b634e487b7160e01b600052601260045260246000fd5b6000825b92508261250e5761250e6124e5565b500690565b6000825b925082612526576125266124e5565b500490565b600060ff8216915060ff83166124ff565b600060ff8216915060ff8316612517565b80825b600185111561258c5780860481111561256b5761256b611f3b565b600185161561257957908102905b80026125858560011c90565b9450612550565b94509492505050565b6000826125a45750600161187d565b816125b15750600061187d565b81600181146125c757600281146125d1576125fe565b600191505061187d565b60ff8411156125e2576125e2611f3b565b8360020a9150848211156125f8576125f8611f3b565b5061187d565b5060208310610133831016604e8410600b8410161715612631575081810a8381111561262c5761262c611f3b565b61187d565b61263e848484600161254d565b9250905081840481111561265457612654611f3b565b0292915050565b600061187d6000198484612595565b601481526000602082017f496e76616c69642070726f6f66206c656e67746800000000000000000000000081529150611ee6565b60208082528101610a1a8161266a565b601581526000602082017f4c65616620696e64657820697320746f6f20626967000000000000000000000081529150611ee6565b60208082528101610a1a816126ae565b60006126fe8285612087565b60208201915061270e8284612087565b5060200192915050565b600060ff8216915060ff831661239c56fea264697066735822122087d68ee90abf06f2df5a3b84e82246a12e1e2e2eb3a63f97b7b6d42894f30b7a64736f6c63430008090033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
MATIC | 100.00% | $0.476814 | 0.1 | $0.047681 |
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.