More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x7378cdcc5850338d958434a10f59b437790a109c9381128f71a2afed4cb438b1 | Claim Rewards | (pending) | 3 days ago | IN | 0 ETH | (Pending) | |||
Unstake Batch | 21232000 | 2 days ago | IN | 0 ETH | 0.00145628 | ||||
Unstake Batch | 21231980 | 2 days ago | IN | 0 ETH | 0.00345029 | ||||
Unstake Batch | 21200921 | 7 days ago | IN | 0 ETH | 0.00241866 | ||||
Unstake Batch | 21200916 | 7 days ago | IN | 0 ETH | 0.00250432 | ||||
Claim Rewards | 21200912 | 7 days ago | IN | 0 ETH | 0.00315345 | ||||
Unstake Batch | 20955910 | 41 days ago | IN | 0 ETH | 0.00163597 | ||||
Unstake Batch | 20955904 | 41 days ago | IN | 0 ETH | 0.00198018 | ||||
Claim Rewards | 20899340 | 49 days ago | IN | 0 ETH | 0.00082965 | ||||
Unstake Batch | 20882708 | 51 days ago | IN | 0 ETH | 0.00244873 | ||||
Unstake Batch | 20676935 | 80 days ago | IN | 0 ETH | 0.00118274 | ||||
Unstake Batch | 20676931 | 80 days ago | IN | 0 ETH | 0.00112997 | ||||
Unstake Batch | 20676258 | 80 days ago | IN | 0 ETH | 0.00032854 | ||||
Unstake Batch | 20676252 | 80 days ago | IN | 0 ETH | 0.00018284 | ||||
Unstake Batch | 20613338 | 89 days ago | IN | 0 ETH | 0.00695812 | ||||
Unstake Batch | 20613328 | 89 days ago | IN | 0 ETH | 0.00936179 | ||||
Unstake Batch | 20578410 | 94 days ago | IN | 0 ETH | 0.00089017 | ||||
Unstake Batch | 20524390 | 101 days ago | IN | 0 ETH | 0.00066835 | ||||
Unstake Batch | 20524384 | 101 days ago | IN | 0 ETH | 0.00111446 | ||||
Unstake Batch | 20524377 | 101 days ago | IN | 0 ETH | 0.00060991 | ||||
Claim Rewards | 20498936 | 105 days ago | IN | 0 ETH | 0.00081892 | ||||
Unstake Batch | 20480375 | 107 days ago | IN | 0 ETH | 0.00051582 | ||||
Unstake Batch | 20429770 | 114 days ago | IN | 0 ETH | 0.00100348 | ||||
Unstake Batch | 20429767 | 114 days ago | IN | 0 ETH | 0.00069937 | ||||
Unstake Batch | 20178899 | 149 days ago | IN | 0 ETH | 0.00062544 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
DHStakingV2
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; interface IShowBiz { function mint(address to, uint256 amount) external; } contract DHStakingV2 is Ownable, IERC721Receiver { using EnumerableSet for EnumerableSet.UintSet; using EnumerableSet for EnumerableSet.AddressSet; IShowBiz _showBiz = IShowBiz(0x136209a516D1C2660F045e70634c9d95D64325F9); struct StakedToken { uint tokenId; uint stakedAt; uint endsAt; uint monthlyRewards; uint months; address owner; } struct PartnerContract { bool active; IERC721 instance; uint[] availablePeriods; uint[] monthlyRewards; } mapping(address => mapping(uint => StakedToken)) public tokenIdToStakedToken; mapping(address => mapping(uint => uint)) public tokenIdToClaimedRewards; mapping(address => mapping(address => EnumerableSet.UintSet)) addressToStakedTokensSet; mapping(address => PartnerContract) public contracts; uint public totalClaimedRewards; EnumerableSet.AddressSet activeContracts; event Stake(address contractAddress, uint contractTokenId, address owner, uint endsAt); event Unstake(address contractAddress, uint contractTokenId, address owner); event ClaimTokenRewards(address contractAddress, uint contractTokenId, address owner, uint rewards); function onERC721Received(address _operator, address, uint256, bytes calldata) external view override returns(bytes4) { require(_operator == address(this), "token must be staked over stake method"); return bytes4(keccak256("onERC721Received(address,address,uint256,bytes)")); } function stake(address contractAddress, uint tokenId, uint months) public { PartnerContract storage _contract = contracts[contractAddress]; require(_contract.active, "token contract is not active"); require(months >= 1, "invalid minimum period"); uint endsAt = block.timestamp + months * 28 days; uint monthlyRewards = 0; for (uint i = 0; i < _contract.availablePeriods.length; i++) { if (_contract.availablePeriods[i] == months) { monthlyRewards = _contract.monthlyRewards[i]; } } require(monthlyRewards != 0, "invalid stake period"); tokenIdToStakedToken[contractAddress][tokenId] = StakedToken({ tokenId: tokenId, stakedAt: block.timestamp, endsAt: endsAt, monthlyRewards: monthlyRewards, months: months, owner: msg.sender }); tokenIdToClaimedRewards[contractAddress][tokenId] = 0; _contract.instance.safeTransferFrom(msg.sender, address(this), tokenId); addressToStakedTokensSet[contractAddress][msg.sender].add(tokenId); emit Stake(contractAddress, tokenId, msg.sender, endsAt); } function renewStake(address contractAddress, uint[] memory tokenIds) public { for (uint i = 0; i < tokenIds.length; i++) { StakedToken storage stakedToken = tokenIdToStakedToken[contractAddress][tokenIds[i]]; require(stakedToken.owner != msg.sender, "caller does not have this token"); stakedToken.endsAt = block.timestamp + stakedToken.months * 28 days; } } function stakeBatch(address contractAddress, uint[] calldata tokenIds, uint months) external { for (uint i = 0; i < tokenIds.length; i++) { stake(contractAddress, tokenIds[i], months); } } function unclaimedRewards(address contractAddress, uint tokenId) public view returns (uint) { StakedToken storage stakedToken = tokenIdToStakedToken[contractAddress][tokenId]; require(stakedToken.owner != address(0), "cannot query an unstaked token"); uint rewardLimit = (stakedToken.endsAt - stakedToken.stakedAt) / 7 days; uint rewardsUntilNow = (block.timestamp - stakedToken.stakedAt) / 7 days; return (rewardsUntilNow > rewardLimit ? rewardLimit : rewardsUntilNow) * stakedToken.monthlyRewards / 4 - tokenIdToClaimedRewards[contractAddress][tokenId]; } function claimTokenRewards(address contractAddress, uint tokenId) public { StakedToken storage stakedToken = tokenIdToStakedToken[contractAddress][tokenId]; require(stakedToken.owner == msg.sender, "caller did not stake this token"); uint _unclaimedRewards = unclaimedRewards(contractAddress, tokenId); if (_unclaimedRewards > 0) { _showBiz.mint(msg.sender, _unclaimedRewards); tokenIdToClaimedRewards[contractAddress][tokenId] += _unclaimedRewards; totalClaimedRewards += _unclaimedRewards; emit ClaimTokenRewards(contractAddress, tokenId, msg.sender, _unclaimedRewards); } } function claimContractRewards(address contractAddress) public { EnumerableSet.UintSet storage stakedTokens = addressToStakedTokensSet[contractAddress][msg.sender]; uint totalStakedTokens = stakedTokens.length(); for (uint i = 0; i < totalStakedTokens; i++) { claimTokenRewards(contractAddress, stakedTokens.at(i)); } } function claimRewards() public { for (uint i = 0; i < activeContracts.length(); i++) { claimContractRewards(activeContracts.at(i)); } } function unstake(address contractAddress, uint tokenId) public { PartnerContract storage _contract = contracts[contractAddress]; StakedToken storage stakedToken = tokenIdToStakedToken[contractAddress][tokenId]; require(stakedToken.owner == msg.sender, "caller not owns this token"); require(block.timestamp > stakedToken.endsAt, "staked period did not finish yet"); claimTokenRewards(contractAddress, tokenId); _contract.instance.safeTransferFrom(address(this), msg.sender, stakedToken.tokenId); addressToStakedTokensSet[contractAddress][msg.sender].remove(stakedToken.tokenId); emit Unstake(contractAddress, stakedToken.tokenId, msg.sender); delete tokenIdToStakedToken[contractAddress][tokenId]; } function unstakeBatch(address contractAddress, uint[] calldata tokenIds) external { for (uint i = 0; i < tokenIds.length; i++) { unstake(contractAddress, tokenIds[i]); } } function stakedTokensOfOwner(address contractAddress, address accountAddress) external view returns (uint[] memory tokenIds) { EnumerableSet.UintSet storage stakedTokens = addressToStakedTokensSet[contractAddress][accountAddress]; tokenIds = new uint[](stakedTokens.length()); for (uint i = 0; i < stakedTokens.length(); i++) { tokenIds[i] = stakedTokens.at(i); } return tokenIds; } function addContract(address contractAddress, uint[] memory availablePeriods, uint[] memory monthlyRewards) public onlyOwner { contracts[contractAddress] = PartnerContract( true, IERC721(contractAddress), availablePeriods, monthlyRewards ); activeContracts.add(contractAddress); } function updateContract(address contractAddress, bool active, uint[] memory availablePeriods, uint[] memory monthlyRewards) public onlyOwner { require(activeContracts.contains(contractAddress), "contract not added"); contracts[contractAddress].active = active; contracts[contractAddress].availablePeriods = availablePeriods; contracts[contractAddress].monthlyRewards = monthlyRewards; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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`, 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 Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 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); /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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 v4.4.0 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"contractTokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"rewards","type":"uint256"}],"name":"ClaimTokenRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"contractTokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"endsAt","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"contractTokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"Unstake","type":"event"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256[]","name":"availablePeriods","type":"uint256[]"},{"internalType":"uint256[]","name":"monthlyRewards","type":"uint256[]"}],"name":"addContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"claimContractRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claimTokenRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"contracts","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"contract IERC721","name":"instance","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"renewStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"months","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"months","type":"uint256"}],"name":"stakeBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"address","name":"accountAddress","type":"address"}],"name":"stakedTokensOfOwner","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToClaimedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToStakedToken","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"stakedAt","type":"uint256"},{"internalType":"uint256","name":"endsAt","type":"uint256"},{"internalType":"uint256","name":"monthlyRewards","type":"uint256"},{"internalType":"uint256","name":"months","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalClaimedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unclaimedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unstakeBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256[]","name":"availablePeriods","type":"uint256[]"},{"internalType":"uint256[]","name":"monthlyRewards","type":"uint256[]"}],"name":"updateContract","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600180546001600160a01b03191673136209a516d1c2660f045e70634c9d95d64325f917905534801561003657600080fd5b5061004033610045565b610095565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611a81806100a46000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80638da5cb5b116100ad578063d1a2983511610071578063d1a298351461034b578063d578ceab1461035e578063f2fde38b14610367578063f301e3d01461037a578063fd712bbe1461038d57600080fd5b80638da5cb5b146102e45780639453b704146102ff578063c2a672e014610312578063c8daa85d14610325578063cf8088b91461033857600080fd5b80633b25724c116100f45780633b25724c1461021e578063458356561461025757806369dc9ff31461026a578063715018a6146102bc578063754b069f146102c457600080fd5b80630c51b88f1461013157806311678a0b1461014657806314c6c86014610159578063150b7a02146101ea578063372500ab14610216575b600080fd5b61014461013f3660046118bc565b6103a0565b005b610144610154366004611792565b61074b565b6101af610167366004611892565b6002602081815260009384526040808520909152918352912080546001820154928201546003830154600484015460059094015492949391929091906001600160a01b031686565b60408051968752602087019590955293850192909252606084015260808301526001600160a01b031660a082015260c0015b60405180910390f35b6101fd6101f83660046115fc565b61082d565b6040516001600160e01b031990911681526020016101e1565b6101446108c1565b61024961022c366004611892565b600360209081526000928352604080842090915290825290205481565b6040519081526020016101e1565b610144610265366004611697565b6108f8565b61029d6102783660046115ae565b60056020526000908152604090205460ff81169061010090046001600160a01b031682565b6040805192151583526001600160a01b039091166020830152016101e1565b610144610937565b6102d76102d23660046115c9565b61096d565b6040516101e191906118ef565b6000546040516001600160a01b0390911681526020016101e1565b61014461030d366004611892565b610a37565b610144610320366004611892565b610bcf565b610249610333366004611892565b610def565b6101446103463660046115ae565b610f16565b610144610359366004611744565b610f70565b61024960065481565b6101446103753660046115ae565b61105d565b6101446103883660046116ea565b6110f5565b61014461039b366004611806565b61113c565b6001600160a01b0383166000908152600560205260409020805460ff1661040e5760405162461bcd60e51b815260206004820152601c60248201527f746f6b656e20636f6e7472616374206973206e6f74206163746976650000000060448201526064015b60405180910390fd5b60018210156104585760405162461bcd60e51b81526020600482015260166024820152751a5b9d985b1a59081b5a5b9a5b5d5b481c195c9a5bd960521b6044820152606401610405565b6000610467836224ea006119a2565b6104719042611968565b90506000805b60018401548110156104df578484600101828154811061049957610499611a1f565b906000526020600020015414156104cd578360020181815481106104bf576104bf611a1f565b906000526020600020015491505b806104d7816119d8565b915050610477565b50806105245760405162461bcd60e51b81526020600482015260146024820152731a5b9d985b1a59081cdd185ad9481c195c9a5bd960621b6044820152606401610405565b6040518060c00160405280868152602001428152602001838152602001828152602001858152602001336001600160a01b031681525060026000886001600160a01b03166001600160a01b031681526020019081526020016000206000878152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550905050600060036000886001600160a01b03166001600160a01b031681526020019081526020016000206000878152602001908152602001600020819055508260000160019054906101000a90046001600160a01b03166001600160a01b03166342842e0e3330886040518463ffffffff1660e01b8152600401610694939291906001600160a01b039384168152919092166020820152604081019190915260600190565b600060405180830381600087803b1580156106ae57600080fd5b505af11580156106c2573d6000803e3d6000fd5b5050506001600160a01b038716600090815260046020908152604080832033845290915290206106f391508661121d565b50604080516001600160a01b03881681526020810187905233818301526060810184905290517f1bd1eb6b4fd3f08e718d7a241c54c4641c9f36004b6949383f48d15a2fcc8f529181900360800190a1505050505050565b6000546001600160a01b031633146107755760405162461bcd60e51b815260040161040590611933565b6040805160808101825260018082526001600160a01b03868116602080850182815285870189815260608701899052600093845260058352969092208551815493516001600160a81b0319909416901515610100600160a81b031916176101009390941692909202929092178155935180519394936107fb938501929190910190611445565b5060608201518051610817916002840191602090910190611445565b5061082791506007905084611230565b50505050565b60006001600160a01b03861630146108965760405162461bcd60e51b815260206004820152602660248201527f746f6b656e206d757374206265207374616b6564206f766572207374616b65206044820152651b595d1a1bd960d21b6064820152608401610405565b507f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f95945050505050565b60005b6108ce6007611245565b8110156108f5576108e361034660078361124f565b806108ed816119d8565b9150506108c4565b50565b60005b81811015610827576109258484848481811061091957610919611a1f565b90506020020135610bcf565b8061092f816119d8565b9150506108fb565b6000546001600160a01b031633146109615760405162461bcd60e51b815260040161040590611933565b61096b600061125b565b565b6001600160a01b03808316600090815260046020908152604080832093851683529290522060609061099e81611245565b67ffffffffffffffff8111156109b6576109b6611a35565b6040519080825280602002602001820160405280156109df578160200160208202803683370190505b50915060005b6109ee82611245565b811015610a2e576109ff828261124f565b838281518110610a1157610a11611a1f565b602090810291909101015280610a26816119d8565b9150506109e5565b50505b92915050565b6001600160a01b038083166000908152600260209081526040808320858452909152902060058101549091163314610ab15760405162461bcd60e51b815260206004820152601f60248201527f63616c6c657220646964206e6f74207374616b65207468697320746f6b656e006044820152606401610405565b6000610abd8484610def565b90508015610827576001546040516340c10f1960e01b8152336004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015610b1157600080fd5b505af1158015610b25573d6000803e3d6000fd5b505050506001600160a01b038416600090815260036020908152604080832086845290915281208054839290610b5c908490611968565b925050819055508060066000828254610b759190611968565b9091555050604080516001600160a01b03861681526020810185905233818301526060810183905290517fec36d6b8be78575964b72e9c6ebdabc50ecd4446d430d833017302ddf8a1e17b9181900360800190a150505050565b6001600160a01b038083166000908152600560208181526040808420600283528185208786529092529092209081015491929091163314610c525760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206e6f74206f776e73207468697320746f6b656e0000000000006044820152606401610405565b80600201544211610ca55760405162461bcd60e51b815260206004820181905260248201527f7374616b656420706572696f6420646964206e6f742066696e697368207965746044820152606401610405565b610caf8484610a37565b81548154604051632142170760e11b815230600482015233602482015260448101919091526101009091046001600160a01b0316906342842e0e90606401600060405180830381600087803b158015610d0757600080fd5b505af1158015610d1b573d6000803e3d6000fd5b505082546001600160a01b03871660009081526004602090815260408083203384529091529020610d4e935091506112ab565b508054604080516001600160a01b038716815260208101929092523382820152517f379bc14156b62673a2efd113a5b989c8240c2018bf1fa01ee2d3d5915f769d4b9181900360600190a150506001600160a01b0390911660009081526002602081815260408084209484529390529181208181556001810182905591820181905560038201819055600482015560050180546001600160a01b0319169055565b6001600160a01b038083166000908152600260209081526040808320858452909152812060058101549192909116610e695760405162461bcd60e51b815260206004820152601e60248201527f63616e6e6f7420717565727920616e20756e7374616b656420746f6b656e00006044820152606401610405565b600062093a8082600101548360020154610e8391906119c1565b610e8d9190611980565b9050600062093a80836001015442610ea591906119c1565b610eaf9190611980565b6001600160a01b03871660009081526003602081815260408084208a8552909152909120549085015491925090600490848411610eec5783610eee565b845b610ef891906119a2565b610f029190611980565b610f0c91906119c1565b9695505050505050565b6001600160a01b0381166000908152600460209081526040808320338452909152812090610f4382611245565b905060005b8181101561082757610f5e8461030d858461124f565b80610f68816119d8565b915050610f48565b60005b8151811015611058576001600160a01b038316600090815260026020526040812083518290859085908110610faa57610faa611a1f565b602090810291909101810151825281019190915260400160002060058101549091506001600160a01b03163314156110245760405162461bcd60e51b815260206004820152601f60248201527f63616c6c657220646f6573206e6f742068617665207468697320746f6b656e006044820152606401610405565b6004810154611036906224ea006119a2565b6110409042611968565b60029091015580611050816119d8565b915050610f73565b505050565b6000546001600160a01b031633146110875760405162461bcd60e51b815260040161040590611933565b6001600160a01b0381166110ec5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610405565b6108f58161125b565b60005b82811015611135576111238585858481811061111657611116611a1f565b90506020020135846103a0565b8061112d816119d8565b9150506110f8565b5050505050565b6000546001600160a01b031633146111665760405162461bcd60e51b815260040161040590611933565b6111716007856112b7565b6111b25760405162461bcd60e51b815260206004820152601260248201527118dbdb9d1c9858dd081b9bdd08185919195960721b6044820152606401610405565b6001600160a01b0384166000908152600560209081526040909120805460ff191685151517815583516111ed92600190920191850190611445565b506001600160a01b0384166000908152600560209081526040909120825161113592600290920191840190611445565b600061122983836112d9565b9392505050565b6000611229836001600160a01b0384166112d9565b6000610a31825490565b60006112298383611328565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006112298383611352565b6001600160a01b03811660009081526001830160205260408120541515611229565b600081815260018301602052604081205461132057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a31565b506000610a31565b600082600001828154811061133f5761133f611a1f565b9060005260206000200154905092915050565b6000818152600183016020526040812054801561143b5760006113766001836119c1565b855490915060009061138a906001906119c1565b90508181146113ef5760008660000182815481106113aa576113aa611a1f565b90600052602060002001549050808760000184815481106113cd576113cd611a1f565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061140057611400611a09565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a31565b6000915050610a31565b828054828255906000526020600020908101928215611480579160200282015b82811115611480578251825591602001919060010190611465565b5061148c929150611490565b5090565b5b8082111561148c5760008155600101611491565b80356001600160a01b03811681146114bc57600080fd5b919050565b60008083601f8401126114d357600080fd5b50813567ffffffffffffffff8111156114eb57600080fd5b6020830191508360208260051b850101111561150657600080fd5b9250929050565b600082601f83011261151e57600080fd5b8135602067ffffffffffffffff8083111561153b5761153b611a35565b8260051b604051601f19603f8301168101818110848211171561156057611560611a35565b6040528481528381019250868401828801850189101561157f57600080fd5b600092505b858310156115a2578035845292840192600192909201918401611584565b50979650505050505050565b6000602082840312156115c057600080fd5b611229826114a5565b600080604083850312156115dc57600080fd5b6115e5836114a5565b91506115f3602084016114a5565b90509250929050565b60008060008060006080868803121561161457600080fd5b61161d866114a5565b945061162b602087016114a5565b935060408601359250606086013567ffffffffffffffff8082111561164f57600080fd5b818801915088601f83011261166357600080fd5b81358181111561167257600080fd5b89602082850101111561168457600080fd5b9699959850939650602001949392505050565b6000806000604084860312156116ac57600080fd5b6116b5846114a5565b9250602084013567ffffffffffffffff8111156116d157600080fd5b6116dd868287016114c1565b9497909650939450505050565b6000806000806060858703121561170057600080fd5b611709856114a5565b9350602085013567ffffffffffffffff81111561172557600080fd5b611731878288016114c1565b9598909750949560400135949350505050565b6000806040838503121561175757600080fd5b611760836114a5565b9150602083013567ffffffffffffffff81111561177c57600080fd5b6117888582860161150d565b9150509250929050565b6000806000606084860312156117a757600080fd5b6117b0846114a5565b9250602084013567ffffffffffffffff808211156117cd57600080fd5b6117d98783880161150d565b935060408601359150808211156117ef57600080fd5b506117fc8682870161150d565b9150509250925092565b6000806000806080858703121561181c57600080fd5b611825856114a5565b93506020850135801515811461183a57600080fd5b9250604085013567ffffffffffffffff8082111561185757600080fd5b6118638883890161150d565b9350606087013591508082111561187957600080fd5b506118868782880161150d565b91505092959194509250565b600080604083850312156118a557600080fd5b6118ae836114a5565b946020939093013593505050565b6000806000606084860312156118d157600080fd5b6118da846114a5565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b818110156119275783518352928401929184019160010161190b565b50909695505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561197b5761197b6119f3565b500190565b60008261199d57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156119bc576119bc6119f3565b500290565b6000828210156119d3576119d36119f3565b500390565b60006000198214156119ec576119ec6119f3565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea264697066735822122013e452c5d544da4e603956c68f1225b3cb4ab6b94e8eb2c2b0b92a3bd5e9a2ec64736f6c63430008070033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80638da5cb5b116100ad578063d1a2983511610071578063d1a298351461034b578063d578ceab1461035e578063f2fde38b14610367578063f301e3d01461037a578063fd712bbe1461038d57600080fd5b80638da5cb5b146102e45780639453b704146102ff578063c2a672e014610312578063c8daa85d14610325578063cf8088b91461033857600080fd5b80633b25724c116100f45780633b25724c1461021e578063458356561461025757806369dc9ff31461026a578063715018a6146102bc578063754b069f146102c457600080fd5b80630c51b88f1461013157806311678a0b1461014657806314c6c86014610159578063150b7a02146101ea578063372500ab14610216575b600080fd5b61014461013f3660046118bc565b6103a0565b005b610144610154366004611792565b61074b565b6101af610167366004611892565b6002602081815260009384526040808520909152918352912080546001820154928201546003830154600484015460059094015492949391929091906001600160a01b031686565b60408051968752602087019590955293850192909252606084015260808301526001600160a01b031660a082015260c0015b60405180910390f35b6101fd6101f83660046115fc565b61082d565b6040516001600160e01b031990911681526020016101e1565b6101446108c1565b61024961022c366004611892565b600360209081526000928352604080842090915290825290205481565b6040519081526020016101e1565b610144610265366004611697565b6108f8565b61029d6102783660046115ae565b60056020526000908152604090205460ff81169061010090046001600160a01b031682565b6040805192151583526001600160a01b039091166020830152016101e1565b610144610937565b6102d76102d23660046115c9565b61096d565b6040516101e191906118ef565b6000546040516001600160a01b0390911681526020016101e1565b61014461030d366004611892565b610a37565b610144610320366004611892565b610bcf565b610249610333366004611892565b610def565b6101446103463660046115ae565b610f16565b610144610359366004611744565b610f70565b61024960065481565b6101446103753660046115ae565b61105d565b6101446103883660046116ea565b6110f5565b61014461039b366004611806565b61113c565b6001600160a01b0383166000908152600560205260409020805460ff1661040e5760405162461bcd60e51b815260206004820152601c60248201527f746f6b656e20636f6e7472616374206973206e6f74206163746976650000000060448201526064015b60405180910390fd5b60018210156104585760405162461bcd60e51b81526020600482015260166024820152751a5b9d985b1a59081b5a5b9a5b5d5b481c195c9a5bd960521b6044820152606401610405565b6000610467836224ea006119a2565b6104719042611968565b90506000805b60018401548110156104df578484600101828154811061049957610499611a1f565b906000526020600020015414156104cd578360020181815481106104bf576104bf611a1f565b906000526020600020015491505b806104d7816119d8565b915050610477565b50806105245760405162461bcd60e51b81526020600482015260146024820152731a5b9d985b1a59081cdd185ad9481c195c9a5bd960621b6044820152606401610405565b6040518060c00160405280868152602001428152602001838152602001828152602001858152602001336001600160a01b031681525060026000886001600160a01b03166001600160a01b031681526020019081526020016000206000878152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550905050600060036000886001600160a01b03166001600160a01b031681526020019081526020016000206000878152602001908152602001600020819055508260000160019054906101000a90046001600160a01b03166001600160a01b03166342842e0e3330886040518463ffffffff1660e01b8152600401610694939291906001600160a01b039384168152919092166020820152604081019190915260600190565b600060405180830381600087803b1580156106ae57600080fd5b505af11580156106c2573d6000803e3d6000fd5b5050506001600160a01b038716600090815260046020908152604080832033845290915290206106f391508661121d565b50604080516001600160a01b03881681526020810187905233818301526060810184905290517f1bd1eb6b4fd3f08e718d7a241c54c4641c9f36004b6949383f48d15a2fcc8f529181900360800190a1505050505050565b6000546001600160a01b031633146107755760405162461bcd60e51b815260040161040590611933565b6040805160808101825260018082526001600160a01b03868116602080850182815285870189815260608701899052600093845260058352969092208551815493516001600160a81b0319909416901515610100600160a81b031916176101009390941692909202929092178155935180519394936107fb938501929190910190611445565b5060608201518051610817916002840191602090910190611445565b5061082791506007905084611230565b50505050565b60006001600160a01b03861630146108965760405162461bcd60e51b815260206004820152602660248201527f746f6b656e206d757374206265207374616b6564206f766572207374616b65206044820152651b595d1a1bd960d21b6064820152608401610405565b507f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f95945050505050565b60005b6108ce6007611245565b8110156108f5576108e361034660078361124f565b806108ed816119d8565b9150506108c4565b50565b60005b81811015610827576109258484848481811061091957610919611a1f565b90506020020135610bcf565b8061092f816119d8565b9150506108fb565b6000546001600160a01b031633146109615760405162461bcd60e51b815260040161040590611933565b61096b600061125b565b565b6001600160a01b03808316600090815260046020908152604080832093851683529290522060609061099e81611245565b67ffffffffffffffff8111156109b6576109b6611a35565b6040519080825280602002602001820160405280156109df578160200160208202803683370190505b50915060005b6109ee82611245565b811015610a2e576109ff828261124f565b838281518110610a1157610a11611a1f565b602090810291909101015280610a26816119d8565b9150506109e5565b50505b92915050565b6001600160a01b038083166000908152600260209081526040808320858452909152902060058101549091163314610ab15760405162461bcd60e51b815260206004820152601f60248201527f63616c6c657220646964206e6f74207374616b65207468697320746f6b656e006044820152606401610405565b6000610abd8484610def565b90508015610827576001546040516340c10f1960e01b8152336004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015610b1157600080fd5b505af1158015610b25573d6000803e3d6000fd5b505050506001600160a01b038416600090815260036020908152604080832086845290915281208054839290610b5c908490611968565b925050819055508060066000828254610b759190611968565b9091555050604080516001600160a01b03861681526020810185905233818301526060810183905290517fec36d6b8be78575964b72e9c6ebdabc50ecd4446d430d833017302ddf8a1e17b9181900360800190a150505050565b6001600160a01b038083166000908152600560208181526040808420600283528185208786529092529092209081015491929091163314610c525760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206e6f74206f776e73207468697320746f6b656e0000000000006044820152606401610405565b80600201544211610ca55760405162461bcd60e51b815260206004820181905260248201527f7374616b656420706572696f6420646964206e6f742066696e697368207965746044820152606401610405565b610caf8484610a37565b81548154604051632142170760e11b815230600482015233602482015260448101919091526101009091046001600160a01b0316906342842e0e90606401600060405180830381600087803b158015610d0757600080fd5b505af1158015610d1b573d6000803e3d6000fd5b505082546001600160a01b03871660009081526004602090815260408083203384529091529020610d4e935091506112ab565b508054604080516001600160a01b038716815260208101929092523382820152517f379bc14156b62673a2efd113a5b989c8240c2018bf1fa01ee2d3d5915f769d4b9181900360600190a150506001600160a01b0390911660009081526002602081815260408084209484529390529181208181556001810182905591820181905560038201819055600482015560050180546001600160a01b0319169055565b6001600160a01b038083166000908152600260209081526040808320858452909152812060058101549192909116610e695760405162461bcd60e51b815260206004820152601e60248201527f63616e6e6f7420717565727920616e20756e7374616b656420746f6b656e00006044820152606401610405565b600062093a8082600101548360020154610e8391906119c1565b610e8d9190611980565b9050600062093a80836001015442610ea591906119c1565b610eaf9190611980565b6001600160a01b03871660009081526003602081815260408084208a8552909152909120549085015491925090600490848411610eec5783610eee565b845b610ef891906119a2565b610f029190611980565b610f0c91906119c1565b9695505050505050565b6001600160a01b0381166000908152600460209081526040808320338452909152812090610f4382611245565b905060005b8181101561082757610f5e8461030d858461124f565b80610f68816119d8565b915050610f48565b60005b8151811015611058576001600160a01b038316600090815260026020526040812083518290859085908110610faa57610faa611a1f565b602090810291909101810151825281019190915260400160002060058101549091506001600160a01b03163314156110245760405162461bcd60e51b815260206004820152601f60248201527f63616c6c657220646f6573206e6f742068617665207468697320746f6b656e006044820152606401610405565b6004810154611036906224ea006119a2565b6110409042611968565b60029091015580611050816119d8565b915050610f73565b505050565b6000546001600160a01b031633146110875760405162461bcd60e51b815260040161040590611933565b6001600160a01b0381166110ec5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610405565b6108f58161125b565b60005b82811015611135576111238585858481811061111657611116611a1f565b90506020020135846103a0565b8061112d816119d8565b9150506110f8565b5050505050565b6000546001600160a01b031633146111665760405162461bcd60e51b815260040161040590611933565b6111716007856112b7565b6111b25760405162461bcd60e51b815260206004820152601260248201527118dbdb9d1c9858dd081b9bdd08185919195960721b6044820152606401610405565b6001600160a01b0384166000908152600560209081526040909120805460ff191685151517815583516111ed92600190920191850190611445565b506001600160a01b0384166000908152600560209081526040909120825161113592600290920191840190611445565b600061122983836112d9565b9392505050565b6000611229836001600160a01b0384166112d9565b6000610a31825490565b60006112298383611328565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006112298383611352565b6001600160a01b03811660009081526001830160205260408120541515611229565b600081815260018301602052604081205461132057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a31565b506000610a31565b600082600001828154811061133f5761133f611a1f565b9060005260206000200154905092915050565b6000818152600183016020526040812054801561143b5760006113766001836119c1565b855490915060009061138a906001906119c1565b90508181146113ef5760008660000182815481106113aa576113aa611a1f565b90600052602060002001549050808760000184815481106113cd576113cd611a1f565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061140057611400611a09565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a31565b6000915050610a31565b828054828255906000526020600020908101928215611480579160200282015b82811115611480578251825591602001919060010190611465565b5061148c929150611490565b5090565b5b8082111561148c5760008155600101611491565b80356001600160a01b03811681146114bc57600080fd5b919050565b60008083601f8401126114d357600080fd5b50813567ffffffffffffffff8111156114eb57600080fd5b6020830191508360208260051b850101111561150657600080fd5b9250929050565b600082601f83011261151e57600080fd5b8135602067ffffffffffffffff8083111561153b5761153b611a35565b8260051b604051601f19603f8301168101818110848211171561156057611560611a35565b6040528481528381019250868401828801850189101561157f57600080fd5b600092505b858310156115a2578035845292840192600192909201918401611584565b50979650505050505050565b6000602082840312156115c057600080fd5b611229826114a5565b600080604083850312156115dc57600080fd5b6115e5836114a5565b91506115f3602084016114a5565b90509250929050565b60008060008060006080868803121561161457600080fd5b61161d866114a5565b945061162b602087016114a5565b935060408601359250606086013567ffffffffffffffff8082111561164f57600080fd5b818801915088601f83011261166357600080fd5b81358181111561167257600080fd5b89602082850101111561168457600080fd5b9699959850939650602001949392505050565b6000806000604084860312156116ac57600080fd5b6116b5846114a5565b9250602084013567ffffffffffffffff8111156116d157600080fd5b6116dd868287016114c1565b9497909650939450505050565b6000806000806060858703121561170057600080fd5b611709856114a5565b9350602085013567ffffffffffffffff81111561172557600080fd5b611731878288016114c1565b9598909750949560400135949350505050565b6000806040838503121561175757600080fd5b611760836114a5565b9150602083013567ffffffffffffffff81111561177c57600080fd5b6117888582860161150d565b9150509250929050565b6000806000606084860312156117a757600080fd5b6117b0846114a5565b9250602084013567ffffffffffffffff808211156117cd57600080fd5b6117d98783880161150d565b935060408601359150808211156117ef57600080fd5b506117fc8682870161150d565b9150509250925092565b6000806000806080858703121561181c57600080fd5b611825856114a5565b93506020850135801515811461183a57600080fd5b9250604085013567ffffffffffffffff8082111561185757600080fd5b6118638883890161150d565b9350606087013591508082111561187957600080fd5b506118868782880161150d565b91505092959194509250565b600080604083850312156118a557600080fd5b6118ae836114a5565b946020939093013593505050565b6000806000606084860312156118d157600080fd5b6118da846114a5565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b818110156119275783518352928401929184019160010161190b565b50909695505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561197b5761197b6119f3565b500190565b60008261199d57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156119bc576119bc6119f3565b500290565b6000828210156119d3576119d36119f3565b500390565b60006000198214156119ec576119ec6119f3565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea264697066735822122013e452c5d544da4e603956c68f1225b3cb4ab6b94e8eb2c2b0b92a3bd5e9a2ec64736f6c63430008070033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.