Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 177 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim Staking Ac... | 21459048 | 25 days ago | IN | 0.01 ETH | 0.0014057 | ||||
Claim Staking Ac... | 21416738 | 30 days ago | IN | 0.01 ETH | 0.00523452 | ||||
Claim Staking Ac... | 21361597 | 38 days ago | IN | 0.01 ETH | 0.002398 | ||||
Claim Staking Ac... | 21142390 | 69 days ago | IN | 0.01 ETH | 0.00209212 | ||||
Claim Staking Ac... | 21080819 | 77 days ago | IN | 0.01 ETH | 0.00167066 | ||||
Claim Staking Ac... | 20905409 | 102 days ago | IN | 0.01 ETH | 0.00184146 | ||||
Claim Staking Ac... | 20556182 | 151 days ago | IN | 0.01 ETH | 0.00018821 | ||||
Claim Staking Ac... | 20494284 | 159 days ago | IN | 0.01 ETH | 0.0004367 | ||||
Claim Staking Ac... | 20491609 | 160 days ago | IN | 0.01 ETH | 0.00140935 | ||||
Claim Staking Ac... | 20281027 | 189 days ago | IN | 0.01 ETH | 0.00031843 | ||||
Claim Staking Ac... | 19906197 | 241 days ago | IN | 0.01 ETH | 0.00052409 | ||||
Claim Staking Ac... | 19881174 | 245 days ago | IN | 0.01 ETH | 0.00077303 | ||||
Claim Staking Ac... | 19402928 | 312 days ago | IN | 0.01 ETH | 0.00778703 | ||||
Claim Staking Ac... | 19402919 | 312 days ago | IN | 0.01 ETH | 0.0086757 | ||||
Claim Staking Ac... | 19087433 | 356 days ago | IN | 0.01 ETH | 0.00269013 | ||||
Claim Staking Ac... | 19087350 | 356 days ago | IN | 0.01 ETH | 0.00312822 | ||||
Claim Staking Ac... | 19087262 | 356 days ago | IN | 0.01 ETH | 0.00244683 | ||||
Claim Staking Ac... | 19059373 | 360 days ago | IN | 0.01 ETH | 0.00164882 | ||||
Claim Staking Ac... | 19059373 | 360 days ago | IN | 0.01 ETH | 0.00183721 | ||||
Claim Staking Ac... | 19059369 | 360 days ago | IN | 0.01 ETH | 0.00215128 | ||||
Claim Staking Ac... | 19054104 | 361 days ago | IN | 0.01 ETH | 0.00144221 | ||||
Claim Staking Ac... | 19054096 | 361 days ago | IN | 0.01 ETH | 0.00180134 | ||||
Claim Staking Ac... | 19054094 | 361 days ago | IN | 0.01 ETH | 0.00157385 | ||||
Claim Staking Ac... | 19035642 | 363 days ago | IN | 0.01 ETH | 0.0076812 | ||||
Claim Staking Ac... | 18944476 | 376 days ago | IN | 0.01 ETH | 0.00194707 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
21459048 | 25 days ago | 0.01 ETH | ||||
21416738 | 30 days ago | 0.01 ETH | ||||
21361597 | 38 days ago | 0.01 ETH | ||||
21142390 | 69 days ago | 0.01 ETH | ||||
21080819 | 77 days ago | 0.01 ETH | ||||
20905409 | 102 days ago | 0.01 ETH | ||||
20556182 | 151 days ago | 0.01 ETH | ||||
20494284 | 159 days ago | 0.01 ETH | ||||
20491609 | 160 days ago | 0.01 ETH | ||||
20281027 | 189 days ago | 0.01 ETH | ||||
19906197 | 241 days ago | 0.01 ETH | ||||
19881174 | 245 days ago | 0.01 ETH | ||||
19402928 | 312 days ago | 0.01 ETH | ||||
19402919 | 312 days ago | 0.01 ETH | ||||
19087433 | 356 days ago | 0.01 ETH | ||||
19087350 | 356 days ago | 0.01 ETH | ||||
19087262 | 356 days ago | 0.01 ETH | ||||
19059373 | 360 days ago | 0.01 ETH | ||||
19059373 | 360 days ago | 0.01 ETH | ||||
19059369 | 360 days ago | 0.01 ETH | ||||
19054104 | 361 days ago | 0.01 ETH | ||||
19054096 | 361 days ago | 0.01 ETH | ||||
19054094 | 361 days ago | 0.01 ETH | ||||
19035642 | 363 days ago | 0.01 ETH | ||||
18944476 | 376 days ago | 0.01 ETH |
Loading...
Loading
Contract Name:
StakingAchievement
Compiler Version
v0.8.13+commit.abaa5c0e
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2022-05-09 */ // Copyright (c) 2022 EverRise Pte Ltd. All rights reserved. // EverRise licenses this file to you under the MIT license. /* EverRise Memento NFTs are awards for completing EverRise staking terms, participating in events and winning challenges. ___________ ________ _______ __ '._==_==_=_.' / | / \ / | .-\: /-. $$$$$$$$/__ __ ______ ______ $$$$$$$ |$$/ _______ ______ v3.14159265 | (|:. |) | $$ |__ / \ / |/ \ / \ $$ |__$$ |/ | / | / \ '-|:. |-' $$ | $$ \ /$$//$$$$$$ |/$$$$$$ |$$ $$< $$ |/$$$$$$$/ /$$$$$$ | \::. / $$$$$/ $$ /$$/ $$ $$ |$$ | $$/ $$$$$$$ |$$ |$$ \ $$ $$ | '::. .' $$ |_____ $$ $$/ $$$$$$$$/ $$ | $$ | $$ |$$ | $$$$$$ |$$$$$$$$/ ) ( $$ | $$$/ $$ |$$ | $$ | $$ |$$ |/ $$/ $$ | _.' '._ $$$$$$$$/ $/ $$$$$$$/ $$/ $$/ $$/ $$/ $$$$$$$/ $$$$$$$/ Magnum opus `"""""""` Learn more about EverRise and the EverRise Ecosystem of dApps and how our utilities and partners can help protect your investors and help your project grow: https://everrise.com */ // SPDX-License-Identifier: MIT pragma solidity 0.8.13; error NotSetup(); // 0xb09c99c0 error WalletLocked(); // 0xd550ed24 error FailedEthSend(); // 0xb5747cc7 error NotZeroAddress(); // 0x66385fa3 error CallerNotApproved(); // 0x4014f1a5 error InvalidAddress(); // 0xe6c4247b error CallerNotOwner(); // 0x5cd83192 error AmountMustBeGreaterThanZero(); // 0x5e85ae73 error AmountOutOfRange(); // 0xc64200e9 address constant EverMigrateAddress = 0x429CA183C5f4B43F09D70580C5365a6D21ccCd47; address constant EverRiseV1Address_BSC = 0xC7D43F2B51F44f09fBB8a691a0451E8FFCF36c0a; address constant EverRiseV1Address_ETH = 0x8A2D988Fe2E8c6716cbCeF1B33Df626C692F7B98; address constant EverRiseV2Address = 0x0cD022ddE27169b20895e0e2B2B8A33B25e63579; address constant EverRiseV2Address_AVAX = 0xC3A8d300333BFfE3ddF6166F2Bc84E6d38351BED; address constant EverRiseV3Address = 0xC17c30e98541188614dF99239cABD40280810cA3; address constant nftRiseV3Address = 0x23cD2E6b283754Fd2340a75732f9DdBb5d11807e; // Testnet // address constant EverRiseV3Address = 0x1665E2b184F352d226A882281f69ccf361349CC6; //address constant nftRiseV3Address = 0x0D3770c2318F84E33d0B0efEc8EfD2086683F0b2; //address constant EverRiseV3Address = 0x639631Ac62abE60c4F67278f80ca3291047eFc1B; // address constant nftRiseV3Address = 0x617cBE19e7A74dF4fb58eFE5830586c3466CC091; address constant mintFeeAddress = 0xc3b7FfA7611C45C1245a1923065442BC94Af9757; address constant royaltyFeeAddress = 0x0BFc8f6374028f1a61Ae3019E5C845F461575381; bytes constant ipfsAddress = "ipfs://bafybeidj6gy62qkgwi6ww32iw2khbjcusf3xefvi2gugykdfau54mvux54/metaOutput/"; interface ICreateRecipe { function createTo(address account, uint256 toTokenId, uint256 toAmount) external; } // File: memeRISE/ITransmuteRecipe.sol interface ITransmuteSingleRecipe { function transmuteSingleTo( address account, uint256 toToken, uint256 toAmount, uint256[] calldata fromIds, uint256[] calldata fromAmounts) external; } interface ITransmuteMultipleRecipe { function transmuteMultipleTo( address account, uint256[] calldata toTokenIds, uint256[] calldata toAmounts, uint256[] calldata fromIds, uint256[] calldata fromAmounts) external; } // File: memeRISE/Abstract/nativeCoinSender.sol contract NativeCoinSender { function sendEthViaCall(address payable to, uint256 amount) internal { (bool sent, ) = to.call{value: amount}(""); if (!sent) revert FailedEthSend(); } } // File: memeRISE/Interfaces/IEverRoyaltySplitter.sol interface IEverRoyaltySplitter { event RoyaltiesSplit(uint256 value); event SplitUpdated(uint256 previous, uint256 current); event UniswapV2RouterSet(address indexed previous, address indexed current); event EverRiseEcosystemSet(address indexed previous, address indexed current); event EverRiseTokenSet(address indexed previous, address indexed current); event StableCoinSet(address indexed previous, address indexed current); function distribute() external; } // File: memeRISE/Interfaces/IERC173-Ownable.sol interface IOwnable { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); function owner() external view returns (address); function transferOwnership(address newOwner) external; } // File: memeRISE/Abstract/Context.sol abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return payable(msg.sender); } } // File: memeRISE/Abstract/ERC173-Ownable.sol contract Ownable is IOwnable, Context { address public owner; function _onlyOwner() private view { if (owner != _msgSender()) revert CallerNotOwner(); } modifier onlyOwner() { _onlyOwner(); _; } constructor() { address msgSender = _msgSender(); owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function transferOwnership(address newOwner) public onlyOwner { if (newOwner == address(0)) revert NotZeroAddress(); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: memeRISE/Interfaces/IERC20-Token.sol interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function transferFromWithPermit(address sender, address recipient, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external returns (bool); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } // File: memeRISE/Interfaces/IEverRise.sol struct ApprovalChecks { // Prevent permits being reused (IERC2612) uint64 nonce; // Allow revoke all spenders/operators approvals in single txn uint32 nftCheck; uint32 tokenCheck; // Allow auto timeout on approvals uint16 autoRevokeNftHours; uint16 autoRevokeTokenHours; // Allow full wallet locking of all transfers uint48 unlockTimestamp; } struct Allowance { uint128 tokenAmount; uint32 nftCheck; uint32 tokenCheck; uint48 timestamp; uint8 nftApproval; uint8 tokenApproval; } interface IEverRise is IERC20Metadata { function totalBuyVolume() external view returns (uint256); function totalSellVolume() external view returns (uint256); function holders() external view returns (uint256); function uniswapV2Pair() external view returns (address); function transferStake(address fromAddress, address toAddress, uint96 amountToTransfer) external; function isWalletLocked(address fromAddress) external view returns (bool); function setApprovalForAll(address fromAddress, address operator, bool approved) external; function isApprovedForAll(address account, address operator) external view returns (bool); function isExcludedFromFee(address account) external view returns (bool); function approvals(address operator) external view returns (ApprovalChecks memory); } // File: memeRISE/Interfaces/IERC165-SupportsInterface.sol interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File: memeRISE/Abstract/ERC165-SupportsInterface.sol abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } // File: memeRISE/Interfaces/IERC2981-Royalty.sol interface IERC2981 is IERC165 { function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns ( address receiver, uint256 royaltyAmount ); } // File: memeRISE/Abstract/royaltyHandler.sol abstract contract royaltyHandler is IERC2981, Ownable { event RoyaltyFeeUpdated(uint256 newValue); event RoyaltyAddressUpdated(address indexed contractAddress); IEverRoyaltySplitter public royaltySplitter; uint256 public defaultRoyaltySplit = 5; function setDefaultNftRoyaltyFeePercent(uint256 royaltySplitRate) external onlyOwner { if (royaltySplitRate > 10) revert AmountOutOfRange(); defaultRoyaltySplit = royaltySplitRate; emit RoyaltyFeeUpdated(royaltySplitRate); } function setRoyaltyAddress(address newAddress) external onlyOwner { if (newAddress == address(0)) revert NotZeroAddress(); _setRoyaltyAddress(newAddress); } function _setRoyaltyAddress(address newAddress) internal { royaltySplitter = IEverRoyaltySplitter(newAddress); emit RoyaltyAddressUpdated(newAddress); } function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns ( address receiver, uint256 royaltyAmount ) { if (_tokenId == 0) revert AmountMustBeGreaterThanZero(); return (address(royaltySplitter), _salePrice / defaultRoyaltySplit); } } // File: memeRISE/Interfaces/IMementoRise.sol interface IMementoRise { function royaltyAddress() external view returns(address payable); function mint(address to, uint256 tokenId, uint256 amount) external; function mintFee(uint16 typeId) external returns (uint256); } // File: memeRISE/mementoRecipe.sol abstract contract MementoRecipe is NativeCoinSender, Ownable { IMementoRise public mementoRise; IEverRise public everRiseToken = IEverRise(EverRiseV3Address); event EverRiseTokenSet(address indexed tokenAddress); event MementoRiseSet(address indexed nftAddress); modifier onlyMementoRise() { require(_msgSender() == address(mementoRise), "Invalid requestor"); _; } constructor(address _mementoRise) { setMementoRise(_mementoRise); } function setEverRiseToken(address tokenAddress) external onlyOwner { if (tokenAddress == address(0)) revert NotZeroAddress(); everRiseToken = IEverRise(tokenAddress); emit EverRiseTokenSet(tokenAddress); } function setMementoRise(address nftAddress) public onlyOwner { if (nftAddress == address(0)) revert NotZeroAddress(); mementoRise = IMementoRise(nftAddress); emit MementoRiseSet(nftAddress); } function krakenMintFee(uint256 baseFee, uint256 quantity) internal { distributeMintFee(payable(address(everRiseToken)), baseFee, quantity); } function handleMintFee(uint256 baseFee, uint256 quantity) internal { distributeMintFee(mementoRise.royaltyAddress(), baseFee, quantity); } function distributeMintFee(address payable receiver, uint256 baseFee, uint256 quantity) private { uint256 _mintFee = baseFee * quantity; require(_mintFee == 0 || msg.value >= _mintFee, "Mint fee not covered"); uint256 _balance = address(this).balance; if (_balance > 0) { // Transfer everything, easier than transferring extras later sendEthViaCall(receiver, _balance); } } } // File: memeRISE/Interfaces/IERC1155-MultiToken.sol interface IERC1155 is IERC165 { event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); event ApprovalForAll(address indexed account, address indexed operator, bool approved); event URI(string value, uint256 indexed id); function balanceOf(address account, uint256 id) external view returns (uint256); function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); function setApprovalForAll(address operator, bool approved) external; function isApprovedForAll(address account, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; } interface IERC1155Receiver is IERC165 { function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external view returns (bytes4); function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external view returns (bytes4); } interface IERC1155MetadataURI { function uri(uint256 id) external view returns (string memory); } // File: memeRISE/mementoRise.sol // Copyright (c) 2022 EverRise Pte Ltd. All rights reserved. // EverRise licenses this file to you under the MIT license. /* EverRise Memento NFTs are awards for completing EverRise staking terms, participating in events and winning challenges. ___________ ________ _______ __ '._==_==_=_.' / | / \ / | .-\: /-. $$$$$$$$/__ __ ______ ______ $$$$$$$ |$$/ _______ ______ v3.14159265 | (|:. |) | $$ |__ / \ / |/ \ / \ $$ |__$$ |/ | / | / \ '-|:. |-' $$ | $$ \ /$$//$$$$$$ |/$$$$$$ |$$ $$< $$ |/$$$$$$$/ /$$$$$$ | \::. / $$$$$/ $$ /$$/ $$ $$ |$$ | $$/ $$$$$$$ |$$ |$$ \ $$ $$ | '::. .' $$ |_____ $$ $$/ $$$$$$$$/ $$ | $$ | $$ |$$ | $$$$$$ |$$$$$$$$/ ) ( $$ | $$$/ $$ |$$ | $$ | $$ |$$ |/ $$/ $$ | _.' '._ $$$$$$$$/ $/ $$$$$$$/ $$/ $$/ $$/ $$/ $$$$$$$/ $$$$$$$/ Magnum opus `"""""""` Learn more about EverRise and the EverRise Ecosystem of dApps and how our utilities and partners can help protect your investors and help your project grow: https://everrise.com */ interface IOpenSeaCollectible { function contractURI() external view returns (string memory); } abstract contract EverRiseTokenManaged is Ownable { IEverRise public everRiseToken; function setEverRiseToken(address tokenAddress) public onlyOwner { if (tokenAddress == address(0)) revert NotZeroAddress(); everRiseToken = IEverRise(tokenAddress); emit EverRiseTokenSet(tokenAddress); } event EverRiseTokenSet(address indexed tokenAddress); } interface IEverMigrate { function userTransaction(address sourceToken, address userAddress, uint256 position) external view returns (uint256, uint256, uint32); } enum Animal { Plankton, Seahorse, Starfish, Swordfish, Stingray, Dolphin, Narwhal, Shark, Orca, Whale, Megalodon, Kraken } contract MigrationV1V2Achievement is MementoRecipe { mapping (uint256 => bool) public processedTxn; mapping (address => uint16) public claimedReward; IEverMigrate public migrate = IEverMigrate(EverMigrateAddress); address immutable public everRiseV1; constructor(address _mementoRise) MementoRecipe(_mementoRise) { everRiseV1 = block.chainid == 1 ? EverRiseV1Address_ETH : EverRiseV1Address_BSC; } function claimMigrationAchievement(uint256 tokenId, uint256 txnPosition) external payable { address from = _msgSender(); (uint256 amount,, uint256 txnId) = migrate.userTransaction(everRiseV1, from, txnPosition); require(txnId > 0, "Invalid txn"); require(!processedTxn[txnId], "Already claimed txn"); processedTxn[txnId] = true; handleMintFee(mementoRise.mintFee(uint16(tokenId & 0xffff)), 1); Animal animal = Animal(tokenId >> 16); require(amount > getMinAmount(animal), "Not enough"); uint16 flag = uint16(1 << uint8(animal)); uint16 flags = claimedReward[from]; require(flags & flag == 0, "Already claimed level"); claimedReward[from] = flags | flag; mementoRise.mint(from, tokenId, 1); } function getMinAmount(Animal animal) private pure returns (uint256) { // 'Plankton', threshold: 1000 } if (animal == Animal.Plankton) { return (1_000 - 1) * 10**4 * 10**9; } // 'Seahorse', threshold: 10000 }, if (animal == Animal.Seahorse) { return (10_000 - 1) * 10**4 * 10**9; } // 'Starfish', threshold: 50000 }, if (animal == Animal.Starfish) { return (50_000 - 1) * 10**4 * 10**9; } // 'SwordFish', threshold: 100000 }, if (animal == Animal.Swordfish) { return (100_000 - 1) * 10**4 * 10**9; } // 'Stingray', threshold: 500000 }, if (animal == Animal.Stingray) { return (500_000 - 1) * 10**4 * 10**9; } // 'Dolphin', threshold: 1000000 }, if (animal == Animal.Dolphin) { return (1_000_000 - 1) * 10**4 * 10**9; } // 'Narwhal', threshold: 5000000 }, if (animal == Animal.Narwhal) { return (5_000_000 - 1) * 10**4 * 10**9; } // 'Shark', threshold: 10000000 }, if (animal == Animal.Shark) { return (10_000_000 - 1) * 10**4 * 10**9; } // 'Orca', threshold: 25000000 }, if (animal == Animal.Orca) { return (25_000_000 - 1) * 10**4 * 10**9; } // 'Whale', threshold: 50000000 }, if (animal == Animal.Whale) { return (50_000_000 - 1) * 10**4 * 10**9; } // 'Megalodon', threshold: 100000000 }, if (animal == Animal.Megalodon) { return (100_000_000 - 1) * 10**4 * 10**9; } // 'Kraken' threshold: 250000000 if (animal == Animal.Kraken) { return (250_000_000 - 1) * 10**4 * 10**9; } require(false, "Unknown level"); return (250_000_000_000 - 1) * 10**4 * 10**9; } } contract HolderV2Achievement is MementoRecipe, ICreateRecipe { IERC20 immutable public everRiseV2; mapping (address => bool) public processedClaim; constructor(address _mementoRise) MementoRecipe(_mementoRise) { everRiseV2 = block.chainid == 43114 ? IERC20(EverRiseV2Address_AVAX) : IERC20(EverRiseV2Address); } function createTo(address account, uint256 toTokenId, uint256 toAmount) external onlyMementoRise { require(toTokenId == 3, "Nft doesn't exist"); require(toAmount == 1, "Can only claim one per chain"); require(everRiseV2.balanceOf(account) > 0, "Not holding RISE v2"); require(!processedClaim[account], "Already claimed"); processedClaim[account] = true; } } struct StakingDetails { uint96 initialTokenAmount; // Max 79 Bn tokens uint96 withdrawnAmount; // Max 79 Bn tokens uint48 depositTime; // 8 M years uint8 numOfMonths; // Max 256 month period uint8 achievementClaimed; // 256 bits, 20000 gwei gas address stakerAddress; // 160 bits (96 bits remaining) uint32 nftId; // Max 4 Bn nfts issued uint32 lookupIndex; // Max 4 Bn active stakes uint24 stakerIndex; // Max 16 M active stakes per wallet uint8 isActive; // 256 bits, 20000 gwei gas } // Total 768 bits, 40000 gwei gas interface InftEverRise { function getNftData(uint256 id) external view returns (StakingDetails memory); function claimAchievement(address staker, uint256 nftId) external returns (uint32 newNftId); } contract StakingAchievement is MementoRecipe { InftEverRise public nftRise; constructor(address _mementoRise) MementoRecipe(_mementoRise) { nftRise = InftEverRise(nftRiseV3Address); } function _walletLock(address fromAddress) private view { if (everRiseToken.isWalletLocked(fromAddress)) revert WalletLocked(); } modifier walletLock(address fromAddress) { _walletLock(fromAddress); _; } function getTokenId(uint256 chainId, uint256 animalId, uint256 months) public pure returns (uint256) { require(chainId <= type(uint8).max, "Chain out of range"); require(animalId <= type(uint8).max, "AnimalId out of range"); require(months <= type(uint8).max, "Months out of range"); uint256 generatedTokenId = 1; generatedTokenId += chainId << 16; generatedTokenId += animalId << 24; generatedTokenId += months << 32; return generatedTokenId; } function claimStakingAchievement(uint256 tokenId, uint256 stakeNftId) external payable walletLock(_msgSender()) { address from = _msgSender(); krakenMintFee(mementoRise.mintFee(uint16(tokenId & 0xffff)), 1); uint32 newNftId = nftRise.claimAchievement(from, stakeNftId); StakingDetails memory stakeDetails = nftRise.getNftData(newNftId); uint256 generatedTokenId = 1; generatedTokenId += getChain() << 16; generatedTokenId += getAnimal(stakeDetails.initialTokenAmount) << 24; generatedTokenId += getMaterial(stakeDetails.numOfMonths) << 32; require(generatedTokenId == tokenId, "Incorrect nft requested"); mementoRise.mint(from, tokenId, 1); } function getMaterial(uint256 months) private pure returns (uint256) { if (months > 0 && months <= 12) return months; if (months == 24) return 14; if (months == 36) return 15; require(false, "Invalid time"); return 0; } function getAnimal(uint256 threshold) private pure returns (uint256) { // 'Kraken' threshold: 250000000 if (threshold > (250_000_000 - 1) * 10**18) { return 11; } // 'Megalodon', threshold: 100000000 }, if (threshold > (100_000_000 - 1) * 10**18) { return 10; } // 'Whale', threshold: 50000000 }, if (threshold > (50_000_000 - 1) * 10**18) { return 9; } // 'Orca', threshold: 25000000 }, if (threshold > (25_000_000 - 1) * 10**18) { return 8; } // 'Shark', threshold: 10000000 }, if (threshold > (10_000_000 - 1) * 10**18) { return 7; } // 'Narwhal', threshold: 5000000 }, if (threshold > (5_000_000 - 1) * 10**18) { return 6; } // 'Dolphin', threshold: 1000000 }, if (threshold > (1_000_000 - 1) * 10**18) { return 5; } // 'Stingray', threshold: 500000 }, if (threshold > (500_000 - 1) * 10**18) { return 4; } // 'Swordfish', threshold: 100000 }, if (threshold > (100_000 - 1) * 10**18) { return 3; } // 'Starfish', threshold: 50000 }, if (threshold > (50_000 - 1) * 10**18) { return 2; } // 'Seahorse', threshold: 10000 }, if (threshold > (10_000 - 1) * 10**18) { return 1; } // 'Plankton', threshold: 1000 } if (threshold > (1_000 - 1) * 10**18) { return 0; } // Smaller require(false, "Too small"); return 0; } function getChain() private view returns (uint256) { uint256 chainId = block.chainid; if (chainId == 1 || chainId == 3 || chainId == 4 || chainId == 5 || chainId == 42) // Ethereum return 4; if (chainId == 56 || chainId == 97) // BNB return 2; if (chainId == 137 || chainId == 80001) // Polygon return 3; if (chainId == 250 || chainId == 4002) // Fantom return 1; if (chainId == 43114 || chainId == 43113) // Avalanche return 0; require(false, "Unknown chain"); return 0; } } type BalanceKey is uint256; type BalanceAmount is uint256; library AmountLib { function add(BalanceAmount b, uint256 value) internal pure returns (BalanceAmount) { require(value < type(uint240).max, "Out of range"); uint256 amountPos = BalanceAmount.unwrap(b); uint240 amount = uint240(amountPos >> 16); uint16 position = uint16(amountPos & 0xffff); amount += uint240(value); amountPos = (uint256(amount) << 16) | position; return BalanceAmount.wrap(amountPos); } function subtract(BalanceAmount b, uint256 value) internal pure returns (BalanceAmount) { require(value < type(uint240).max, "Out of range"); uint256 amountPos = BalanceAmount.unwrap(b); uint240 amount = uint240(amountPos >> 16); uint16 position = uint16(amountPos & 0xffff); require (amount >= value, "Balance too low"); unchecked { amount -= uint240(value); } amountPos = (uint256(amount) << 16) | position; return BalanceAmount.wrap(amountPos); } function Amount(BalanceAmount b) internal pure returns (uint256 value) { uint256 amountPos = BalanceAmount.unwrap(b); return uint240(amountPos >> 16); } function getPosition(BalanceAmount b) internal pure returns (uint16) { uint256 amountPos = BalanceAmount.unwrap(b); return uint16(amountPos & 0xffff); } function setPosition(BalanceAmount b, uint16 position) internal pure returns (BalanceAmount) { uint256 amountPos = BalanceAmount.unwrap(b); uint240 amount = uint240(amountPos >> 16); return BalanceAmount.wrap((uint256(amount) << 16) | position); } } contract MementoRise is EverRiseTokenManaged, royaltyHandler, NativeCoinSender, ERC165, IERC1155, IMementoRise, IERC1155MetadataURI, IOpenSeaCollectible { using AmountLib for BalanceAmount; event BaseUriForTypeSet(uint16 indexed nftType, string uri); event NftBridgeSet(address bridge); event NftBridgedIn(address indexed contractAddress, address indexed operator, address indexed to, uint256 id, uint256 amount); event NftsBridgedIn(address indexed contractAddress, address indexed operator, address indexed to, uint256[] ids, uint256[] amounts); event NftBridgedOut(address indexed contractAddress, address indexed operator, address indexed from, uint256 id, uint256 amount); event NftsBridgedOut(address indexed contractAddress, address indexed operator, address indexed from, uint256[] ids, uint256[] amounts); event TransferExternalTokens(address indexed tokenAddress, address indexed to, uint256 count); event SetMintFee(uint16 typeId, uint256 fee); event SetTransmuteFee(uint16 typeId, uint256 fee); event SetMintFeeDefault(uint256 fee); event SetTransmuteFeeDefault(uint256 fee); event SetAllowedCreateTo(uint16 nftType, address contractAddress); event SetAllowedCreateFrom(uint16 nftType, address contractAddress); event SetAllowedTransumtateSingleTo(uint16 nftType, address contractAddress); event SetAllowedTransumtateMultipleTo(uint16 nftType, address contractAddress); address public nftBridge; uint256 public defaultCreateFee; uint256 public defaultTransmuteFee; mapping (uint16 => uint256) private _mintFee; mapping (uint16 => uint256) private _transmuteFee; mapping (uint16 => ICreateRecipe) public allowedCreateTo; mapping (uint16 => ITransmuteSingleRecipe) public allowedTransumtateSingleTo; mapping (uint16 => ITransmuteMultipleRecipe) public allowedTransumtateMultipleTo; mapping (uint16 => address) public allowedCreateFrom; mapping (uint16 => bytes) public baseUris; mapping (BalanceKey => BalanceAmount) private _balanceOf; mapping (address => uint96[]) public tokensHeld; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; StakingAchievement public stakingAchievement; MigrationV1V2Achievement public migrationV1V2Achievement; HolderV2Achievement public holderV2Achievement; constructor(address _owner) { _setRoyaltyAddress(royaltyFeeAddress); StakingAchievement _stakingAchievement = new StakingAchievement(address(this)); MigrationV1V2Achievement _migrationV1V2Achievement = new MigrationV1V2Achievement(address(this)); HolderV2Achievement _holderV2Achievement = new HolderV2Achievement(address(this)); stakingAchievement = _stakingAchievement; migrationV1V2Achievement = _migrationV1V2Achievement; holderV2Achievement = _holderV2Achievement; allowedCreateFrom[1] = address(_stakingAchievement); allowedCreateFrom[2] = address(_migrationV1V2Achievement); allowedCreateTo[3] = _holderV2Achievement; uint256 _defaultCreateFee = getDefaultCreateFee(); defaultCreateFee = _defaultCreateFee; uint256 _defaultTransmuteFee = _defaultCreateFee * 5 / 2; // x2.5 defaultTransmuteFee = _defaultTransmuteFee; emit SetMintFeeDefault(_defaultCreateFee); emit SetTransmuteFeeDefault(_defaultTransmuteFee); setEverRiseToken(EverRiseV3Address); transferOwnership(_owner); _stakingAchievement.transferOwnership(_owner); _migrationV1V2Achievement.transferOwnership(_owner); _holderV2Achievement.transferOwnership(_owner); bytes memory _uri = ipfsAddress; baseUris[1] = _uri; baseUris[2] = _uri; baseUris[3] = _uri; emit TransferSingle(address(this), address(0), address(0), 4295098369, 0); emit TransferSingle(address(this), address(0), address(0), 2, 0); emit TransferSingle(address(this), address(0), address(0), 3, 0); } function name() external pure returns (string memory) { return "EverRise Mementos"; } function symbol() external pure returns (string memory) { return "memeRISE"; } function decimals() external pure returns (uint8) { return 0; } uint256 public totalSupply; function setMintFee(uint16 typeId, uint256 fee) external onlyOwner { _mintFee[typeId] = fee; emit SetMintFee(typeId, fee); } function setTransmuteFee(uint16 typeId, uint256 fee) external onlyOwner { _transmuteFee[typeId] = fee; emit SetTransmuteFee(typeId, fee); } function setMintFeeDefault(uint256 fee) external onlyOwner { defaultCreateFee = fee; emit SetMintFeeDefault(fee); } function setTransmuteFeeDefault(uint256 fee) external onlyOwner { defaultTransmuteFee = fee; emit SetTransmuteFeeDefault(fee); } function mintFee(uint16 typeId) public view returns (uint256) { uint256 fee = _mintFee[typeId]; if (fee == 0) return defaultCreateFee; return fee; } function transmuteFee(uint16 typeId) public view returns (uint256) { uint256 fee = _transmuteFee[typeId]; if (fee == 0) return defaultTransmuteFee; return fee; } function getDefaultCreateFee() private view returns (uint256) { uint256 chainId = block.chainid; if (chainId == 1) // Ethereum return 10000000000000000; // 0.01 if (chainId == 56) // BNB return 10000000000000000; // 0.01 if (chainId == 137) // Polygon return 3000000000000000000; // 3 if (chainId == 250) // Fantom return 3000000000000000000; // 3 if (chainId == 43114) // Avalanche return 50000000000000000; // 0.05 return 3000000000000000000; } function setNftBridge(address _bridge) external onlyOwner { nftBridge = _bridge; emit NftBridgeSet(nftBridge); } function setBaseUriForType(uint16 nftType, string calldata baseUri) external onlyOwner { baseUris[nftType] = bytes(baseUri); emit BaseUriForTypeSet(nftType, baseUri); } function setAllowedCreateTo(uint16 nftType, address contractAddress) external onlyOwner { allowedCreateTo[nftType] = ICreateRecipe(contractAddress); emit SetAllowedCreateTo(nftType, contractAddress); } function setAllowedCreateFrom(uint16 nftType, address contractAddress) external onlyOwner { allowedCreateFrom[nftType] = contractAddress; emit SetAllowedCreateFrom(nftType, contractAddress); } function setAllowedTransumtateSingleTo(uint16 nftType, address contractAddress) external onlyOwner { allowedTransumtateSingleTo[nftType] = ITransmuteSingleRecipe(contractAddress); emit SetAllowedTransumtateSingleTo(nftType, contractAddress); } function setAllowedTransumtateMultipleTo(uint16 nftType, address contractAddress) external onlyOwner { allowedTransumtateMultipleTo[nftType] = ITransmuteMultipleRecipe(contractAddress); emit SetAllowedTransumtateMultipleTo(nftType, contractAddress); } function royaltyAddress() external view returns (address payable) { return payable(address(royaltySplitter)); } function tokenURI(uint256 id) external view returns (string memory) { return uri(id); } function uri(uint256 id) public view returns (string memory) { uint16 nftType = uint16(id & 0xffff); bytes memory baseUri = baseUris[nftType]; require(baseUri.length > 0, "Uri not set"); return string(abi.encodePacked(baseUri, uint2hexstr(id), ".json")); } function uint2hexstr(uint i) public pure returns (string memory) { uint mask = 15; bytes memory bstr = new bytes(64); uint k = 64; while (k > 0) { uint curr = (i & mask); bstr[--k] = curr > 9 ? bytes1(uint8(55 + curr)) : bytes1(uint8(48 + curr)); // 55 = 65 - 10 i = i >> 4; } return string(bstr); } function contractURI() external view returns (string memory) { return string( abi.encodePacked("https://data.everrise.com/data/memerise-", toString(block.chainid), ".json") ); } function _walletLock(address fromAddress) private view { if (everRiseToken.isWalletLocked(fromAddress)) revert WalletLocked(); } modifier walletLock(address fromAddress) { _walletLock(fromAddress); _; } function handleMintFee(uint256 baseFee, uint256 quantity) internal { uint256 totalFee = baseFee * quantity; require(totalFee == 0 || msg.value >= totalFee, "Mint fee not covered"); uint256 _balance = address(this).balance; if (_balance > 0) { // Transfer everything, easier than transferring extras later sendEthViaCall(payable(address(royaltySplitter)), _balance); } } function toBalanceKey(address account, uint256 tokenId) private pure returns (BalanceKey) { if (tokenId > type(uint96).max) revert AmountOutOfRange(); uint256 key = uint256(uint160(account)) << 96 | uint96(tokenId); return BalanceKey.wrap(key); } function balanceOf(address account, uint256 tokenId) view public returns (uint256) { if (account == address(0)) revert NotZeroAddress(); return _balanceOf[toBalanceKey(account, tokenId)].Amount(); } function mint(address to, uint256 tokenId, uint256 amount) external { address requestor = _msgSender(); uint16 nftType = uint16(tokenId & 0xffff); require(allowedCreateFrom[nftType] == requestor, "Requestor not allowed to mint that type"); // Mint new tokens AddBalance(to, tokenId, amount); emit TransferSingle(to, address(0), to, tokenId, amount); } function create(uint256 tokenId, uint256 amount) external payable { uint16 nftType = uint16(tokenId & 0xffff); ICreateRecipe creator = allowedCreateTo[nftType]; if (address(creator) == address(0)) revert NotSetup(); handleMintFee(mintFee(nftType), amount); address from = _msgSender(); creator.createTo(from, tokenId, amount); // Mint new tokens AddBalance(from, tokenId, amount); emit TransferSingle(from, address(0), from, tokenId, amount); } function getAllTokensHeld(address account) external view returns (uint96[] memory tokenIds, uint256[] memory amounts) { uint96[] storage refTokenIds = tokensHeld[account]; uint256 tokenIdsLength = refTokenIds.length; if (tokenIdsLength < 2) { // Position 0 is skipped tokenIds = new uint96[](0); amounts = new uint256[](0); return (tokenIds, amounts); } uint256 length = tokenIdsLength - 1; uint256 position; tokenIds = new uint96[](length); amounts = new uint256[](length); for (uint256 i = 1; i < tokenIdsLength;) { unchecked { position = i - 1; } uint96 tokenId = refTokenIds[i]; tokenIds[position] = tokenId; amounts[position] = _balanceOf[toBalanceKey(account, tokenId)].Amount(); unchecked { ++i; } } } function AddBalance(address account, uint256 tokenId, uint256 amount) private { require(tokenId < type(uint96).max, "Out of range"); BalanceKey key = toBalanceKey(account, tokenId); BalanceAmount currentBalance = _balanceOf[key]; if (currentBalance.getPosition() > 0) { // Simple add _balanceOf[key] = currentBalance.add(amount); } else { uint96[] storage refTokenIds = tokensHeld[account]; uint256 length = refTokenIds.length; if (length == 0) { // Add empty zero item refTokenIds.push(); refTokenIds.push(uint96(tokenId)); _balanceOf[key] = BalanceAmount.wrap((uint256(amount) << 16) | 1); } else { require(length < type(uint16).max, "Too many types"); uint16 position = uint16(length); refTokenIds.push(uint96(tokenId)); _balanceOf[key] = BalanceAmount.wrap((uint256(amount) << 16) | position); } } totalSupply += amount; } function SubtractBalance(address account, uint256 tokenId, uint256 amount) private { require(tokenId < type(uint96).max, "Out of range"); BalanceKey key = toBalanceKey(account, tokenId); BalanceAmount currentBalance = _balanceOf[key]; uint16 position = currentBalance.getPosition(); require (position > 0, "Non-existance"); currentBalance = currentBalance.subtract(amount); if (currentBalance.Amount() > 0) { // Simple decrement _balanceOf[key] = currentBalance; } else { _balanceOf[key] = BalanceAmount.wrap(0); // Remove from position array uint96[] storage refTokenIds = tokensHeld[account]; uint256 length = refTokenIds.length; require (length > 1, "Token List"); uint256 last = length - 1; if (position < last) { uint96 lastTokenId = refTokenIds[last]; key = toBalanceKey(account, lastTokenId); currentBalance = _balanceOf[key]; _balanceOf[key] = currentBalance.setPosition(position); refTokenIds[position] = lastTokenId; } refTokenIds.pop(); } totalSupply -= amount; } function transmuteMultiple(uint256[] calldata toTokenIds, uint256[] calldata toAmounts, uint256[] calldata fromIds, uint256[] calldata fromAmounts) external payable walletLock(_msgSender()) { uint256 fromIdsLength = fromIds.length; require(fromIdsLength > 0, "No input tokens"); require(fromIdsLength == fromAmounts.length, "Input: ids and amounts length mismatch"); uint256 toTokenIdsLength = toTokenIds.length; require(toTokenIdsLength > 0, "No output tokens"); require(toTokenIdsLength == toAmounts.length, "Output: ids and amounts length mismatch"); uint16 nftType = uint16(toTokenIds[0] & 0xffff); uint256 totalAmount; for (uint256 i = 0; i < toTokenIdsLength; i++) { uint256 toTokenId = toTokenIds[i]; require(nftType == uint16(toTokenId & 0xffff), "Not same type outputs"); uint256 toAmount = toAmounts[i]; require(toAmount > 0, "No zero outputs"); totalAmount += toAmount; } ITransmuteMultipleRecipe transmutator = allowedTransumtateMultipleTo[nftType]; if (address(transmutator) == address(0)) revert NotSetup(); handleMintFee(transmuteFee(nftType), totalAmount); _transmuteMultiple(transmutator, toTokenIds, toAmounts, fromIds, fromAmounts); } function _transmuteMultiple(ITransmuteMultipleRecipe transmutator, uint256[] calldata toTokenIds, uint256[] calldata toAmounts, uint256[] calldata fromIds, uint256[] calldata fromAmounts) private { address from = _msgSender(); transmutator.transmuteMultipleTo(from, toTokenIds, toAmounts, fromIds, fromAmounts); // Burn passed in tokens uint256 idsLength = fromIds.length; for (uint256 i = 0; i < idsLength; i++) { uint256 fromId = fromIds[i]; uint256 fromAmount = fromAmounts[i]; SubtractBalance(from, fromId, fromAmount); } emit TransferBatch(from, from, address(0), fromIds, fromAmounts); // Mint new tokens idsLength = toTokenIds.length; for (uint256 i = 0; i < idsLength; i++) { uint256 toTokenId = toTokenIds[i]; uint256 toAmount = toAmounts[i]; AddBalance(from, toTokenId, toAmount); } emit TransferBatch(from, address(0), from, toTokenIds, toAmounts); } function transmuteSingle(uint256 toTokenId, uint256 toAmount, uint256[] calldata fromIds, uint256[] calldata fromAmounts) external payable walletLock(_msgSender()) { uint256 fromIdsLength = fromIds.length; require(fromIdsLength == fromAmounts.length, "ERC1155: ids and amounts length mismatch"); require(toAmount > 0, "No zero output"); uint16 nftType = uint16(toTokenId & 0xffff); ITransmuteSingleRecipe transmutator = allowedTransumtateSingleTo[nftType]; if (address(transmutator) == address(0)) revert NotSetup(); handleMintFee(transmuteFee(nftType), toAmount); address from = _msgSender(); transmutator.transmuteSingleTo(from, toTokenId, toAmount, fromIds, fromAmounts); // Burn passed in tokens for (uint256 i = 0; i < fromIdsLength; i++) { uint256 tokenId = fromIds[i]; uint256 amount = fromAmounts[i]; SubtractBalance(from, tokenId, amount); } emit TransferBatch(from, from, address(0), fromIds, fromAmounts); // Mint new tokens AddBalance(from, toTokenId, toAmount); emit TransferSingle(from, address(0), from, toTokenId, toAmount); } function supportsInterface(bytes4 interfaceId) public view virtual override (ERC165, IERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory) { uint256 accountsLength = accounts.length; require(accountsLength == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accountsLength); for (uint256 i = 0; i < accountsLength; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } // Approval function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } function _setApprovalForAll( address owner, address operator, bool approved ) private { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } // Transfer function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external walletLock(from) { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external walletLock(from) { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } function _safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) private { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); SubtractBalance(from, id, amount); AddBalance(to, id, amount); emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } function _safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) private { uint256 idsLength = ids.length; require(idsLength == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); for (uint256 i = 0; i < idsLength; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; SubtractBalance(from, id, amount); AddBalance(to, id, amount); } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } // Hook checks function _doSafeBatchTransferAcceptanceCheck(address operator, address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) private view { if (isContract(to)) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeTransferAcceptanceCheck(address operator, address from, address to, uint256 id, uint256 amount, bytes calldata data) private view { if (isContract(to)) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } // Bridge functions function bridgeNftOut(address from, uint256 id, uint256 amount) external { address operator = _msgSender(); require(operator == nftBridge, "Only bridge"); _walletLock(from); if (isApprovedForAll(from, operator)) { revert CallerNotApproved(); } SubtractBalance(from, id, amount); emit TransferSingle(operator, from, address(0), id, amount); emit NftBridgedOut(address(this), nftBridge, from, id, amount); } function bridgeNftsOut(address from, uint256[] calldata ids, uint256[] calldata amounts) external { address operator = _msgSender(); require(operator == nftBridge, "Only bridge"); _walletLock(from); if (isApprovedForAll(from, operator)) { revert CallerNotApproved(); } uint256 idsLength = ids.length; require(idsLength == amounts.length, "ERC1155: ids and amounts length mismatch"); for (uint256 i = 0; i < idsLength; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; SubtractBalance(from, id, amount); } emit TransferBatch(operator, from, address(0), ids, amounts); emit NftsBridgedOut(address(this), nftBridge, from, ids, amounts); } function bridgeNftIn(address to, uint256 id, uint256 amount) external { address operator = _msgSender(); require(operator == nftBridge, "Only bridge"); AddBalance(to, id, amount); emit TransferSingle(operator, address(0), to, id, amount); emit NftBridgedIn(address(this), nftBridge, to, id, amount); } function bridgeNftsIn(address to, uint256[] calldata ids, uint256[] calldata amounts) external { address operator = _msgSender(); require(operator == nftBridge, "Only bridge"); uint256 idsLength = ids.length; require(idsLength == amounts.length, "ERC1155: ids and amounts length mismatch"); for (uint256 i = 0; i < idsLength; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; AddBalance(to, id, amount); } emit TransferBatch(operator, address(0), to, ids, amounts); emit NftsBridgedIn(address(this), nftBridge, to, ids, amounts); } // Utility functions function isContract(address account) private view returns (bool) { return account.code.length > 0; } function toString(uint256 value) private pure returns (bytes memory output) { if (value == 0) { return "0"; } uint256 remaining = value; uint256 length; while (remaining != 0) { length++; remaining /= 10; } output = new bytes(length); uint256 position = length; remaining = value; while (remaining != 0) { output[--position] = bytes1(uint8(48 + remaining % 10)); remaining /= 10; } } // Remove trapped tokens function transferBalance(uint256 amount) external onlyOwner { sendEthViaCall(_msgSender(), amount); } function transferExternalTokens(address tokenAddress, address to, uint256 amount) external onlyOwner { if (tokenAddress == address(0)) revert NotZeroAddress(); transferTokens(tokenAddress, to, amount); } function transferTokens(address tokenAddress, address to, uint256 amount) private { IERC20(tokenAddress).transfer(to, amount); emit TransferExternalTokens(tokenAddress, to, amount); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_mementoRise","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CallerNotOwner","type":"error"},{"inputs":[],"name":"FailedEthSend","type":"error"},{"inputs":[],"name":"NotZeroAddress","type":"error"},{"inputs":[],"name":"WalletLocked","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"}],"name":"EverRiseTokenSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nftAddress","type":"address"}],"name":"MementoRiseSet","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"stakeNftId","type":"uint256"}],"name":"claimStakingAchievement","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"everRiseToken","outputs":[{"internalType":"contract IEverRise","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"uint256","name":"animalId","type":"uint256"},{"internalType":"uint256","name":"months","type":"uint256"}],"name":"getTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"mementoRise","outputs":[{"internalType":"contract IMementoRise","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftRise","outputs":[{"internalType":"contract InftEverRise","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"setEverRiseToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nftAddress","type":"address"}],"name":"setMementoRise","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600280546001600160a01b03191673c17c30e98541188614df99239cabd40280810ca317905534801561003657600080fd5b5060405161102838038061102883398101604081905261005591610172565b600080546001600160a01b031916339081178255604051839282917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061009f816100cc565b5050600380546001600160a01b0319167323cd2e6b283754fd2340a75732f9ddbb5d11807e1790556101a2565b6100d4610145565b6001600160a01b0381166100fb576040516366385fa360e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f047bb057cb56af8c7f8b85dbf04218832f6163ba1d8f03b944083b01f977a88290600090a250565b6000546001600160a01b0316331461017057604051632e6c18c960e11b815260040160405180910390fd5b565b60006020828403121561018457600080fd5b81516001600160a01b038116811461019b57600080fd5b9392505050565b610e77806101b16000396000f3fe6080604052600436106100865760003560e01c806373a225571161005957806373a22557146101385780638116ed72146101585780638da5cb5b14610178578063dfbb06dd14610198578063f2fde38b146101ab57600080fd5b806301e089dd1461008b57806328004236146100c857806333a19e2f146100f65780635718f41a14610118575b600080fd5b34801561009757600080fd5b506001546100ab906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100d457600080fd5b506100e86100e3366004610b9d565b6101cb565b6040519081526020016100bf565b34801561010257600080fd5b50610116610111366004610bde565b6102e1565b005b34801561012457600080fd5b50610116610133366004610bde565b61035a565b34801561014457600080fd5b506003546100ab906001600160a01b031681565b34801561016457600080fd5b506002546100ab906001600160a01b031681565b34801561018457600080fd5b506000546100ab906001600160a01b031681565b6101166101a6366004610c02565b6103d3565b3480156101b757600080fd5b506101166101c6366004610bde565b61067b565b600060ff8411156102185760405162461bcd60e51b8152602060048201526012602482015271436861696e206f7574206f662072616e676560701b60448201526064015b60405180910390fd5b60ff8311156102615760405162461bcd60e51b8152602060048201526015602482015274416e696d616c4964206f7574206f662072616e676560581b604482015260640161020f565b60ff8211156102a85760405162461bcd60e51b81526020600482015260136024820152724d6f6e746873206f7574206f662072616e676560681b604482015260640161020f565b60016102b8601086901b82610c3a565b90506102c8601885901b82610c3a565b90506102d8602084901b82610c3a565b95945050505050565b6102e9610705565b6001600160a01b038116610310576040516366385fa360e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f047bb057cb56af8c7f8b85dbf04218832f6163ba1d8f03b944083b01f977a88290600090a250565b610362610705565b6001600160a01b038116610389576040516366385fa360e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040517f151b7e66bd44c3b053284cb5cc54c216555683d266fbd4518b9dc513064be66d90600090a250565b336103dd81610732565b600033600154604051632a24bf8560e11b815261ffff87166004820152919250610460916001600160a01b03909116906354497f0a906024016020604051808303816000875af1158015610435573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104599190610c52565b60016107c1565b6003546040516331eee37160e21b81526001600160a01b03838116600483015260248201869052600092169063c7bb8dc4906044016020604051808303816000875af11580156104b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d89190610c84565b60035460405163a802d82b60e01b815263ffffffff831660048201529192506000916001600160a01b039091169063a802d82b9060240161014060405180830381865afa15801561052d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105519190610d38565b90506001601061055f6107dc565b61056a911b82610c3a565b9050601861058983600001516bffffffffffffffffffffffff166108c9565b610594911b82610c3a565b905060206105a8836060015160ff16610a3c565b6105b3911b82610c3a565b90508681146106045760405162461bcd60e51b815260206004820152601760248201527f496e636f7272656374206e667420726571756573746564000000000000000000604482015260640161020f565b60018054604051630ab714fb60e11b81526001600160a01b038781166004830152602482018b9052604482019390935291169063156e29f690606401600060405180830381600087803b15801561065a57600080fd5b505af115801561066e573d6000803e3d6000fd5b5050505050505050505050565b610683610705565b6001600160a01b0381166106aa576040516366385fa360e01b815260040160405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461073057604051632e6c18c960e11b815260040160405180910390fd5b565b60025460405163060648d160e11b81526001600160a01b03838116600483015290911690630c0c91a290602401602060405180830381865afa15801561077c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a09190610e00565b156107be576040516335543b4960e21b815260040160405180910390fd5b50565b6002546107d8906001600160a01b03168383610aae565b5050565b60004660018114806107ee5750806003145b806107f95750806004145b806108045750806005145b8061080f575080602a145b1561081c57600491505090565b806038148061082b5750806061145b1561083857600291505090565b806089148061084957508062013881145b1561085657600391505090565b8060fa1480610866575080610fa2145b1561087357600191505090565b8061a86a148061088457508061a869145b1561089157600091505090565b60405162461bcd60e51b815260206004820152600d60248201526c2ab735b737bbb71031b430b4b760991b604482015260640161020f565b60006acecb8f1a13695b929c00008211156108e65750600b919050565b6a52b7d2cee7561f3c9c00008211156109015750600a919050565b6a295be960834fb5ca9c000082111561091c57506009919050565b6a14adf4a9514c81119c000082111561093757506008919050565b6a08459508334a94a29c000082111561095257506007919050565b6a0422ca7d2949f07d9c000082111561096d57506006919050565b69d3c20dee1639f99c000082111561098757506005919050565b6969e10006afc3291c00008211156109a157506004919050565b69152cf4e72a974f1c00008211156109bb57506003919050565b690a96738339f1d3dc00008211156109d557506002919050565b69021e0c0013070adc00008211156109ef57506001919050565b683627e8f712373c0000821115610a0857506000919050565b60405162461bcd60e51b8152602060048201526009602482015268151bdbc81cdb585b1b60ba1b604482015260640161020f565b60008082118015610a4e5750600c8211155b15610a57575090565b81601803610a675750600e919050565b81602403610a775750600f919050565b60405162461bcd60e51b815260206004820152600c60248201526b496e76616c69642074696d6560a01b604482015260640161020f565b6000610aba8284610e22565b9050801580610ac95750803410155b610b0c5760405162461bcd60e51b8152602060048201526014602482015273135a5b9d08199959481b9bdd0818dbdd995c995960621b604482015260640161020f565b478015610b1d57610b1d8582610b24565b5050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610b71576040519150601f19603f3d011682016040523d82523d6000602084013e610b76565b606091505b5050905080610b985760405163b5747cc760e01b815260040160405180910390fd5b505050565b600080600060608486031215610bb257600080fd5b505081359360208301359350604090920135919050565b6001600160a01b03811681146107be57600080fd5b600060208284031215610bf057600080fd5b8135610bfb81610bc9565b9392505050565b60008060408385031215610c1557600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b60008219821115610c4d57610c4d610c24565b500190565b600060208284031215610c6457600080fd5b5051919050565b805163ffffffff81168114610c7f57600080fd5b919050565b600060208284031215610c9657600080fd5b610bfb82610c6b565b604051610140810167ffffffffffffffff81118282101715610cd157634e487b7160e01b600052604160045260246000fd5b60405290565b80516bffffffffffffffffffffffff81168114610c7f57600080fd5b805165ffffffffffff81168114610c7f57600080fd5b805160ff81168114610c7f57600080fd5b8051610c7f81610bc9565b805162ffffff81168114610c7f57600080fd5b60006101408284031215610d4b57600080fd5b610d53610c9f565b610d5c83610cd7565b8152610d6a60208401610cd7565b6020820152610d7b60408401610cf3565b6040820152610d8c60608401610d09565b6060820152610d9d60808401610d09565b6080820152610dae60a08401610d1a565b60a0820152610dbf60c08401610c6b565b60c0820152610dd060e08401610c6b565b60e0820152610100610de3818501610d25565b90820152610120610df5848201610d09565b908201529392505050565b600060208284031215610e1257600080fd5b81518015158114610bfb57600080fd5b6000816000190483118215151615610e3c57610e3c610c24565b50029056fea2646970667358221220c59f58d5a63256e7230820bd78e195d441968fc17564d85cca0bb5a88d48556564736f6c634300080d00330000000000000000000000001c57a5ee9c5a90c9a5e31b5265175e0642b943b1
Deployed Bytecode
0x6080604052600436106100865760003560e01c806373a225571161005957806373a22557146101385780638116ed72146101585780638da5cb5b14610178578063dfbb06dd14610198578063f2fde38b146101ab57600080fd5b806301e089dd1461008b57806328004236146100c857806333a19e2f146100f65780635718f41a14610118575b600080fd5b34801561009757600080fd5b506001546100ab906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100d457600080fd5b506100e86100e3366004610b9d565b6101cb565b6040519081526020016100bf565b34801561010257600080fd5b50610116610111366004610bde565b6102e1565b005b34801561012457600080fd5b50610116610133366004610bde565b61035a565b34801561014457600080fd5b506003546100ab906001600160a01b031681565b34801561016457600080fd5b506002546100ab906001600160a01b031681565b34801561018457600080fd5b506000546100ab906001600160a01b031681565b6101166101a6366004610c02565b6103d3565b3480156101b757600080fd5b506101166101c6366004610bde565b61067b565b600060ff8411156102185760405162461bcd60e51b8152602060048201526012602482015271436861696e206f7574206f662072616e676560701b60448201526064015b60405180910390fd5b60ff8311156102615760405162461bcd60e51b8152602060048201526015602482015274416e696d616c4964206f7574206f662072616e676560581b604482015260640161020f565b60ff8211156102a85760405162461bcd60e51b81526020600482015260136024820152724d6f6e746873206f7574206f662072616e676560681b604482015260640161020f565b60016102b8601086901b82610c3a565b90506102c8601885901b82610c3a565b90506102d8602084901b82610c3a565b95945050505050565b6102e9610705565b6001600160a01b038116610310576040516366385fa360e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f047bb057cb56af8c7f8b85dbf04218832f6163ba1d8f03b944083b01f977a88290600090a250565b610362610705565b6001600160a01b038116610389576040516366385fa360e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040517f151b7e66bd44c3b053284cb5cc54c216555683d266fbd4518b9dc513064be66d90600090a250565b336103dd81610732565b600033600154604051632a24bf8560e11b815261ffff87166004820152919250610460916001600160a01b03909116906354497f0a906024016020604051808303816000875af1158015610435573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104599190610c52565b60016107c1565b6003546040516331eee37160e21b81526001600160a01b03838116600483015260248201869052600092169063c7bb8dc4906044016020604051808303816000875af11580156104b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d89190610c84565b60035460405163a802d82b60e01b815263ffffffff831660048201529192506000916001600160a01b039091169063a802d82b9060240161014060405180830381865afa15801561052d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105519190610d38565b90506001601061055f6107dc565b61056a911b82610c3a565b9050601861058983600001516bffffffffffffffffffffffff166108c9565b610594911b82610c3a565b905060206105a8836060015160ff16610a3c565b6105b3911b82610c3a565b90508681146106045760405162461bcd60e51b815260206004820152601760248201527f496e636f7272656374206e667420726571756573746564000000000000000000604482015260640161020f565b60018054604051630ab714fb60e11b81526001600160a01b038781166004830152602482018b9052604482019390935291169063156e29f690606401600060405180830381600087803b15801561065a57600080fd5b505af115801561066e573d6000803e3d6000fd5b5050505050505050505050565b610683610705565b6001600160a01b0381166106aa576040516366385fa360e01b815260040160405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461073057604051632e6c18c960e11b815260040160405180910390fd5b565b60025460405163060648d160e11b81526001600160a01b03838116600483015290911690630c0c91a290602401602060405180830381865afa15801561077c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a09190610e00565b156107be576040516335543b4960e21b815260040160405180910390fd5b50565b6002546107d8906001600160a01b03168383610aae565b5050565b60004660018114806107ee5750806003145b806107f95750806004145b806108045750806005145b8061080f575080602a145b1561081c57600491505090565b806038148061082b5750806061145b1561083857600291505090565b806089148061084957508062013881145b1561085657600391505090565b8060fa1480610866575080610fa2145b1561087357600191505090565b8061a86a148061088457508061a869145b1561089157600091505090565b60405162461bcd60e51b815260206004820152600d60248201526c2ab735b737bbb71031b430b4b760991b604482015260640161020f565b60006acecb8f1a13695b929c00008211156108e65750600b919050565b6a52b7d2cee7561f3c9c00008211156109015750600a919050565b6a295be960834fb5ca9c000082111561091c57506009919050565b6a14adf4a9514c81119c000082111561093757506008919050565b6a08459508334a94a29c000082111561095257506007919050565b6a0422ca7d2949f07d9c000082111561096d57506006919050565b69d3c20dee1639f99c000082111561098757506005919050565b6969e10006afc3291c00008211156109a157506004919050565b69152cf4e72a974f1c00008211156109bb57506003919050565b690a96738339f1d3dc00008211156109d557506002919050565b69021e0c0013070adc00008211156109ef57506001919050565b683627e8f712373c0000821115610a0857506000919050565b60405162461bcd60e51b8152602060048201526009602482015268151bdbc81cdb585b1b60ba1b604482015260640161020f565b60008082118015610a4e5750600c8211155b15610a57575090565b81601803610a675750600e919050565b81602403610a775750600f919050565b60405162461bcd60e51b815260206004820152600c60248201526b496e76616c69642074696d6560a01b604482015260640161020f565b6000610aba8284610e22565b9050801580610ac95750803410155b610b0c5760405162461bcd60e51b8152602060048201526014602482015273135a5b9d08199959481b9bdd0818dbdd995c995960621b604482015260640161020f565b478015610b1d57610b1d8582610b24565b5050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610b71576040519150601f19603f3d011682016040523d82523d6000602084013e610b76565b606091505b5050905080610b985760405163b5747cc760e01b815260040160405180910390fd5b505050565b600080600060608486031215610bb257600080fd5b505081359360208301359350604090920135919050565b6001600160a01b03811681146107be57600080fd5b600060208284031215610bf057600080fd5b8135610bfb81610bc9565b9392505050565b60008060408385031215610c1557600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b60008219821115610c4d57610c4d610c24565b500190565b600060208284031215610c6457600080fd5b5051919050565b805163ffffffff81168114610c7f57600080fd5b919050565b600060208284031215610c9657600080fd5b610bfb82610c6b565b604051610140810167ffffffffffffffff81118282101715610cd157634e487b7160e01b600052604160045260246000fd5b60405290565b80516bffffffffffffffffffffffff81168114610c7f57600080fd5b805165ffffffffffff81168114610c7f57600080fd5b805160ff81168114610c7f57600080fd5b8051610c7f81610bc9565b805162ffffff81168114610c7f57600080fd5b60006101408284031215610d4b57600080fd5b610d53610c9f565b610d5c83610cd7565b8152610d6a60208401610cd7565b6020820152610d7b60408401610cf3565b6040820152610d8c60608401610d09565b6060820152610d9d60808401610d09565b6080820152610dae60a08401610d1a565b60a0820152610dbf60c08401610c6b565b60c0820152610dd060e08401610c6b565b60e0820152610100610de3818501610d25565b90820152610120610df5848201610d09565b908201529392505050565b600060208284031215610e1257600080fd5b81518015158114610bfb57600080fd5b6000816000190483118215151615610e3c57610e3c610c24565b50029056fea2646970667358221220c59f58d5a63256e7230820bd78e195d441968fc17564d85cca0bb5a88d48556564736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001C57a5eE9C5A90C9a5e31B5265175e0642b943b1
-----Decoded View---------------
Arg [0] : _mementoRise (address): 0x1C57a5eE9C5A90C9a5e31B5265175e0642b943b1
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000001C57a5eE9C5A90C9a5e31B5265175e0642b943b1
Deployed Bytecode Sourcemap
21473:4297:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10714:31;;;;;;;;;;-1:-1:-1;10714:31:0;;;;-1:-1:-1;;;;;10714:31:0;;;;;;-1:-1:-1;;;;;198:32:1;;;180:51;;168:2;153:18;10714:31:0;;;;;;;;21944:528;;;;;;;;;;-1:-1:-1;21944:528:0;;;;;:::i;:::-;;:::i;:::-;;;709:25:1;;;697:2;682:18;21944:528:0;563:177:1;11420:228:0;;;;;;;;;;-1:-1:-1;11420:228:0;;;;;:::i;:::-;;:::i;:::-;;11163:249;;;;;;;;;;-1:-1:-1;11163:249:0;;;;;:::i;:::-;;:::i;21525:27::-;;;;;;;;;;-1:-1:-1;21525:27:0;;;;-1:-1:-1;;;;;21525:27:0;;;10752:61;;;;;;;;;;-1:-1:-1;10752:61:0;;;;-1:-1:-1;;;;;10752:61:0;;;5145:20;;;;;;;;;;-1:-1:-1;5145:20:0;;;;-1:-1:-1;;;;;5145:20:0;;;22480:749;;;;;;:::i;:::-;;:::i;5518:214::-;;;;;;;;;;-1:-1:-1;5518:214:0;;;;;:::i;:::-;;:::i;21944:528::-;22036:7;22075:15;22064:26;;;22056:57;;;;-1:-1:-1;;;22056:57:0;;2250:2:1;22056:57:0;;;2232:21:1;2289:2;2269:18;;;2262:30;-1:-1:-1;;;2308:18:1;;;2301:48;2366:18;;22056:57:0;;;;;;;;;22144:15;22132:27;;;22124:61;;;;-1:-1:-1;;;22124:61:0;;2597:2:1;22124:61:0;;;2579:21:1;2636:2;2616:18;;;2609:30;-1:-1:-1;;;2655:18:1;;;2648:51;2716:18;;22124:61:0;2395:345:1;22124:61:0;22214:15;22204:25;;;22196:57;;;;-1:-1:-1;;;22196:57:0;;2947:2:1;22196:57:0;;;2929:21:1;2986:2;2966:18;;;2959:30;-1:-1:-1;;;3005:18:1;;;2998:49;3064:18;;22196:57:0;2745:343:1;22196:57:0;22293:1;22307:33;22338:2;22327:13;;;22293:1;22307:33;:::i;:::-;;-1:-1:-1;22351:34:0;22383:2;22371:14;;;22307:33;22351:34;:::i;:::-;;-1:-1:-1;22396:32:0;22426:2;22416:12;;;22351:34;22396:32;:::i;:::-;;21944:528;-1:-1:-1;;;;;21944:528:0:o;11420:228::-;5318:12;:10;:12::i;:::-;-1:-1:-1;;;;;11496:24:0;::::1;11492:53;;11529:16;;-1:-1:-1::0;;;11529:16:0::1;;;;;;;;;;;11492:53;11558:11;:38:::0;;-1:-1:-1;;;;;;11558:38:0::1;-1:-1:-1::0;;;;;11558:38:0;::::1;::::0;;::::1;::::0;;;11614:26:::1;::::0;::::1;::::0;-1:-1:-1;;11614:26:0::1;11420:228:::0;:::o;11163:249::-;5318:12;:10;:12::i;:::-;-1:-1:-1;;;;;11245:26:0;::::1;11241:55;;11280:16;;-1:-1:-1::0;;;11280:16:0::1;;;;;;;;;;;11241:55;11317:13;:39:::0;;-1:-1:-1;;;;;;11317:39:0::1;-1:-1:-1::0;;;;;11317:39:0;::::1;::::0;;::::1;::::0;;;11374:30:::1;::::0;::::1;::::0;-1:-1:-1;;11374:30:0::1;11163:249:::0;:::o;22480:749::-;5025:10;21892:24;21904:11;21892;:24::i;:::-;22603:12:::1;5025:10:::0;22657:11:::1;::::0;:45:::1;::::0;-1:-1:-1;;;22657:45:0;;22694:6:::1;22684:16:::0;::::1;22657:45;::::0;::::1;3502:38:1::0;22603:27:0;;-1:-1:-1;22643:63:0::1;::::0;-1:-1:-1;;;;;22657:11:0;;::::1;::::0;:19:::1;::::0;3475:18:1;;22657:45:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;22704:1;22643:13;:63::i;:::-;22735:7;::::0;:42:::1;::::0;-1:-1:-1;;;22735:42:0;;-1:-1:-1;;;;;3932:32:1;;;22735:42:0::1;::::0;::::1;3914:51:1::0;3981:18;;;3974:34;;;22717:15:0::1;::::0;22735:7:::1;::::0;:24:::1;::::0;3887:18:1;;22735:42:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;22827:7;::::0;:28:::1;::::0;-1:-1:-1;;;22827:28:0;;4577:10:1;4565:23;;22827:28:0::1;::::0;::::1;4547:42:1::0;22717:60:0;;-1:-1:-1;22790:34:0::1;::::0;-1:-1:-1;;;;;22827:7:0;;::::1;::::0;:18:::1;::::0;4520::1;;22827:28:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;22790:65:::0;-1:-1:-1;22895:1:0::1;22943:2;22929:10;:8;:10::i;:::-;22909:36;::::0;22929:16:::1;22909:36:::0;::::1;:::i;:::-;;;23022:2;22976:42;22986:12;:31;;;22976:42;;:9;:42::i;:::-;22956:68;::::0;22976:48:::1;22956:68:::0;::::1;:::i;:::-;;;23096:2;23055:37;23067:12;:24;;;23055:37;;:11;:37::i;:::-;23035:63;::::0;23055:43:::1;23035:63:::0;::::1;:::i;:::-;;;23139:7;23119:16;:27;23111:63;;;::::0;-1:-1:-1;;;23111:63:0;;7085:2:1;23111:63:0::1;::::0;::::1;7067:21:1::0;7124:2;7104:18;;;7097:30;7163:25;7143:18;;;7136:53;7206:18;;23111:63:0::1;6883:347:1::0;23111:63:0::1;23187:11;::::0;;:34:::1;::::0;-1:-1:-1;;;23187:34:0;;-1:-1:-1;;;;;7463:32:1;;;23187:34:0::1;::::0;::::1;7445:51:1::0;7512:18;;;7505:34;;;7555:18;;;7548:34;;;;23187:11:0;::::1;::::0;:16:::1;::::0;7418:18:1;;23187:34:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;22592:637;;;;22480:749:::0;;;:::o;5518:214::-;5318:12;:10;:12::i;:::-;-1:-1:-1;;;;;5595:22:0;::::1;5591:51;;5626:16;;-1:-1:-1::0;;;5626:16:0::1;;;;;;;;;;;5591:51;5681:5;::::0;;5660:37:::1;::::0;-1:-1:-1;;;;;5660:37:0;;::::1;::::0;5681:5;::::1;::::0;5660:37:::1;::::0;::::1;5708:5;:16:::0;;-1:-1:-1;;;;;;5708:16:0::1;-1:-1:-1::0;;;;;5708:16:0;;;::::1;::::0;;;::::1;::::0;;5518:214::o;5174:104::-;5224:5;;-1:-1:-1;;;;;5224:5:0;5025:10;5224:21;5220:50;;5254:16;;-1:-1:-1;;;5254:16:0;;;;;;;;;;;5220:50;5174:104::o;21690:142::-;21760:13;;:41;;-1:-1:-1;;;21760:41:0;;-1:-1:-1;;;;;198:32:1;;;21760:41:0;;;180:51:1;21760:13:0;;;;:28;;153:18:1;;21760:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;21756:68;;;21810:14;;-1:-1:-1;;;21810:14:0;;;;;;;;;;;21756:68;21690:142;:::o;11656:155::-;11768:13;;11734:69;;-1:-1:-1;;;;;11768:13:0;11785:7;11794:8;11734:17;:69::i;:::-;11656:155;;:::o;25152:615::-;25194:7;25232:13;25271:1;25260:12;;;:28;;;25276:7;25287:1;25276:12;25260:28;:44;;;;25292:7;25303:1;25292:12;25260:44;:60;;;;25308:7;25319:1;25308:12;25260:60;:77;;;;25324:7;25335:2;25324:13;25260:77;25256:117;;;25372:1;25365:8;;;25152:615;:::o;25256:117::-;25388:7;25399:2;25388:13;:30;;;;25405:7;25416:2;25405:13;25388:30;25384:64;;;25447:1;25440:8;;;25152:615;:::o;25384:64::-;25463:7;25474:3;25463:14;:34;;;;25481:7;25492:5;25481:16;25463:34;25459:72;;;25530:1;25523:8;;;25152:615;:::o;25459:72::-;25546:7;25557:3;25546:14;:33;;;;25564:7;25575:4;25564:15;25546:33;25542:71;;;25612:1;25605:8;;;25152:615;:::o;25542:71::-;25628:7;25639:5;25628:16;:36;;;;25648:7;25659:5;25648:16;25628:36;25624:76;;;25699:1;25692:8;;;25152:615;:::o;25624:76::-;25711:31;;-1:-1:-1;;;25711:31:0;;8077:2:1;25711:31:0;;;8059:21:1;8116:2;8096:18;;;8089:30;-1:-1:-1;;;8135:18:1;;;8128:43;8188:18;;25711:31:0;7875:337:1;23519:1625:0;23579:7;23653:26;23641:9;:38;23637:76;;;-1:-1:-1;23701:2:0;;23519:1625;-1:-1:-1;23519:1625:0:o;23637:76::-;23784:26;23772:9;:38;23768:76;;;-1:-1:-1;23832:2:0;;23519:1625;-1:-1:-1;23519:1625:0:o;23768:76::-;23910:25;23898:9;:37;23894:75;;;-1:-1:-1;23958:1:0;;23519:1625;-1:-1:-1;23519:1625:0:o;23894:75::-;24034:25;24022:9;:37;24018:74;;;-1:-1:-1;24081:1:0;;23519:1625;-1:-1:-1;23519:1625:0:o;24018:74::-;24158:25;24146:9;:37;24142:74;;;-1:-1:-1;24205:1:0;;23519:1625;-1:-1:-1;23519:1625:0:o;24142:74::-;24283:24;24271:9;:36;24267:73;;;-1:-1:-1;24329:1:0;;23519:1625;-1:-1:-1;23519:1625:0:o;24267:73::-;24407:24;24395:9;:36;24391:73;;;-1:-1:-1;24453:1:0;;23519:1625;-1:-1:-1;23519:1625:0:o;24391:73::-;24531:22;24519:9;:34;24515:71;;;-1:-1:-1;24575:1:0;;23519:1625;-1:-1:-1;23519:1625:0:o;24515:71::-;24654:22;24642:9;:34;24638:71;;;-1:-1:-1;24698:1:0;;23519:1625;-1:-1:-1;23519:1625:0:o;24638:71::-;24775:21;24763:9;:33;24759:70;;;-1:-1:-1;24818:1:0;;23519:1625;-1:-1:-1;23519:1625:0:o;24759:70::-;24895:21;24883:9;:33;24879:70;;;-1:-1:-1;24938:1:0;;23519:1625;-1:-1:-1;23519:1625:0:o;24879:70::-;25013:20;25001:9;:32;24997:69;;;-1:-1:-1;25055:1:0;;23519:1625;-1:-1:-1;23519:1625:0:o;24997:69::-;25092:27;;-1:-1:-1;;;25092:27:0;;8419:2:1;25092:27:0;;;8401:21:1;8458:1;8438:18;;;8431:29;-1:-1:-1;;;8476:18:1;;;8469:39;8525:18;;25092:27:0;8217:332:1;23237:270:0;23296:7;23329:1;23320:6;:10;:26;;;;;23344:2;23334:6;:12;;23320:26;23316:45;;;-1:-1:-1;23355:6:0;23237:270::o;23316:45::-;23376:6;23386:2;23376:12;23372:27;;-1:-1:-1;23397:2:0;;23237:270;-1:-1:-1;23237:270:0:o;23372:27::-;23414:6;23424:2;23414:12;23410:27;;-1:-1:-1;23435:2:0;;23237:270;-1:-1:-1;23237:270:0:o;23410:27::-;23450:30;;-1:-1:-1;;;23450:30:0;;8756:2:1;23450:30:0;;;8738:21:1;8795:2;8775:18;;;8768:30;-1:-1:-1;;;8814:18:1;;;8807:42;8866:18;;23450:30:0;8554:336:1;11979:451:0;12086:16;12105:18;12115:8;12105:7;:18;:::i;:::-;12086:37;-1:-1:-1;12142:13:0;;;:38;;;12172:8;12159:9;:21;;12142:38;12134:71;;;;-1:-1:-1;;;12134:71:0;;9270:2:1;12134:71:0;;;9252:21:1;9309:2;9289:18;;;9282:30;-1:-1:-1;;;9328:18:1;;;9321:50;9388:18;;12134:71:0;9068:344:1;12134:71:0;12237:21;12273:12;;12269:154;;12377:34;12392:8;12402;12377:14;:34::i;:::-;12075:355;;11979:451;;;:::o;3829:174::-;3910:9;3925:2;-1:-1:-1;;;;;3925:7:0;3940:6;3925:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3909:42;;;3967:4;3962:33;;3980:15;;-1:-1:-1;;;3980:15:0;;;;;;;;;;;3962:33;3898:105;3829:174;;:::o;242:316:1:-;319:6;327;335;388:2;376:9;367:7;363:23;359:32;356:52;;;404:1;401;394:12;356:52;-1:-1:-1;;427:23:1;;;497:2;482:18;;469:32;;-1:-1:-1;548:2:1;533:18;;;520:32;;242:316;-1:-1:-1;242:316:1:o;745:131::-;-1:-1:-1;;;;;820:31:1;;810:42;;800:70;;866:1;863;856:12;881:247;940:6;993:2;981:9;972:7;968:23;964:32;961:52;;;1009:1;1006;999:12;961:52;1048:9;1035:23;1067:31;1092:5;1067:31;:::i;:::-;1117:5;881:247;-1:-1:-1;;;881:247:1:o;1795:248::-;1863:6;1871;1924:2;1912:9;1903:7;1899:23;1895:32;1892:52;;;1940:1;1937;1930:12;1892:52;-1:-1:-1;;1963:23:1;;;2033:2;2018:18;;;2005:32;;-1:-1:-1;1795:248:1:o;3093:127::-;3154:10;3149:3;3145:20;3142:1;3135:31;3185:4;3182:1;3175:15;3209:4;3206:1;3199:15;3225:128;3265:3;3296:1;3292:6;3289:1;3286:13;3283:39;;;3302:18;;:::i;:::-;-1:-1:-1;3338:9:1;;3225:128::o;3551:184::-;3621:6;3674:2;3662:9;3653:7;3649:23;3645:32;3642:52;;;3690:1;3687;3680:12;3642:52;-1:-1:-1;3713:16:1;;3551:184;-1:-1:-1;3551:184:1:o;4019:167::-;4097:13;;4150:10;4139:22;;4129:33;;4119:61;;4176:1;4173;4166:12;4119:61;4019:167;;;:::o;4191:206::-;4260:6;4313:2;4301:9;4292:7;4288:23;4284:32;4281:52;;;4329:1;4326;4319:12;4281:52;4352:39;4381:9;4352:39;:::i;4600:344::-;4667:2;4661:9;4709:3;4697:16;;4743:18;4728:34;;4764:22;;;4725:62;4722:185;;;4829:10;4824:3;4820:20;4817:1;4810:31;4864:4;4861:1;4854:15;4892:4;4889:1;4882:15;4722:185;4923:2;4916:22;4600:344;:::o;4949:183::-;5027:13;;5080:26;5069:38;;5059:49;;5049:77;;5122:1;5119;5112:12;5137:171;5215:13;;5268:14;5257:26;;5247:37;;5237:65;;5298:1;5295;5288:12;5313:160;5390:13;;5443:4;5432:16;;5422:27;;5412:55;;5463:1;5460;5453:12;5478:138;5557:13;;5579:31;5557:13;5579:31;:::i;5621:165::-;5699:13;;5752:8;5741:20;;5731:31;;5721:59;;5776:1;5773;5766:12;5791:1087;5893:6;5946:3;5934:9;5925:7;5921:23;5917:33;5914:53;;;5963:1;5960;5953:12;5914:53;5989:17;;:::i;:::-;6029:39;6058:9;6029:39;:::i;:::-;6022:5;6015:54;6101:48;6145:2;6134:9;6130:18;6101:48;:::i;:::-;6096:2;6089:5;6085:14;6078:72;6182:48;6226:2;6215:9;6211:18;6182:48;:::i;:::-;6177:2;6170:5;6166:14;6159:72;6263:47;6306:2;6295:9;6291:18;6263:47;:::i;:::-;6258:2;6251:5;6247:14;6240:71;6344:48;6387:3;6376:9;6372:19;6344:48;:::i;:::-;6338:3;6331:5;6327:15;6320:73;6426:50;6471:3;6460:9;6456:19;6426:50;:::i;:::-;6420:3;6413:5;6409:15;6402:75;6510:49;6554:3;6543:9;6539:19;6510:49;:::i;:::-;6504:3;6497:5;6493:15;6486:74;6593:49;6637:3;6626:9;6622:19;6593:49;:::i;:::-;6587:3;6580:5;6576:15;6569:74;6662:3;6697:48;6741:2;6730:9;6726:18;6697:48;:::i;:::-;6681:14;;;6674:72;6765:3;6800:47;6828:18;;;6800:47;:::i;:::-;6784:14;;;6777:71;6788:5;5791:1087;-1:-1:-1;;;5791:1087:1:o;7593:277::-;7660:6;7713:2;7701:9;7692:7;7688:23;7684:32;7681:52;;;7729:1;7726;7719:12;7681:52;7761:9;7755:16;7814:5;7807:13;7800:21;7793:5;7790:32;7780:60;;7836:1;7833;7826:12;8895:168;8935:7;9001:1;8997;8993:6;8989:14;8986:1;8983:21;8978:1;8971:9;8964:17;8960:45;8957:71;;;9008:18;;:::i;:::-;-1:-1:-1;9048:9:1;;8895:168::o
Swarm Source
ipfs://c59f58d5a63256e7230820bd78e195d441968fc17564d85cca0bb5a88d485565
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ 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.