Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
PYEMarketEarnings
Compiler Version
v0.8.16+commit.07a7930e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./interfaces/IPYEMarket.sol"; import "./interfaces/ITOPIA.sol"; import "./interfaces/IHub.sol"; contract PYEMarketEarnings is Ownable, ReentrancyGuard { ITOPIA public TOPIAToken; IHub public HUB; IPYEMarket public PYEMarket; uint256 public foodieAdjuster = 222; uint256 public shopOwnerAdjuster = 111; struct Earnings { uint256 unadjustedClaimed; uint256 adjustedClaimed; } mapping(uint16 => Earnings) public foodie; mapping(uint16 => Earnings) public shopOwner; mapping(uint16 => uint8) public genesisType; uint256 public totalTOPIAEarned; event FoodieClaimed(uint256 indexed tokenId, uint256 earned); event ShopOwnerClaimed(uint256 indexed tokenId, uint256 earned); constructor(address _topia, address _hub, address _market) { TOPIAToken = ITOPIA(_topia); HUB = IHub(_hub); PYEMarket = IPYEMarket(_market); } function updateContracts(address _topia, address _hub, address _market) external onlyOwner { TOPIAToken = ITOPIA(_topia); HUB = IHub(_hub); PYEMarket = IPYEMarket(_market); } function updateAdjusters(uint256 _foodie, uint256 _shopOwner) external onlyOwner { foodieAdjuster = _foodie; shopOwnerAdjuster = _shopOwner; } // mass update the nftType mapping function setBatchNFTType(uint16[] calldata tokenIds, uint8[] calldata _types) external onlyOwner { require(tokenIds.length == _types.length , " _idNumbers.length != _types.length: Each token ID must have exactly 1 corresponding type!"); for (uint16 i = 0; i < tokenIds.length; i++) { require(_types[i] == 2 || _types[i] == 3, "Invalid nft type - must be 2 or 3"); genesisType[tokenIds[i]] = _types[i]; } } function claimMany(uint16[] calldata tokenIds) external nonReentrant { require(tx.origin == msg.sender, "Only EOA"); uint256 owed = 0; for(uint i = 0; i < tokenIds.length; i++) { if (genesisType[tokenIds[i]] == 2) { owed += claimFoodieEarnings(tokenIds[i]); } else if (genesisType[tokenIds[i]] == 3) { owed += claimShopOwnerEarnings(tokenIds[i]); } else if (genesisType[tokenIds[i]] == 0) { revert('invalid token id'); } } totalTOPIAEarned += owed; TOPIAToken.mint(msg.sender, owed); HUB.emitTopiaClaimed(msg.sender, owed); } function claimFoodieEarnings(uint16 _tokenId) internal returns (uint256) { uint256 unclaimed = PYEMarket.getUnclaimedGenesis(_tokenId); if(unclaimed <= foodie[_tokenId].unadjustedClaimed) { return 0; } uint256 adjustedEarnings = unclaimed * foodieAdjuster / 10000; uint256 owed = adjustedEarnings - foodie[_tokenId].unadjustedClaimed; foodie[_tokenId].unadjustedClaimed += unclaimed; foodie[_tokenId].adjustedClaimed += adjustedEarnings; emit FoodieClaimed(_tokenId, owed); return owed; } function claimShopOwnerEarnings(uint16 _tokenId) internal returns (uint256) { uint256 unclaimed = PYEMarket.getUnclaimedGenesis(_tokenId); if(unclaimed <= shopOwner[_tokenId].unadjustedClaimed) { return 0; } uint256 adjustedEarnings = unclaimed * shopOwnerAdjuster / 10000; uint256 owed = adjustedEarnings - shopOwner[_tokenId].unadjustedClaimed; shopOwner[_tokenId].unadjustedClaimed += unclaimed; shopOwner[_tokenId].adjustedClaimed += adjustedEarnings; emit ShopOwnerClaimed(_tokenId, owed); return owed; } function getUnclaimedGenesis(uint16 _tokenId) external view returns (uint256) { uint256 unclaimed = PYEMarket.getUnclaimedGenesis(_tokenId); if(genesisType[_tokenId] == 2) { if(unclaimed <= foodie[_tokenId].unadjustedClaimed) { return 0; } uint256 adjustedEarnings = unclaimed * foodieAdjuster / 10000; uint256 owed = adjustedEarnings - foodie[_tokenId].unadjustedClaimed; return owed; } else if(genesisType[_tokenId] == 3) { if(unclaimed <= shopOwner[_tokenId].unadjustedClaimed) { return 0; } uint256 adjustedEarnings = unclaimed * shopOwnerAdjuster / 10000; uint256 owed = adjustedEarnings - shopOwner[_tokenId].unadjustedClaimed; return owed; } else { return 0; } } }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; interface IHub { function emitGenesisStaked(address owner, uint16[] calldata tokenIds, uint8 gameId) external; function emitAlphaStaked(address owner, uint16[] calldata tokenIds, uint8 gameId) external; function emitGenesisUnstaked(address owner, uint16[] calldata tokenIds) external; function emitAlphaUnstaked(address owner, uint16[] calldata tokenIds) external; function emitTopiaClaimed(address owner, uint256 amount) external; function balanceOf(address owner) external view returns (uint256); }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; interface ITOPIA { function mint(address to, uint256 amount) external; function burn(uint256 amount) external; function burnFrom(address from, uint256 amount) external; function updateOriginAccess() external; function transferFrom(address sender, address recipient, uint256 amount) external returns(bool); }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; interface IPYEMarket { function addManyToStakingPool(address account, uint16[] calldata tokenIds) external; function isOwner(uint16 tokenId, address owner) external view returns (bool); function getUnclaimedGenesis(uint16 tokenId) external view returns (uint256); }
// 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 (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "byzantium", "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_topia","type":"address"},{"internalType":"address","name":"_hub","type":"address"},{"internalType":"address","name":"_market","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"earned","type":"uint256"}],"name":"FoodieClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"earned","type":"uint256"}],"name":"ShopOwnerClaimed","type":"event"},{"inputs":[],"name":"HUB","outputs":[{"internalType":"contract IHub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PYEMarket","outputs":[{"internalType":"contract IPYEMarket","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOPIAToken","outputs":[{"internalType":"contract ITOPIA","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"tokenIds","type":"uint16[]"}],"name":"claimMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"foodie","outputs":[{"internalType":"uint256","name":"unadjustedClaimed","type":"uint256"},{"internalType":"uint256","name":"adjustedClaimed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"foodieAdjuster","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"genesisType","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_tokenId","type":"uint16"}],"name":"getUnclaimedGenesis","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"uint16[]","name":"tokenIds","type":"uint16[]"},{"internalType":"uint8[]","name":"_types","type":"uint8[]"}],"name":"setBatchNFTType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"shopOwner","outputs":[{"internalType":"uint256","name":"unadjustedClaimed","type":"uint256"},{"internalType":"uint256","name":"adjustedClaimed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"shopOwnerAdjuster","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTOPIAEarned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_foodie","type":"uint256"},{"internalType":"uint256","name":"_shopOwner","type":"uint256"}],"name":"updateAdjusters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_topia","type":"address"},{"internalType":"address","name":"_hub","type":"address"},{"internalType":"address","name":"_market","type":"address"}],"name":"updateContracts","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080346100ea5761106980380390601f19601f83011683019183831067ffffffffffffffff8411176100ef578084926060946040528339810103126100ea576100478161011e565b61005f60406100586020850161011e565b930161011e565b60008054600160a060020a0319808216339081178455604051969195600160a060020a0395948694859391908416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908ba36001805560de600555606f600655168560025416176002551683600354161760035516906004541617600455610f3690816101338239f35b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b5190600160a060020a03821682036100ea5756fe6080604081815260048036101561001557600080fd5b6000927c01000000000000000000000000000000000000000000000000000000008435049081631b218df5146109e8575080631bacd85e146109ab5780633a4f29e81461096e5780636dca4d44146108fd578063715018a6146108a85780638da5cb5b146108825780638e2e856b1461053a57806398974cc51461051b578063a4c52b86146104f3578063a6d2de98146104c1578063b69289e61461049b578063bd48652e1461047c578063db5b0f3414610455578063e3b3293514610432578063e5d7c2bc146103fc578063efa09d68146101dc5763f2fde38b146100fa57600080fd5b346101d85760203660031901126101d857610113610a0d565b61011b610a58565b600160a060020a0380911691821561016c57506000549282600160a060020a03198516176000555192167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600084a3f35b608490602085519160e560020a62461bcd028352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b8280fd5b5091346103f957816003193601126103f95767ffffffffffffffff9280358481116101d85761020e9036908301610a28565b60249586359081116103f5576102279036908501610a28565b959091610232610a58565b86810361036457855b61ffff808216908382101561035f5760ff9060028261026361025e868f8c610ab3565b610adc565b161482848d8315610343575b505050156102d85761029861029361028b61025e868f8c610ab3565b94878b610ab3565b610aea565b1689526009602052848920911660ff1982541617905561ffff8091169081146102c35760010161023b565b888760118860e060020a634e487b7102835252fd5b60848960218e60208a519360e560020a62461bcd0285528401528201527f496e76616c6964206e66742074797065202d206d7573742062652032206f722060448201527f33000000000000000000000000000000000000000000000000000000000000006064820152fd5b600393506103559161025e918c610ab3565b161482848d61026f565b888551f35b60a485605a8a602086519360e560020a62461bcd0285528401528201527f205f69644e756d626572732e6c656e67746820213d205f74797065732e6c656e60448201527f6774683a204561636820746f6b656e204944206d75737420686176652065786160648201527f63746c79203120636f72726573706f6e64696e672074797065210000000000006084820152fd5b8480fd5b80fd5b50346101d85760203660031901126101d8573561ffff81168091036101d857818360ff9260209552600985522054169051908152f35b5050346104515781600319360112610451576020906005549051908152f35b5080fd5b5091346103f957806003193601126103f95750600160a060020a0360209254169051908152f35b505034610451578160031936011261045157602090600a549051908152f35b50346101d857816003193601126101d8576104b4610a58565b3560055560243560065551f35b50346101d85760203660031901126101d857359161ffff831683036103f957506104ec602092610de6565b9051908152f35b505034610451578160031936011261045157602090600160a060020a03600354169051908152f35b5050346104515781600319360112610451576020906006549051908152f35b50346101d85760208060031936011261069f57813567ffffffffffffffff81116103f55761056b9036908401610a28565b9290916002906001948286541461083d578286553332036107f8579390879488925b8184106106c857505050506105a483600a54610af9565b600a55600160a060020a0380915416803b156106c45786865180927f40c10f190000000000000000000000000000000000000000000000000000000082528183816106088a338b840160209093929193600160a060020a0360408201951681520152565b03925af180156106ba576106a3575b50908592916003541691823b1561069f5785517f1fb2e3e700000000000000000000000000000000000000000000000000000000815233928101928352602083019190915291839183919082908490829060400103925af1801561069557610681575b5050805551f35b61068a90610b1f565b6101d857823861067a565b84513d84823e3d90fd5b8380fd5b6106b1909691939296610b1f565b94909138610617565b86513d89823e3d90fd5b8680fd5b9091929561ffff806106de6102938a8787610ab3565b168b52600980865260ff918b8d8b8a8684842054161460001461074f57905061072495945061071e9350610719925061029391508787610ab3565b610b8e565b90610af9565b955b600019811461073957870192919061058d565b60248a60118860e060020a634e487b7102835252fd5b918591846107636102936003968d8d610ab3565b168152858b52205416036107945750505061078e9061071e6107896102938a8787610ab3565b610cc9565b95610726565b6107a56102938b88889d979d610ab3565b168c528552898b20541661072657606486858b519160e560020a62461bcd028352820152601060248201527f696e76616c696420746f6b656e206964000000000000000000000000000000006044820152fd5b6064848389519160e560020a62461bcd028352820152600860248201527f4f6e6c7920454f410000000000000000000000000000000000000000000000006044820152fd5b6064848389519160e560020a62461bcd028352820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b505034610451578160031936011261045157600160a060020a0360209254169051908152f35b5050346104515781600319360112610451576108c2610a58565b81600160a060020a038154928119841683555192167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08284a3f35b50346101d85760603660031901126101d857610917610a0d565b60243590600160a060020a039182811680910361096a57604435928084168094036106c457610944610a58565b600160a060020a0319921682600254161760025581600354161760035582541617905551f35b8580fd5b50346101d85760203660031901126101d8573561ffff81168091036101d85791819281526007602052206001815491015482519182526020820152f35b50346101d85760203660031901126101d8573561ffff81168091036101d85791819281526008602052206001815491015482519182526020820152f35b849034610451578160031936011261045157602090600160a060020a03600254168152f35b60043590600160a060020a0382168203610a2357565b600080fd5b9181601f84011215610a235782359167ffffffffffffffff8311610a2357602080850194818502010111610a2357565b600160a060020a03600054163303610a6c57565b606460405160e560020a62461bcd02815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b9190811015610ac3576020020190565b60e060020a634e487b7102600052603260045260246000fd5b3560ff81168103610a235790565b3561ffff81168103610a235790565b91908201809211610b0657565b60e060020a634e487b7102600052601160045260246000fd5b67ffffffffffffffff8111610b3357604052565b60e060020a634e487b7102600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff821117610b3357604052565b8060001904821181151516610b06570290565b91908203918211610b0657565b61ffff90600160a060020a03600454169060409081519384917fa6d2de98000000000000000000000000000000000000000000000000000000008352169283600483015281602460209384935afa938415610cbe57600094610c8f575b5082600052600781528160002054841115610c86577f52d22abdd22b63ad6707a8d92f2a489a300dcde7ac184e4a270945ae22599e1091612710610c3160055487610b6e565b048460005260078352610c48826000205482610b81565b958560005260078452610c6083600020918254610af9565b90558460005260078352610c7c60018360002001918254610af9565b905551848152a290565b50505050600090565b90938482813d8311610cb7575b610ca68183610b4c565b810103126103f95750519238610beb565b503d610c9c565b82513d6000823e3d90fd5b61ffff90600160a060020a03600454169060409081519384917fa6d2de98000000000000000000000000000000000000000000000000000000008352169283600483015281602460209384935afa938415610cbe57600094610db7575b5082600052600881528160002054841115610c86577f781216bdb48f97f6b05add3679cf667b2ae6597474bb34458892397b03600a7091612710610d6c60065487610b6e565b048460005260088352610d83826000205482610b81565b958560005260088452610d9b83600020918254610af9565b90558460005260088352610c7c60018360002001918254610af9565b90938482813d8311610ddf575b610dce8183610b4c565b810103126103f95750519238610d26565b503d610dc4565b61ffff90600160a060020a03600454169060409081519384917fa6d2de98000000000000000000000000000000000000000000000000000000008352169283600483015281602460209687935afa908115610cbe57600091610ed3575b508260005260098452600260ff83600020541614600014610e9b5782600052600784528160002054811115610c8657610e9893612710610e8860079360055490610b6e565b0493600052526000205490610b81565b90565b600360ff83600020541614600014610c8657600884528160002054811115610c8657610e9893612710610e8860089360065490610b6e565b908482813d8311610ef9575b610ee98183610b4c565b810103126103f957505138610e43565b503d610edf56fea264697066735822122017b42e6c8fedb9c7a293356f4833b80d82af6b8453cb3f4568500e8e9e93804064736f6c6343000810003300000000000000000000000041473032b82a4205ddde155cc7ed210b000b014d00000000000000000000000069fde1a7d6837cd7e82b0bbedcbad40f487fdb05000000000000000000000000c4bc9b325d7b1fb618bdd31352d19ba46fa58d8e
Deployed Bytecode
0x6080604081815260048036101561001557600080fd5b6000927c01000000000000000000000000000000000000000000000000000000008435049081631b218df5146109e8575080631bacd85e146109ab5780633a4f29e81461096e5780636dca4d44146108fd578063715018a6146108a85780638da5cb5b146108825780638e2e856b1461053a57806398974cc51461051b578063a4c52b86146104f3578063a6d2de98146104c1578063b69289e61461049b578063bd48652e1461047c578063db5b0f3414610455578063e3b3293514610432578063e5d7c2bc146103fc578063efa09d68146101dc5763f2fde38b146100fa57600080fd5b346101d85760203660031901126101d857610113610a0d565b61011b610a58565b600160a060020a0380911691821561016c57506000549282600160a060020a03198516176000555192167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600084a3f35b608490602085519160e560020a62461bcd028352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b8280fd5b5091346103f957816003193601126103f95767ffffffffffffffff9280358481116101d85761020e9036908301610a28565b60249586359081116103f5576102279036908501610a28565b959091610232610a58565b86810361036457855b61ffff808216908382101561035f5760ff9060028261026361025e868f8c610ab3565b610adc565b161482848d8315610343575b505050156102d85761029861029361028b61025e868f8c610ab3565b94878b610ab3565b610aea565b1689526009602052848920911660ff1982541617905561ffff8091169081146102c35760010161023b565b888760118860e060020a634e487b7102835252fd5b60848960218e60208a519360e560020a62461bcd0285528401528201527f496e76616c6964206e66742074797065202d206d7573742062652032206f722060448201527f33000000000000000000000000000000000000000000000000000000000000006064820152fd5b600393506103559161025e918c610ab3565b161482848d61026f565b888551f35b60a485605a8a602086519360e560020a62461bcd0285528401528201527f205f69644e756d626572732e6c656e67746820213d205f74797065732e6c656e60448201527f6774683a204561636820746f6b656e204944206d75737420686176652065786160648201527f63746c79203120636f72726573706f6e64696e672074797065210000000000006084820152fd5b8480fd5b80fd5b50346101d85760203660031901126101d8573561ffff81168091036101d857818360ff9260209552600985522054169051908152f35b5050346104515781600319360112610451576020906005549051908152f35b5080fd5b5091346103f957806003193601126103f95750600160a060020a0360209254169051908152f35b505034610451578160031936011261045157602090600a549051908152f35b50346101d857816003193601126101d8576104b4610a58565b3560055560243560065551f35b50346101d85760203660031901126101d857359161ffff831683036103f957506104ec602092610de6565b9051908152f35b505034610451578160031936011261045157602090600160a060020a03600354169051908152f35b5050346104515781600319360112610451576020906006549051908152f35b50346101d85760208060031936011261069f57813567ffffffffffffffff81116103f55761056b9036908401610a28565b9290916002906001948286541461083d578286553332036107f8579390879488925b8184106106c857505050506105a483600a54610af9565b600a55600160a060020a0380915416803b156106c45786865180927f40c10f190000000000000000000000000000000000000000000000000000000082528183816106088a338b840160209093929193600160a060020a0360408201951681520152565b03925af180156106ba576106a3575b50908592916003541691823b1561069f5785517f1fb2e3e700000000000000000000000000000000000000000000000000000000815233928101928352602083019190915291839183919082908490829060400103925af1801561069557610681575b5050805551f35b61068a90610b1f565b6101d857823861067a565b84513d84823e3d90fd5b8380fd5b6106b1909691939296610b1f565b94909138610617565b86513d89823e3d90fd5b8680fd5b9091929561ffff806106de6102938a8787610ab3565b168b52600980865260ff918b8d8b8a8684842054161460001461074f57905061072495945061071e9350610719925061029391508787610ab3565b610b8e565b90610af9565b955b600019811461073957870192919061058d565b60248a60118860e060020a634e487b7102835252fd5b918591846107636102936003968d8d610ab3565b168152858b52205416036107945750505061078e9061071e6107896102938a8787610ab3565b610cc9565b95610726565b6107a56102938b88889d979d610ab3565b168c528552898b20541661072657606486858b519160e560020a62461bcd028352820152601060248201527f696e76616c696420746f6b656e206964000000000000000000000000000000006044820152fd5b6064848389519160e560020a62461bcd028352820152600860248201527f4f6e6c7920454f410000000000000000000000000000000000000000000000006044820152fd5b6064848389519160e560020a62461bcd028352820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b505034610451578160031936011261045157600160a060020a0360209254169051908152f35b5050346104515781600319360112610451576108c2610a58565b81600160a060020a038154928119841683555192167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08284a3f35b50346101d85760603660031901126101d857610917610a0d565b60243590600160a060020a039182811680910361096a57604435928084168094036106c457610944610a58565b600160a060020a0319921682600254161760025581600354161760035582541617905551f35b8580fd5b50346101d85760203660031901126101d8573561ffff81168091036101d85791819281526007602052206001815491015482519182526020820152f35b50346101d85760203660031901126101d8573561ffff81168091036101d85791819281526008602052206001815491015482519182526020820152f35b849034610451578160031936011261045157602090600160a060020a03600254168152f35b60043590600160a060020a0382168203610a2357565b600080fd5b9181601f84011215610a235782359167ffffffffffffffff8311610a2357602080850194818502010111610a2357565b600160a060020a03600054163303610a6c57565b606460405160e560020a62461bcd02815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b9190811015610ac3576020020190565b60e060020a634e487b7102600052603260045260246000fd5b3560ff81168103610a235790565b3561ffff81168103610a235790565b91908201809211610b0657565b60e060020a634e487b7102600052601160045260246000fd5b67ffffffffffffffff8111610b3357604052565b60e060020a634e487b7102600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff821117610b3357604052565b8060001904821181151516610b06570290565b91908203918211610b0657565b61ffff90600160a060020a03600454169060409081519384917fa6d2de98000000000000000000000000000000000000000000000000000000008352169283600483015281602460209384935afa938415610cbe57600094610c8f575b5082600052600781528160002054841115610c86577f52d22abdd22b63ad6707a8d92f2a489a300dcde7ac184e4a270945ae22599e1091612710610c3160055487610b6e565b048460005260078352610c48826000205482610b81565b958560005260078452610c6083600020918254610af9565b90558460005260078352610c7c60018360002001918254610af9565b905551848152a290565b50505050600090565b90938482813d8311610cb7575b610ca68183610b4c565b810103126103f95750519238610beb565b503d610c9c565b82513d6000823e3d90fd5b61ffff90600160a060020a03600454169060409081519384917fa6d2de98000000000000000000000000000000000000000000000000000000008352169283600483015281602460209384935afa938415610cbe57600094610db7575b5082600052600881528160002054841115610c86577f781216bdb48f97f6b05add3679cf667b2ae6597474bb34458892397b03600a7091612710610d6c60065487610b6e565b048460005260088352610d83826000205482610b81565b958560005260088452610d9b83600020918254610af9565b90558460005260088352610c7c60018360002001918254610af9565b90938482813d8311610ddf575b610dce8183610b4c565b810103126103f95750519238610d26565b503d610dc4565b61ffff90600160a060020a03600454169060409081519384917fa6d2de98000000000000000000000000000000000000000000000000000000008352169283600483015281602460209687935afa908115610cbe57600091610ed3575b508260005260098452600260ff83600020541614600014610e9b5782600052600784528160002054811115610c8657610e9893612710610e8860079360055490610b6e565b0493600052526000205490610b81565b90565b600360ff83600020541614600014610c8657600884528160002054811115610c8657610e9893612710610e8860089360065490610b6e565b908482813d8311610ef9575b610ee98183610b4c565b810103126103f957505138610e43565b503d610edf56fea264697066735822122017b42e6c8fedb9c7a293356f4833b80d82af6b8453cb3f4568500e8e9e93804064736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000041473032b82a4205ddde155cc7ed210b000b014d00000000000000000000000069fde1a7d6837cd7e82b0bbedcbad40f487fdb05000000000000000000000000c4bc9b325d7b1fb618bdd31352d19ba46fa58d8e
-----Decoded View---------------
Arg [0] : _topia (address): 0x41473032b82a4205DDDe155CC7ED210B000b014D
Arg [1] : _hub (address): 0x69fdE1A7d6837cD7E82B0BbedcbAd40F487Fdb05
Arg [2] : _market (address): 0xc4bc9B325D7B1fB618BDd31352D19ba46fA58d8E
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000041473032b82a4205ddde155cc7ed210b000b014d
Arg [1] : 00000000000000000000000069fde1a7d6837cd7e82b0bbedcbad40f487fdb05
Arg [2] : 000000000000000000000000c4bc9b325d7b1fb618bdd31352d19ba46fa58d8e
Deployed Bytecode Sourcemap
287:3952:3:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;287:3952:3;;;;;;:::i;:::-;1063:62:0;;:::i;:::-;-1:-1:-1;;;;;287:3952:3;;;2169:22:0;;;287:3952:3;;;;;;;-1:-1:-1;;;;;287:3952:3;;;;;;;;;2573:40:0;287:3952:3;2573:40:0;;287:3952:3;;;;;;;;-1:-1:-1;;;;;287:3952:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:::i;:::-;1063:62:0;;;;;:::i;:::-;1571:32:3;;;287:3952;;1714:12;1749:3;287:3952;;;;1728:19;;;;;;;287:3952;;1789:1;287:3952;1776:9;;287:3952;;1776:9;;:::i;:::-;;:::i;:::-;287:3952;1776:14;:32;;;;;;;1749:3;287:3952;;;;;;1872:11;;1887:9;;;;;;:::i;:::-;1872:11;;;;:::i;:::-;;:::i;:::-;287:3952;;;1860:11;287:3952;;;;;;;;;;;;;;;;;;;;;;;;;;1714:12;;287:3952;;;;;-1:-1:-1;;;;;287:3952:3;;;;;;;;;;;;;-1:-1:-1;;;;;287:3952:3;;;;;;;;;;;;;;;;;;;1776:32;287:3952;1794:9;;;;;;;;:::i;:::-;287:3952;1794:14;1776:32;;;;;1728:19;;;287:3952;;;;;;;;;;;-1:-1:-1;;;;;287:3952:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;287:3952:3;;;;;;;;;;;;;;;;;;;;677:43;287:3952;;;;;;;;;;;;;;;;;;;;;;;;;;;428:35;287:3952;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;287:3952:3;;;;;;;;;;;;;;;;;;;;;;;;;;724:31;287:3952;;;;;;;;;;;;;;;;;;;;1063:62:0;;:::i;:::-;287:3952:3;1343:24;287:3952;;;1374:30;287:3952;;;;;;;;;;-1:-1:-1;;287:3952:3;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;287:3952:3;;;;;;;;;;;;;;;;;;;;;;;;;466:38;287:3952;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1744:1:1;;;;2325:7;;287:3952:3;;;;2325:19:1;1744:1;;287:3952:3;;;2010:10;1997:9;:23;287:3952;;2037:16;;;2061:10;;2057:313;2073:19;;;;;;287:3952;;;;2373:24;287:3952;2373:24;287:3952;2373:24;:::i;:::-;;287:3952;-1:-1:-1;;;;;287:3952:3;;;;2404:33;;;;;287:3952;;;2404:33;;287:3952;2404:33;;2010:10;;;2404:33;2010:10;;2404:33;;;287:3952;;;;;;-1:-1:-1;;;;;287:3952:3;;;;;;;;;;2404:33;;;;;;;;;;;2057:313;287:3952;;;;;;;;2444:38;;;;;;287:3952;;;2444:38;;2010:10;2444:38;;;287:3952;;;;;;;;;;;;;;;;;;;;;;;;2444:38;;;;;;;;;;2057:313;287:3952;;;;;;2444:38;;;;:::i;:::-;287:3952;;2444:38;;;;;287:3952;;;;;;;;;2444:38;287:3952;;;2404:33;;;;;;;;;:::i;:::-;;;;;;;;287:3952;;;;;;;;;2404:33;287:3952;;;2094:3;287:3952;;;;;2120:11;;;;;;;:::i;:::-;287:3952;;;2108:11;287:3952;;;;;;;;;;;;;;;2108:29;2104:262;1744:1:1;;;2173:11:3;;2145:40;2173:11;;;2153:32;2173:11;;;;;;;;;;;:::i;:::-;2153:32;:::i;:::-;2145:40;;:::i;:::-;2104:262;;-1:-1:-1;;287:3952:3;;;;;;2061:10;;;;;287:3952;;;;;-1:-1:-1;;;;;287:3952:3;;;;2104:262;2213:11;;;;;;287:3952;2213:11;;;;:::i;:::-;287:3952;;;;;;;;;2201:29;2229:1;;2269:11;;;2238:43;2269:11;2246:35;2269:11;;;;;;:::i;:::-;2246:35;:::i;2238:43::-;2197:169;2104:262;;2197:169;2309:11;;;;;;;;;:::i;:::-;287:3952;;;;;;;;;;2104:262;2293:73;287:3952;;;;;2334:26;-1:-1:-1;;;;;2334:26:3;;;;287:3952;;;;;;;;;;;2334:26;287:3952;;;;;;;-1:-1:-1;;;;;287:3952:3;;;;;;;;;;;;;;;;1744:1:1;;287:3952:3;;;;1744:1:1;-1:-1:-1;;;;;1744:1:1;;;;;;;;;287:3952:3;1744:1:1;287:3952:3;;;1744:1:1;;287:3952:3;;;;;;;;;;;;;;-1:-1:-1;;;;;287:3952:3;;;;;;;;;;;;;;;;;;;;;;;;1063:62:0;;:::i;:::-;287:3952:3;-1:-1:-1;;;;;287:3952:3;;;;;;;;;;;;2573:40:0;;;;287:3952:3;;;;;;;;-1:-1:-1;;287:3952:3;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;287:3952:3;;;;;;;;;;;;;;;;;;;;1063:62:0;;:::i;:::-;-1:-1:-1;;;;;287:3952:3;;;;1154:27;287:3952;;;1154:27;287:3952;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;287:3952:3;;;;;;;;;;;;;;;;;;586:41;287:3952;;;586:41;287:3952;;586:41;;287:3952;;;;;;;;;;;;;;;;;;-1:-1:-1;;287:3952:3;;;;;;;;;;;;;;;;;;630:44;287:3952;;;630:44;287:3952;;630:44;;287:3952;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;346:24:3;287:3952;;;;;;;;;-1:-1:-1;;;;;287:3952:3;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1359:130:0:-;-1:-1:-1;;;;;1273:6:0;287:3952:3;;719:10:2;1422:23:0;287:3952:3;;1359:130:0:o;287:3952:3:-;;;;-1:-1:-1;;;;;287:3952:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;-1:-1:-1;;;;;287:3952:3;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;:::o;:::-;;;;;;;;;;:::o;:::-;-1:-1:-1;;;;;287:3952:3;;;;;;;;;;;;;;;;:::o;:::-;-1:-1:-1;;;;;287:3952:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;:::o;2489:506::-;287:3952;2489:506;-1:-1:-1;;;;;2586:9:3;287:3952;;;;;;;2586:39;;;287:3952;2586:39;;287:3952;2586:39;;:9;:39;;287:3952;2586:39;287:3952;2586:39;;;;;;;;;;;-1:-1:-1;2586:39:3;;;2489:506;287:3952;;-1:-1:-1;287:3952:3;2645:6;287:3952;;;-1:-1:-1;287:3952:3;;2632:47;;;2629:65;;2947:29;287:3952;2753:5;2724:26;2736:14;287:3952;2724:26;;:::i;:::-;287:3952;;-1:-1:-1;287:3952:3;2645:6;287:3952;;2777:53;287:3952;-1:-1:-1;287:3952:3;;2777:53;;:::i;:::-;287:3952;;-1:-1:-1;287:3952:3;2645:6;287:3952;;2835:47;287:3952;-1:-1:-1;287:3952:3;;;;2835:47;:::i;:::-;287:3952;;;-1:-1:-1;287:3952:3;2645:6;287:3952;;2886:52;:32;287:3952;-1:-1:-1;287:3952:3;2886:32;287:3952;;;2886:52;:::i;:::-;287:3952;;;;;;2947:29;2489:506;:::o;2629:65::-;2683:8;;;;-1:-1:-1;2683:8:3;:::o;2586:39::-;;;;;;;;;;;;;;;;:::i;:::-;;;287:3952;;;;;;2586:39;;;;;;;;;;287:3952;;;-1:-1:-1;287:3952:3;;;;;2998:527;287:3952;2998:527;-1:-1:-1;;;;;3098:9:3;287:3952;;;;;;;3098:39;;;287:3952;3098:39;;287:3952;3098:39;;:9;:39;;287:3952;3098:39;287:3952;3098:39;;;;;;;;;;;-1:-1:-1;3098:39:3;;;2998:527;287:3952;;-1:-1:-1;287:3952:3;3157:9;287:3952;;;-1:-1:-1;287:3952:3;;3144:50;;;3141:68;;3474:32;287:3952;3271:5;3239:29;3251:17;287:3952;3239:29;;:::i;:::-;287:3952;;-1:-1:-1;287:3952:3;3157:9;287:3952;;3295:56;287:3952;-1:-1:-1;287:3952:3;;3295:56;;:::i;:::-;287:3952;;-1:-1:-1;287:3952:3;3157:9;287:3952;;3356:50;287:3952;-1:-1:-1;287:3952:3;;;;3356:50;:::i;:::-;287:3952;;;-1:-1:-1;287:3952:3;3157:9;287:3952;;3410:55;:35;287:3952;-1:-1:-1;287:3952:3;3410:35;287:3952;;;3410:55;:::i;3098:39::-;;;;;;;;;;;;;;;;:::i;:::-;;;287:3952;;;;;;3098:39;;;;;;;;;3528:709;287:3952;3528:709;-1:-1:-1;;;;;3630:9:3;287:3952;;;;;;;3630:39;;;287:3952;3630:39;;287:3952;3630:39;;:9;:39;;287:3952;3630:39;287:3952;3630:39;;;;;;;;;;;-1:-1:-1;3630:39:3;;;3528:709;287:3952;;-1:-1:-1;287:3952:3;3676:11;287:3952;;3701:1;287:3952;;-1:-1:-1;287:3952:3;;;3676:26;3673:561;3701:1;;;287:3952;-1:-1:-1;287:3952:3;3725:6;287:3952;;;-1:-1:-1;287:3952:3;;3712:47;;;3709:65;;3859:53;287:3952;3834:5;3805:26;3725:6;287:3952;3817:14;287:3952;3805:26;;:::i;:::-;287:3952;;-1:-1:-1;287:3952:3;;-1:-1:-1;287:3952:3;;3859:53;;:::i;:::-;3918:11;:::o;3673:561::-;3968:1;287:3952;;-1:-1:-1;287:3952:3;;;3943:26;3940:294;3968:1;;;3992:9;287:3952;;;-1:-1:-1;287:3952:3;;3979:50;;;3976:68;;4132:56;287:3952;4107:5;4075:29;3992:9;287:3952;4087:17;287:3952;4075:29;;:::i;3630:39::-;;;;;;;;;;;;;;;:::i;:::-;;;287:3952;;;;;;3630:39;;;;;;;
Swarm Source
ipfs://17b42e6c8fedb9c7a293356f4833b80d82af6b8453cb3f4568500e8e9e938040
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.