Source Code
Latest 25 from a total of 459 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Unstake Nft | 17510789 | 979 days ago | IN | 0 ETH | 0.00166814 | ||||
| Unstake Nft | 17510786 | 979 days ago | IN | 0 ETH | 0.00153523 | ||||
| Unstake Nft | 17510783 | 979 days ago | IN | 0 ETH | 0.00174441 | ||||
| Unstake Nft | 17510780 | 979 days ago | IN | 0 ETH | 0.00148326 | ||||
| Unstake Nft | 17510777 | 979 days ago | IN | 0 ETH | 0.00171277 | ||||
| Unstake Nft | 17510773 | 979 days ago | IN | 0 ETH | 0.0017841 | ||||
| Withdraw Availab... | 17510769 | 979 days ago | IN | 0 ETH | 0.0013859 | ||||
| Withdraw Availab... | 17449989 | 988 days ago | IN | 0 ETH | 0.00143679 | ||||
| Unstake Nft | 17036486 | 1046 days ago | IN | 0 ETH | 0.00233514 | ||||
| Withdraw Availab... | 16994134 | 1052 days ago | IN | 0 ETH | 0.00161161 | ||||
| Withdraw Availab... | 16920703 | 1062 days ago | IN | 0 ETH | 0.00208502 | ||||
| Unstake Nft | 16913513 | 1063 days ago | IN | 0 ETH | 0.00145238 | ||||
| Stake Multiple N... | 16888157 | 1067 days ago | IN | 0 ETH | 0.00388176 | ||||
| Stake Multiple N... | 16886424 | 1067 days ago | IN | 0 ETH | 0.00357019 | ||||
| Withdraw Availab... | 16853261 | 1072 days ago | IN | 0 ETH | 0.01908097 | ||||
| Withdraw Availab... | 16816990 | 1077 days ago | IN | 0 ETH | 0.00224774 | ||||
| Unstake Nft | 16788600 | 1081 days ago | IN | 0 ETH | 0.00182066 | ||||
| Unstake Nft | 16788598 | 1081 days ago | IN | 0 ETH | 0.00229318 | ||||
| Withdraw Availab... | 16764842 | 1084 days ago | IN | 0 ETH | 0.0024351 | ||||
| Stake Nft | 16740314 | 1088 days ago | IN | 0 ETH | 0.00238882 | ||||
| Withdraw Availab... | 16675043 | 1097 days ago | IN | 0 ETH | 0.00196921 | ||||
| Unstake Nft | 16672945 | 1097 days ago | IN | 0 ETH | 0.00239084 | ||||
| Withdraw Availab... | 16617820 | 1105 days ago | IN | 0 ETH | 0.01126123 | ||||
| Stake Multiple N... | 16615476 | 1105 days ago | IN | 0 ETH | 0.00616881 | ||||
| Stake Nft | 16610130 | 1106 days ago | IN | 0 ETH | 0.00219875 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
DWStaking
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 300 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: The MIT License (MIT)
// __/\\\\\\\\\\\\_______/\\\\\\\\\______/\\\\\\\\\\\\\\\_____/\\\\\\\\\_____/\\\\____________/\\\\_
// _\/\\\////////\\\___/\\\///////\\\___\/\\\///////////____/\\\\\\\\\\\\\__\/\\\\\\________/\\\\\\_
// _\/\\\______\//\\\_\/\\\_____\/\\\___\/\\\______________/\\\/////////\\\_\/\\\//\\\____/\\\//\\\_
// _\/\\\_______\/\\\_\/\\\\\\\\\\\/____\/\\\\\\\\\\\_____\/\\\_______\/\\\_\/\\\\///\\\/\\\/_\/\\\_
// _\/\\\_______\/\\\_\/\\\//////\\\____\/\\\///////______\/\\\\\\\\\\\\\\\_\/\\\__\///\\\/___\/\\\_
// _\/\\\_______\/\\\_\/\\\____\//\\\___\/\\\_____________\/\\\/////////\\\_\/\\\____\///_____\/\\\_
// _\/\\\_______/\\\__\/\\\_____\//\\\__\/\\\_____________\/\\\_______\/\\\_\/\\\_____________\/\\\_
// _\/\\\\\\\\\\\\/___\/\\\______\//\\\_\/\\\\\\\\\\\\\\\_\/\\\_______\/\\\_\/\\\_____________\/\\\_
// _\////////////_____\///________\///__\///////////////__\///________\///__\///______________\///__
// _____/\\\\\\\\\\\____/\\\\\\\\\\\\\\\_____/\\\\\\\\\_____/\\\________/\\\__/\\\\\\\\\\\\\\\_
// ___/\\\/////////\\\_\///////\\\/////____/\\\\\\\\\\\\\__\/\\\_____/\\\//__\/\\\///////////__
// __\//\\\______\///________\/\\\________/\\\/////////\\\_\/\\\__/\\\//_____\/\\\_____________
// ___\////\\\_______________\/\\\_______\/\\\_______\/\\\_\/\\\\\\//\\\_____\/\\\\\\\\\\\_____
// ______\////\\\____________\/\\\_______\/\\\\\\\\\\\\\\\_\/\\\//_\//\\\____\/\\\///////______
// _________\////\\\_________\/\\\_______\/\\\/////////\\\_\/\\\____\//\\\___\/\\\_____________
// __/\\\______\//\\\________\/\\\_______\/\\\_______\/\\\_\/\\\_____\//\\\__\/\\\_____________
// _\///\\\\\\\\\\\/_________\/\\\_______\/\\\_______\/\\\_\/\\\______\//\\\_\/\\\\\\\\\\\\\\\_
// ___\///////////___________\///________\///________\///__\///________\///__\///////////////__
pragma solidity ^0.8.15;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
interface IToken {
function mint(address to, uint256 amount) external;
}
/**
* @title DreamWorld Staking
*
* @notice The official Dream World NFT staking contract.
*
* @author M. Burke
*
* @custom:security-contact dev@ctrllaunch.com
*/
contract DWStaking is Ownable, ReentrancyGuard {
IToken immutable ZZZs;
IERC721 immutable DWnft;
uint256 immutable INITIAL_BLOCK;
mapping(address => StakeCommitment[]) public commitments;
event StakeNft(address indexed _staker, uint256 indexed _tokenId);
event UnstakeNft(
address indexed _staker,
uint256 indexed _tokenId,
uint256 _rewardTokens
);
/**
* @dev blockStakedAdjusted will be updated as users withdraw rewards from staked nfts
*
* @param blockStakedAdjusted is the calculated value => block.number - INITIAL_BLOCK
* (which is set on deployment). This is allows the struct to use uint32
* rather than uint256.
*
* @param tokenId is the token id from the Dream World NFT contract associated with the
* NFT to be staked.
*/
struct StakeCommitment {
uint32 blockStakedAdjusted;
uint256 tokenId;
}
constructor(address _erc20Token, address _erc721Token) {
ZZZs = IToken(_erc20Token);
DWnft = IERC721(_erc721Token);
INITIAL_BLOCK = block.number;
}
//------------------------------------USER FUNCS-------------------------------------------\\
/** @dev The use of safeTransferFrom ensures the caller either owns the NFT or has
* been approved.
*
* @param _tokenId is the token id from the Dream World NFT contract associated with the
* NFT to be staked.
*/
function stakeNft(uint256 _tokenId) external {
DWnft.safeTransferFrom(msg.sender, address(this), _tokenId);
}
/**
* @notice 'stakeMultipleNfts' is to be used only for staking multiple NFTs.
* While using it to stake one, is possible, unnecessary gas
* costs will occure.
*
* @param _tokenIds is an array of Dream World NFT ids to be staked.
*/
function stakeMultipleNfts(uint256[] memory _tokenIds) external {
require(
DWnft.isApprovedForAll(msg.sender, address(this)) == true,
"DWStaking: Staking contract is not approved for all."
);
uint256 len = _tokenIds.length;
for (uint256 i = 0; i < len; ) {
DWnft.safeTransferFrom(msg.sender, address(this), _tokenIds[i]);
unchecked {
++i;
}
}
}
/**
* @notice 'withdrawAvailableRewards' is to be called by user wishing to withdraw ZZZs.
*
* @dev Note that 'blockStakedAdjusted' will be updated to reflect no available
* reward on withdraw.
*/
function withdrawAvailableRewards() external nonReentrant {
StakeCommitment[] memory commitmentsArr = commitments[msg.sender];
uint256 availableRewards = _getAvailableRewards(msg.sender);
uint256 currentAdjustedBlock = block.number - INITIAL_BLOCK;
uint256 len = commitmentsArr.length;
for (uint256 i = 0; i < len; ) {
commitments[msg.sender][i].blockStakedAdjusted = uint32(
currentAdjustedBlock
);
unchecked {
++i;
}
}
_mintTo(msg.sender, availableRewards);
}
/**
* @notice A variation of 'unstakeNft' is available below: 'unstakeNftOptions'.
* Calling `unstakeNft` with a single arg (_tokenId) assumes the caller is the owner
* and does not wish to specify an alternate beneficiary.
*
* @dev Users can view an array of staked NFTs via `getStakingCommitments`.
*
* @param _tokenId is the token id from the Dream World NFT contract associated with the
* NFT to be unstaked.
*/
function unstakeNft(uint256 _tokenId) external nonReentrant {
_unStakeNft(_tokenId, msg.sender, msg.sender);
}
/**
* @notice See function definition above for simple use case.
* Caling `unstakeNftOptions` with three args (_tokenId, _owner, _beneficiary)
* assumes the caller may not be the owner (an approvedForAll check will be made).
* It also gives the approved user or owner the opportunity to specify a beneficiary.
*
* @dev User can view array of staked NFTs via `getStakingCommitments`.
*
* @param _tokenId is the token id from the Dream World NFT contract associated with the
* NFT to be unstaked.
*
* @param _owner The address of the Nft's owner at time of stkaing.
*
* @param _beneficiary The address of an alternate wallet to send BOTH the ERC20 ZZZs
* staking rewards and the original ERC721 staked NFT.
*/
function unstakeNftOptions(
uint256 _tokenId,
address _owner,
address _beneficiary
) external nonReentrant {
require(
DWnft.isApprovedForAll(_owner, msg.sender),
"Caller is not approved for all. See ERC721 spec."
);
_unStakeNft(_tokenId, _owner, _beneficiary);
}
/**
* @dev '_unStakeNft' may be called either `unstakeNft` or 'unstakeNftOptions'
*
* @dev '_unStakeNft' will iterate through the array of an owners staked tokens. If
* correct commitment is found, any commitsments following will be shifted down
* to overwrite and the last commitment will be zeroed out in O(n) time.
*/
function _unStakeNft(
uint256 _tokenId,
address _owner,
address _beneficiary
) private {
StakeCommitment[] memory existingCommitmentsArr = commitments[_owner];
uint256 len = existingCommitmentsArr.length;
uint256 rewardsAmount = 0;
bool includesId = false;
for (uint256 i = 0; i < len; ) {
uint256 elTokenId = existingCommitmentsArr[i].tokenId;
if (includesId == true && i < len-1) {
commitments[_owner][i] = existingCommitmentsArr[i+1];
}
if (elTokenId == _tokenId) {
includesId = true;
rewardsAmount = _calculateRewards(existingCommitmentsArr[i].blockStakedAdjusted);
if (i < len-1) {
commitments[_owner][i] = existingCommitmentsArr[i+1];
}
}
unchecked {
++i;
}
}
// Zero out last commitment
require(includesId, "Token not found");
delete commitments[_owner][len-1];
_mintTo(_beneficiary, rewardsAmount);
DWnft.safeTransferFrom(address(this), _beneficiary, _tokenId);
emit UnstakeNft(_beneficiary, _tokenId, rewardsAmount);
}
//-----------------------------------------------------------------------------------------\\
/**
* @notice 'onERC721Received' will be called to validate the staking process
* (See ERC721 docs: `safeTransferFrom`).
*
* @dev Business logic of staking is within 'onERC721Received'
*/
function onERC721Received(
address _operator,
address _from,
uint256 _tokenId,
bytes memory _data
) public returns (bytes4) {
require(
_operator == address(this),
"Must transfer valid nft via stake function."
);
require(
DWnft.ownerOf(_tokenId) == address(this),
"Must transfer token from DW collection"
);
uint256 currentBlock = block.number;
StakeCommitment memory newCommitment;
newCommitment = StakeCommitment({
blockStakedAdjusted: uint32(currentBlock - INITIAL_BLOCK),
tokenId: _tokenId
});
uint256 numberOfCommits = commitments[_from].length;
// If user previously unstaked a token, last el will have been zeroed out.
// This overwrites last el only in this situation.
if (numberOfCommits == 0 || commitments[_from][numberOfCommits-1].blockStakedAdjusted != 0) {
commitments[_from].push(newCommitment);
} else if (commitments[_from][numberOfCommits-1].blockStakedAdjusted == 0) {
commitments[_from][numberOfCommits-1] = newCommitment;
}
emit StakeNft(_from, _tokenId);
return IERC721Receiver.onERC721Received.selector;
}
/**
* @notice `_getStakedIds` is used internally for fetching account data
* but it also made available for users.
*
* @dev Returns an array of ERC721 token Ids that an
* account has staked.
*
* @param _account is the wallet address of the user, who's data is to be fetched.
*/
function _getStakedIds(address _account)
public
view
returns (uint256[] memory)
{
StakeCommitment[] memory commitmentsArr = commitments[_account];
uint256 len = commitmentsArr.length;
uint256[] memory tokenIdArray = new uint256[](len);
for (uint256 i = 0; i < len; ) {
tokenIdArray[i] = commitmentsArr[i].tokenId;
unchecked {
++i;
}
}
return tokenIdArray;
}
/**
* @notice `_getAvailableRewards` is used internally for fetching account data
* but it also made available for users.
*
* @dev '_getAvailableRewards' will return the sum of available rewards.
*
* @param _account is the wallet address of the user, who's data is to be fetched.
*/
function _getAvailableRewards(address _account)
public
view
returns (uint256)
{
StakeCommitment[] memory commitmentsArr = commitments[_account];
uint256 len = commitmentsArr.length;
uint256 rewards = 0;
for (uint256 i = 0; i < len; ) {
rewards += _calculateRewards(commitmentsArr[i].blockStakedAdjusted);
unchecked {
++i;
}
}
return rewards;
}
//------------------------------------UTILS------------------------------------------------\\
/// @notice '_mintTo' is used internally for interfacing w/ the ERC20 ZZZs rewards token.
function _mintTo(address _user, uint256 _amount) private {
ZZZs.mint(_user, _amount);
}
/**
* @dev '_calculateRewards' is used in calculating the amount of ERC20 ZZZs rewards token
* to issue to the beneficiary durring the unstaking process.
*/
function _calculateRewards(uint32 _stakedAtAdjusted)
private
view
returns (uint256)
{
if (_stakedAtAdjusted == 0) {
return 0;
}
uint256 availableBlocks = block.number - INITIAL_BLOCK;
uint256 rewardBlocks = availableBlocks - _stakedAtAdjusted;
// Where one token staked for one day should receive ~ 72 ZZZs
return rewardBlocks * 10 ** 16 ;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: 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 (last updated v4.6.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 `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// 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 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);
}{
"optimizer": {
"enabled": true,
"runs": 300
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_erc20Token","type":"address"},{"internalType":"address","name":"_erc721Token","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_staker","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"StakeNft","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_staker","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_rewardTokens","type":"uint256"}],"name":"UnstakeNft","type":"event"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"_getAvailableRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"_getStakedIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"commitments","outputs":[{"internalType":"uint32","name":"blockStakedAdjusted","type":"uint32"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"stakeMultipleNfts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"stakeNft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"unstakeNft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_beneficiary","type":"address"}],"name":"unstakeNftOptions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAvailableRewards","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60e06040523480156200001157600080fd5b5060405162001855380380620018558339810160408190526200003491620000cc565b6200003f336200005f565b600180556001600160a01b039182166080521660a0524360c05262000104565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000c757600080fd5b919050565b60008060408385031215620000e057600080fd5b620000eb83620000af565b9150620000fb60208401620000af565b90509250929050565b60805160a05160c0516116f062000165600039600081816104ec01528181610ce10152611272015260008181610287015281816103f90152818161070a01528181610803015281816108e801526110f3015260006112ec01526116f06000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80638da5cb5b11610081578063e5054d4e1161005b578063e5054d4e146101cb578063e5f92306146101eb578063f2fde38b146101f357600080fd5b80638da5cb5b1461016057806399ca856c1461017b578063cf2bebf0146101aa57600080fd5b80634300f5e1116100b25780634300f5e1146101325780636b42600014610145578063715018a61461015857600080fd5b806312da74e7146100d9578063150b7a02146100ee5780632a2a54661461011f575b600080fd5b6100ec6100e7366004611361565b610206565b005b6101016100fc3660046113ea565b61036b565b6040516001600160e01b031990911681526020015b60405180910390f35b6100ec61012d3660046114ae565b6106ef565b6100ec610140366004611554565b6108c6565b6100ec610153366004611554565b61094f565b6100ec6109b8565b6000546040516001600160a01b039091168152602001610116565b61018e61018936600461156d565b6109cc565b6040805163ffffffff9093168352602083019190915201610116565b6101bd6101b8366004611599565b610a0f565b604051908152602001610116565b6101de6101d9366004611599565b610ae2565b60405161011691906115bd565b6100ec610bfd565b6100ec610201366004611599565b610d7f565b60026001540361025d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260015560405163e985e9c560e01b81526001600160a01b0383811660048301523360248301527f0000000000000000000000000000000000000000000000000000000000000000169063e985e9c590604401602060405180830381865afa1580156102ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f29190611601565b6103575760405162461bcd60e51b815260206004820152603060248201527f43616c6c6572206973206e6f7420617070726f76656420666f7220616c6c2e2060448201526f29b2b29022a9219b99189039b832b19760811b6064820152608401610254565b610362838383610df8565b50506001805550565b60006001600160a01b03851630146103d95760405162461bcd60e51b815260206004820152602b60248201527f4d757374207472616e736665722076616c6964206e667420766961207374616b60448201526a3290333ab731ba34b7b71760a91b6064820152608401610254565b6040516331a9108f60e11b81526004810184905230906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636352211e90602401602060405180830381865afa158015610440573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104649190611623565b6001600160a01b0316146104c95760405162461bcd60e51b815260206004820152602660248201527f4d757374207472616e7366657220746f6b656e2066726f6d20445720636f6c6c60448201526532b1ba34b7b760d11b6064820152608401610254565b6040805180820182526000808252602082015281518083019092524391806105117f000000000000000000000000000000000000000000000000000000000000000085611656565b63ffffffff16815260209081018790526001600160a01b03881660009081526002909152604090205490915080158061059257506001600160a01b0387166000908152600260205260409020610568600183611656565b815481106105785761057861166d565b600091825260209091206002909102015463ffffffff1615155b156105ec576001600160a01b0387166000908152600260208181526040832080546001808201835591855293829020865194909302909201805463ffffffff191663ffffffff9094169390931783558401519101556106a5565b6001600160a01b038716600090815260026020526040902061060f600183611656565b8154811061061f5761061f61166d565b6000918252602082206002909102015463ffffffff1690036106a5576001600160a01b03871660009081526002602052604090208290610660600184611656565b815481106106705761067061166d565b6000918252602091829020835160029290920201805463ffffffff191663ffffffff9092169190911781559101516001909101555b60405186906001600160a01b038916907fcedcb7619cdd73f5806e0d56fa9401f1f7e53328f5a01ca7ea7075e0d115e9ad90600090a350630a85bd0160e11b979650505050505050565b60405163e985e9c560e01b81523360048201523060248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e985e9c590604401602060405180830381865afa158015610759573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077d9190611601565b15156001146107f45760405162461bcd60e51b815260206004820152603460248201527f44575374616b696e673a205374616b696e6720636f6e7472616374206973206e60448201527f6f7420617070726f76656420666f7220616c6c2e0000000000000000000000006064820152608401610254565b805160005b818110156108c1577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166342842e0e33308685815181106108445761084461166d565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050508060010190506107f9565b505050565b604051632142170760e11b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e90606401600060405180830381600087803b15801561093457600080fd5b505af1158015610948573d6000803e3d6000fd5b5050505050565b6002600154036109a15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610254565b60026001556109b1813380610df8565b5060018055565b6109c061119c565b6109ca60006111f6565b565b600260205281600052604060002081815481106109e857600080fd5b60009182526020909120600290910201805460019091015463ffffffff9091169250905082565b6001600160a01b038116600090815260026020908152604080832080548251818502810185019093528083528493849084015b82821015610a875760008481526020908190206040805180820190915260028502909101805463ffffffff168252600190810154828401529083529092019101610a42565b5050505090506000815190506000805b82811015610ad957610ac5848281518110610ab457610ab461166d565b602002602001015160000151611253565b610acf9083611683565b9150600101610a97565b50949350505050565b6001600160a01b0381166000908152600260209081526040808320805482518185028101850190935280835260609493849084015b82821015610b5c5760008481526020908190206040805180820190915260028502909101805463ffffffff168252600190810154828401529083529092019101610b17565b50505050905060008151905060008167ffffffffffffffff811115610b8357610b836113a3565b604051908082528060200260200182016040528015610bac578160200160208202803683370190505b50905060005b82811015610ad957838181518110610bcc57610bcc61166d565b602002602001015160200151828281518110610bea57610bea61166d565b6020908102919091010152600101610bb2565b600260015403610c4f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610254565b60026001819055336000908152602091825260408082208054825181860281018601909352808352929391929091849084015b82821015610cc75760008481526020908190206040805180820190915260028502909101805463ffffffff168252600190810154828401529083529092019101610c82565b5050505090506000610cd833610a0f565b90506000610d067f000000000000000000000000000000000000000000000000000000000000000043611656565b835190915060005b81811015610d6a57336000908152600260205260409020805484919083908110610d3a57610d3a61166d565b60009182526020909120600290910201805463ffffffff191663ffffffff92909216919091179055600101610d0e565b50610d7533846112c6565b5050600180555050565b610d8761119c565b6001600160a01b038116610dec5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610254565b610df5816111f6565b50565b6001600160a01b038216600090815260026020908152604080832080548251818502810185019093528083529192909190849084015b82821015610e735760008481526020908190206040805180820190915260028502909101805463ffffffff168252600190810154828401529083529092019101610e2e565b50505050905060008151905060008060005b8381101561102c576000858281518110610ea157610ea161166d565b602002602001015160200151905082151560011515148015610ecc5750610ec9600186611656565b82105b15610f605785610edd836001611683565b81518110610eed57610eed61166d565b6020026020010151600260008a6001600160a01b03166001600160a01b031681526020019081526020016000208381548110610f2b57610f2b61166d565b6000918252602091829020835160029290920201805463ffffffff191663ffffffff9092169190911781559101516001909101555b8881036110235760019250610f80868381518110610ab457610ab461166d565b9350610f8d600186611656565b8210156110235785610fa0836001611683565b81518110610fb057610fb061166d565b6020026020010151600260008a6001600160a01b03166001600160a01b031681526020019081526020016000208381548110610fee57610fee61166d565b6000918252602091829020835160029290920201805463ffffffff191663ffffffff9092169190911781559101516001909101555b50600101610e85565b508061106c5760405162461bcd60e51b815260206004820152600f60248201526e151bdad95b881b9bdd08199bdd5b99608a1b6044820152606401610254565b6001600160a01b038616600090815260026020526040902061108f600185611656565b8154811061109f5761109f61166d565b600091825260208220600290910201805463ffffffff19168155600101556110c785836112c6565b604051632142170760e11b81523060048201526001600160a01b038681166024830152604482018990527f000000000000000000000000000000000000000000000000000000000000000016906342842e0e90606401600060405180830381600087803b15801561113757600080fd5b505af115801561114b573d6000803e3d6000fd5b5050505086856001600160a01b03167ffad2c6d8d541c47f0c17b00c3636c27c299284aa7122cc14d8955dc4534d2b1b8460405161118b91815260200190565b60405180910390a350505050505050565b6000546001600160a01b031633146109ca5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610254565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008163ffffffff1660000361126b57506000919050565b60006112977f000000000000000000000000000000000000000000000000000000000000000043611656565b905060006112ab63ffffffff851683611656565b90506112be81662386f26fc1000061169b565b949350505050565b6040516340c10f1960e01b81526001600160a01b038381166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b15801561133057600080fd5b505af1158015611344573d6000803e3d6000fd5b505050505050565b6001600160a01b0381168114610df557600080fd5b60008060006060848603121561137657600080fd5b8335925060208401356113888161134c565b915060408401356113988161134c565b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156113e2576113e26113a3565b604052919050565b6000806000806080858703121561140057600080fd5b843561140b8161134c565b935060208581013561141c8161134c565b935060408601359250606086013567ffffffffffffffff8082111561144057600080fd5b818801915088601f83011261145457600080fd5b813581811115611466576114666113a3565b611478601f8201601f191685016113b9565b9150808252898482850101111561148e57600080fd5b808484018584013760008482840101525080935050505092959194509250565b600060208083850312156114c157600080fd5b823567ffffffffffffffff808211156114d957600080fd5b818501915085601f8301126114ed57600080fd5b8135818111156114ff576114ff6113a3565b8060051b91506115108483016113b9565b818152918301840191848101908884111561152a57600080fd5b938501935b838510156115485784358252938501939085019061152f565b98975050505050505050565b60006020828403121561156657600080fd5b5035919050565b6000806040838503121561158057600080fd5b823561158b8161134c565b946020939093013593505050565b6000602082840312156115ab57600080fd5b81356115b68161134c565b9392505050565b6020808252825182820181905260009190848201906040850190845b818110156115f5578351835292840192918401916001016115d9565b50909695505050505050565b60006020828403121561161357600080fd5b815180151581146115b657600080fd5b60006020828403121561163557600080fd5b81516115b68161134c565b634e487b7160e01b600052601160045260246000fd5b60008282101561166857611668611640565b500390565b634e487b7160e01b600052603260045260246000fd5b6000821982111561169657611696611640565b500190565b60008160001904831182151516156116b5576116b5611640565b50029056fea2646970667358221220dd51099411271628a4c663fa482b3427243fa6cbae9b0daf6ba9eddfedab70d364736f6c634300080f00330000000000000000000000003cda90a65d34c2f7c2cfc7acf6a9e3433ce0e882000000000000000000000000cdbf12722615269158d8959abe47cc83caddb112
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100d45760003560e01c80638da5cb5b11610081578063e5054d4e1161005b578063e5054d4e146101cb578063e5f92306146101eb578063f2fde38b146101f357600080fd5b80638da5cb5b1461016057806399ca856c1461017b578063cf2bebf0146101aa57600080fd5b80634300f5e1116100b25780634300f5e1146101325780636b42600014610145578063715018a61461015857600080fd5b806312da74e7146100d9578063150b7a02146100ee5780632a2a54661461011f575b600080fd5b6100ec6100e7366004611361565b610206565b005b6101016100fc3660046113ea565b61036b565b6040516001600160e01b031990911681526020015b60405180910390f35b6100ec61012d3660046114ae565b6106ef565b6100ec610140366004611554565b6108c6565b6100ec610153366004611554565b61094f565b6100ec6109b8565b6000546040516001600160a01b039091168152602001610116565b61018e61018936600461156d565b6109cc565b6040805163ffffffff9093168352602083019190915201610116565b6101bd6101b8366004611599565b610a0f565b604051908152602001610116565b6101de6101d9366004611599565b610ae2565b60405161011691906115bd565b6100ec610bfd565b6100ec610201366004611599565b610d7f565b60026001540361025d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260015560405163e985e9c560e01b81526001600160a01b0383811660048301523360248301527f000000000000000000000000cdbf12722615269158d8959abe47cc83caddb112169063e985e9c590604401602060405180830381865afa1580156102ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f29190611601565b6103575760405162461bcd60e51b815260206004820152603060248201527f43616c6c6572206973206e6f7420617070726f76656420666f7220616c6c2e2060448201526f29b2b29022a9219b99189039b832b19760811b6064820152608401610254565b610362838383610df8565b50506001805550565b60006001600160a01b03851630146103d95760405162461bcd60e51b815260206004820152602b60248201527f4d757374207472616e736665722076616c6964206e667420766961207374616b60448201526a3290333ab731ba34b7b71760a91b6064820152608401610254565b6040516331a9108f60e11b81526004810184905230906001600160a01b037f000000000000000000000000cdbf12722615269158d8959abe47cc83caddb1121690636352211e90602401602060405180830381865afa158015610440573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104649190611623565b6001600160a01b0316146104c95760405162461bcd60e51b815260206004820152602660248201527f4d757374207472616e7366657220746f6b656e2066726f6d20445720636f6c6c60448201526532b1ba34b7b760d11b6064820152608401610254565b6040805180820182526000808252602082015281518083019092524391806105117f0000000000000000000000000000000000000000000000000000000000f2f0be85611656565b63ffffffff16815260209081018790526001600160a01b03881660009081526002909152604090205490915080158061059257506001600160a01b0387166000908152600260205260409020610568600183611656565b815481106105785761057861166d565b600091825260209091206002909102015463ffffffff1615155b156105ec576001600160a01b0387166000908152600260208181526040832080546001808201835591855293829020865194909302909201805463ffffffff191663ffffffff9094169390931783558401519101556106a5565b6001600160a01b038716600090815260026020526040902061060f600183611656565b8154811061061f5761061f61166d565b6000918252602082206002909102015463ffffffff1690036106a5576001600160a01b03871660009081526002602052604090208290610660600184611656565b815481106106705761067061166d565b6000918252602091829020835160029290920201805463ffffffff191663ffffffff9092169190911781559101516001909101555b60405186906001600160a01b038916907fcedcb7619cdd73f5806e0d56fa9401f1f7e53328f5a01ca7ea7075e0d115e9ad90600090a350630a85bd0160e11b979650505050505050565b60405163e985e9c560e01b81523360048201523060248201527f000000000000000000000000cdbf12722615269158d8959abe47cc83caddb1126001600160a01b03169063e985e9c590604401602060405180830381865afa158015610759573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077d9190611601565b15156001146107f45760405162461bcd60e51b815260206004820152603460248201527f44575374616b696e673a205374616b696e6720636f6e7472616374206973206e60448201527f6f7420617070726f76656420666f7220616c6c2e0000000000000000000000006064820152608401610254565b805160005b818110156108c1577f000000000000000000000000cdbf12722615269158d8959abe47cc83caddb1126001600160a01b03166342842e0e33308685815181106108445761084461166d565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050508060010190506107f9565b505050565b604051632142170760e11b8152336004820152306024820152604481018290527f000000000000000000000000cdbf12722615269158d8959abe47cc83caddb1126001600160a01b0316906342842e0e90606401600060405180830381600087803b15801561093457600080fd5b505af1158015610948573d6000803e3d6000fd5b5050505050565b6002600154036109a15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610254565b60026001556109b1813380610df8565b5060018055565b6109c061119c565b6109ca60006111f6565b565b600260205281600052604060002081815481106109e857600080fd5b60009182526020909120600290910201805460019091015463ffffffff9091169250905082565b6001600160a01b038116600090815260026020908152604080832080548251818502810185019093528083528493849084015b82821015610a875760008481526020908190206040805180820190915260028502909101805463ffffffff168252600190810154828401529083529092019101610a42565b5050505090506000815190506000805b82811015610ad957610ac5848281518110610ab457610ab461166d565b602002602001015160000151611253565b610acf9083611683565b9150600101610a97565b50949350505050565b6001600160a01b0381166000908152600260209081526040808320805482518185028101850190935280835260609493849084015b82821015610b5c5760008481526020908190206040805180820190915260028502909101805463ffffffff168252600190810154828401529083529092019101610b17565b50505050905060008151905060008167ffffffffffffffff811115610b8357610b836113a3565b604051908082528060200260200182016040528015610bac578160200160208202803683370190505b50905060005b82811015610ad957838181518110610bcc57610bcc61166d565b602002602001015160200151828281518110610bea57610bea61166d565b6020908102919091010152600101610bb2565b600260015403610c4f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610254565b60026001819055336000908152602091825260408082208054825181860281018601909352808352929391929091849084015b82821015610cc75760008481526020908190206040805180820190915260028502909101805463ffffffff168252600190810154828401529083529092019101610c82565b5050505090506000610cd833610a0f565b90506000610d067f0000000000000000000000000000000000000000000000000000000000f2f0be43611656565b835190915060005b81811015610d6a57336000908152600260205260409020805484919083908110610d3a57610d3a61166d565b60009182526020909120600290910201805463ffffffff191663ffffffff92909216919091179055600101610d0e565b50610d7533846112c6565b5050600180555050565b610d8761119c565b6001600160a01b038116610dec5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610254565b610df5816111f6565b50565b6001600160a01b038216600090815260026020908152604080832080548251818502810185019093528083529192909190849084015b82821015610e735760008481526020908190206040805180820190915260028502909101805463ffffffff168252600190810154828401529083529092019101610e2e565b50505050905060008151905060008060005b8381101561102c576000858281518110610ea157610ea161166d565b602002602001015160200151905082151560011515148015610ecc5750610ec9600186611656565b82105b15610f605785610edd836001611683565b81518110610eed57610eed61166d565b6020026020010151600260008a6001600160a01b03166001600160a01b031681526020019081526020016000208381548110610f2b57610f2b61166d565b6000918252602091829020835160029290920201805463ffffffff191663ffffffff9092169190911781559101516001909101555b8881036110235760019250610f80868381518110610ab457610ab461166d565b9350610f8d600186611656565b8210156110235785610fa0836001611683565b81518110610fb057610fb061166d565b6020026020010151600260008a6001600160a01b03166001600160a01b031681526020019081526020016000208381548110610fee57610fee61166d565b6000918252602091829020835160029290920201805463ffffffff191663ffffffff9092169190911781559101516001909101555b50600101610e85565b508061106c5760405162461bcd60e51b815260206004820152600f60248201526e151bdad95b881b9bdd08199bdd5b99608a1b6044820152606401610254565b6001600160a01b038616600090815260026020526040902061108f600185611656565b8154811061109f5761109f61166d565b600091825260208220600290910201805463ffffffff19168155600101556110c785836112c6565b604051632142170760e11b81523060048201526001600160a01b038681166024830152604482018990527f000000000000000000000000cdbf12722615269158d8959abe47cc83caddb11216906342842e0e90606401600060405180830381600087803b15801561113757600080fd5b505af115801561114b573d6000803e3d6000fd5b5050505086856001600160a01b03167ffad2c6d8d541c47f0c17b00c3636c27c299284aa7122cc14d8955dc4534d2b1b8460405161118b91815260200190565b60405180910390a350505050505050565b6000546001600160a01b031633146109ca5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610254565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008163ffffffff1660000361126b57506000919050565b60006112977f0000000000000000000000000000000000000000000000000000000000f2f0be43611656565b905060006112ab63ffffffff851683611656565b90506112be81662386f26fc1000061169b565b949350505050565b6040516340c10f1960e01b81526001600160a01b038381166004830152602482018390527f0000000000000000000000003cda90a65d34c2f7c2cfc7acf6a9e3433ce0e88216906340c10f1990604401600060405180830381600087803b15801561133057600080fd5b505af1158015611344573d6000803e3d6000fd5b505050505050565b6001600160a01b0381168114610df557600080fd5b60008060006060848603121561137657600080fd5b8335925060208401356113888161134c565b915060408401356113988161134c565b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156113e2576113e26113a3565b604052919050565b6000806000806080858703121561140057600080fd5b843561140b8161134c565b935060208581013561141c8161134c565b935060408601359250606086013567ffffffffffffffff8082111561144057600080fd5b818801915088601f83011261145457600080fd5b813581811115611466576114666113a3565b611478601f8201601f191685016113b9565b9150808252898482850101111561148e57600080fd5b808484018584013760008482840101525080935050505092959194509250565b600060208083850312156114c157600080fd5b823567ffffffffffffffff808211156114d957600080fd5b818501915085601f8301126114ed57600080fd5b8135818111156114ff576114ff6113a3565b8060051b91506115108483016113b9565b818152918301840191848101908884111561152a57600080fd5b938501935b838510156115485784358252938501939085019061152f565b98975050505050505050565b60006020828403121561156657600080fd5b5035919050565b6000806040838503121561158057600080fd5b823561158b8161134c565b946020939093013593505050565b6000602082840312156115ab57600080fd5b81356115b68161134c565b9392505050565b6020808252825182820181905260009190848201906040850190845b818110156115f5578351835292840192918401916001016115d9565b50909695505050505050565b60006020828403121561161357600080fd5b815180151581146115b657600080fd5b60006020828403121561163557600080fd5b81516115b68161134c565b634e487b7160e01b600052601160045260246000fd5b60008282101561166857611668611640565b500390565b634e487b7160e01b600052603260045260246000fd5b6000821982111561169657611696611640565b500190565b60008160001904831182151516156116b5576116b5611640565b50029056fea2646970667358221220dd51099411271628a4c663fa482b3427243fa6cbae9b0daf6ba9eddfedab70d364736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003cda90a65d34c2f7c2cfc7acf6a9e3433ce0e882000000000000000000000000cdbf12722615269158d8959abe47cc83caddb112
-----Decoded View---------------
Arg [0] : _erc20Token (address): 0x3CdA90a65d34c2f7c2cFc7Acf6A9E3433cE0e882
Arg [1] : _erc721Token (address): 0xCdbF12722615269158D8959aBE47Cc83cAdDb112
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000003cda90a65d34c2f7c2cfc7acf6a9e3433ce0e882
Arg [1] : 000000000000000000000000cdbf12722615269158d8959abe47cc83caddb112
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.