Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Setup
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.24; import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol"; import {ITreasury} from "./interfaces/ITreasury.sol"; import {IDataStreamsVerifier} from "./interfaces/IDataStreamsVerifier.sol"; contract Setup is AccessControl { event SetupNewPlayer( bytes32 gameId, bool isLong, uint256 depositAmount, address player ); event SetupCancelled(bytes32 gameId, address initiator); event SetupFinalized( bytes32 gameId, bool takeProfitWon, int192 finalPrice, uint256 endTime, uint256 initiatorFee ); event SetupCreated( bytes32 gameId, bytes32 feedId, uint256 startTime, uint256 endTime, int192 startingPrice, int192 takeProfitPrice, int192 stopLossPrice, bool isLong, address creator ); enum Status { Created, Cancelled, Finished } struct GameInfo { bytes32 feedId; address initiator; uint256 startTime; uint256 endTime; bool isLong; uint256 totalDepositsSL; uint256 totalDepositsTP; int192 takeProfitPrice; int192 stopLossPrice; int192 startringPrice; int192 finalPrice; address[] teamSL; address[] teamTP; Status gameStatus; } mapping(bytes32 => GameInfo) public games; mapping(bytes32 => mapping(address => uint256)) public depositAmounts; uint256 public minDuration = 30 minutes; uint256 public maxDuration = 24 weeks; address public treasury; constructor(address newTreasury) { _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); treasury = newTreasury; } function createSetup( bool isLong, uint256 endTime, int192 takeProfitPrice, int192 stopLossPrice, bytes memory unverifiedReport, bytes32 feedId ) public { require( endTime - block.timestamp >= minDuration, "Min game duration must be higher" ); require( endTime - block.timestamp <= maxDuration, "Max game duration must be lower" ); bytes32 gameId = keccak256( abi.encodePacked( block.timestamp, endTime, takeProfitPrice, stopLossPrice ) ); GameInfo memory newGame = games[gameId]; (newGame.startringPrice, newGame.startTime) = IDataStreamsVerifier( ITreasury(treasury).upkeep() ).verifyReportWithTimestamp(unverifiedReport, feedId); if (isLong) { require( newGame.startringPrice > stopLossPrice || newGame.startringPrice < takeProfitPrice, "Wrong tp or sl price" ); } else { require( newGame.startringPrice < stopLossPrice || newGame.startringPrice > takeProfitPrice, "Wrong tp or sl price" ); } newGame.isLong = isLong; newGame.initiator = msg.sender; newGame.endTime = endTime; newGame.stopLossPrice = stopLossPrice; newGame.takeProfitPrice = takeProfitPrice; newGame.gameStatus = Status.Created; newGame.feedId = feedId; games[gameId] = newGame; emit SetupCreated( gameId, feedId, newGame.startTime, endTime, newGame.startringPrice, takeProfitPrice, stopLossPrice, isLong, msg.sender ); } function play(bool isLong, uint256 depositAmount, bytes32 gameId) public { require(games[gameId].gameStatus == Status.Created, "Wrong status!"); require( games[gameId].startTime + (games[gameId].endTime - games[gameId].startTime) / 3 > block.timestamp, "Game is closed for new players" ); require( depositAmounts[gameId][msg.sender] == 0, "You are already in the game" ); ITreasury(treasury).deposit(depositAmount, msg.sender); depositAmounts[gameId][msg.sender] = depositAmount; if (isLong) { games[gameId].teamTP.push(msg.sender); games[gameId].totalDepositsTP += depositAmount; } else { games[gameId].teamSL.push(msg.sender); games[gameId].totalDepositsSL += depositAmount; } emit SetupNewPlayer(gameId, isLong, depositAmount, msg.sender); } function playWithPermit( bool isLong, uint256 depositAmount, bytes32 gameId, ITreasury.PermitData calldata permitData ) public { require(games[gameId].gameStatus == Status.Created, "Wrong status!"); require( games[gameId].startTime + (games[gameId].endTime - games[gameId].startTime) / 3 > block.timestamp, "Game is closed for new players" ); require( depositAmounts[gameId][msg.sender] == 0, "You are already in the game" ); ITreasury(treasury).depositWithPermit( depositAmount, msg.sender, permitData.deadline, permitData.v, permitData.r, permitData.s ); depositAmounts[gameId][msg.sender] = depositAmount; if (isLong) { games[gameId].teamTP.push(msg.sender); games[gameId].totalDepositsTP += depositAmount; } else { games[gameId].teamSL.push(msg.sender); games[gameId].totalDepositsSL += depositAmount; } emit SetupNewPlayer(gameId, isLong, depositAmount, msg.sender); } function closeGame(bytes32 gameId) public onlyRole(DEFAULT_ADMIN_ROLE) { require(games[gameId].startTime != 0, "Game doesn't exist"); require( ((games[gameId].startTime + (games[gameId].endTime - games[gameId].startTime) / 3 < block.timestamp && (games[gameId].teamSL.length == 0 || games[gameId].teamTP.length == 0)) || block.timestamp > games[gameId].endTime), "Wrong status!" ); for (uint i; i < games[gameId].teamSL.length; i++) { ITreasury(treasury).refund( depositAmounts[gameId][games[gameId].teamSL[i]], games[gameId].teamSL[i] ); } for (uint i; i < games[gameId].teamTP.length; i++) { ITreasury(treasury).refund( depositAmounts[gameId][games[gameId].teamTP[i]], games[gameId].teamTP[i] ); } games[gameId].gameStatus = Status.Cancelled; emit SetupCancelled(gameId, games[gameId].initiator); } function finalizeGame( bytes memory unverifiedReport, bytes32 gameId ) public onlyRole(DEFAULT_ADMIN_ROLE) { require(games[gameId].gameStatus == Status.Created, "Wrong status!"); (int192 finalPrice, uint256 endTime) = IDataStreamsVerifier( ITreasury(treasury).upkeep() ).verifyReportWithTimestamp(unverifiedReport, games[gameId].feedId); if ( games[gameId].teamSL.length == 0 || games[gameId].teamTP.length == 0 ) { for (uint i; i < games[gameId].teamSL.length; i++) { ITreasury(treasury).refund( depositAmounts[gameId][games[gameId].teamSL[i]], games[gameId].teamSL[i] ); } for (uint i; i < games[gameId].teamTP.length; i++) { ITreasury(treasury).refund( depositAmounts[gameId][games[gameId].teamTP[i]], games[gameId].teamTP[i] ); } games[gameId].gameStatus = Status.Cancelled; games[gameId].finalPrice = finalPrice; emit SetupCancelled(gameId, games[gameId].initiator); return; } bool takeProfitWon; uint256 initiatorFee; uint256 finalRate; if (games[gameId].isLong) { require( finalPrice <= games[gameId].stopLossPrice || finalPrice >= games[gameId].takeProfitPrice, "Can't end" ); if (finalPrice >= games[gameId].takeProfitPrice) { // tp team wins (finalRate, initiatorFee) = ITreasury(treasury) .calculateSetupRate( games[gameId].totalDepositsSL, games[gameId].totalDepositsTP, games[gameId].initiator ); for (uint i; i < games[gameId].teamTP.length; i++) { ITreasury(treasury).distributeWithoutFee( finalRate, games[gameId].teamTP[i], depositAmounts[gameId][games[gameId].teamTP[i]] ); } takeProfitWon = true; } else if (finalPrice <= games[gameId].stopLossPrice) { // sl team wins (finalRate, initiatorFee) = ITreasury(treasury) .calculateSetupRate( games[gameId].totalDepositsTP, games[gameId].totalDepositsSL, games[gameId].initiator ); for (uint i; i < games[gameId].teamSL.length; i++) { ITreasury(treasury).distributeWithoutFee( finalRate, games[gameId].teamSL[i], depositAmounts[gameId][games[gameId].teamSL[i]] ); } } } else { require( finalPrice >= games[gameId].stopLossPrice || finalPrice <= games[gameId].takeProfitPrice, "Can't end" ); if (finalPrice >= games[gameId].stopLossPrice) { // sl team wins (finalRate, initiatorFee) = ITreasury(treasury) .calculateSetupRate( games[gameId].totalDepositsTP, games[gameId].totalDepositsSL, games[gameId].initiator ); for (uint i; i < games[gameId].teamSL.length; i++) { ITreasury(treasury).distributeWithoutFee( finalRate, games[gameId].teamSL[i], depositAmounts[gameId][games[gameId].teamSL[i]] ); } } else if (finalPrice <= games[gameId].takeProfitPrice) { (finalRate, initiatorFee) = ITreasury(treasury) .calculateSetupRate( games[gameId].totalDepositsSL, games[gameId].totalDepositsTP, games[gameId].initiator ); for (uint i; i < games[gameId].teamTP.length; i++) { ITreasury(treasury).distributeWithoutFee( finalRate, games[gameId].teamTP[i], depositAmounts[gameId][games[gameId].teamTP[i]] ); } takeProfitWon = true; } } games[gameId].endTime = endTime; games[gameId].finalPrice = finalPrice; games[gameId].gameStatus = Status.Finished; emit SetupFinalized( gameId, takeProfitWon, finalPrice, endTime, initiatorFee ); } function getPlayersAmount( bytes32 gameId ) public view returns (uint256, uint256) { return (games[gameId].teamSL.length, games[gameId].teamTP.length); } /** * Changes min and max game limits * @param newMaxDuration new max game duration * @param newMinDuration new min game duration */ function changeGameDuration( uint256 newMaxDuration, uint256 newMinDuration ) public onlyRole(DEFAULT_ADMIN_ROLE) { minDuration = newMinDuration; maxDuration = newMaxDuration; } /** * Change treasury address * @param newTreasury new treasury address */ function setTreasury( address newTreasury ) public onlyRole(DEFAULT_ADMIN_ROLE) { treasury = newTreasury; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "./IAccessControl.sol"; import {Context} from "../utils/Context.sol"; import {ERC165} from "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } mapping(bytes32 role => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual returns (bool) { return _roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { if (!hasRole(role, account)) { _roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { if (hasRole(role, account)) { _roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// 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/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; interface IDataStreamsVerifier { function lastRetrievedPrice() external view returns (int192); function getPrice() external view returns (int192); function verifyReportWithTimestamp( bytes memory unverifiedReport, bytes32 feedId ) external returns (int192, uint32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; interface ITreasury { struct PermitData { uint256 deadline; uint8 v; bytes32 r; bytes32 s; } function DISTRIBUTOR_ROLE() external view returns (bytes32); function grantRole(bytes32 role, address account) external; function increaseFee(uint256 amount) external; function deposit(uint256 amount, address from) external; function depositWithPermit( uint256 amount, address from, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; function upkeep() external view returns (address); function distribute( uint256 amount, address to, uint256 initialDeposit, uint256 gameFee ) external; function refund(uint256 amount, address to) external; function distributeWithoutFee( uint256 rate, address to, uint256 initialDeposit ) external; function calculateSetupRate( uint256 lostTeamTotal, uint256 wonTeamTotal, address initiator ) external returns (uint256, uint256); function calculateUpDownRate( uint256 lostTeamTotal, uint256 wonTeamTotal, uint256 updownFee ) external returns (uint256 rate); }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract ABI
API[{"inputs":[{"internalType":"address","name":"newTreasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"gameId","type":"bytes32"},{"indexed":false,"internalType":"address","name":"initiator","type":"address"}],"name":"SetupCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"gameId","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"feedId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"},{"indexed":false,"internalType":"int192","name":"startingPrice","type":"int192"},{"indexed":false,"internalType":"int192","name":"takeProfitPrice","type":"int192"},{"indexed":false,"internalType":"int192","name":"stopLossPrice","type":"int192"},{"indexed":false,"internalType":"bool","name":"isLong","type":"bool"},{"indexed":false,"internalType":"address","name":"creator","type":"address"}],"name":"SetupCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"gameId","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"takeProfitWon","type":"bool"},{"indexed":false,"internalType":"int192","name":"finalPrice","type":"int192"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"initiatorFee","type":"uint256"}],"name":"SetupFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"gameId","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"isLong","type":"bool"},{"indexed":false,"internalType":"uint256","name":"depositAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"player","type":"address"}],"name":"SetupNewPlayer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxDuration","type":"uint256"},{"internalType":"uint256","name":"newMinDuration","type":"uint256"}],"name":"changeGameDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"gameId","type":"bytes32"}],"name":"closeGame","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"int192","name":"takeProfitPrice","type":"int192"},{"internalType":"int192","name":"stopLossPrice","type":"int192"},{"internalType":"bytes","name":"unverifiedReport","type":"bytes"},{"internalType":"bytes32","name":"feedId","type":"bytes32"}],"name":"createSetup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"name":"depositAmounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"unverifiedReport","type":"bytes"},{"internalType":"bytes32","name":"gameId","type":"bytes32"}],"name":"finalizeGame","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"games","outputs":[{"internalType":"bytes32","name":"feedId","type":"bytes32"},{"internalType":"address","name":"initiator","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"uint256","name":"totalDepositsSL","type":"uint256"},{"internalType":"uint256","name":"totalDepositsTP","type":"uint256"},{"internalType":"int192","name":"takeProfitPrice","type":"int192"},{"internalType":"int192","name":"stopLossPrice","type":"int192"},{"internalType":"int192","name":"startringPrice","type":"int192"},{"internalType":"int192","name":"finalPrice","type":"int192"},{"internalType":"enum Setup.Status","name":"gameStatus","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"gameId","type":"bytes32"}],"name":"getPlayersAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"uint256","name":"depositAmount","type":"uint256"},{"internalType":"bytes32","name":"gameId","type":"bytes32"}],"name":"play","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"uint256","name":"depositAmount","type":"uint256"},{"internalType":"bytes32","name":"gameId","type":"bytes32"},{"components":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct ITreasury.PermitData","name":"permitData","type":"tuple"}],"name":"playWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTreasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405261070860035562dd7c006004553480156200001e57600080fd5b5060405162002ae038038062002ae0833981016040819052620000419162000124565b6200004e60003362000075565b50600580546001600160a01b0319166001600160a01b039290921691909117905562000156565b6000828152602081815260408083206001600160a01b038516845290915281205460ff166200011a576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620000d13390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016200011e565b5060005b92915050565b6000602082840312156200013757600080fd5b81516001600160a01b03811681146200014f57600080fd5b9392505050565b61297a80620001666000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c806391d14854116100ad578063f0f4426011610071578063f0f4426014610294578063f27f1642146102a7578063f579f882146102ba578063f6ccb8261461035b578063ff2d9a351461036e57600080fd5b806391d1485414610240578063a217fddf14610253578063ba22de821461025b578063d547741f1461026e578063ea8d53ef1461028157600080fd5b806336568abe116100f457806336568abe146101c557806356715761146101d857806361d027b3146101e15780636db5c8fd1461020c57806381d5f2181461021557600080fd5b806301648da91461013157806301ffc9a7146101465780631199cdd21461016e578063248a9ca3146101815780632f2ff15d146101b2575b600080fd5b61014461013f3660046124cd565b6103ae565b005b610159610154366004612512565b61117e565b60405190151581526020015b60405180910390f35b61014461017c366004612558565b6111b5565b6101a461018f36600461258b565b60009081526020819052604090206001015490565b604051908152602001610165565b6101446101c03660046125b9565b61146d565b6101446101d33660046125b9565b611498565b6101a460035481565b6005546101f4906001600160a01b031681565b6040516001600160a01b039091168152602001610165565b6101a460045481565b6101a46102233660046125b9565b600260209081526000928352604080842090915290825290205481565b61015961024e3660046125b9565b6114cb565b6101a4600081565b6101446102693660046125e9565b6114f4565b61014461027c3660046125b9565b6117f2565b61014461028f366004612639565b611817565b6101446102a236600461265b565b61182b565b6101446102b5366004612687565b611859565b6103436102c836600461258b565b600160208190526000918252604090912080549181015460028201546003830154600484015460058501546006860154600787015460088801546009890154600a8a0154600d909a01546001600160a01b03909916999798969760ff9687169795969495601794850b9593850b9492830b939190920b91168c565b6040516101659c9b9a99989796959493929190612722565b61014461036936600461258b565b611eac565b61039961037c36600461258b565b6000908152600160205260409020600b810154600c909101549091565b60408051928352602083019190915201610165565b60006103b981612269565b6000828152600160205260408120600d015460ff1660028111156103df576103df61270c565b146104055760405162461bcd60e51b81526004016103fc906127b8565b60405180910390fd5b600080600560009054906101000a90046001600160a01b03166001600160a01b0316632cf4704a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561045b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047f91906127df565b6000858152600160205260409081902054905163b6a9b90960e01b81526001600160a01b03929092169163b6a9b909916104be918991906004016127fc565b60408051808303816000875af11580156104dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105009190612851565b6000868152600160205260409020600b015491935063ffffffff169150158061053857506000848152600160205260409020600c0154155b156108055760005b6000858152600160205260409020600b015481101561065a57600554600086815260026020908152604080832060019092528220600b0180546001600160a01b0390941693637ad226dc9391908690811061059d5761059d612889565b60009182526020808320909101546001600160a01b031683528281019390935260409182018120548a8252600190935220600b018054859081106105e3576105e3612889565b60009182526020909120015460405160e084901b6001600160e01b031916815260048101929092526001600160a01b03166024820152604401600060405180830381600087803b15801561063657600080fd5b505af115801561064a573d6000803e3d6000fd5b5050600190920191506105409050565b5060005b6000858152600160205260409020600c015481101561077857600554600086815260026020908152604080832060019092528220600c0180546001600160a01b0390941693637ad226dc939190869081106106bb576106bb612889565b60009182526020808320909101546001600160a01b031683528281019390935260409182018120548a8252600190935220600c0180548590811061070157610701612889565b60009182526020909120015460405160e084901b6001600160e01b031916815260048101929092526001600160a01b03166024820152604401600060405180830381600087803b15801561075457600080fd5b505af1158015610768573d6000803e3d6000fd5b50506001909201915061065e9050565b50600084815260016020818152604092839020600d8101805460ff191684179055600a810180546001600160c01b0388166001600160c01b03199091161790559091015482518781526001600160a01b03909116918101919091527f1bb2a2f27eacf65458312514d65e8198c0f3823a644f49b5a8a57b536cd5cf40910160405180910390a15050505050565b6000848152600160205260408120600401548190819060ff1615610c8257600087815260016020526040902060080154601790810b9086900b1315806108645750600087815260016020526040902060070154601790810b9086900b12155b61089c5760405162461bcd60e51b815260206004820152600960248201526810d85b89dd08195b9960ba1b60448201526064016103fc565b600087815260016020526040902060070154601790810b9086900b12610a93576005805460008981526001602081905260409182902093840154600685015494909101549151636664a95960e01b8152600481019190915260248101939093526001600160a01b0390811660448401521690636664a9599060640160408051808303816000875af1158015610935573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610959919061289f565b9250905060005b6000888152600160205260409020600c0154811015610a89576005546000898152600160205260409020600c0180546001600160a01b039092169163619aed98918591859081106109b3576109b3612889565b60009182526020808320909101548d835260028252604080842060019093528320600c0180546001600160a01b039092169391889081106109f6576109f6612889565b6000918252602080832091909101546001600160a01b039081168452908301939093526040918201902054905160e086901b6001600160e01b03191681526004810194909452911660248301526044820152606401600060405180830381600087803b158015610a6557600080fd5b505af1158015610a79573d6000803e3d6000fd5b5050600190920191506109609050565b50600192506110d6565b600087815260016020526040902060080154601790810b9086900b13610c7d57600580546000898152600160208190526040918290206006810154948101549101549151636664a95960e01b8152600481019490945260248401526001600160a01b0390811660448401521690636664a9599060640160408051808303816000875af1158015610b27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4b919061289f565b9250905060005b6000888152600160205260409020600b0154811015610c7b576005546000898152600160205260409020600b0180546001600160a01b039092169163619aed9891859185908110610ba557610ba5612889565b60009182526020808320909101548d835260028252604080842060019093528320600b0180546001600160a01b03909216939188908110610be857610be8612889565b6000918252602080832091909101546001600160a01b039081168452908301939093526040918201902054905160e086901b6001600160e01b03191681526004810194909452911660248301526044820152606401600060405180830381600087803b158015610c5757600080fd5b505af1158015610c6b573d6000803e3d6000fd5b505060019092019150610b529050565b505b6110d6565b600087815260016020526040902060080154601790810b9086900b121580610cc35750600087815260016020526040902060070154601790810b9086900b13155b610cfb5760405162461bcd60e51b815260206004820152600960248201526810d85b89dd08195b9960ba1b60448201526064016103fc565b600087815260016020526040902060080154601790810b9086900b12610ee357600580546000898152600160208190526040918290206006810154948101549101549151636664a95960e01b8152600481019490945260248401526001600160a01b0390811660448401521690636664a9599060640160408051808303816000875af1158015610d8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db3919061289f565b9250905060005b6000888152600160205260409020600b0154811015610c7b576005546000898152600160205260409020600b0180546001600160a01b039092169163619aed9891859185908110610e0d57610e0d612889565b60009182526020808320909101548d835260028252604080842060019093528320600b0180546001600160a01b03909216939188908110610e5057610e50612889565b6000918252602080832091909101546001600160a01b039081168452908301939093526040918201902054905160e086901b6001600160e01b03191681526004810194909452911660248301526044820152606401600060405180830381600087803b158015610ebf57600080fd5b505af1158015610ed3573d6000803e3d6000fd5b505060019092019150610dba9050565b600087815260016020526040902060070154601790810b9086900b136110d6576005805460008981526001602081905260409182902093840154600685015494909101549151636664a95960e01b8152600481019190915260248101939093526001600160a01b0390811660448401521690636664a9599060640160408051808303816000875af1158015610f7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa0919061289f565b9250905060005b6000888152600160205260409020600c01548110156110d0576005546000898152600160205260409020600c0180546001600160a01b039092169163619aed9891859185908110610ffa57610ffa612889565b60009182526020808320909101548d835260028252604080842060019093528320600c0180546001600160a01b0390921693918890811061103d5761103d612889565b6000918252602080832091909101546001600160a01b039081168452908301939093526040918201902054905160e086901b6001600160e01b03191681526004810194909452911660248301526044820152606401600060405180830381600087803b1580156110ac57600080fd5b505af11580156110c0573d6000803e3d6000fd5b505060019092019150610fa79050565b50600192505b60008781526001602090815260409182902060038101879055600a810180546001600160c01b038a166001600160c01b0319909116179055600d01805460ff19166002179055815189815285151591810191909152601787900b9181019190915260608101859052608081018390527ff54d519c86119f7686ea36a599b9e7fedbec473aeaf3928ab410e6d88b56ffa29060a0015b60405180910390a150505050505b505050565b60006001600160e01b03198216637965db0b60e01b14806111af57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000818152600160205260408120600d015460ff1660028111156111db576111db61270c565b146111f85760405162461bcd60e51b81526004016103fc906127b8565b6000818152600160205260409020600281015460039182015442929161121d916128d9565b61122791906128ec565b600083815260016020526040902060020154611243919061290e565b116112905760405162461bcd60e51b815260206004820152601e60248201527f47616d6520697320636c6f73656420666f72206e657720706c6179657273000060448201526064016103fc565b6000818152600260209081526040808320338452909152902054156112f75760405162461bcd60e51b815260206004820152601b60248201527f596f752061726520616c726561647920696e207468652067616d65000000000060448201526064016103fc565b600554604051636e553f6560e01b8152600481018490523360248201526001600160a01b0390911690636e553f6590604401600060405180830381600087803b15801561134357600080fd5b505af1158015611357573d6000803e3d6000fd5b505050600082815260026020908152604080832033845290915290208390555082156113d15760008181526001602081815260408320600c810180549384018155845290832090910180546001600160a01b0319163317905582825260060180548492906113c690849061290e565b909155506114209050565b60008181526001602081815260408320600b810180549384018155845290832090910180546001600160a01b03191633179055828252600501805484929061141a90849061290e565b90915550505b6040805182815284151560208201529081018390523360608201527f8993f9d83fb7b79296de3541e38e3e6ed9e26e74fb5778902dfceae433c045e59060800160405180910390a1505050565b60008281526020819052604090206001015461148881612269565b6114928383612276565b50505050565b6001600160a01b03811633146114c15760405163334bd91960e11b815260040160405180910390fd5b6111798282612308565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152600160205260408120600d015460ff16600281111561151a5761151a61270c565b146115375760405162461bcd60e51b81526004016103fc906127b8565b6000828152600160205260409020600281015460039182015442929161155c916128d9565b61156691906128ec565b600084815260016020526040902060020154611582919061290e565b116115cf5760405162461bcd60e51b815260206004820152601e60248201527f47616d6520697320636c6f73656420666f72206e657720706c6179657273000060448201526064016103fc565b6000828152600260209081526040808320338452909152902054156116365760405162461bcd60e51b815260206004820152601b60248201527f596f752061726520616c726561647920696e207468652067616d65000000000060448201526064016103fc565b6005546001600160a01b03166350921b238433843561165b6040870160208801612921565b604080516001600160e01b031960e088901b16815260048101959095526001600160a01b039093166024850152604484019190915260ff1660648301528401356084820152606084013560a482015260c401600060405180830381600087803b1580156116c757600080fd5b505af11580156116db573d6000803e3d6000fd5b505050600083815260026020908152604080832033845290915290208490555083156117555760008281526001602081815260408320600c810180549384018155845290832090910180546001600160a01b03191633179055838252600601805485929061174a90849061290e565b909155506117a49050565b60008281526001602081815260408320600b810180549384018155845290832090910180546001600160a01b03191633179055838252600501805485929061179e90849061290e565b90915550505b6040805183815285151560208201529081018490523360608201527f8993f9d83fb7b79296de3541e38e3e6ed9e26e74fb5778902dfceae433c045e59060800160405180910390a150505050565b60008281526020819052604090206001015461180d81612269565b6114928383612308565b600061182281612269565b50600355600455565b600061183681612269565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b60035461186642876128d9565b10156118b45760405162461bcd60e51b815260206004820181905260248201527f4d696e2067616d65206475726174696f6e206d7573742062652068696768657260448201526064016103fc565b6004546118c142876128d9565b111561190f5760405162461bcd60e51b815260206004820152601f60248201527f4d61782067616d65206475726174696f6e206d757374206265206c6f7765720060448201526064016103fc565b6040805142602082015280820187905285821b60608201529084901b607882015260009060900160408051601f198184030181528282528051602091820120600081815260018084528482206101c08701865280548752908101546001600160a01b03168685015260028101548686015260038101546060870152600481015460ff1615156080870152600581015460a0870152600681015460c08701526007810154601790810b60e08801526008820154810b6101008801526009820154810b610120880152600a820154900b610140870152600b81018054865181870281018701909752808752939750919594909361016086019391929190830182828015611a4357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611a25575b50505050508152602001600c8201805480602002602001604051908101604052809291908181526020018280548015611aa557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611a87575b5050509183525050600d82015460209091019060ff166002811115611acc57611acc61270c565b6002811115611add57611add61270c565b815250509050600560009054906101000a90046001600160a01b03166001600160a01b0316632cf4704a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5a91906127df565b6001600160a01b031663b6a9b90985856040518363ffffffff1660e01b8152600401611b879291906127fc565b60408051808303816000875af1158015611ba5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc99190612851565b63ffffffff16604083015260170b6101208201528715611c4e578460170b81610120015160170b1380611c0657508560170b81610120015160170b125b611c495760405162461bcd60e51b815260206004820152601460248201527357726f6e67207470206f7220736c20707269636560601b60448201526064016103fc565b611cb4565b8460170b81610120015160170b1280611c7157508560170b81610120015160170b135b611cb45760405162461bcd60e51b815260206004820152601460248201527357726f6e67207470206f7220736c20707269636560601b60448201526064016103fc565b871515608082015233602082015260608101879052601785810b61010083015286900b60e082015260006101a0820181905250828152600082815260016020818152604092839020845181558185015192810180546001600160a01b0319166001600160a01b039094169390931790925591830151600282015560608301516003820155608083015160048201805460ff191691151591909117905560a0830151600582015560c0830151600682015560e08301516007820180546001600160c01b03199081166001600160c01b039384161790915561010085015160088401805483169184169190911790556101208501516009840180548316918416919091179055610140850151600a84018054909216921691909117905561016083015180518493611dea92600b8501929101906123b0565b506101808201518051611e0791600c8401916020909101906123b0565b506101a0820151600d8201805460ff19166001836002811115611e2c57611e2c61270c565b021790555050506040808201516101208084015183518681526020810188905293840192909252606083018a9052601791820b608084015288820b60a08401529087900b60c083015289151560e0830152336101008301527f82f8916c48a4f53180899c8e634c9cf94bc928cf943c436474c499cb740a14f3910161116b565b6000611eb781612269565b6000828152600160205260408120600201549003611f0c5760405162461bcd60e51b815260206004820152601260248201527111d85b5948191bd95cdb89dd08195e1a5cdd60721b60448201526064016103fc565b60008281526001602052604090206002810154600391820154429291611f31916128d9565b611f3b91906128ec565b600084815260016020526040902060020154611f57919061290e565b108015611f8c57506000828152600160205260409020600b01541580611f8c57506000828152600160205260409020600c0154155b80611fa7575060008281526001602052604090206003015442115b611fc35760405162461bcd60e51b81526004016103fc906127b8565b60005b6000838152600160205260409020600b01548110156120e057600554600084815260026020908152604080832060019092528220600b0180546001600160a01b0390941693637ad226dc9391908690811061202357612023612889565b60009182526020808320909101546001600160a01b03168352828101939093526040918201812054888252600190935220600b0180548590811061206957612069612889565b60009182526020909120015460405160e084901b6001600160e01b031916815260048101929092526001600160a01b03166024820152604401600060405180830381600087803b1580156120bc57600080fd5b505af11580156120d0573d6000803e3d6000fd5b505060019092019150611fc69050565b5060005b6000838152600160205260409020600c01548110156121fe57600554600084815260026020908152604080832060019092528220600c0180546001600160a01b0390941693637ad226dc9391908690811061214157612141612889565b60009182526020808320909101546001600160a01b03168352828101939093526040918201812054888252600190935220600c0180548590811061218757612187612889565b60009182526020909120015460405160e084901b6001600160e01b031916815260048101929092526001600160a01b03166024820152604401600060405180830381600087803b1580156121da57600080fd5b505af11580156121ee573d6000803e3d6000fd5b5050600190920191506120e49050565b50600082815260016020818152604092839020600d8101805460ff1916841790559091015482518581526001600160a01b03909116918101919091527f1bb2a2f27eacf65458312514d65e8198c0f3823a644f49b5a8a57b536cd5cf40910160405180910390a15050565b6122738133612373565b50565b600061228283836114cb565b612300576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556122b83390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016111af565b5060006111af565b600061231483836114cb565b15612300576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016111af565b61237d82826114cb565b6123ac5760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016103fc565b5050565b828054828255906000526020600020908101928215612405579160200282015b8281111561240557825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906123d0565b50612411929150612415565b5090565b5b808211156124115760008155600101612416565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261245157600080fd5b813567ffffffffffffffff8082111561246c5761246c61242a565b604051601f8301601f19908116603f011681019082821181831017156124945761249461242a565b816040528381528660208588010111156124ad57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156124e057600080fd5b823567ffffffffffffffff8111156124f757600080fd5b61250385828601612440565b95602094909401359450505050565b60006020828403121561252457600080fd5b81356001600160e01b03198116811461253c57600080fd5b9392505050565b8035801515811461255357600080fd5b919050565b60008060006060848603121561256d57600080fd5b61257684612543565b95602085013595506040909401359392505050565b60006020828403121561259d57600080fd5b5035919050565b6001600160a01b038116811461227357600080fd5b600080604083850312156125cc57600080fd5b8235915060208301356125de816125a4565b809150509250929050565b60008060008084860360e081121561260057600080fd5b61260986612543565b945060208601359350604086013592506080605f198201121561262b57600080fd5b509295919450926060019150565b6000806040838503121561264c57600080fd5b50508035926020909101359150565b60006020828403121561266d57600080fd5b813561253c816125a4565b8060170b811461227357600080fd5b60008060008060008060c087890312156126a057600080fd5b6126a987612543565b95506020870135945060408701356126c081612678565b935060608701356126d081612678565b9250608087013567ffffffffffffffff8111156126ec57600080fd5b6126f889828a01612440565b92505060a087013590509295509295509295565b634e487b7160e01b600052602160045260246000fd5b8c81526001600160a01b038c166020820152604081018b9052606081018a9052881515608082015260a0810188905260c08101879052601786810b60e083015285810b61010083015284810b61012083015283900b6101408201526101808101600383106127a057634e487b7160e01b600052602160045260246000fd5b826101608301529d9c50505050505050505050505050565b6020808252600d908201526c57726f6e67207374617475732160981b604082015260600190565b6000602082840312156127f157600080fd5b815161253c816125a4565b604081526000835180604084015260005b8181101561282a576020818701810151606086840101520161280d565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b6000806040838503121561286457600080fd5b825161286f81612678565b602084015190925063ffffffff811681146125de57600080fd5b634e487b7160e01b600052603260045260246000fd5b600080604083850312156128b257600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b818103818111156111af576111af6128c3565b60008261290957634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156111af576111af6128c3565b60006020828403121561293357600080fd5b813560ff8116811461253c57600080fdfea26469706673582212202607fe92ea59b717495785b52aad5c8e42b41cd5e612a3921bcdac752376006464736f6c63430008180033000000000000000000000000f5a90c6ec7894c4c2f58b93c3cda0a2b85164562
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c806391d14854116100ad578063f0f4426011610071578063f0f4426014610294578063f27f1642146102a7578063f579f882146102ba578063f6ccb8261461035b578063ff2d9a351461036e57600080fd5b806391d1485414610240578063a217fddf14610253578063ba22de821461025b578063d547741f1461026e578063ea8d53ef1461028157600080fd5b806336568abe116100f457806336568abe146101c557806356715761146101d857806361d027b3146101e15780636db5c8fd1461020c57806381d5f2181461021557600080fd5b806301648da91461013157806301ffc9a7146101465780631199cdd21461016e578063248a9ca3146101815780632f2ff15d146101b2575b600080fd5b61014461013f3660046124cd565b6103ae565b005b610159610154366004612512565b61117e565b60405190151581526020015b60405180910390f35b61014461017c366004612558565b6111b5565b6101a461018f36600461258b565b60009081526020819052604090206001015490565b604051908152602001610165565b6101446101c03660046125b9565b61146d565b6101446101d33660046125b9565b611498565b6101a460035481565b6005546101f4906001600160a01b031681565b6040516001600160a01b039091168152602001610165565b6101a460045481565b6101a46102233660046125b9565b600260209081526000928352604080842090915290825290205481565b61015961024e3660046125b9565b6114cb565b6101a4600081565b6101446102693660046125e9565b6114f4565b61014461027c3660046125b9565b6117f2565b61014461028f366004612639565b611817565b6101446102a236600461265b565b61182b565b6101446102b5366004612687565b611859565b6103436102c836600461258b565b600160208190526000918252604090912080549181015460028201546003830154600484015460058501546006860154600787015460088801546009890154600a8a0154600d909a01546001600160a01b03909916999798969760ff9687169795969495601794850b9593850b9492830b939190920b91168c565b6040516101659c9b9a99989796959493929190612722565b61014461036936600461258b565b611eac565b61039961037c36600461258b565b6000908152600160205260409020600b810154600c909101549091565b60408051928352602083019190915201610165565b60006103b981612269565b6000828152600160205260408120600d015460ff1660028111156103df576103df61270c565b146104055760405162461bcd60e51b81526004016103fc906127b8565b60405180910390fd5b600080600560009054906101000a90046001600160a01b03166001600160a01b0316632cf4704a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561045b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047f91906127df565b6000858152600160205260409081902054905163b6a9b90960e01b81526001600160a01b03929092169163b6a9b909916104be918991906004016127fc565b60408051808303816000875af11580156104dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105009190612851565b6000868152600160205260409020600b015491935063ffffffff169150158061053857506000848152600160205260409020600c0154155b156108055760005b6000858152600160205260409020600b015481101561065a57600554600086815260026020908152604080832060019092528220600b0180546001600160a01b0390941693637ad226dc9391908690811061059d5761059d612889565b60009182526020808320909101546001600160a01b031683528281019390935260409182018120548a8252600190935220600b018054859081106105e3576105e3612889565b60009182526020909120015460405160e084901b6001600160e01b031916815260048101929092526001600160a01b03166024820152604401600060405180830381600087803b15801561063657600080fd5b505af115801561064a573d6000803e3d6000fd5b5050600190920191506105409050565b5060005b6000858152600160205260409020600c015481101561077857600554600086815260026020908152604080832060019092528220600c0180546001600160a01b0390941693637ad226dc939190869081106106bb576106bb612889565b60009182526020808320909101546001600160a01b031683528281019390935260409182018120548a8252600190935220600c0180548590811061070157610701612889565b60009182526020909120015460405160e084901b6001600160e01b031916815260048101929092526001600160a01b03166024820152604401600060405180830381600087803b15801561075457600080fd5b505af1158015610768573d6000803e3d6000fd5b50506001909201915061065e9050565b50600084815260016020818152604092839020600d8101805460ff191684179055600a810180546001600160c01b0388166001600160c01b03199091161790559091015482518781526001600160a01b03909116918101919091527f1bb2a2f27eacf65458312514d65e8198c0f3823a644f49b5a8a57b536cd5cf40910160405180910390a15050505050565b6000848152600160205260408120600401548190819060ff1615610c8257600087815260016020526040902060080154601790810b9086900b1315806108645750600087815260016020526040902060070154601790810b9086900b12155b61089c5760405162461bcd60e51b815260206004820152600960248201526810d85b89dd08195b9960ba1b60448201526064016103fc565b600087815260016020526040902060070154601790810b9086900b12610a93576005805460008981526001602081905260409182902093840154600685015494909101549151636664a95960e01b8152600481019190915260248101939093526001600160a01b0390811660448401521690636664a9599060640160408051808303816000875af1158015610935573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610959919061289f565b9250905060005b6000888152600160205260409020600c0154811015610a89576005546000898152600160205260409020600c0180546001600160a01b039092169163619aed98918591859081106109b3576109b3612889565b60009182526020808320909101548d835260028252604080842060019093528320600c0180546001600160a01b039092169391889081106109f6576109f6612889565b6000918252602080832091909101546001600160a01b039081168452908301939093526040918201902054905160e086901b6001600160e01b03191681526004810194909452911660248301526044820152606401600060405180830381600087803b158015610a6557600080fd5b505af1158015610a79573d6000803e3d6000fd5b5050600190920191506109609050565b50600192506110d6565b600087815260016020526040902060080154601790810b9086900b13610c7d57600580546000898152600160208190526040918290206006810154948101549101549151636664a95960e01b8152600481019490945260248401526001600160a01b0390811660448401521690636664a9599060640160408051808303816000875af1158015610b27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4b919061289f565b9250905060005b6000888152600160205260409020600b0154811015610c7b576005546000898152600160205260409020600b0180546001600160a01b039092169163619aed9891859185908110610ba557610ba5612889565b60009182526020808320909101548d835260028252604080842060019093528320600b0180546001600160a01b03909216939188908110610be857610be8612889565b6000918252602080832091909101546001600160a01b039081168452908301939093526040918201902054905160e086901b6001600160e01b03191681526004810194909452911660248301526044820152606401600060405180830381600087803b158015610c5757600080fd5b505af1158015610c6b573d6000803e3d6000fd5b505060019092019150610b529050565b505b6110d6565b600087815260016020526040902060080154601790810b9086900b121580610cc35750600087815260016020526040902060070154601790810b9086900b13155b610cfb5760405162461bcd60e51b815260206004820152600960248201526810d85b89dd08195b9960ba1b60448201526064016103fc565b600087815260016020526040902060080154601790810b9086900b12610ee357600580546000898152600160208190526040918290206006810154948101549101549151636664a95960e01b8152600481019490945260248401526001600160a01b0390811660448401521690636664a9599060640160408051808303816000875af1158015610d8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db3919061289f565b9250905060005b6000888152600160205260409020600b0154811015610c7b576005546000898152600160205260409020600b0180546001600160a01b039092169163619aed9891859185908110610e0d57610e0d612889565b60009182526020808320909101548d835260028252604080842060019093528320600b0180546001600160a01b03909216939188908110610e5057610e50612889565b6000918252602080832091909101546001600160a01b039081168452908301939093526040918201902054905160e086901b6001600160e01b03191681526004810194909452911660248301526044820152606401600060405180830381600087803b158015610ebf57600080fd5b505af1158015610ed3573d6000803e3d6000fd5b505060019092019150610dba9050565b600087815260016020526040902060070154601790810b9086900b136110d6576005805460008981526001602081905260409182902093840154600685015494909101549151636664a95960e01b8152600481019190915260248101939093526001600160a01b0390811660448401521690636664a9599060640160408051808303816000875af1158015610f7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa0919061289f565b9250905060005b6000888152600160205260409020600c01548110156110d0576005546000898152600160205260409020600c0180546001600160a01b039092169163619aed9891859185908110610ffa57610ffa612889565b60009182526020808320909101548d835260028252604080842060019093528320600c0180546001600160a01b0390921693918890811061103d5761103d612889565b6000918252602080832091909101546001600160a01b039081168452908301939093526040918201902054905160e086901b6001600160e01b03191681526004810194909452911660248301526044820152606401600060405180830381600087803b1580156110ac57600080fd5b505af11580156110c0573d6000803e3d6000fd5b505060019092019150610fa79050565b50600192505b60008781526001602090815260409182902060038101879055600a810180546001600160c01b038a166001600160c01b0319909116179055600d01805460ff19166002179055815189815285151591810191909152601787900b9181019190915260608101859052608081018390527ff54d519c86119f7686ea36a599b9e7fedbec473aeaf3928ab410e6d88b56ffa29060a0015b60405180910390a150505050505b505050565b60006001600160e01b03198216637965db0b60e01b14806111af57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000818152600160205260408120600d015460ff1660028111156111db576111db61270c565b146111f85760405162461bcd60e51b81526004016103fc906127b8565b6000818152600160205260409020600281015460039182015442929161121d916128d9565b61122791906128ec565b600083815260016020526040902060020154611243919061290e565b116112905760405162461bcd60e51b815260206004820152601e60248201527f47616d6520697320636c6f73656420666f72206e657720706c6179657273000060448201526064016103fc565b6000818152600260209081526040808320338452909152902054156112f75760405162461bcd60e51b815260206004820152601b60248201527f596f752061726520616c726561647920696e207468652067616d65000000000060448201526064016103fc565b600554604051636e553f6560e01b8152600481018490523360248201526001600160a01b0390911690636e553f6590604401600060405180830381600087803b15801561134357600080fd5b505af1158015611357573d6000803e3d6000fd5b505050600082815260026020908152604080832033845290915290208390555082156113d15760008181526001602081815260408320600c810180549384018155845290832090910180546001600160a01b0319163317905582825260060180548492906113c690849061290e565b909155506114209050565b60008181526001602081815260408320600b810180549384018155845290832090910180546001600160a01b03191633179055828252600501805484929061141a90849061290e565b90915550505b6040805182815284151560208201529081018390523360608201527f8993f9d83fb7b79296de3541e38e3e6ed9e26e74fb5778902dfceae433c045e59060800160405180910390a1505050565b60008281526020819052604090206001015461148881612269565b6114928383612276565b50505050565b6001600160a01b03811633146114c15760405163334bd91960e11b815260040160405180910390fd5b6111798282612308565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152600160205260408120600d015460ff16600281111561151a5761151a61270c565b146115375760405162461bcd60e51b81526004016103fc906127b8565b6000828152600160205260409020600281015460039182015442929161155c916128d9565b61156691906128ec565b600084815260016020526040902060020154611582919061290e565b116115cf5760405162461bcd60e51b815260206004820152601e60248201527f47616d6520697320636c6f73656420666f72206e657720706c6179657273000060448201526064016103fc565b6000828152600260209081526040808320338452909152902054156116365760405162461bcd60e51b815260206004820152601b60248201527f596f752061726520616c726561647920696e207468652067616d65000000000060448201526064016103fc565b6005546001600160a01b03166350921b238433843561165b6040870160208801612921565b604080516001600160e01b031960e088901b16815260048101959095526001600160a01b039093166024850152604484019190915260ff1660648301528401356084820152606084013560a482015260c401600060405180830381600087803b1580156116c757600080fd5b505af11580156116db573d6000803e3d6000fd5b505050600083815260026020908152604080832033845290915290208490555083156117555760008281526001602081815260408320600c810180549384018155845290832090910180546001600160a01b03191633179055838252600601805485929061174a90849061290e565b909155506117a49050565b60008281526001602081815260408320600b810180549384018155845290832090910180546001600160a01b03191633179055838252600501805485929061179e90849061290e565b90915550505b6040805183815285151560208201529081018490523360608201527f8993f9d83fb7b79296de3541e38e3e6ed9e26e74fb5778902dfceae433c045e59060800160405180910390a150505050565b60008281526020819052604090206001015461180d81612269565b6114928383612308565b600061182281612269565b50600355600455565b600061183681612269565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b60035461186642876128d9565b10156118b45760405162461bcd60e51b815260206004820181905260248201527f4d696e2067616d65206475726174696f6e206d7573742062652068696768657260448201526064016103fc565b6004546118c142876128d9565b111561190f5760405162461bcd60e51b815260206004820152601f60248201527f4d61782067616d65206475726174696f6e206d757374206265206c6f7765720060448201526064016103fc565b6040805142602082015280820187905285821b60608201529084901b607882015260009060900160408051601f198184030181528282528051602091820120600081815260018084528482206101c08701865280548752908101546001600160a01b03168685015260028101548686015260038101546060870152600481015460ff1615156080870152600581015460a0870152600681015460c08701526007810154601790810b60e08801526008820154810b6101008801526009820154810b610120880152600a820154900b610140870152600b81018054865181870281018701909752808752939750919594909361016086019391929190830182828015611a4357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611a25575b50505050508152602001600c8201805480602002602001604051908101604052809291908181526020018280548015611aa557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611a87575b5050509183525050600d82015460209091019060ff166002811115611acc57611acc61270c565b6002811115611add57611add61270c565b815250509050600560009054906101000a90046001600160a01b03166001600160a01b0316632cf4704a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5a91906127df565b6001600160a01b031663b6a9b90985856040518363ffffffff1660e01b8152600401611b879291906127fc565b60408051808303816000875af1158015611ba5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc99190612851565b63ffffffff16604083015260170b6101208201528715611c4e578460170b81610120015160170b1380611c0657508560170b81610120015160170b125b611c495760405162461bcd60e51b815260206004820152601460248201527357726f6e67207470206f7220736c20707269636560601b60448201526064016103fc565b611cb4565b8460170b81610120015160170b1280611c7157508560170b81610120015160170b135b611cb45760405162461bcd60e51b815260206004820152601460248201527357726f6e67207470206f7220736c20707269636560601b60448201526064016103fc565b871515608082015233602082015260608101879052601785810b61010083015286900b60e082015260006101a0820181905250828152600082815260016020818152604092839020845181558185015192810180546001600160a01b0319166001600160a01b039094169390931790925591830151600282015560608301516003820155608083015160048201805460ff191691151591909117905560a0830151600582015560c0830151600682015560e08301516007820180546001600160c01b03199081166001600160c01b039384161790915561010085015160088401805483169184169190911790556101208501516009840180548316918416919091179055610140850151600a84018054909216921691909117905561016083015180518493611dea92600b8501929101906123b0565b506101808201518051611e0791600c8401916020909101906123b0565b506101a0820151600d8201805460ff19166001836002811115611e2c57611e2c61270c565b021790555050506040808201516101208084015183518681526020810188905293840192909252606083018a9052601791820b608084015288820b60a08401529087900b60c083015289151560e0830152336101008301527f82f8916c48a4f53180899c8e634c9cf94bc928cf943c436474c499cb740a14f3910161116b565b6000611eb781612269565b6000828152600160205260408120600201549003611f0c5760405162461bcd60e51b815260206004820152601260248201527111d85b5948191bd95cdb89dd08195e1a5cdd60721b60448201526064016103fc565b60008281526001602052604090206002810154600391820154429291611f31916128d9565b611f3b91906128ec565b600084815260016020526040902060020154611f57919061290e565b108015611f8c57506000828152600160205260409020600b01541580611f8c57506000828152600160205260409020600c0154155b80611fa7575060008281526001602052604090206003015442115b611fc35760405162461bcd60e51b81526004016103fc906127b8565b60005b6000838152600160205260409020600b01548110156120e057600554600084815260026020908152604080832060019092528220600b0180546001600160a01b0390941693637ad226dc9391908690811061202357612023612889565b60009182526020808320909101546001600160a01b03168352828101939093526040918201812054888252600190935220600b0180548590811061206957612069612889565b60009182526020909120015460405160e084901b6001600160e01b031916815260048101929092526001600160a01b03166024820152604401600060405180830381600087803b1580156120bc57600080fd5b505af11580156120d0573d6000803e3d6000fd5b505060019092019150611fc69050565b5060005b6000838152600160205260409020600c01548110156121fe57600554600084815260026020908152604080832060019092528220600c0180546001600160a01b0390941693637ad226dc9391908690811061214157612141612889565b60009182526020808320909101546001600160a01b03168352828101939093526040918201812054888252600190935220600c0180548590811061218757612187612889565b60009182526020909120015460405160e084901b6001600160e01b031916815260048101929092526001600160a01b03166024820152604401600060405180830381600087803b1580156121da57600080fd5b505af11580156121ee573d6000803e3d6000fd5b5050600190920191506120e49050565b50600082815260016020818152604092839020600d8101805460ff1916841790559091015482518581526001600160a01b03909116918101919091527f1bb2a2f27eacf65458312514d65e8198c0f3823a644f49b5a8a57b536cd5cf40910160405180910390a15050565b6122738133612373565b50565b600061228283836114cb565b612300576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556122b83390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016111af565b5060006111af565b600061231483836114cb565b15612300576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016111af565b61237d82826114cb565b6123ac5760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016103fc565b5050565b828054828255906000526020600020908101928215612405579160200282015b8281111561240557825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906123d0565b50612411929150612415565b5090565b5b808211156124115760008155600101612416565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261245157600080fd5b813567ffffffffffffffff8082111561246c5761246c61242a565b604051601f8301601f19908116603f011681019082821181831017156124945761249461242a565b816040528381528660208588010111156124ad57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156124e057600080fd5b823567ffffffffffffffff8111156124f757600080fd5b61250385828601612440565b95602094909401359450505050565b60006020828403121561252457600080fd5b81356001600160e01b03198116811461253c57600080fd5b9392505050565b8035801515811461255357600080fd5b919050565b60008060006060848603121561256d57600080fd5b61257684612543565b95602085013595506040909401359392505050565b60006020828403121561259d57600080fd5b5035919050565b6001600160a01b038116811461227357600080fd5b600080604083850312156125cc57600080fd5b8235915060208301356125de816125a4565b809150509250929050565b60008060008084860360e081121561260057600080fd5b61260986612543565b945060208601359350604086013592506080605f198201121561262b57600080fd5b509295919450926060019150565b6000806040838503121561264c57600080fd5b50508035926020909101359150565b60006020828403121561266d57600080fd5b813561253c816125a4565b8060170b811461227357600080fd5b60008060008060008060c087890312156126a057600080fd5b6126a987612543565b95506020870135945060408701356126c081612678565b935060608701356126d081612678565b9250608087013567ffffffffffffffff8111156126ec57600080fd5b6126f889828a01612440565b92505060a087013590509295509295509295565b634e487b7160e01b600052602160045260246000fd5b8c81526001600160a01b038c166020820152604081018b9052606081018a9052881515608082015260a0810188905260c08101879052601786810b60e083015285810b61010083015284810b61012083015283900b6101408201526101808101600383106127a057634e487b7160e01b600052602160045260246000fd5b826101608301529d9c50505050505050505050505050565b6020808252600d908201526c57726f6e67207374617475732160981b604082015260600190565b6000602082840312156127f157600080fd5b815161253c816125a4565b604081526000835180604084015260005b8181101561282a576020818701810151606086840101520161280d565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b6000806040838503121561286457600080fd5b825161286f81612678565b602084015190925063ffffffff811681146125de57600080fd5b634e487b7160e01b600052603260045260246000fd5b600080604083850312156128b257600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b818103818111156111af576111af6128c3565b60008261290957634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156111af576111af6128c3565b60006020828403121561293357600080fd5b813560ff8116811461253c57600080fdfea26469706673582212202607fe92ea59b717495785b52aad5c8e42b41cd5e612a3921bcdac752376006464736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f5a90c6ec7894c4c2f58b93c3cda0a2b85164562
-----Decoded View---------------
Arg [0] : newTreasury (address): 0xF5A90C6ec7894c4C2F58B93c3CdA0A2B85164562
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000f5a90c6ec7894c4c2f58b93c3cda0a2b85164562
Loading...
Loading
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.