Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 1,072 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Stake | 14284529 | 1468 days ago | IN | 0 ETH | 0.00192504 | ||||
| Claim | 14107547 | 1496 days ago | IN | 0 ETH | 0.0034139 | ||||
| Claim | 14089556 | 1498 days ago | IN | 0 ETH | 0.01106073 | ||||
| Stake | 14088886 | 1498 days ago | IN | 0 ETH | 0.00461304 | ||||
| Stake | 14086635 | 1499 days ago | IN | 0 ETH | 0.00382252 | ||||
| Claim | 14082112 | 1500 days ago | IN | 0 ETH | 0.02931001 | ||||
| Stake | 14075694 | 1500 days ago | IN | 0 ETH | 0.01908873 | ||||
| Stake | 14075258 | 1501 days ago | IN | 0 ETH | 0.00496319 | ||||
| Stake | 14075257 | 1501 days ago | IN | 0 ETH | 0.01999909 | ||||
| Stake | 14075203 | 1501 days ago | IN | 0 ETH | 0.01680026 | ||||
| Stake | 14075200 | 1501 days ago | IN | 0 ETH | 0.01700031 | ||||
| Stake | 14075065 | 1501 days ago | IN | 0 ETH | 0.0136073 | ||||
| Claim | 14075024 | 1501 days ago | IN | 0 ETH | 0.02214051 | ||||
| Stake | 14074958 | 1501 days ago | IN | 0 ETH | 0.01160999 | ||||
| Stake | 14074712 | 1501 days ago | IN | 0 ETH | 0.00316592 | ||||
| Stake | 14074712 | 1501 days ago | IN | 0 ETH | 0.01433154 | ||||
| Stake | 14074712 | 1501 days ago | IN | 0 ETH | 0.01234958 | ||||
| Claim | 14074687 | 1501 days ago | IN | 0 ETH | 0.00750864 | ||||
| Stake | 14074623 | 1501 days ago | IN | 0 ETH | 0.01303816 | ||||
| Stake | 14074614 | 1501 days ago | IN | 0 ETH | 0.01097571 | ||||
| Stake | 14074570 | 1501 days ago | IN | 0 ETH | 0.01194159 | ||||
| Stake | 14074532 | 1501 days ago | IN | 0 ETH | 0.00987624 | ||||
| Stake | 14074431 | 1501 days ago | IN | 0 ETH | 0.01412781 | ||||
| Claim | 14074429 | 1501 days ago | IN | 0 ETH | 0.00766733 | ||||
| Claim | 14074406 | 1501 days ago | IN | 0 ETH | 0.01592222 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
BlockverseStaking
Compiler Version
v0.8.9+commit.e5eed63a
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "./interfaces/IBlockverseStaking.sol";
import "./interfaces/IBlockverseDiamonds.sol";
import "./interfaces/IBlockverse.sol";
contract BlockverseStaking is IBlockverseStaking, IERC721Receiver, Ownable, ReentrancyGuard {
IBlockverse blockverse;
IBlockverseDiamonds diamonds;
address signer;
mapping(address => uint256) public userStake;
mapping(address => uint256) public userUnstakeTime;
mapping(address => IBlockverse.BlockverseFaction) public userUnstakeFaction;
mapping(uint256 => address) public tokenStakedBy;
mapping(uint256 => bool) public nonceUsed;
uint256 unstakeFactionChangeTime = 3 days;
function stake(address from, uint256 tokenId) external override requireContractsSet nonReentrant {
require(tx.origin == _msgSender() || _msgSender() == address(blockverse), "Only EOA");
require(userStake[from] == 0, "Must not be staking already");
require(userUnstakeFaction[from] == blockverse.getTokenFaction(tokenId) || block.timestamp - userUnstakeTime[from] > unstakeFactionChangeTime, "Can't switch faction yet");
if (_msgSender() != address(blockverse)) {
require(blockverse.ownerOf(tokenId) == _msgSender(), "Must own this token");
require(_msgSender() == from, "Must stake from yourself");
blockverse.transferFrom(_msgSender(), address(this), tokenId);
}
userStake[from] = tokenId;
tokenStakedBy[tokenId] = from;
}
bytes32 constant public MINT_CALL_HASH_TYPE = keccak256("mint(address to,uint256 amount)");
function claim(uint256 tokenId, bool unstake, uint256 nonce, uint256 amountV, bytes32 r, bytes32 s) external override requireContractsSet nonReentrant {
require(tx.origin == _msgSender(), "Only EOA");
require(userStake[_msgSender()] == tokenId, "Must own this token");
require(tokenStakedBy[tokenId] == _msgSender(), "Must own this token");
require(!nonceUsed[nonce], "Claim already used");
nonceUsed[nonce] = true;
uint256 amount = uint248(amountV >> 8);
uint8 v = uint8(amountV);
bytes32 digest = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32",
keccak256(abi.encode(MINT_CALL_HASH_TYPE, nonce, _msgSender(), amount))
));
address signedBy = ecrecover(digest, v, r, s);
require(signedBy == signer, "Invalid signer");
if (unstake) {
userStake[_msgSender()] = 0;
tokenStakedBy[tokenId] = address(0);
userUnstakeFaction[_msgSender()] = blockverse.getTokenFaction(tokenId);
userUnstakeTime[_msgSender()] = block.timestamp;
blockverse.safeTransferFrom(address(this), _msgSender(), tokenId, "");
}
diamonds.mint(_msgSender(), amount);
emit Claim(tokenId, amount, unstake);
}
function stakedByUser(address user) external view override returns (uint256) {
return userStake[user];
}
// SETUP
modifier requireContractsSet() {
require(address(blockverse) != address(0) && address(diamonds) != address(0) &&
address(signer) != address(0),
"Contracts not set");
_;
}
function setContracts(address _blockverse, address _diamonds, address _signer) external onlyOwner {
blockverse = IBlockverse(_blockverse);
diamonds = IBlockverseDiamonds(_diamonds);
signer = _signer;
}
function onERC721Received(
address,
address from,
uint256,
bytes calldata
) external pure override returns (bytes4) {
require(from == address(0x0), "Cannot send to BlockverseStaking directly");
return IERC721Receiver.onERC721Received.selector;
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./interfaces/IBlockverse.sol";
import "./interfaces/IBlockverseStaking.sol";
import "./interfaces/IBlockverseMetadata.sol";
contract Blockverse is IBlockverse, ERC721Enumerable, Ownable, ReentrancyGuard {
using MerkleProof for bytes32[];
IBlockverseStaking staking;
IBlockverseMetadata metadata;
uint256 public constant price = 0.05 ether;
uint256 constant mintLimit = 4;
uint256 constant presaleMintLimit = 3;
uint256 constant supplyLimit = 10000;
bytes32 whitelistMerkelRoot;
// Sale Stages
// 0 - Nothing enabled
// 1 - Whitelist
// 2 - Public sale
uint8 public saleStage = 0;
mapping(address => uint256) public minted;
mapping(address => BlockverseFaction) public walletAssignedMintFaction;
mapping(BlockverseFaction => uint256) public mintedByFaction;
mapping(uint256 => BlockverseFaction) public tokenFaction;
constructor() ERC721("Blockverse", "BLCK") {}
// MINT
function remainingMint(address user) public view returns (uint256) {
return (saleStage == 1 ? presaleMintLimit : mintLimit) - minted[user];
}
function mint(uint256 num, bool autoStake) external override payable nonReentrant requireContractsSet {
uint256 supply = totalSupply();
require(tx.origin == _msgSender(), "Only EOA");
require(saleStage == 2 || _msgSender() == owner(), "Sale not started");
require(remainingMint(_msgSender()) >= num || _msgSender() == owner(), "Hit mint limit");
require(supply + num < supplyLimit, "Exceeds maximum supply");
require(msg.value >= price * num || _msgSender() == owner(), "Ether sent is not correct");
require(num > 0, "Can't mint 0");
if (walletAssignedMintFaction[_msgSender()] == BlockverseFaction.UNASSIGNED) {
BlockverseFaction minFaction = BlockverseFaction.APES;
uint256 minCount = mintedByFaction[minFaction];
for (uint256 i = 1; i <= uint256(BlockverseFaction.ALIENS); i++) {
uint256 iCount = mintedByFaction[BlockverseFaction(i)];
if (iCount < minCount) {
minFaction = BlockverseFaction(i);
minCount = iCount;
}
}
walletAssignedMintFaction[_msgSender()] = minFaction;
}
minted[_msgSender()] += num;
mintedByFaction[walletAssignedMintFaction[_msgSender()]] += num;
for (uint256 i; i < num; i++) {
address recipient = autoStake && i == 0 ? address(staking) : _msgSender();
_safeMint(recipient, supply + i + 1);
tokenFaction[supply + i + 1] = walletAssignedMintFaction[_msgSender()];
}
if (autoStake && staking.stakedByUser(_msgSender()) == 0) {
staking.stake(_msgSender(), supply + 1);
}
}
function whitelistMint(uint256 num, bytes32[] memory proof, bool autoStake) external override payable nonReentrant requireContractsSet {
uint256 supply = totalSupply();
require(tx.origin == _msgSender(), "Only EOA");
require(saleStage == 1 || _msgSender() == owner(), "Pre-sale not started or has ended");
require(remainingMint(_msgSender()) >= num, "Hit mint limit");
require(supply + num < supplyLimit, "Exceeds maximum supply");
require(msg.value >= num * price, "Ether sent is not correct");
require(whitelistMerkelRoot != 0, "Whitelist not set");
require(
proof.verify(whitelistMerkelRoot, keccak256(abi.encodePacked(_msgSender()))),
"You aren't whitelisted"
);
require(num > 0, "Can't mint 0");
minted[_msgSender()] += num;
for (uint256 i; i < num; i++) {
address recipient = autoStake ? address(staking) : _msgSender();
_safeMint(recipient, supply + i + 1);
tokenFaction[supply + i + 1] = walletAssignedMintFaction[_msgSender()];
}
if (autoStake) {
staking.stake(_msgSender(), supply + 1);
}
}
// UI LINK/METADATA
function walletOfUser(address user) public view override returns (uint256[] memory) {
uint256 tokenCount = balanceOf(user);
uint256[] memory tokensId = new uint256[](tokenCount);
for (uint256 i; i < tokenCount; i++) {
tokensId[i] = tokenOfOwnerByIndex(user, i);
}
return tokensId;
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
return metadata.tokenURI(tokenId, tokenFaction[tokenId]);
}
function getTokenFaction(uint256 tokenId) external view override returns (BlockverseFaction) {
return tokenFaction[tokenId];
}
// ADMIN
function setSaleStage(uint8 val) public onlyOwner {
saleStage = val;
}
function setWhitelistRoot(bytes32 val) public onlyOwner {
whitelistMerkelRoot = val;
}
function withdrawAll(address payable a) public onlyOwner {
a.transfer(address(this).balance);
}
// ALLOW STAKING TO MODIFY
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override(ERC721, IERC721) {
// allow admin contracts to be send without approval
if(_msgSender() != address(staking) && _msgSender() != owner()) {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
}
_transfer(from, to, tokenId);
}
// SETUP
modifier requireContractsSet() {
require(address(staking) != address(0) && address(metadata) != address(0)
, "Contracts not set");
_;
}
function setContracts(address _staking, address _metadata) external onlyOwner {
staking = IBlockverseStaking(_staking);
metadata = IBlockverseMetadata(_metadata);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)
pragma solidity ^0.8.0;
import "../ERC721.sol";
import "./IERC721Enumerable.sol";
/**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array with all token ids, used for enumeration
uint256[] private _allTokens;
// Mapping from token id to position in the allTokens array
mapping(uint256 => uint256) private _allTokensIndex;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
super._beforeTokenTransfer(from, to, tokenId);
if (from == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (from != to) {
_removeTokenFromOwnerEnumeration(from, tokenId);
}
if (to == address(0)) {
_removeTokenFromAllTokensEnumeration(tokenId);
} else if (to != from) {
_addTokenToOwnerEnumeration(to, tokenId);
}
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = ERC721.balanceOf(to);
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
uint256 tokenIndex = _ownedTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary
if (tokenIndex != lastTokenIndex) {
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
}
// This also deletes the contents at the last position of the array
delete _ownedTokensIndex[tokenId];
delete _ownedTokens[from][lastTokenIndex];
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
// rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
// an 'if' statement (like in _removeTokenFromOwnerEnumeration)
uint256 lastTokenId = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
// This also deletes the contents at the last position of the array
delete _allTokensIndex[tokenId];
_allTokens.pop();
}
}// 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 (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.1 (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
} else {
// Hash(current element of the proof + current computed hash)
computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
}
}
return computedHash;
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
interface IBlockverse is IERC721Enumerable {
function mint(uint256 amount, bool autoStake) external payable;
function whitelistMint(uint256 amount, bytes32[] memory proof, bool autoStake) external payable;
function walletOfUser(address user) external view returns (uint256[] memory);
function getTokenFaction(uint256 tokenId) external view returns (BlockverseFaction);
enum BlockverseFaction {
UNASSIGNED,
APES,
KONGS,
DOODLERS,
CATS,
KAIJUS,
ALIENS
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
interface IBlockverseStaking {
function stake(address from, uint256 tokenId) external;
function claim(uint256 tokenId, bool unstake, uint256 nonce, uint256 amountV, bytes32 r, bytes32 s) external;
function stakedByUser(address user) external view returns (uint256);
event Claim(uint256 indexed _tokenId, uint256 indexed _amount, bool indexed _unstake);
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "./IBlockverse.sol";
interface IBlockverseMetadata {
function tokenURI(uint256 tokenId, IBlockverse.BlockverseFaction faction) external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @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.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol)
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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.1 (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.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "./interfaces/IBlockverseMetadata.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
struct BlockverseToken {
IBlockverse.BlockverseFaction faction;
uint8 bottom;
uint8 eye;
uint8 mouth;
uint8 top;
}
contract BlockverseMetadata is IBlockverseMetadata, Ownable {
using Strings for uint256;
using Strings for uint8;
string public cdnUrl;
uint256[] public tidBreakpoints;
uint256[] public seedBreakpoints;
mapping(uint256 => uint8[]) public traitProbabilities;
mapping(uint256 => uint8[]) public traitAliases;
mapping(uint256 => mapping(uint8 => string)) public traitNames;
function tokenURI(uint256 tokenId, IBlockverse.BlockverseFaction faction) external view override returns (string memory) {
BlockverseToken memory tokenStruct = getTokenMetadata(tokenId, faction);
string memory metadata;
if (tokenStruct.faction == IBlockverse.BlockverseFaction.UNASSIGNED) {
metadata = string(abi.encodePacked(
'{',
'"name":"Blockverse #???",',
'"description":"",',
'"image":"', cdnUrl, '/unknown",',
'"attributes":[',
attributeForTypeAndValue("Faction", "???"),',',
attributeForTypeAndValue("Bottom", "???"),',',
attributeForTypeAndValue("Eye", "???"),',',
attributeForTypeAndValue("Mouth", "???"),',',
attributeForTypeAndValue("Top", "???"),
']',
"}"
));
} else {
string memory queryParams = string(abi.encodePacked(
"?base=",uint256(faction).toString(),
"&bottoms=",tokenStruct.bottom.toString(),
"&eyes=",tokenStruct.eye.toString(),
"&mouths=",tokenStruct.mouth.toString(),
"&tops=",tokenStruct.top.toString()
));
metadata = string(abi.encodePacked(
'{',
'"name":"Blockverse #',tokenId.toString(),'",',
'"description":"",',
'"image":"', cdnUrl, '/token',queryParams,'",',
'"skinImage":"', cdnUrl, '/skin',queryParams,'",',
'"attributes":[',
attributeForTypeAndValue("Faction", factionToString(faction)),',',
attributeForTypeAndValue("Bottom", traitNames[0][tokenStruct.bottom]),',',
attributeForTypeAndValue("Eye", traitNames[1][tokenStruct.eye]),',',
attributeForTypeAndValue("Mouth", traitNames[2][tokenStruct.mouth]),',',
attributeForTypeAndValue("Top", traitNames[3][tokenStruct.top]),
']',
"}"
));
}
return string(abi.encodePacked(
"data:application/json;base64,",
base64(bytes(metadata))
));
}
// METADATA/SEEDING
function getTokenMetadata(uint256 tid, IBlockverse.BlockverseFaction faction) internal view returns (BlockverseToken memory tokenMetadata) {
uint256 seed = getTokenSeed(tid);
if (seed == 0) {
tokenMetadata.faction = IBlockverse.BlockverseFaction.UNASSIGNED;
} else {
tokenMetadata.faction = faction;
tokenMetadata.bottom = getTraitValue(seed, 0);
tokenMetadata.eye = getTraitValue(seed, 1);
tokenMetadata.mouth = getTraitValue(seed, 2);
tokenMetadata.top = getTraitValue(seed, 3);
}
}
function getTraitValue(uint256 seed, uint256 trait) public view returns (uint8 traitValue) {
uint8 n = uint8(traitProbabilities[trait].length);
uint16 traitSeed = uint16(seed >> trait * 16);
traitValue = uint8(traitSeed) % n;
uint8 rand = uint8(traitSeed >> 8);
if (traitProbabilities[trait][traitValue] < rand) {
traitValue = traitAliases[trait][traitValue];
}
}
function getTokenSeed(uint256 tid) public view returns (uint256 seed) {
require(tidBreakpoints.length == seedBreakpoints.length, "Invalid state");
uint256 rangeSeed = 0;
for (uint256 i; i < tidBreakpoints.length; i++) {
if (tidBreakpoints[i] > tid) {
rangeSeed = seedBreakpoints[i];
}
}
seed = rangeSeed == 0 ? 0 : uint256(keccak256(abi.encodePacked(tid, rangeSeed)));
}
function addBreakpoint(uint256 seed, uint256 tid) external onlyOwner {
require(seed != 0, "Seed can't be 0");
require(tid != 0, "Token ID can't be 0");
seedBreakpoints.push(seed);
tidBreakpoints.push(tid);
}
// TRAIT UPLOAD
function uploadTraitNames(uint8 traitType, uint8[] calldata traitIds, string[] calldata newTraitNames) external onlyOwner {
require(traitIds.length == newTraitNames.length, "Mismatched inputs");
for (uint i = 0; i < traitIds.length; i++) {
traitNames[traitType][traitIds[i]] = newTraitNames[i];
}
}
function uploadTraitProbabilities(uint8 traitType, uint8[] calldata newTraitProbabilities) external onlyOwner {
delete traitProbabilities[traitType];
for (uint i = 0; i < newTraitProbabilities.length; i++) {
traitProbabilities[traitType].push(newTraitProbabilities[i]);
}
}
function uploadTraitAliases(uint8 traitType, uint8[] calldata newTraitAliases) external onlyOwner {
delete traitAliases[traitType];
for (uint i = 0; i < newTraitAliases.length; i++) {
traitAliases[traitType].push(newTraitAliases[i]);
}
}
function setCdnUri(string memory newCdnUri) external onlyOwner {
cdnUrl = newCdnUri;
}
// JSON Representation
function factionToString(IBlockverse.BlockverseFaction faction) internal pure returns (string memory factionString) {
factionString = "???";
if (faction == IBlockverse.BlockverseFaction.APES) {
factionString = "Apes";
} else if (faction == IBlockverse.BlockverseFaction.KONGS) {
factionString = "Kongs";
} else if (faction == IBlockverse.BlockverseFaction.DOODLERS) {
factionString = "Doodlers";
} else if (faction == IBlockverse.BlockverseFaction.CATS) {
factionString = "Cats";
} else if (faction == IBlockverse.BlockverseFaction.KAIJUS) {
factionString = "Kaijus";
} else if (faction == IBlockverse.BlockverseFaction.ALIENS) {
factionString = "Aliens";
}
}
function attributeForTypeAndValue(string memory traitType, string memory value) internal pure returns (string memory) {
return string(abi.encodePacked(
'{"trait_type":"',
traitType,
'","value":"',
value,
'"}'
));
}
/** BASE 64 - Written by Brech Devos */
string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
function base64(bytes memory data) internal pure returns (string memory) {
if (data.length == 0) return '';
// load the table into memory
string memory table = TABLE;
// multiply by 4/3 rounded up
uint256 encodedLen = 4 * ((data.length + 2) / 3);
// add some extra buffer at the end required for the writing
string memory result = new string(encodedLen + 32);
assembly {
// set the actual output length
mstore(result, encodedLen)
// prepare the lookup table
let tablePtr := add(table, 1)
// input ptr
let dataPtr := data
let endPtr := add(dataPtr, mload(data))
// result ptr, jump over length
let resultPtr := add(result, 32)
// run over the input, 3 bytes at a time
for {} lt(dataPtr, endPtr) {}
{
dataPtr := add(dataPtr, 3)
// read 3 bytes
let input := mload(dataPtr)
// write 4 characters
mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F)))))
resultPtr := add(resultPtr, 1)
mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F)))))
resultPtr := add(resultPtr, 1)
mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr( 6, input), 0x3F)))))
resultPtr := add(resultPtr, 1)
mstore(resultPtr, shl(248, mload(add(tablePtr, and( input, 0x3F)))))
resultPtr := add(resultPtr, 1)
}
// padding with '='
switch mod(mload(data), 3)
case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
}
return result;
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
interface IBlockverseDiamonds {
function mint(address to, uint256 amount) external;
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IBlockverseDiamonds.sol";
import "./interfaces/IBlockverseStaking.sol";
contract BlockverseDiamonds is ERC20, IBlockverseDiamonds, Ownable, ReentrancyGuard {
IBlockverseStaking staking;
constructor() ERC20("Blockverse Diamonds", "DIAMOND") {}
function decimals() public view virtual override returns (uint8) {
return 0;
}
function mint(address to, uint256 amount) external override nonReentrant requireContractsSet {
require(_msgSender() == address(staking) || _msgSender() == owner(), "Not authorized");
_mint(to, amount);
}
// SETUP
modifier requireContractsSet() {
require(address(staking) != address(0), "Contracts not set");
_;
}
function setContracts(address _staking) external onlyOwner {
staking = IBlockverseStaking(_staking);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}{
"optimizer": {
"enabled": true,
"runs": 200,
"details": {
"yul": true,
"yulDetails": {
"stackAllocation": true,
"optimizerSteps": "dhfoDgvulfnTUtnIf"
}
}
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":true,"internalType":"bool","name":"_unstake","type":"bool"}],"name":"Claim","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"},{"inputs":[],"name":"MINT_CALL_HASH_TYPE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"unstake","type":"bool"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"amountV","type":"uint256"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nonceUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","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":"address","name":"_blockverse","type":"address"},{"internalType":"address","name":"_diamonds","type":"address"},{"internalType":"address","name":"_signer","type":"address"}],"name":"setContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"stakedByUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenStakedBy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userUnstakeFaction","outputs":[{"internalType":"enum IBlockverse.BlockverseFaction","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userUnstakeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60806040526203f480600a5534801561001757600080fd5b506100213361002a565b6001805561007a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61143b806100896000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063b1b03c691161008c578063bf5a185111610066578063bf5a185114610231578063c688387f14610261578063c9b6222214610288578063f2fde38b1461029b57600080fd5b8063b1b03c69146101cc578063b3066d49146101f5578063b7614de71461020857600080fd5b8063715018a6116100c8578063715018a6146101655780638da5cb5b1461016f57806394d0d3a614610189578063adc9772e146101b957600080fd5b8063150b7a02146100ef5780631f6317381461011857806368e5585d14610145575b600080fd5b6101026100fd366004610ca8565b6102ae565b60405161010f9190610d3e565b60405180910390f35b610138610126366004610d4c565b60066020526000908152604090205481565b60405161010f9190610d7b565b610138610153366004610d4c565b60056020526000908152604090205481565b61016d6102f3565b005b6000546001600160a01b03165b60405161010f9190610d92565b6101ac610197366004610da0565b60096020526000908152604090205460ff1681565b60405161010f9190610dc9565b61016d6101c7366004610dd7565b610329565b61017c6101da366004610da0565b6008602052600090815260409020546001600160a01b031681565b61016d610203366004610e14565b6106b2565b610138610216366004610d4c565b6001600160a01b031660009081526005602052604090205490565b61025461023f366004610d4c565b60076020526000908152604090205460ff1681565b60405161010f9190610ead565b6101387faa6a499e4ed4ba779febcb80f1baa5fd8e691625a960e04cce5ba90bfc9f358581565b61016d610296366004610ece565b61071b565b61016d6102a9366004610d4c565b610b67565b60006001600160a01b038516156102e05760405162461bcd60e51b81526004016102d790610f9e565b60405180910390fd5b50630a85bd0160e11b5b95945050505050565b6000546001600160a01b0316331461031d5760405162461bcd60e51b81526004016102d790610fe0565b6103276000610bc3565b565b6002546001600160a01b03161580159061034d57506003546001600160a01b031615155b801561036357506004546001600160a01b031615155b61037f5760405162461bcd60e51b81526004016102d790611016565b600260015414156103a25760405162461bcd60e51b81526004016102d790611058565b6002600155323314806103c857506002546001600160a01b0316336001600160a01b0316145b6103e45760405162461bcd60e51b81526004016102d790611085565b6001600160a01b0382166000908152600560205260409020541561041a5760405162461bcd60e51b81526004016102d7906110c7565b60025460405163db67f61760e01b81526001600160a01b039091169063db67f6179061044a908490600401610d7b565b60206040518083038186803b15801561046257600080fd5b505afa158015610476573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049a91906110ef565b60068111156104ab576104ab610e64565b6001600160a01b03831660009081526007602052604090205460ff1660068111156104d8576104d8610e64565b14806105075750600a546001600160a01b0383166000908152600660205260409020546105059042611126565b115b6105235760405162461bcd60e51b81526004016102d79061116f565b6002546001600160a01b0316336001600160a01b031614610671576002546040516331a9108f60e11b815233916001600160a01b031690636352211e9061056e908590600401610d7b565b60206040518083038186803b15801561058657600080fd5b505afa15801561059a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105be919061118a565b6001600160a01b0316146105e45760405162461bcd60e51b81526004016102d7906111d3565b336001600160a01b0383161461060c5760405162461bcd60e51b81526004016102d790611215565b6002546001600160a01b03166323b872dd3330846040518463ffffffff1660e01b815260040161063e93929190611225565b600060405180830381600087803b15801561065857600080fd5b505af115801561066c573d6000803e3d6000fd5b505050505b6001600160a01b039091166000818152600560209081526040808320859055938252600890529190912080546001600160a01b031916909117905560018055565b6000546001600160a01b031633146106dc5760405162461bcd60e51b81526004016102d790610fe0565b600280546001600160a01b039485166001600160a01b031991821617909155600380549385169382169390931790925560048054919093169116179055565b6002546001600160a01b03161580159061073f57506003546001600160a01b031615155b801561075557506004546001600160a01b031615155b6107715760405162461bcd60e51b81526004016102d790611016565b600260015414156107945760405162461bcd60e51b81526004016102d790611058565b60026001553233146107b85760405162461bcd60e51b81526004016102d790611085565b3360009081526005602052604090205486146107e65760405162461bcd60e51b81526004016102d7906111d3565b6000868152600860205260409020546001600160a01b0316331461081c5760405162461bcd60e51b81526004016102d7906111d3565b60008481526009602052604090205460ff161561084b5760405162461bcd60e51b81526004016102d790611274565b6000848152600960205260408120805460ff19166001179055600884901c9084907faa6a499e4ed4ba779febcb80f1baa5fd8e691625a960e04cce5ba90bfc9f3585876108953390565b856040516020016108a99493929190611284565b604051602081830303815290604052805190602001206040516020016108cf91906112b9565b60405160208183030381529060405280519060200120905060006001828488886040516000815260200160405260405161090c94939291906112fa565b6020604051602081039080840390855afa15801561092e573d6000803e3d6000fd5b5050604051601f1901516004549092506001600160a01b03808416911614905061096a5760405162461bcd60e51b81526004016102d790611345565b8815610ac4573360009081526005602090815260408083208390558c835260089091529081902080546001600160a01b0319169055600254905163db67f61760e01b81526001600160a01b039091169063db67f617906109ce908d90600401610d7b565b60206040518083038186803b1580156109e657600080fd5b505afa1580156109fa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1e91906110ef565b336000908152600760205260409020805460ff19166001836006811115610a4757610a47610e64565b021790555033600081815260066020526040908190204290556002549051635c46a7ef60e11b81526001600160a01b039091169163b88d4fde91610a919130918f90600401611355565b600060405180830381600087803b158015610aab57600080fd5b505af1158015610abf573d6000803e3d6000fd5b505050505b6003546001600160a01b03166340c10f1933866040518363ffffffff1660e01b8152600401610af4929190611392565b600060405180830381600087803b158015610b0e57600080fd5b505af1158015610b22573d6000803e3d6000fd5b50505050881515848b7fddd837f81529f537c19f61d49b005e876ce85ad5e3a532b99238e081e71b6eec60405160405180910390a45050600180555050505050505050565b6000546001600160a01b03163314610b915760405162461bcd60e51b81526004016102d790610fe0565b6001600160a01b038116610bb75760405162461bcd60e51b81526004016102d7906113f5565b610bc081610bc3565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001600160a01b0382165b92915050565b610c2f81610c13565b8114610bc057600080fd5b8035610c2081610c26565b80610c2f565b8035610c2081610c45565b60008083601f840112610c6b57610c6b600080fd5b50813567ffffffffffffffff811115610c8657610c86600080fd5b602083019150836001820283011115610ca157610ca1600080fd5b9250929050565b600080600080600060808688031215610cc357610cc3600080fd5b6000610ccf8888610c3a565b9550506020610ce088828901610c3a565b9450506040610cf188828901610c4b565b935050606086013567ffffffffffffffff811115610d1157610d11600080fd5b610d1d88828901610c56565b92509250509295509295909350565b6001600160e01b031981165b82525050565b60208101610c208284610d2c565b600060208284031215610d6157610d61600080fd5b6000610d6d8484610c3a565b949350505050565b80610d38565b60208101610c208284610d75565b610d3881610c13565b60208101610c208284610d89565b600060208284031215610db557610db5600080fd5b6000610d6d8484610c4b565b801515610d38565b60208101610c208284610dc1565b60008060408385031215610ded57610ded600080fd5b6000610df98585610c3a565b9250506020610e0a85828601610c4b565b9150509250929050565b600080600060608486031215610e2c57610e2c600080fd5b6000610e388686610c3a565b9350506020610e4986828701610c3a565b9250506040610e5a86828701610c3a565b9150509250925092565b634e487b7160e01b600052602160045260246000fd5b60078110610bc057610bc0610e64565b80610e9481610e7a565b919050565b6000610c2082610e8a565b610d3881610e99565b60208101610c208284610ea4565b801515610c2f565b8035610c2081610ebb565b60008060008060008060c08789031215610eea57610eea600080fd5b6000610ef68989610c4b565b9650506020610f0789828a01610ec3565b9550506040610f1889828a01610c4b565b9450506060610f2989828a01610c4b565b9350506080610f3a89828a01610c4b565b92505060a0610f4b89828a01610c4b565b9150509295509295509295565b60298152602081017f43616e6e6f742073656e6420746f20426c6f636b76657273655374616b696e67815268206469726563746c7960b81b602082015290505b60400190565b60208082528101610c2081610f58565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081525b60200190565b60208082528101610c2081610fae565b60118152602081017010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b81529050610fda565b60208082528101610c2081610ff0565b601f8152602081017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081529050610fda565b60208082528101610c2081611026565b6008815260208101674f6e6c7920454f4160c01b81529050610fda565b60208082528101610c2081611068565b601b8152602081017f4d757374206e6f74206265207374616b696e6720616c7265616479000000000081529050610fda565b60208082528101610c2081611095565b60078110610bc057600080fd5b8051610c20816110d7565b60006020828403121561110457611104600080fd5b6000610d6d84846110e4565b634e487b7160e01b600052601160045260246000fd5b60008282101561113857611138611110565b500390565b60188152602081017f43616e2774207377697463682066616374696f6e20796574000000000000000081529050610fda565b60208082528101610c208161113d565b8051610c2081610c26565b60006020828403121561119f5761119f600080fd5b6000610d6d848461117f565b60138152602081017226bab9ba1037bbb7103a3434b9903a37b5b2b760691b81529050610fda565b60208082528101610c20816111ab565b60188152602081017f4d757374207374616b652066726f6d20796f757273656c66000000000000000081529050610fda565b60208082528101610c20816111e3565b606081016112338286610d89565b6112406020830185610d89565b610d6d6040830184610d75565b60128152602081017110db185a5b48185b1c9958591e481d5cd95960721b81529050610fda565b60208082528101610c208161124d565b608081016112928287610d75565b61129f6020830186610d75565b6112ac6040830185610d89565b6102ea6060830184610d75565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c016112e98183610d75565b602001919050565b60ff8116610d38565b608081016113088287610d75565b61131560208301866112f1565b6112ac6040830185610d75565b600e8152602081016d24b73b30b634b21039b4b3b732b960911b81529050610fda565b60208082528101610c2081611322565b608081016113638286610d89565b6113706020830185610d89565b61137d6040830184610d75565b818103606083015260008152602081016102ea565b604081016113a08285610d89565b6113ad6020830184610d75565b9392505050565b60268152602081017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b60208201529050610f98565b60208082528101610c20816113b456fea2646970667358221220ed25948652f86c1ef42d082e3bf5f37bab74be3c75dd67759929a13fa77ef75364736f6c63430008090033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063b1b03c691161008c578063bf5a185111610066578063bf5a185114610231578063c688387f14610261578063c9b6222214610288578063f2fde38b1461029b57600080fd5b8063b1b03c69146101cc578063b3066d49146101f5578063b7614de71461020857600080fd5b8063715018a6116100c8578063715018a6146101655780638da5cb5b1461016f57806394d0d3a614610189578063adc9772e146101b957600080fd5b8063150b7a02146100ef5780631f6317381461011857806368e5585d14610145575b600080fd5b6101026100fd366004610ca8565b6102ae565b60405161010f9190610d3e565b60405180910390f35b610138610126366004610d4c565b60066020526000908152604090205481565b60405161010f9190610d7b565b610138610153366004610d4c565b60056020526000908152604090205481565b61016d6102f3565b005b6000546001600160a01b03165b60405161010f9190610d92565b6101ac610197366004610da0565b60096020526000908152604090205460ff1681565b60405161010f9190610dc9565b61016d6101c7366004610dd7565b610329565b61017c6101da366004610da0565b6008602052600090815260409020546001600160a01b031681565b61016d610203366004610e14565b6106b2565b610138610216366004610d4c565b6001600160a01b031660009081526005602052604090205490565b61025461023f366004610d4c565b60076020526000908152604090205460ff1681565b60405161010f9190610ead565b6101387faa6a499e4ed4ba779febcb80f1baa5fd8e691625a960e04cce5ba90bfc9f358581565b61016d610296366004610ece565b61071b565b61016d6102a9366004610d4c565b610b67565b60006001600160a01b038516156102e05760405162461bcd60e51b81526004016102d790610f9e565b60405180910390fd5b50630a85bd0160e11b5b95945050505050565b6000546001600160a01b0316331461031d5760405162461bcd60e51b81526004016102d790610fe0565b6103276000610bc3565b565b6002546001600160a01b03161580159061034d57506003546001600160a01b031615155b801561036357506004546001600160a01b031615155b61037f5760405162461bcd60e51b81526004016102d790611016565b600260015414156103a25760405162461bcd60e51b81526004016102d790611058565b6002600155323314806103c857506002546001600160a01b0316336001600160a01b0316145b6103e45760405162461bcd60e51b81526004016102d790611085565b6001600160a01b0382166000908152600560205260409020541561041a5760405162461bcd60e51b81526004016102d7906110c7565b60025460405163db67f61760e01b81526001600160a01b039091169063db67f6179061044a908490600401610d7b565b60206040518083038186803b15801561046257600080fd5b505afa158015610476573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049a91906110ef565b60068111156104ab576104ab610e64565b6001600160a01b03831660009081526007602052604090205460ff1660068111156104d8576104d8610e64565b14806105075750600a546001600160a01b0383166000908152600660205260409020546105059042611126565b115b6105235760405162461bcd60e51b81526004016102d79061116f565b6002546001600160a01b0316336001600160a01b031614610671576002546040516331a9108f60e11b815233916001600160a01b031690636352211e9061056e908590600401610d7b565b60206040518083038186803b15801561058657600080fd5b505afa15801561059a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105be919061118a565b6001600160a01b0316146105e45760405162461bcd60e51b81526004016102d7906111d3565b336001600160a01b0383161461060c5760405162461bcd60e51b81526004016102d790611215565b6002546001600160a01b03166323b872dd3330846040518463ffffffff1660e01b815260040161063e93929190611225565b600060405180830381600087803b15801561065857600080fd5b505af115801561066c573d6000803e3d6000fd5b505050505b6001600160a01b039091166000818152600560209081526040808320859055938252600890529190912080546001600160a01b031916909117905560018055565b6000546001600160a01b031633146106dc5760405162461bcd60e51b81526004016102d790610fe0565b600280546001600160a01b039485166001600160a01b031991821617909155600380549385169382169390931790925560048054919093169116179055565b6002546001600160a01b03161580159061073f57506003546001600160a01b031615155b801561075557506004546001600160a01b031615155b6107715760405162461bcd60e51b81526004016102d790611016565b600260015414156107945760405162461bcd60e51b81526004016102d790611058565b60026001553233146107b85760405162461bcd60e51b81526004016102d790611085565b3360009081526005602052604090205486146107e65760405162461bcd60e51b81526004016102d7906111d3565b6000868152600860205260409020546001600160a01b0316331461081c5760405162461bcd60e51b81526004016102d7906111d3565b60008481526009602052604090205460ff161561084b5760405162461bcd60e51b81526004016102d790611274565b6000848152600960205260408120805460ff19166001179055600884901c9084907faa6a499e4ed4ba779febcb80f1baa5fd8e691625a960e04cce5ba90bfc9f3585876108953390565b856040516020016108a99493929190611284565b604051602081830303815290604052805190602001206040516020016108cf91906112b9565b60405160208183030381529060405280519060200120905060006001828488886040516000815260200160405260405161090c94939291906112fa565b6020604051602081039080840390855afa15801561092e573d6000803e3d6000fd5b5050604051601f1901516004549092506001600160a01b03808416911614905061096a5760405162461bcd60e51b81526004016102d790611345565b8815610ac4573360009081526005602090815260408083208390558c835260089091529081902080546001600160a01b0319169055600254905163db67f61760e01b81526001600160a01b039091169063db67f617906109ce908d90600401610d7b565b60206040518083038186803b1580156109e657600080fd5b505afa1580156109fa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1e91906110ef565b336000908152600760205260409020805460ff19166001836006811115610a4757610a47610e64565b021790555033600081815260066020526040908190204290556002549051635c46a7ef60e11b81526001600160a01b039091169163b88d4fde91610a919130918f90600401611355565b600060405180830381600087803b158015610aab57600080fd5b505af1158015610abf573d6000803e3d6000fd5b505050505b6003546001600160a01b03166340c10f1933866040518363ffffffff1660e01b8152600401610af4929190611392565b600060405180830381600087803b158015610b0e57600080fd5b505af1158015610b22573d6000803e3d6000fd5b50505050881515848b7fddd837f81529f537c19f61d49b005e876ce85ad5e3a532b99238e081e71b6eec60405160405180910390a45050600180555050505050505050565b6000546001600160a01b03163314610b915760405162461bcd60e51b81526004016102d790610fe0565b6001600160a01b038116610bb75760405162461bcd60e51b81526004016102d7906113f5565b610bc081610bc3565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001600160a01b0382165b92915050565b610c2f81610c13565b8114610bc057600080fd5b8035610c2081610c26565b80610c2f565b8035610c2081610c45565b60008083601f840112610c6b57610c6b600080fd5b50813567ffffffffffffffff811115610c8657610c86600080fd5b602083019150836001820283011115610ca157610ca1600080fd5b9250929050565b600080600080600060808688031215610cc357610cc3600080fd5b6000610ccf8888610c3a565b9550506020610ce088828901610c3a565b9450506040610cf188828901610c4b565b935050606086013567ffffffffffffffff811115610d1157610d11600080fd5b610d1d88828901610c56565b92509250509295509295909350565b6001600160e01b031981165b82525050565b60208101610c208284610d2c565b600060208284031215610d6157610d61600080fd5b6000610d6d8484610c3a565b949350505050565b80610d38565b60208101610c208284610d75565b610d3881610c13565b60208101610c208284610d89565b600060208284031215610db557610db5600080fd5b6000610d6d8484610c4b565b801515610d38565b60208101610c208284610dc1565b60008060408385031215610ded57610ded600080fd5b6000610df98585610c3a565b9250506020610e0a85828601610c4b565b9150509250929050565b600080600060608486031215610e2c57610e2c600080fd5b6000610e388686610c3a565b9350506020610e4986828701610c3a565b9250506040610e5a86828701610c3a565b9150509250925092565b634e487b7160e01b600052602160045260246000fd5b60078110610bc057610bc0610e64565b80610e9481610e7a565b919050565b6000610c2082610e8a565b610d3881610e99565b60208101610c208284610ea4565b801515610c2f565b8035610c2081610ebb565b60008060008060008060c08789031215610eea57610eea600080fd5b6000610ef68989610c4b565b9650506020610f0789828a01610ec3565b9550506040610f1889828a01610c4b565b9450506060610f2989828a01610c4b565b9350506080610f3a89828a01610c4b565b92505060a0610f4b89828a01610c4b565b9150509295509295509295565b60298152602081017f43616e6e6f742073656e6420746f20426c6f636b76657273655374616b696e67815268206469726563746c7960b81b602082015290505b60400190565b60208082528101610c2081610f58565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081525b60200190565b60208082528101610c2081610fae565b60118152602081017010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b81529050610fda565b60208082528101610c2081610ff0565b601f8152602081017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081529050610fda565b60208082528101610c2081611026565b6008815260208101674f6e6c7920454f4160c01b81529050610fda565b60208082528101610c2081611068565b601b8152602081017f4d757374206e6f74206265207374616b696e6720616c7265616479000000000081529050610fda565b60208082528101610c2081611095565b60078110610bc057600080fd5b8051610c20816110d7565b60006020828403121561110457611104600080fd5b6000610d6d84846110e4565b634e487b7160e01b600052601160045260246000fd5b60008282101561113857611138611110565b500390565b60188152602081017f43616e2774207377697463682066616374696f6e20796574000000000000000081529050610fda565b60208082528101610c208161113d565b8051610c2081610c26565b60006020828403121561119f5761119f600080fd5b6000610d6d848461117f565b60138152602081017226bab9ba1037bbb7103a3434b9903a37b5b2b760691b81529050610fda565b60208082528101610c20816111ab565b60188152602081017f4d757374207374616b652066726f6d20796f757273656c66000000000000000081529050610fda565b60208082528101610c20816111e3565b606081016112338286610d89565b6112406020830185610d89565b610d6d6040830184610d75565b60128152602081017110db185a5b48185b1c9958591e481d5cd95960721b81529050610fda565b60208082528101610c208161124d565b608081016112928287610d75565b61129f6020830186610d75565b6112ac6040830185610d89565b6102ea6060830184610d75565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c016112e98183610d75565b602001919050565b60ff8116610d38565b608081016113088287610d75565b61131560208301866112f1565b6112ac6040830185610d75565b600e8152602081016d24b73b30b634b21039b4b3b732b960911b81529050610fda565b60208082528101610c2081611322565b608081016113638286610d89565b6113706020830185610d89565b61137d6040830184610d75565b818103606083015260008152602081016102ea565b604081016113a08285610d89565b6113ad6020830184610d75565b9392505050565b60268152602081017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b60208201529050610f98565b60208082528101610c20816113b456fea2646970667358221220ed25948652f86c1ef42d082e3bf5f37bab74be3c75dd67759929a13fa77ef75364736f6c63430008090033
Deployed Bytecode Sourcemap
381:3622:20:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3704:297;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;612:50;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;:::i;562:44::-;;;;;;:::i;:::-;;;;;;;;;;;;;;1668:101:0;;;:::i;:::-;;1036:85;1082:7;1108:6;-1:-1:-1;;;;;1108:6:0;1036:85;;;;;;;:::i;803:41:20:-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;:::i;899:820::-;;;;;;:::i;:::-;;:::i;749:48::-;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;749:48:20;;;3469:229;;;;;;:::i;:::-;;:::i;3114:116::-;;;;;;:::i;:::-;-1:-1:-1;;;;;3208:15:20;3182:7;3208:15;;;:9;:15;;;;;;;3114:116;668:75;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;:::i;1725:90::-;;1771:44;1725:90;;1822:1286;;;;;;:::i;:::-;;:::i;1918:198:0:-;;;;;;:::i;:::-;;:::i;3704:297:20:-;3848:6;-1:-1:-1;;;;;3872:20:20;;;3864:74;;;;-1:-1:-1;;;3864:74:20;;;;;;;:::i;:::-;;;;;;;;;-1:-1:-1;;;;3704:297:20;;;;;;;;:::o;1668:101:0:-;1082:7;1108:6;-1:-1:-1;;;;;1108:6:0;719:10:12;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;;;;;;:::i;:::-;1732:30:::1;1759:1;1732:18;:30::i;:::-;1668:101::o:0;899:820:20:-;3306:10;;-1:-1:-1;;;;;3306:10:20;3298:33;;;;:68;;-1:-1:-1;3343:8:20;;-1:-1:-1;;;;;3343:8:20;3335:31;;3298:68;:113;;;;-1:-1:-1;3390:6:20;;-1:-1:-1;;;;;3390:6:20;3382:29;;3298:113;3290:155;;;;-1:-1:-1;;;3290:155:20;;;;;;;:::i;:::-;1744:1:1::1;2325:7;;:19;;2317:63;;;;-1:-1:-1::0;;;2317:63:1::1;;;;;;;:::i;:::-;1744:1;2455:7;:18:::0;1014:9:20::2;719:10:12::0;1014:25:20::2;::::0;:64:::2;;-1:-1:-1::0;1067:10:20::2;::::0;-1:-1:-1;;;;;1067:10:20::2;719::12::0;-1:-1:-1;;;;;1043:35:20::2;;1014:64;1006:85;;;;-1:-1:-1::0;;;1006:85:20::2;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;1109:15:20;::::2;;::::0;;;:9:::2;:15;::::0;;;;;:20;1101:60:::2;;;;-1:-1:-1::0;;;1101:60:20::2;;;;;;;:::i;:::-;1207:10;::::0;:35:::2;::::0;-1:-1:-1;;;1207:35:20;;-1:-1:-1;;;;;1207:10:20;;::::2;::::0;:26:::2;::::0;:35:::2;::::0;1234:7;;1207:35:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1179:63;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;1179:24:20;::::2;;::::0;;;:18:::2;:24;::::0;;;;;::::2;;:63;::::0;::::2;;;;;;:::i;:::-;;:133;;;-1:-1:-1::0;1288:24:20::2;::::0;-1:-1:-1;;;;;1264:21:20;::::2;;::::0;;;:15:::2;:21;::::0;;;;;1246:39:::2;::::0;:15:::2;:39;:::i;:::-;:66;1179:133;1171:170;;;;-1:-1:-1::0;;;1171:170:20::2;;;;;;;:::i;:::-;1379:10;::::0;-1:-1:-1;;;;;1379:10:20::2;719::12::0;-1:-1:-1;;;;;1355:35:20::2;;1351:287;;1414:10;::::0;:27:::2;::::0;-1:-1:-1;;;1414:27:20;;719:10:12;;-1:-1:-1;;;;;1414:10:20::2;::::0;:18:::2;::::0;:27:::2;::::0;1433:7;;1414:27:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;1414:43:20::2;;1406:75;;;;-1:-1:-1::0;;;1406:75:20::2;;;;;;;:::i;:::-;719:10:12::0;-1:-1:-1;;;;;1503:20:20;::::2;;1495:57;;;;-1:-1:-1::0;;;1495:57:20::2;;;;;;;:::i;:::-;1566:10;::::0;-1:-1:-1;;;;;1566:10:20::2;:23;719:10:12::0;1612:4:20::2;1619:7;1566:61;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;1351:287;-1:-1:-1::0;;;;;1648:15:20;;::::2;;::::0;;;:9:::2;:15;::::0;;;;;;;:25;;;1683:22;;;:13:::2;:22:::0;;;;;;:29;;-1:-1:-1;;;;;;1683:29:20::2;::::0;;::::2;::::0;;;2628:22:1;;899:820:20:o;3469:229::-;1082:7:0;1108:6;-1:-1:-1;;;;;1108:6:0;719:10:12;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;;;;;;:::i;:::-;3577:10:20::1;:37:::0;;-1:-1:-1;;;;;3577:37:20;;::::1;-1:-1:-1::0;;;;;;3577:37:20;;::::1;;::::0;;;3624:8:::1;:41:::0;;;;::::1;::::0;;::::1;::::0;;;::::1;::::0;;;3675:6:::1;:16:::0;;;;;::::1;::::0;::::1;;::::0;;3469:229::o;1822:1286::-;3306:10;;-1:-1:-1;;;;;3306:10:20;3298:33;;;;:68;;-1:-1:-1;3343:8:20;;-1:-1:-1;;;;;3343:8:20;3335:31;;3298:68;:113;;;;-1:-1:-1;3390:6:20;;-1:-1:-1;;;;;3390:6:20;3382:29;;3298:113;3290:155;;;;-1:-1:-1;;;3290:155:20;;;;;;;:::i;:::-;1744:1:1::1;2325:7;;:19;;2317:63;;;;-1:-1:-1::0;;;2317:63:1::1;;;;;;;:::i;:::-;1744:1;2455:7;:18:::0;1991:9:20::2;719:10:12::0;1991:25:20::2;1983:46;;;;-1:-1:-1::0;;;1983:46:20::2;;;;;;;:::i;:::-;719:10:12::0;2047:23:20::2;::::0;;;:9:::2;:23;::::0;;;;;:34;::::2;2039:66;;;;-1:-1:-1::0;;;2039:66:20::2;;;;;;;:::i;:::-;2123:22;::::0;;;:13:::2;:22;::::0;;;;;-1:-1:-1;;;;;2123:22:20::2;719:10:12::0;2123:38:20::2;2115:70;;;;-1:-1:-1::0;;;2115:70:20::2;;;;;;;:::i;:::-;2204:16;::::0;;;:9:::2;:16;::::0;;;;;::::2;;2203:17;2195:48;;;;-1:-1:-1::0;;;2195:48:20::2;;;;;;;:::i;:::-;2254:16;::::0;;;:9:::2;:16;::::0;;;;:23;;-1:-1:-1;;2254:23:20::2;2273:4;2254:23;::::0;;2323:1:::2;2312:12:::0;;::::2;::::0;:7;;1771:44:::2;2264:5:::0;2511:12:::2;719:10:12::0;;640:96;2511:12:20::2;2525:6;2472:60;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;2462:71;;;;;;2397:146;;;;;;;;:::i;:::-;;;;;;;;;;;;;2387:157;;;;;;2370:174;;2555:16;2574:26;2584:6;2592:1;2595;2598;2574:26;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;2574:26:20::2;::::0;-1:-1:-1;;2574:26:20;;2630:6:::2;::::0;2574:26;;-1:-1:-1;;;;;;2618:18:20;;::::2;2630:6:::0;::::2;2618:18;::::0;-1:-1:-1;2610:45:20::2;;;;-1:-1:-1::0;;;2610:45:20::2;;;;;;;:::i;:::-;2670:7;2666:343;;;719:10:12::0;2719:1:20::2;2693:23:::0;;;:9:::2;:23;::::0;;;;;;;:27;;;2734:22;;;:13:::2;:22:::0;;;;;;;:35;;-1:-1:-1;;;;;;2734:35:20::2;::::0;;2818:10:::2;::::0;:35;;-1:-1:-1;;;2818:35:20;;-1:-1:-1;;;;;2818:10:20;;::::2;::::0;:26:::2;::::0;:35:::2;::::0;2734:22;;2818:35:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;719:10:12::0;2783:32:20::2;::::0;;;:18:::2;:32;::::0;;;;:70;;-1:-1:-1;;2783:70:20::2;::::0;;::::2;::::0;::::2;;;;;;:::i;:::-;;;::::0;;-1:-1:-1;719:10:12;2867:29:20::2;::::0;;;:15:::2;:29;::::0;;;;;;2899:15:::2;2867:47:::0;;2929:10:::2;::::0;:69;;-1:-1:-1;;;2929:69:20;;-1:-1:-1;;;;;2929:10:20;;::::2;::::0;:27:::2;::::0;:69:::2;::::0;2965:4:::2;::::0;2986:7;;2929:69:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;2666:343;3019:8;::::0;-1:-1:-1;;;;;3019:8:20::2;:13;719:10:12::0;3047:6:20::2;3019:35;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;3093:7;3070:31;;3085:6;3076:7;3070:31;;;;;;;;;;-1:-1:-1::0;;1701:1:1::1;2628:22:::0;;-1:-1:-1;;;;;;;;1822:1286:20:o;1918:198:0:-;1082:7;1108:6;-1:-1:-1;;;;;1108:6:0;719:10:12;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;2006:22:0;::::1;1998:73;;;;-1:-1:-1::0;;;1998:73:0::1;;;;;;;:::i;:::-;2081:28;2100:8;2081:18;:28::i;:::-;1918:198:::0;:::o;2270:187::-;2343:16;2362:6;;-1:-1:-1;;;;;2378:17:0;;;-1:-1:-1;;;;;;2378:17:0;;;;;;2410:40;;2362:6;;;;;;;2410:40;;2343:16;2410:40;2333:124;2270:187;:::o;238:96:25:-;273:7;-1:-1:-1;;;;;196:31:25;;306:22;295:33;238:96;-1:-1:-1;;238:96:25:o;339:122::-;414:22;430:5;414:22;:::i;:::-;407:5;404:33;394:61;;451:1;448;441:12;466:139;539:20;;568:31;539:20;568:31;:::i;682:122::-;773:5;757:22;610:67;809:139;882:20;;911:31;882:20;911:31;:::i;953:634::-;1004:8;1014:6;1068:3;1061:4;1053:6;1049:17;1045:27;1035:150;;1096:79;381:3622:20;;;1096:79:25;-1:-1:-1;1204:20:25;;1247:18;1236:30;;1233:145;;;1289:79;381:3622:20;;;1289:79:25;1411:4;1403:6;1399:17;1387:29;;1465:3;1457:4;1449:6;1445:17;1435:8;1431:32;1428:41;1425:156;;;1492:79;381:3622:20;;;1492:79:25;953:634;;;;;:::o;1592:896::-;1689:6;1697;1705;1713;1721;1774:3;1762:9;1753:7;1749:23;1745:33;1742:148;;;1801:79;381:3622:20;;;1801:79:25;1913:1;1933:51;1976:7;1956:9;1933:51;:::i;:::-;1923:61;;;2009:2;2030:53;2075:7;2064:8;2053:9;2049:24;2030:53;:::i;:::-;2020:63;;;2108:2;2129:53;2174:7;2163:8;2152:9;2148:24;2129:53;:::i;:::-;2119:63;;;2235:2;2224:9;2220:18;2207:32;2264:18;2254:8;2251:32;2248:147;;;2306:79;381:3622:20;;;2306:79:25;2422:60;2474:7;2463:8;2452:9;2448:24;2422:60;:::i;:::-;2404:78;;;;;1592:896;;;;;;;;:::o;2603:93::-;-1:-1:-1;;;;;;2560:32:25;;2668:21;2663:3;2656:34;;;2603:93::o;2701:194::-;2833:2;2818:18;;2845:44;2822:9;2863:6;2845:44;:::i;2900:327::-;2959:6;3012:2;3000:9;2991:7;2987:23;2983:32;2980:147;;;3038:79;381:3622:20;;;3038:79:25;3150:1;3170:51;3213:7;3193:9;3170:51;:::i;:::-;3160:61;2900:327;-1:-1:-1;;;;2900:327:25:o;3232:95::-;3314:5;3298:22;610:67;3332:197;3466:2;3451:18;;3478:45;3455:9;3497:6;3478:45;:::i;3534:95::-;3600:22;3616:5;3600:22;:::i;3634:197::-;3768:2;3753:18;;3780:45;3757:9;3799:6;3780:45;:::i;3836:327::-;3895:6;3948:2;3936:9;3927:7;3923:23;3919:32;3916:147;;;3974:79;381:3622:20;;;3974:79:25;4086:1;4106:51;4149:7;4129:9;4106:51;:::i;4265:89::-;4240:13;;4233:21;4328:19;4168:92;4359:188;4487:2;4472:18;;4499:42;4476:9;4515:6;4499:42;:::i;4552:443::-;4620:6;4628;4681:2;4669:9;4660:7;4656:23;4652:32;4649:147;;;4707:79;381:3622:20;;;4707:79:25;4819:1;4839:51;4882:7;4862:9;4839:51;:::i;:::-;4829:61;;;4915:2;4936:53;4981:7;4970:8;4959:9;4955:24;4936:53;:::i;:::-;4926:63;;;4552:443;;;;;:::o;5000:559::-;5077:6;5085;5093;5146:2;5134:9;5125:7;5121:23;5117:32;5114:147;;;5172:79;381:3622:20;;;5172:79:25;5284:1;5304:51;5347:7;5327:9;5304:51;:::i;:::-;5294:61;;;5380:2;5401:53;5446:7;5435:8;5424:9;5420:24;5401:53;:::i;:::-;5391:63;;;5479:2;5500:53;5545:7;5534:8;5523:9;5519:24;5500:53;:::i;:::-;5490:63;;;5000:559;;;;;:::o;5564:127::-;5625:10;5620:3;5616:20;5613:1;5606:31;5656:4;5653:1;5646:15;5680:4;5677:1;5670:15;5696:122;5786:1;5779:5;5776:12;5766:46;;5792:18;;:::i;5823:149::-;5906:5;5920:46;5906:5;5920:46;:::i;:::-;5823:149;;;:::o;5977:139::-;6036:9;6073:37;6104:5;6073:37;:::i;6121:134::-;6202:46;6242:5;6202:46;:::i;6260:232::-;6414:2;6399:18;;6426:60;6403:9;6460:6;6426:60;:::i;6821:116::-;4240:13;;4233:21;6893:19;4168:92;6942:133;7012:20;;7041:28;7012:20;7041:28;:::i;7351:904::-;7452:6;7460;7468;7476;7484;7492;7545:3;7533:9;7524:7;7520:23;7516:33;7513:148;;;7572:79;381:3622:20;;;7572:79:25;7684:1;7704:51;7747:7;7727:9;7704:51;:::i;:::-;7694:61;;;7780:2;7801:50;7843:7;7832:8;7821:9;7817:24;7801:50;:::i;:::-;7791:60;;;7876:2;7897:53;7942:7;7931:8;7920:9;7916:24;7897:53;:::i;:::-;7887:63;;;7975:2;7996:53;8041:7;8030:8;8019:9;8015:24;7996:53;:::i;:::-;7986:63;;;8074:3;8096:53;8141:7;8130:8;8119:9;8115:24;8096:53;:::i;:::-;8086:63;;;8174:3;8196:53;8241:7;8230:8;8219:9;8215:24;8196:53;:::i;:::-;8186:63;;;7351:904;;;;;;;;:::o;8649:252::-;8762:2;8347:19;;8399:4;8390:14;;8558:34;8535:58;;-1:-1:-1;;;8621:2:25;8609:15;;8602:36;8714:51;-1:-1:-1;8774:93:25;8892:2;8883:12;;8649:252::o;8906:324::-;9113:2;9125:47;;;9098:18;;9189:35;9098:18;9189:35;:::i;9424:247::-;9532:2;8347:19;;;9378:34;8390:14;;9355:58;;;9544:93;9662:2;9653:12;;9424:247::o;9676:319::-;9883:2;9895:47;;;9868:18;;9959:30;9868:18;9959:30;:::i;10174:252::-;10287:2;8347:19;;8399:4;8390:14;;-1:-1:-1;;;10120:43:25;;10239:51;-1:-1:-1;10299:93:25;10000:169;10431:324;10638:2;10650:47;;;10623:18;;10714:35;10623:18;10714:35;:::i;10948:252::-;11061:2;8347:19;;8399:4;8390:14;;10903:33;10880:57;;11013:51;-1:-1:-1;11073:93:25;10760:183;11205:324;11412:2;11424:47;;;11397:18;;11488:35;11397:18;11488:35;:::i;11699:251::-;11812:1;8347:19;;8399:4;8390:14;;-1:-1:-1;;;11654:34:25;;11764:50;-1:-1:-1;11823:93:25;11534:160;11955:324;12162:2;12174:47;;;12147:18;;12238:35;12147:18;12238:35;:::i;12468:252::-;12581:2;8347:19;;8399:4;8390:14;;12427:29;12404:53;;12533:51;-1:-1:-1;12593:93:25;12284:179;12725:324;12932:2;12944:47;;;12917:18;;13008:35;12917:18;13008:35;:::i;13054:116::-;13144:1;13137:5;13134:12;13124:40;;13160:1;13157;13150:12;13175:173;13274:13;;13296:46;13274:13;13296:46;:::i;13353:386::-;13445:6;13498:2;13486:9;13477:7;13473:23;13469:32;13466:147;;;13524:79;381:3622:20;;;13524:79:25;13636:1;13656:77;13725:7;13705:9;13656:77;:::i;13744:127::-;13805:10;13800:3;13796:20;13793:1;13786:31;13836:4;13833:1;13826:15;13860:4;13857:1;13850:15;13876:189;13916:4;14008:1;14005;14002:8;13999:34;;;14013:18;;:::i;:::-;-1:-1:-1;14050:9:25;;13876:189::o;14251:252::-;14364:2;8347:19;;8399:4;8390:14;;14213:26;14190:50;;14316:51;-1:-1:-1;14376:93:25;14070:176;14508:324;14715:2;14727:47;;;14700:18;;14791:35;14700:18;14791:35;:::i;14837:143::-;14921:13;;14943:31;14921:13;14943:31;:::i;14985:349::-;15055:6;15108:2;15096:9;15087:7;15083:23;15079:32;15076:147;;;15134:79;381:3622:20;;;15134:79:25;15246:1;15266:62;15320:7;15300:9;15266:62;:::i;15515:252::-;15628:2;8347:19;;8399:4;8390:14;;-1:-1:-1;;;15459:45:25;;15580:51;-1:-1:-1;15640:93:25;15339:171;15772:324;15979:2;15991:47;;;15964:18;;16055:35;15964:18;16055:35;:::i;16282:252::-;16395:2;8347:19;;8399:4;8390:14;;16244:26;16221:50;;16347:51;-1:-1:-1;16407:93:25;16101:176;16539:324;16746:2;16758:47;;;16731:18;;16822:35;16731:18;16822:35;:::i;16868:363::-;17058:2;17043:18;;17070:45;17047:9;17089:6;17070:45;:::i;:::-;17124:46;17166:2;17155:9;17151:18;17143:6;17124:46;:::i;:::-;17179;17221:2;17210:9;17206:18;17198:6;17179:46;:::i;17411:252::-;17524:2;8347:19;;8399:4;8390:14;;-1:-1:-1;;;17356:44:25;;17476:51;-1:-1:-1;17536:93:25;17236:170;17668:324;17875:2;17887:47;;;17860:18;;17951:35;17860:18;17951:35;:::i;17997:458::-;18215:3;18200:19;;18228:56;18204:9;18258:6;18228:56;:::i;:::-;18293:46;18335:2;18324:9;18320:18;18312:6;18293:46;:::i;:::-;18348;18390:2;18379:9;18375:18;18367:6;18348:46;:::i;:::-;18403;18445:2;18434:9;18430:18;18422:6;18403:46;:::i;19195:364::-;18725:66;18702:90;;19064:2;19055:12;19475:31;19055:12;19494:6;19475:31;:::i;:::-;19531:2;19522:12;;19195:364;-1:-1:-1;19195:364:25:o;19645:91::-;19633:4;19622:16;;19709:20;19564:76;19741:474;19955:3;19940:19;;19968:56;19944:9;19998:6;19968:56;:::i;:::-;20033:44;20073:2;20062:9;20058:18;20050:6;20033:44;:::i;:::-;20086:57;20139:2;20128:9;20124:18;20116:6;20086:57;:::i;20391:252::-;20504:2;8347:19;;8399:4;8390:14;;-1:-1:-1;;;20340:40:25;;20456:51;-1:-1:-1;20516:93:25;20220:166;20648:324;20855:2;20867:47;;;20840:18;;20931:35;20840:18;20931:35;:::i;21130:573::-;21420:3;21405:19;;21433:45;21409:9;21452:6;21433:45;:::i;:::-;21487:46;21529:2;21518:9;21514:18;21506:6;21487:46;:::i;:::-;21542;21584:2;21573:9;21569:18;21561:6;21542:46;:::i;:::-;21624:20;;;21619:2;21604:18;;21597:48;21090:1;8347:19;;8399:4;8390:14;;21662:35;5823:149;21708:280;21870:2;21855:18;;21882:45;21859:9;21901:6;21882:45;:::i;:::-;21936:46;21978:2;21967:9;21963:18;21955:6;21936:46;:::i;:::-;21708:280;;;;;:::o;22224:252::-;22337:2;8347:19;;8399:4;8390:14;;22136:34;22113:58;;-1:-1:-1;;;22199:2:25;22187:15;;22180:33;22289:51;-1:-1:-1;22349:93:25;21993:226;22481:324;22688:2;22700:47;;;22673:18;;22764:35;22673:18;22764:35;:::i
Swarm Source
ipfs://ed25948652f86c1ef42d082e3bf5f37bab74be3c75dd67759929a13fa77ef753
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 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.