More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 136 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 19700274 | 216 days ago | IN | 0 ETH | 0.00026313 | ||||
Claim | 19700270 | 216 days ago | IN | 0 ETH | 0.00026858 | ||||
Claim | 19700262 | 216 days ago | IN | 0 ETH | 0.00031518 | ||||
Claim | 19700258 | 216 days ago | IN | 0 ETH | 0.00048154 | ||||
Claim | 19691942 | 217 days ago | IN | 0 ETH | 0.00050487 | ||||
Claim | 19691939 | 217 days ago | IN | 0 ETH | 0.00044253 | ||||
Claim | 19691087 | 217 days ago | IN | 0 ETH | 0.00044662 | ||||
Claim | 19690518 | 217 days ago | IN | 0 ETH | 0.00060205 | ||||
Claim | 19690516 | 217 days ago | IN | 0 ETH | 0.00058151 | ||||
Claim | 19690239 | 217 days ago | IN | 0 ETH | 0.00062892 | ||||
Claim | 19690001 | 217 days ago | IN | 0 ETH | 0.00063722 | ||||
Claim | 19689998 | 217 days ago | IN | 0 ETH | 0.00065695 | ||||
Claim | 19689969 | 217 days ago | IN | 0 ETH | 0.00071888 | ||||
Claim | 19689964 | 217 days ago | IN | 0 ETH | 0.00073954 | ||||
Claim | 19689955 | 217 days ago | IN | 0 ETH | 0.00077517 | ||||
Update Winners | 19689932 | 217 days ago | IN | 0 ETH | 0.00571581 | ||||
Update Winners | 19689930 | 217 days ago | IN | 0 ETH | 0.00539703 | ||||
Update Winners | 19689928 | 217 days ago | IN | 0 ETH | 0.00476251 | ||||
End Tournament | 19689915 | 217 days ago | IN | 0 ETH | 0.00042735 | ||||
End Tournament | 19689913 | 217 days ago | IN | 0 ETH | 0.00042294 | ||||
End Tournament | 19689909 | 217 days ago | IN | 0 ETH | 0.00043635 | ||||
Swap For Credits | 19688255 | 218 days ago | IN | 0 ETH | 0.00169235 | ||||
Swap For Credits | 19687920 | 218 days ago | IN | 0 ETH | 0.00171444 | ||||
Swap For Credits | 19685037 | 218 days ago | IN | 0 ETH | 0.00128326 | ||||
Swap For Credits | 19682464 | 218 days ago | IN | 0 ETH | 0.00144657 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
MetacadeTournament
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; interface IERC20Extended is IERC20 { function decimals() external view returns (uint8); } contract MetacadeTournament is Ownable(msg.sender), ReentrancyGuard { address public updater; uint256 private constant CBR_SCALE_FACTOR = 10 ** 6; constructor(address _updater) { updater = _updater; } struct Tournament { IERC20 paymentToken; bool isActive; uint256 gameId; uint256 startedAtBlock; uint256 creditBurnRate; uint256 baseCreditCost; Shareholder[] shareholders; CreditPackageType creditPackages; } mapping(uint256 => Tournament) public tournaments; mapping(address => mapping(uint256 => uint256)) public claimablePrizesForTournament; mapping(uint256 => uint256) public prizePools; mapping(uint256 => WinnerInfo[]) public tournamentWinners; struct WinnerInfo { address winner; uint256 amount; } struct Shareholder { address wallet; uint256 share; } struct CreditPackageType { uint256 tier1; uint256 tier2; uint256 tier3; } event TournamentCreated( uint256 indexed tournamentId, address paymentToken, uint256 creditBurnRate, uint256 baseCreditCost, uint256 gameId ); event PrizePoolFunded( uint256 indexed tournamentId, address funder, uint256 amount ); event TournamentStarted(uint256 indexed tournamentId, uint256 timestamp); event TournamentEnded(uint256 indexed tournamentId, uint256 timestamp); event CreditPurchased( uint256 indexed tournamentId, uint256 gameId, address buyer, address paymentToken, uint256 amount ); event Claimed( uint256 indexed tournamentId, address claimer, uint256 amount, address paymentToken ); event WinnersUpdated(uint256 indexed tournamentId); modifier onlyUpdater() { require(msg.sender == updater, "Not authorized"); _; } function updateUpdater(address _updater) external onlyOwner { updater = _updater; } function getTournamentWinners( uint256 tournamentId ) external view returns (WinnerInfo[] memory) { return tournamentWinners[tournamentId]; } function getTournamentShareholder( uint256 tournamentId, uint256 shareholderIndex ) external view returns (address, uint256) { Shareholder memory shareholder = tournaments[tournamentId].shareholders[ shareholderIndex ]; return (shareholder.wallet, shareholder.share); } function getTournamentCreditPackageType( uint256 tournamentId ) external view returns (CreditPackageType memory) { CreditPackageType memory creditPackages = tournaments[tournamentId] .creditPackages; return creditPackages; } function createTournament( uint256 tournamentId, uint256 gameId, uint256 creditBurnRate, uint256 baseCreditCost, address paymentTokenAddress, Shareholder[] memory _shareholders, CreditPackageType memory _creditPackages ) external onlyOwner { require( tournaments[tournamentId].paymentToken == IERC20(address(0)), "Tournament already exists" ); require( creditBurnRate >= 0, "Credit Burn Rate should be greater than or equal to 0" ); require( baseCreditCost >= 0, "Base Credit Cost should be greater than or equal to 0" ); require( gameId > 0, "Tournament must be associated with a certain game identifier" ); uint256 totalShare = 0; for (uint256 i = 0; i < _shareholders.length; i++) { require(_shareholders[i].share > 0, "Share must be greater than 0"); totalShare += _shareholders[i].share; } require(totalShare == 100, "Total share must be exactly 100"); Shareholder[] storage allShareholders = tournaments[tournamentId] .shareholders; for (uint256 i = 0; i < _shareholders.length; i++) { allShareholders.push(_shareholders[i]); } uint256 scaledCBR = creditBurnRate * CBR_SCALE_FACTOR; IERC20 paymentToken = IERC20(paymentTokenAddress); Tournament storage tournament = tournaments[tournamentId]; tournament.paymentToken = paymentToken; tournament.baseCreditCost = baseCreditCost; tournament.gameId = gameId; tournament.isActive = false; tournament.creditBurnRate = scaledCBR; tournament.startedAtBlock = 0; tournament.creditPackages = _creditPackages; emit TournamentCreated( tournamentId, paymentTokenAddress, creditBurnRate, baseCreditCost, gameId ); } function startTournament(uint256 tournamentId) external onlyOwner { Tournament storage tournament = tournaments[tournamentId]; require(!tournament.isActive, "Tournament already active"); require(tournament.gameId > 0, "Tournament does not exist"); tournament.isActive = true; tournament.startedAtBlock = block.number; emit TournamentStarted(tournamentId, block.timestamp); } function fundPrizePool( uint256 tournamentId, uint256 tokenAmount ) external payable { Tournament storage tournament = tournaments[tournamentId]; require(tournament.isActive, "Tournament is not active."); uint256 fundedAmount; if (tournament.paymentToken == IERC20(address(0))) { require(msg.value > 0, "Ether amount must be greater than 0"); prizePools[tournamentId] += msg.value; fundedAmount = msg.value; } else { require(tokenAmount > 0, "Token amount must be greater than 0"); require(msg.value == 0, "Do not send Ether for ERC20 funding"); require( tournament.paymentToken.transferFrom( msg.sender, address(this), tokenAmount ), "Token transfer to contract failed" ); prizePools[tournamentId] += tokenAmount; fundedAmount = tokenAmount; } emit PrizePoolFunded(tournamentId, msg.sender, fundedAmount); } function swapForCredits( uint256 tournamentId, uint256 gameId, uint256 creditTier, address beneficiary ) external payable nonReentrant { require(beneficiary != address(0), "Invalid beneficiary address"); Tournament storage tournament = tournaments[tournamentId]; require(tournament.isActive, "Tournament is paused"); require(gameId == tournament.gameId, "Invalid game id"); uint256 tokenAmount; if (creditTier == 1) { tokenAmount = tournament.creditPackages.tier1; } else if (creditTier == 2) { tokenAmount = tournament.creditPackages.tier2; } else if (creditTier == 3) { tokenAmount = tournament.creditPackages.tier3; } else { revert("Invalid credit tier"); } if (tournament.paymentToken == IERC20(address(0))) { require(msg.value == tokenAmount, "Incorrect Ether amount"); } else { require(msg.value == 0, "This tournament does not accept Ether"); require( tournament.paymentToken.transferFrom( msg.sender, address(this), tokenAmount ), "ERC20 token transfer failed" ); } distributeTokens(tournamentId, tokenAmount); emit CreditPurchased( tournamentId, gameId, beneficiary, address(tournament.paymentToken), tokenAmount ); } function distributeTokens( uint256 tournamentId, uint256 tokenAmount ) internal { Tournament storage tournament = tournaments[tournamentId]; for (uint256 i = 0; i < tournament.shareholders.length; i++) { Shareholder memory shareholder = tournament.shareholders[i]; uint256 shareholderAmount = (tokenAmount * shareholder.share) / 100; if (tournament.paymentToken == IERC20(address(0))) { if (shareholder.wallet == address(this)) { prizePools[tournamentId] += shareholderAmount; } else { (bool sent, ) = shareholder.wallet.call{ value: shareholderAmount }(""); require(sent, "Failed to send Ether"); } } else { if (shareholder.wallet == address(this)) { require( tournament.paymentToken.transfer( address(this), shareholderAmount ), "Token transfer to contract failed" ); prizePools[tournamentId] += shareholderAmount; } else { require( tournament.paymentToken.transfer( shareholder.wallet, shareholderAmount ), "Token transfer to shareholder failed" ); } } } } function updateWinners( uint256 tournamentId, address[] calldata winnerAddresses, uint256[] calldata amountsInWei ) external onlyUpdater { require( winnerAddresses.length == amountsInWei.length, "Address and amount arrays must match" ); Tournament storage tournament = tournaments[tournamentId]; require(!tournament.isActive, "Tournament must be ended first"); delete tournamentWinners[tournamentId]; uint256 totalAmount = 0; for (uint256 i = 0; i < winnerAddresses.length; i++) { tournamentWinners[tournamentId].push( WinnerInfo({ winner: winnerAddresses[i], amount: amountsInWei[i] }) ); claimablePrizesForTournament[winnerAddresses[i]][ tournamentId ] += amountsInWei[i]; totalAmount += amountsInWei[i]; } // Ensure the total amount being claimed does not exceed the prize pool require( totalAmount <= prizePools[tournamentId], "Total amount exceeds prize pool" ); emit WinnersUpdated(tournamentId); } function endTournament(uint256 tournamentId) external onlyOwner { Tournament storage tournament = tournaments[tournamentId]; require(tournament.isActive, "Tournament has not started"); tournament.isActive = false; emit TournamentEnded(tournamentId, block.timestamp); } function withdrawToken( address tokenAddress, uint256 amount ) external onlyOwner { require(amount > 0, "Amount must be greater than 0"); if (tokenAddress == address(0)) { require( address(this).balance >= amount, "Insufficient Ether balance" ); (bool sent, ) = msg.sender.call{value: amount}(""); require(sent, "Failed to send Ether"); } else { // Withdrawal request for an ERC20 token IERC20 token = IERC20(tokenAddress); uint256 contractBalance = token.balanceOf(address(this)); require(contractBalance >= amount, "Insufficient token balance"); require( token.transfer(msg.sender, amount), "Token transfer failed" ); } } function claim(uint256 tournamentId) external nonReentrant { uint256 claimAmount = claimablePrizesForTournament[msg.sender][ tournamentId ]; require(claimAmount > 0, "No claimable amount"); claimablePrizesForTournament[msg.sender][tournamentId] = 0; Tournament storage tournament = tournaments[tournamentId]; if (address(tournament.paymentToken) == address(0)) { (bool sent, ) = msg.sender.call{value: claimAmount}(""); require(sent, "Failed to send Ether"); } else { require( tournament.paymentToken.transfer(msg.sender, claimAmount), "Token transfer failed" ); } emit Claimed( tournamentId, msg.sender, claimAmount, address(tournament.paymentToken) ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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 { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; /** * @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; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); 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() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be NOT_ENTERED if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "london", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_updater","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tournamentId","type":"uint256"},{"indexed":false,"internalType":"address","name":"claimer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"paymentToken","type":"address"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tournamentId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"address","name":"paymentToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"CreditPurchased","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":"tournamentId","type":"uint256"},{"indexed":false,"internalType":"address","name":"funder","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PrizePoolFunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tournamentId","type":"uint256"},{"indexed":false,"internalType":"address","name":"paymentToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"creditBurnRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"baseCreditCost","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"gameId","type":"uint256"}],"name":"TournamentCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tournamentId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TournamentEnded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tournamentId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TournamentStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tournamentId","type":"uint256"}],"name":"WinnersUpdated","type":"event"},{"inputs":[{"internalType":"uint256","name":"tournamentId","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimablePrizesForTournament","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tournamentId","type":"uint256"},{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"uint256","name":"creditBurnRate","type":"uint256"},{"internalType":"uint256","name":"baseCreditCost","type":"uint256"},{"internalType":"address","name":"paymentTokenAddress","type":"address"},{"components":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"share","type":"uint256"}],"internalType":"struct MetacadeTournament.Shareholder[]","name":"_shareholders","type":"tuple[]"},{"components":[{"internalType":"uint256","name":"tier1","type":"uint256"},{"internalType":"uint256","name":"tier2","type":"uint256"},{"internalType":"uint256","name":"tier3","type":"uint256"}],"internalType":"struct MetacadeTournament.CreditPackageType","name":"_creditPackages","type":"tuple"}],"name":"createTournament","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tournamentId","type":"uint256"}],"name":"endTournament","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tournamentId","type":"uint256"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"fundPrizePool","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tournamentId","type":"uint256"}],"name":"getTournamentCreditPackageType","outputs":[{"components":[{"internalType":"uint256","name":"tier1","type":"uint256"},{"internalType":"uint256","name":"tier2","type":"uint256"},{"internalType":"uint256","name":"tier3","type":"uint256"}],"internalType":"struct MetacadeTournament.CreditPackageType","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tournamentId","type":"uint256"},{"internalType":"uint256","name":"shareholderIndex","type":"uint256"}],"name":"getTournamentShareholder","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tournamentId","type":"uint256"}],"name":"getTournamentWinners","outputs":[{"components":[{"internalType":"address","name":"winner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct MetacadeTournament.WinnerInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"prizePools","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tournamentId","type":"uint256"}],"name":"startTournament","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tournamentId","type":"uint256"},{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"uint256","name":"creditTier","type":"uint256"},{"internalType":"address","name":"beneficiary","type":"address"}],"name":"swapForCredits","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tournamentWinners","outputs":[{"internalType":"address","name":"winner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tournaments","outputs":[{"internalType":"contract IERC20","name":"paymentToken","type":"address"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"uint256","name":"startedAtBlock","type":"uint256"},{"internalType":"uint256","name":"creditBurnRate","type":"uint256"},{"internalType":"uint256","name":"baseCreditCost","type":"uint256"},{"components":[{"internalType":"uint256","name":"tier1","type":"uint256"},{"internalType":"uint256","name":"tier2","type":"uint256"},{"internalType":"uint256","name":"tier3","type":"uint256"}],"internalType":"struct MetacadeTournament.CreditPackageType","name":"creditPackages","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_updater","type":"address"}],"name":"updateUpdater","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tournamentId","type":"uint256"},{"internalType":"address[]","name":"winnerAddresses","type":"address[]"},{"internalType":"uint256[]","name":"amountsInWei","type":"uint256[]"}],"name":"updateWinners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updater","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162002497380380620024978339810160408190526200003491620000e1565b33806200005b57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b620000668162000091565b5060018055600280546001600160a01b0319166001600160a01b039290921691909117905562000113565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000f457600080fd5b81516001600160a01b03811681146200010c57600080fd5b9392505050565b61237480620001236000396000f3fe60806040526004361061011f5760003560e01c80639e281a98116100a0578063cd90d30211610064578063cd90d302146103e4578063df034cd014610404578063eddad39414610424578063f2fde38b14610451578063f4fc9f581461047157600080fd5b80639e281a9814610311578063a44ef7f314610331578063aa3b47c01461035e578063babb99441461037e578063c32e5c62146103c457600080fd5b8063651ea943116100e7578063651ea943146101ee5780636ae31c7a1461020e578063715018a61461022e5780637503e1b7146102435780638da5cb5b146102df57600080fd5b8063379607f51461012457806349bb6a9a146101465780634d96a63d1461017c57806356c071ee1461018f578063637af51c146101ce575b600080fd5b34801561013057600080fd5b5061014461013f366004611db2565b610484565b005b34801561015257600080fd5b50610166610161366004611db2565b6106a4565b6040516101739190611dcb565b60405180910390f35b61014461018a366004611dee565b610704565b34801561019b57600080fd5b506101af6101aa366004611dee565b6109b8565b604080516001600160a01b039093168352602083019190915201610173565b3480156101da57600080fd5b506101446101e9366004611e2c565b610a23565b3480156101fa57600080fd5b50610144610209366004611db2565b610a4d565b34801561021a57600080fd5b50610144610229366004611e93565b610b67565b34801561023a57600080fd5b50610144610e94565b34801561024f57600080fd5b506102cc61025e366004611db2565b600360208181526000928352604092839020805460018201546002830154948301546004840154875160608101895260068601548152600786015496810196909652600890940154968501969096526001600160a01b03821695600160a01b90920460ff1694909390929087565b6040516101739796959493929190611f0d565b3480156102eb57600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610173565b34801561031d57600080fd5b5061014461032c366004611f6f565b610ea8565b34801561033d57600080fd5b5061035161034c366004611db2565b611145565b6040516101739190611f99565b34801561036a57600080fd5b50610144610379366004611db2565b6111cd565b34801561038a57600080fd5b506103b6610399366004611f6f565b600460209081526000928352604080842090915290825290205481565b604051908152602001610173565b3480156103d057600080fd5b506101af6103df366004611dee565b611278565b3480156103f057600080fd5b506101446103ff3660046120bd565b6112be565b34801561041057600080fd5b506002546102f9906001600160a01b031681565b34801561043057600080fd5b506103b661043f366004611db2565b60056020526000908152604090205481565b34801561045d57600080fd5b5061014461046c366004611e2c565b61164a565b61014461047f3660046121dd565b611685565b61048c6119e7565b336000908152600460209081526040808320848452909152902054806104ef5760405162461bcd60e51b8152602060048201526013602482015272139bc818db185a5b58589b1948185b5bdd5b9d606a1b60448201526064015b60405180910390fd5b33600090815260046020908152604080832085845282528083208390556003909152902080546001600160a01b031661059057604051600090339084908381818185875af1925050503d8060008114610564576040519150601f19603f3d011682016040523d82523d6000602084013e610569565b606091505b505090508061058a5760405162461bcd60e51b81526004016104e69061221c565b50610648565b805460405163a9059cbb60e01b8152336004820152602481018490526001600160a01b039091169063a9059cbb906044016020604051808303816000875af11580156105e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610604919061224a565b6106485760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b60448201526064016104e6565b805460408051338152602081018590526001600160a01b039092169082015283907f3e4099b80f87674da7b70e32bb8d66d58f6e4b05e66cc204a8a2299155afd49a9060600160405180910390a250506106a160018055565b50565b6106c860405180606001604052806000815260200160008152602001600081525090565b50600090815260036020908152604091829020825160608101845260068201548152600782015492810192909252600801549181019190915290565b60008281526003602052604090208054600160a01b900460ff1661076a5760405162461bcd60e51b815260206004820152601960248201527f546f75726e616d656e74206973206e6f74206163746976652e0000000000000060448201526064016104e6565b80546000906001600160a01b031661080457600034116107d85760405162461bcd60e51b815260206004820152602360248201527f457468657220616d6f756e74206d75737420626520677265617465722074686160448201526206e20360ec1b60648201526084016104e6565b600084815260056020526040812080543492906107f6908490612282565b909155503491506109779050565b600083116108605760405162461bcd60e51b815260206004820152602360248201527f546f6b656e20616d6f756e74206d75737420626520677265617465722074686160448201526206e20360ec1b60648201526084016104e6565b34156108ba5760405162461bcd60e51b815260206004820152602360248201527f446f206e6f742073656e6420457468657220666f722045524332302066756e64604482015262696e6760e81b60648201526084016104e6565b81546040516323b872dd60e01b8152336004820152306024820152604481018590526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610934919061224a565b6109505760405162461bcd60e51b81526004016104e690612295565b6000848152600560205260408120805485929061096e908490612282565b90915550839150505b604080513381526020810183905285917f1d66716db7c7b1ac78167b83f8a0a8c2c4f396c67094bb0992585592b5f8231b910160405180910390a250505050565b6000828152600360205260408120600501805482918291859081106109df576109df6122d6565b60009182526020918290206040805180820190915260029092020180546001600160a01b0316808352600190910154919092018190529093509150505b9250929050565b610a2b611a11565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b610a55611a11565b60008181526003602052604090208054600160a01b900460ff1615610abc5760405162461bcd60e51b815260206004820152601960248201527f546f75726e616d656e7420616c7265616479206163746976650000000000000060448201526064016104e6565b6000816001015411610b105760405162461bcd60e51b815260206004820152601960248201527f546f75726e616d656e7420646f6573206e6f742065786973740000000000000060448201526064016104e6565b805460ff60a01b1916600160a01b17815543600282015560405182907fbc7efbd054762c7024dd5838b4eef6be3c9982e8a7397e2b3949e1b52263a61c90610b5b9042815260200190565b60405180910390a25050565b6002546001600160a01b03163314610bb25760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b60448201526064016104e6565b828114610c0d5760405162461bcd60e51b8152602060048201526024808201527f4164647265737320616e6420616d6f756e7420617272617973206d757374206d6044820152630c2e8c6d60e31b60648201526084016104e6565b60008581526003602052604090208054600160a01b900460ff1615610c745760405162461bcd60e51b815260206004820152601e60248201527f546f75726e616d656e74206d75737420626520656e646564206669727374000060448201526064016104e6565b6000868152600660205260408120610c8b91611d6c565b6000805b85811015610e0157600660008981526020019081526020016000206040518060400160405280898985818110610cc757610cc76122d6565b9050602002016020810190610cdc9190611e2c565b6001600160a01b03168152602001878785818110610cfc57610cfc6122d6565b60209081029290920135909252835460018082018655600095865294829020845160029092020180546001600160a01b0319166001600160a01b03909216919091178155920151919092015550848482818110610d5b57610d5b6122d6565b9050602002013560046000898985818110610d7857610d786122d6565b9050602002016020810190610d8d9190611e2c565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008a81526020019081526020016000206000828254610dcd9190612282565b909155508590508482818110610de557610de56122d6565b9050602002013582610df79190612282565b9150600101610c8f565b50600087815260056020526040902054811115610e605760405162461bcd60e51b815260206004820152601f60248201527f546f74616c20616d6f756e742065786365656473207072697a6520706f6f6c0060448201526064016104e6565b60405187907ff19ceb069badcedcd40bccc144808aef5183a407233c372652bf4363c1a1e2d490600090a250505050505050565b610e9c611a11565b610ea66000611a3e565b565b610eb0611a11565b60008111610f005760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016104e6565b6001600160a01b038216610fcb5780471015610f5e5760405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e742045746865722062616c616e636500000000000060448201526064016104e6565b604051600090339083908381818185875af1925050503d8060008114610fa0576040519150601f19603f3d011682016040523d82523d6000602084013e610fa5565b606091505b5050905080610fc65760405162461bcd60e51b81526004016104e69061221c565b505050565b6040516370a0823160e01b815230600482015282906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611014573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103891906122ec565b90508281101561108a5760405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e7420746f6b656e2062616c616e636500000000000060448201526064016104e6565b60405163a9059cbb60e01b8152336004820152602481018490526001600160a01b0383169063a9059cbb906044016020604051808303816000875af11580156110d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fb919061224a565b61113f5760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b60448201526064016104e6565b50505050565b606060066000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156111c2576000848152602090819020604080518082019091526002850290910180546001600160a01b0316825260019081015482840152908352909201910161117a565b505050509050919050565b6111d5611a11565b60008181526003602052604090208054600160a01b900460ff1661123b5760405162461bcd60e51b815260206004820152601a60248201527f546f75726e616d656e7420686173206e6f74207374617274656400000000000060448201526064016104e6565b805460ff60a01b1916815560405142815282907f807dbf27de9298b64d17f9338504ff1b1eaa8e96cbf4c3fa8bfbc09fa4a092de90602001610b5b565b6006602052816000526040600020818154811061129457600080fd5b6000918252602090912060029091020180546001909101546001600160a01b039091169250905082565b6112c6611a11565b6000878152600360205260409020546001600160a01b03161561132b5760405162461bcd60e51b815260206004820152601960248201527f546f75726e616d656e7420616c7265616479206578697374730000000000000060448201526064016104e6565b600086116113a15760405162461bcd60e51b815260206004820152603c60248201527f546f75726e616d656e74206d757374206265206173736f63696174656420776960448201527f74682061206365727461696e2067616d65206964656e7469666965720000000060648201526084016104e6565b6000805b835181101561144e5760008482815181106113c2576113c26122d6565b6020026020010151602001511161141b5760405162461bcd60e51b815260206004820152601c60248201527f5368617265206d7573742062652067726561746572207468616e20300000000060448201526064016104e6565b83818151811061142d5761142d6122d6565b602002602001015160200151826114449190612282565b91506001016113a5565b508060641461149f5760405162461bcd60e51b815260206004820152601f60248201527f546f74616c207368617265206d7573742062652065786163746c79203130300060448201526064016104e6565b6000888152600360205260408120600501905b845181101561151e57818582815181106114ce576114ce6122d6565b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b0319166001600160a01b0390921691909117815591015190820155016114b2565b50600061152e620f424089612305565b905060008690506000600360008d81526020019081526020016000209050818160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508881600401819055508a816001018190555060008160000160146101000a81548160ff0219169083151502179055508281600301819055506000816002018190555085816006016000820151816000015560208201518160010155604082015181600201559050508b7f9dfa471fb2a01ff96ecc85dafc5b863f9ab1e302e66287583cd7a0a5acbf2b52898c8c8f60405161163494939291906001600160a01b0394909416845260208401929092526040830152606082015260800190565b60405180910390a2505050505050505050505050565b611652611a11565b6001600160a01b03811661167c57604051631e4fbdf760e01b8152600060048201526024016104e6565b6106a181611a3e565b61168d6119e7565b6001600160a01b0381166116e35760405162461bcd60e51b815260206004820152601b60248201527f496e76616c69642062656e65666963696172792061646472657373000000000060448201526064016104e6565b60008481526003602052604090208054600160a01b900460ff166117405760405162461bcd60e51b8152602060048201526014602482015273151bdd5c9b985b595b9d081a5cc81c185d5cd95960621b60448201526064016104e6565b806001015484146117855760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481a59608a1b60448201526064016104e6565b60008360010361179a575060068101546117fe565b836002036117ad575060078101546117fe565b836003036117c0575060088101546117fe565b60405162461bcd60e51b815260206004820152601360248201527224b73b30b634b21031b932b234ba103a34b2b960691b60448201526064016104e6565b81546001600160a01b031661185a578034146118555760405162461bcd60e51b8152602060048201526016602482015275125b98dbdc9c9958dd08115d1a195c88185b5bdd5b9d60521b60448201526064016104e6565b61197c565b34156118b65760405162461bcd60e51b815260206004820152602560248201527f5468697320746f75726e616d656e7420646f6573206e6f74206163636570742060448201526422ba3432b960d91b60648201526084016104e6565b81546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af115801561190c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611930919061224a565b61197c5760405162461bcd60e51b815260206004820152601b60248201527f455243323020746f6b656e207472616e73666572206661696c6564000000000060448201526064016104e6565b6119868682611a8e565b8154604080518781526001600160a01b038087166020830152909216908201526060810182905286907ff32a7f6fcd0d49572f487a2d4534e855a7420ccd7262da23651124662310c8c99060800160405180910390a2505061113f60018055565b600260015403611a0a57604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b6000546001600160a01b03163314610ea65760405163118cdaa760e01b81523360048201526024016104e6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000828152600360205260408120905b600582015481101561113f576000826005018281548110611ac157611ac16122d6565b600091825260208083206040805180820190915260029093020180546001600160a01b0316835260010154908201819052909250606490611b029087612305565b611b0c919061231c565b84549091506001600160a01b0316611bd2578151306001600160a01b0390911603611b5a5760008681526005602052604081208054839290611b4f908490612282565b90915550611d629050565b81516040516000916001600160a01b03169083908381818185875af1925050503d8060008114611ba6576040519150601f19603f3d011682016040523d82523d6000602084013e611bab565b606091505b5050905080611bcc5760405162461bcd60e51b81526004016104e69061221c565b50611d62565b8151306001600160a01b0390911603611c9357835460405163a9059cbb60e01b8152306004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015611c35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c59919061224a565b611c755760405162461bcd60e51b81526004016104e690612295565b60008681526005602052604081208054839290611b4f908490612282565b8354825160405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905291169063a9059cbb906044016020604051808303816000875af1158015611ce6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0a919061224a565b611d625760405162461bcd60e51b8152602060048201526024808201527f546f6b656e207472616e7366657220746f207368617265686f6c6465722066616044820152631a5b195960e21b60648201526084016104e6565b5050600101611a9e565b50805460008255600202906000526020600020908101906106a191905b80821115611dae5780546001600160a01b031916815560006001820155600201611d89565b5090565b600060208284031215611dc457600080fd5b5035919050565b815181526020808301519082015260408083015190820152606081015b92915050565b60008060408385031215611e0157600080fd5b50508035926020909101359150565b80356001600160a01b0381168114611e2757600080fd5b919050565b600060208284031215611e3e57600080fd5b611e4782611e10565b9392505050565b60008083601f840112611e6057600080fd5b50813567ffffffffffffffff811115611e7857600080fd5b6020830191508360208260051b8501011115610a1c57600080fd5b600080600080600060608688031215611eab57600080fd5b85359450602086013567ffffffffffffffff80821115611eca57600080fd5b611ed689838a01611e4e565b90965094506040880135915080821115611eef57600080fd5b50611efc88828901611e4e565b969995985093965092949392505050565b6001600160a01b0388168152861515602082015260408101869052606081018590526080810184905260a081018390526101208101611f6360c08301848051825260208082015190830152604090810151910152565b98975050505050505050565b60008060408385031215611f8257600080fd5b611f8b83611e10565b946020939093013593505050565b602080825282518282018190526000919060409081850190868401855b82811015611fe457815180516001600160a01b03168552860151868501529284019290850190600101611fb6565b5091979650505050505050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561202a5761202a611ff1565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561205957612059611ff1565b604052919050565b60006060828403121561207357600080fd5b6040516060810181811067ffffffffffffffff8211171561209657612096611ff1565b80604052508091508235815260208301356020820152604083013560408201525092915050565b6000806000806000806000610120888a0312156120d957600080fd5b87359650602080890135965060408901359550606089013594506120ff60808a01611e10565b935060a089013567ffffffffffffffff8082111561211c57600080fd5b818b0191508b601f83011261213057600080fd5b81358181111561214257612142611ff1565b612150848260051b01612030565b818152848101925060069190911b83018401908d82111561217057600080fd5b928401925b818410156121ba576040848f03121561218e5760008081fd5b612196612007565b61219f85611e10565b81528486013586820152835260409093019291840191612175565b80965050505050506121cf8960c08a01612061565b905092959891949750929550565b600080600080608085870312156121f357600080fd5b84359350602085013592506040850135915061221160608601611e10565b905092959194509250565b6020808252601490820152732330b4b632b2103a379039b2b7321022ba3432b960611b604082015260600190565b60006020828403121561225c57600080fd5b81518015158114611e4757600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115611de857611de861226c565b60208082526021908201527f546f6b656e207472616e7366657220746f20636f6e7472616374206661696c656040820152601960fa1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156122fe57600080fd5b5051919050565b8082028115828204841417611de857611de861226c565b60008261233957634e487b7160e01b600052601260045260246000fd5b50049056fea26469706673582212204dab5cda0b7c87b9651c67392c127666f00891db5d85221c200549e93ec70d2564736f6c634300081700330000000000000000000000004873bf13a4225ec965cb26347046f6b81c5f508e
Deployed Bytecode
0x60806040526004361061011f5760003560e01c80639e281a98116100a0578063cd90d30211610064578063cd90d302146103e4578063df034cd014610404578063eddad39414610424578063f2fde38b14610451578063f4fc9f581461047157600080fd5b80639e281a9814610311578063a44ef7f314610331578063aa3b47c01461035e578063babb99441461037e578063c32e5c62146103c457600080fd5b8063651ea943116100e7578063651ea943146101ee5780636ae31c7a1461020e578063715018a61461022e5780637503e1b7146102435780638da5cb5b146102df57600080fd5b8063379607f51461012457806349bb6a9a146101465780634d96a63d1461017c57806356c071ee1461018f578063637af51c146101ce575b600080fd5b34801561013057600080fd5b5061014461013f366004611db2565b610484565b005b34801561015257600080fd5b50610166610161366004611db2565b6106a4565b6040516101739190611dcb565b60405180910390f35b61014461018a366004611dee565b610704565b34801561019b57600080fd5b506101af6101aa366004611dee565b6109b8565b604080516001600160a01b039093168352602083019190915201610173565b3480156101da57600080fd5b506101446101e9366004611e2c565b610a23565b3480156101fa57600080fd5b50610144610209366004611db2565b610a4d565b34801561021a57600080fd5b50610144610229366004611e93565b610b67565b34801561023a57600080fd5b50610144610e94565b34801561024f57600080fd5b506102cc61025e366004611db2565b600360208181526000928352604092839020805460018201546002830154948301546004840154875160608101895260068601548152600786015496810196909652600890940154968501969096526001600160a01b03821695600160a01b90920460ff1694909390929087565b6040516101739796959493929190611f0d565b3480156102eb57600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610173565b34801561031d57600080fd5b5061014461032c366004611f6f565b610ea8565b34801561033d57600080fd5b5061035161034c366004611db2565b611145565b6040516101739190611f99565b34801561036a57600080fd5b50610144610379366004611db2565b6111cd565b34801561038a57600080fd5b506103b6610399366004611f6f565b600460209081526000928352604080842090915290825290205481565b604051908152602001610173565b3480156103d057600080fd5b506101af6103df366004611dee565b611278565b3480156103f057600080fd5b506101446103ff3660046120bd565b6112be565b34801561041057600080fd5b506002546102f9906001600160a01b031681565b34801561043057600080fd5b506103b661043f366004611db2565b60056020526000908152604090205481565b34801561045d57600080fd5b5061014461046c366004611e2c565b61164a565b61014461047f3660046121dd565b611685565b61048c6119e7565b336000908152600460209081526040808320848452909152902054806104ef5760405162461bcd60e51b8152602060048201526013602482015272139bc818db185a5b58589b1948185b5bdd5b9d606a1b60448201526064015b60405180910390fd5b33600090815260046020908152604080832085845282528083208390556003909152902080546001600160a01b031661059057604051600090339084908381818185875af1925050503d8060008114610564576040519150601f19603f3d011682016040523d82523d6000602084013e610569565b606091505b505090508061058a5760405162461bcd60e51b81526004016104e69061221c565b50610648565b805460405163a9059cbb60e01b8152336004820152602481018490526001600160a01b039091169063a9059cbb906044016020604051808303816000875af11580156105e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610604919061224a565b6106485760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b60448201526064016104e6565b805460408051338152602081018590526001600160a01b039092169082015283907f3e4099b80f87674da7b70e32bb8d66d58f6e4b05e66cc204a8a2299155afd49a9060600160405180910390a250506106a160018055565b50565b6106c860405180606001604052806000815260200160008152602001600081525090565b50600090815260036020908152604091829020825160608101845260068201548152600782015492810192909252600801549181019190915290565b60008281526003602052604090208054600160a01b900460ff1661076a5760405162461bcd60e51b815260206004820152601960248201527f546f75726e616d656e74206973206e6f74206163746976652e0000000000000060448201526064016104e6565b80546000906001600160a01b031661080457600034116107d85760405162461bcd60e51b815260206004820152602360248201527f457468657220616d6f756e74206d75737420626520677265617465722074686160448201526206e20360ec1b60648201526084016104e6565b600084815260056020526040812080543492906107f6908490612282565b909155503491506109779050565b600083116108605760405162461bcd60e51b815260206004820152602360248201527f546f6b656e20616d6f756e74206d75737420626520677265617465722074686160448201526206e20360ec1b60648201526084016104e6565b34156108ba5760405162461bcd60e51b815260206004820152602360248201527f446f206e6f742073656e6420457468657220666f722045524332302066756e64604482015262696e6760e81b60648201526084016104e6565b81546040516323b872dd60e01b8152336004820152306024820152604481018590526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610934919061224a565b6109505760405162461bcd60e51b81526004016104e690612295565b6000848152600560205260408120805485929061096e908490612282565b90915550839150505b604080513381526020810183905285917f1d66716db7c7b1ac78167b83f8a0a8c2c4f396c67094bb0992585592b5f8231b910160405180910390a250505050565b6000828152600360205260408120600501805482918291859081106109df576109df6122d6565b60009182526020918290206040805180820190915260029092020180546001600160a01b0316808352600190910154919092018190529093509150505b9250929050565b610a2b611a11565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b610a55611a11565b60008181526003602052604090208054600160a01b900460ff1615610abc5760405162461bcd60e51b815260206004820152601960248201527f546f75726e616d656e7420616c7265616479206163746976650000000000000060448201526064016104e6565b6000816001015411610b105760405162461bcd60e51b815260206004820152601960248201527f546f75726e616d656e7420646f6573206e6f742065786973740000000000000060448201526064016104e6565b805460ff60a01b1916600160a01b17815543600282015560405182907fbc7efbd054762c7024dd5838b4eef6be3c9982e8a7397e2b3949e1b52263a61c90610b5b9042815260200190565b60405180910390a25050565b6002546001600160a01b03163314610bb25760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b60448201526064016104e6565b828114610c0d5760405162461bcd60e51b8152602060048201526024808201527f4164647265737320616e6420616d6f756e7420617272617973206d757374206d6044820152630c2e8c6d60e31b60648201526084016104e6565b60008581526003602052604090208054600160a01b900460ff1615610c745760405162461bcd60e51b815260206004820152601e60248201527f546f75726e616d656e74206d75737420626520656e646564206669727374000060448201526064016104e6565b6000868152600660205260408120610c8b91611d6c565b6000805b85811015610e0157600660008981526020019081526020016000206040518060400160405280898985818110610cc757610cc76122d6565b9050602002016020810190610cdc9190611e2c565b6001600160a01b03168152602001878785818110610cfc57610cfc6122d6565b60209081029290920135909252835460018082018655600095865294829020845160029092020180546001600160a01b0319166001600160a01b03909216919091178155920151919092015550848482818110610d5b57610d5b6122d6565b9050602002013560046000898985818110610d7857610d786122d6565b9050602002016020810190610d8d9190611e2c565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008a81526020019081526020016000206000828254610dcd9190612282565b909155508590508482818110610de557610de56122d6565b9050602002013582610df79190612282565b9150600101610c8f565b50600087815260056020526040902054811115610e605760405162461bcd60e51b815260206004820152601f60248201527f546f74616c20616d6f756e742065786365656473207072697a6520706f6f6c0060448201526064016104e6565b60405187907ff19ceb069badcedcd40bccc144808aef5183a407233c372652bf4363c1a1e2d490600090a250505050505050565b610e9c611a11565b610ea66000611a3e565b565b610eb0611a11565b60008111610f005760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016104e6565b6001600160a01b038216610fcb5780471015610f5e5760405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e742045746865722062616c616e636500000000000060448201526064016104e6565b604051600090339083908381818185875af1925050503d8060008114610fa0576040519150601f19603f3d011682016040523d82523d6000602084013e610fa5565b606091505b5050905080610fc65760405162461bcd60e51b81526004016104e69061221c565b505050565b6040516370a0823160e01b815230600482015282906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611014573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103891906122ec565b90508281101561108a5760405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e7420746f6b656e2062616c616e636500000000000060448201526064016104e6565b60405163a9059cbb60e01b8152336004820152602481018490526001600160a01b0383169063a9059cbb906044016020604051808303816000875af11580156110d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fb919061224a565b61113f5760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b60448201526064016104e6565b50505050565b606060066000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156111c2576000848152602090819020604080518082019091526002850290910180546001600160a01b0316825260019081015482840152908352909201910161117a565b505050509050919050565b6111d5611a11565b60008181526003602052604090208054600160a01b900460ff1661123b5760405162461bcd60e51b815260206004820152601a60248201527f546f75726e616d656e7420686173206e6f74207374617274656400000000000060448201526064016104e6565b805460ff60a01b1916815560405142815282907f807dbf27de9298b64d17f9338504ff1b1eaa8e96cbf4c3fa8bfbc09fa4a092de90602001610b5b565b6006602052816000526040600020818154811061129457600080fd5b6000918252602090912060029091020180546001909101546001600160a01b039091169250905082565b6112c6611a11565b6000878152600360205260409020546001600160a01b03161561132b5760405162461bcd60e51b815260206004820152601960248201527f546f75726e616d656e7420616c7265616479206578697374730000000000000060448201526064016104e6565b600086116113a15760405162461bcd60e51b815260206004820152603c60248201527f546f75726e616d656e74206d757374206265206173736f63696174656420776960448201527f74682061206365727461696e2067616d65206964656e7469666965720000000060648201526084016104e6565b6000805b835181101561144e5760008482815181106113c2576113c26122d6565b6020026020010151602001511161141b5760405162461bcd60e51b815260206004820152601c60248201527f5368617265206d7573742062652067726561746572207468616e20300000000060448201526064016104e6565b83818151811061142d5761142d6122d6565b602002602001015160200151826114449190612282565b91506001016113a5565b508060641461149f5760405162461bcd60e51b815260206004820152601f60248201527f546f74616c207368617265206d7573742062652065786163746c79203130300060448201526064016104e6565b6000888152600360205260408120600501905b845181101561151e57818582815181106114ce576114ce6122d6565b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b0319166001600160a01b0390921691909117815591015190820155016114b2565b50600061152e620f424089612305565b905060008690506000600360008d81526020019081526020016000209050818160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508881600401819055508a816001018190555060008160000160146101000a81548160ff0219169083151502179055508281600301819055506000816002018190555085816006016000820151816000015560208201518160010155604082015181600201559050508b7f9dfa471fb2a01ff96ecc85dafc5b863f9ab1e302e66287583cd7a0a5acbf2b52898c8c8f60405161163494939291906001600160a01b0394909416845260208401929092526040830152606082015260800190565b60405180910390a2505050505050505050505050565b611652611a11565b6001600160a01b03811661167c57604051631e4fbdf760e01b8152600060048201526024016104e6565b6106a181611a3e565b61168d6119e7565b6001600160a01b0381166116e35760405162461bcd60e51b815260206004820152601b60248201527f496e76616c69642062656e65666963696172792061646472657373000000000060448201526064016104e6565b60008481526003602052604090208054600160a01b900460ff166117405760405162461bcd60e51b8152602060048201526014602482015273151bdd5c9b985b595b9d081a5cc81c185d5cd95960621b60448201526064016104e6565b806001015484146117855760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481a59608a1b60448201526064016104e6565b60008360010361179a575060068101546117fe565b836002036117ad575060078101546117fe565b836003036117c0575060088101546117fe565b60405162461bcd60e51b815260206004820152601360248201527224b73b30b634b21031b932b234ba103a34b2b960691b60448201526064016104e6565b81546001600160a01b031661185a578034146118555760405162461bcd60e51b8152602060048201526016602482015275125b98dbdc9c9958dd08115d1a195c88185b5bdd5b9d60521b60448201526064016104e6565b61197c565b34156118b65760405162461bcd60e51b815260206004820152602560248201527f5468697320746f75726e616d656e7420646f6573206e6f74206163636570742060448201526422ba3432b960d91b60648201526084016104e6565b81546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af115801561190c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611930919061224a565b61197c5760405162461bcd60e51b815260206004820152601b60248201527f455243323020746f6b656e207472616e73666572206661696c6564000000000060448201526064016104e6565b6119868682611a8e565b8154604080518781526001600160a01b038087166020830152909216908201526060810182905286907ff32a7f6fcd0d49572f487a2d4534e855a7420ccd7262da23651124662310c8c99060800160405180910390a2505061113f60018055565b600260015403611a0a57604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b6000546001600160a01b03163314610ea65760405163118cdaa760e01b81523360048201526024016104e6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000828152600360205260408120905b600582015481101561113f576000826005018281548110611ac157611ac16122d6565b600091825260208083206040805180820190915260029093020180546001600160a01b0316835260010154908201819052909250606490611b029087612305565b611b0c919061231c565b84549091506001600160a01b0316611bd2578151306001600160a01b0390911603611b5a5760008681526005602052604081208054839290611b4f908490612282565b90915550611d629050565b81516040516000916001600160a01b03169083908381818185875af1925050503d8060008114611ba6576040519150601f19603f3d011682016040523d82523d6000602084013e611bab565b606091505b5050905080611bcc5760405162461bcd60e51b81526004016104e69061221c565b50611d62565b8151306001600160a01b0390911603611c9357835460405163a9059cbb60e01b8152306004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015611c35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c59919061224a565b611c755760405162461bcd60e51b81526004016104e690612295565b60008681526005602052604081208054839290611b4f908490612282565b8354825160405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905291169063a9059cbb906044016020604051808303816000875af1158015611ce6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0a919061224a565b611d625760405162461bcd60e51b8152602060048201526024808201527f546f6b656e207472616e7366657220746f207368617265686f6c6465722066616044820152631a5b195960e21b60648201526084016104e6565b5050600101611a9e565b50805460008255600202906000526020600020908101906106a191905b80821115611dae5780546001600160a01b031916815560006001820155600201611d89565b5090565b600060208284031215611dc457600080fd5b5035919050565b815181526020808301519082015260408083015190820152606081015b92915050565b60008060408385031215611e0157600080fd5b50508035926020909101359150565b80356001600160a01b0381168114611e2757600080fd5b919050565b600060208284031215611e3e57600080fd5b611e4782611e10565b9392505050565b60008083601f840112611e6057600080fd5b50813567ffffffffffffffff811115611e7857600080fd5b6020830191508360208260051b8501011115610a1c57600080fd5b600080600080600060608688031215611eab57600080fd5b85359450602086013567ffffffffffffffff80821115611eca57600080fd5b611ed689838a01611e4e565b90965094506040880135915080821115611eef57600080fd5b50611efc88828901611e4e565b969995985093965092949392505050565b6001600160a01b0388168152861515602082015260408101869052606081018590526080810184905260a081018390526101208101611f6360c08301848051825260208082015190830152604090810151910152565b98975050505050505050565b60008060408385031215611f8257600080fd5b611f8b83611e10565b946020939093013593505050565b602080825282518282018190526000919060409081850190868401855b82811015611fe457815180516001600160a01b03168552860151868501529284019290850190600101611fb6565b5091979650505050505050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561202a5761202a611ff1565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561205957612059611ff1565b604052919050565b60006060828403121561207357600080fd5b6040516060810181811067ffffffffffffffff8211171561209657612096611ff1565b80604052508091508235815260208301356020820152604083013560408201525092915050565b6000806000806000806000610120888a0312156120d957600080fd5b87359650602080890135965060408901359550606089013594506120ff60808a01611e10565b935060a089013567ffffffffffffffff8082111561211c57600080fd5b818b0191508b601f83011261213057600080fd5b81358181111561214257612142611ff1565b612150848260051b01612030565b818152848101925060069190911b83018401908d82111561217057600080fd5b928401925b818410156121ba576040848f03121561218e5760008081fd5b612196612007565b61219f85611e10565b81528486013586820152835260409093019291840191612175565b80965050505050506121cf8960c08a01612061565b905092959891949750929550565b600080600080608085870312156121f357600080fd5b84359350602085013592506040850135915061221160608601611e10565b905092959194509250565b6020808252601490820152732330b4b632b2103a379039b2b7321022ba3432b960611b604082015260600190565b60006020828403121561225c57600080fd5b81518015158114611e4757600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115611de857611de861226c565b60208082526021908201527f546f6b656e207472616e7366657220746f20636f6e7472616374206661696c656040820152601960fa1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156122fe57600080fd5b5051919050565b8082028115828204841417611de857611de861226c565b60008261233957634e487b7160e01b600052601260045260246000fd5b50049056fea26469706673582212204dab5cda0b7c87b9651c67392c127666f00891db5d85221c200549e93ec70d2564736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004873bf13a4225ec965cb26347046f6b81c5f508e
-----Decoded View---------------
Arg [0] : _updater (address): 0x4873BF13A4225ec965Cb26347046F6b81C5F508E
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000004873bf13a4225ec965cb26347046f6b81c5f508e
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.