Overview
APE Balance
APE Value
$0.23 (@ $0.61/APE)More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 329 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Execute Round | 10752969 | 2 hrs ago | IN | 0 APE | 0.00949447 | ||||
Execute Round | 10752914 | 2 hrs ago | IN | 0 APE | 0.00949447 | ||||
Execute Round | 10752848 | 2 hrs ago | IN | 0 APE | 0.00949447 | ||||
Execute Round | 10752803 | 2 hrs ago | IN | 0 APE | 0.00949444 | ||||
Execute Round | 10752748 | 2 hrs ago | IN | 0 APE | 0.00949447 | ||||
Execute Round | 10752689 | 2 hrs ago | IN | 0 APE | 0.00949447 | ||||
Execute Round | 10752634 | 2 hrs ago | IN | 0 APE | 0.00949447 | ||||
Execute Round | 10752592 | 2 hrs ago | IN | 0 APE | 0.00949447 | ||||
Execute Round | 10752535 | 2 hrs ago | IN | 0 APE | 0.00949447 | ||||
Execute Round | 10752498 | 2 hrs ago | IN | 0 APE | 0.00949378 | ||||
Execute Round | 10752461 | 2 hrs ago | IN | 0 APE | 0.00949378 | ||||
Execute Round | 10752414 | 2 hrs ago | IN | 0 APE | 0.00949447 | ||||
Execute Round | 10752380 | 2 hrs ago | IN | 0 APE | 0.00949447 | ||||
Execute Round | 10752348 | 2 hrs ago | IN | 0 APE | 0.00949378 | ||||
Execute Round | 10752292 | 2 hrs ago | IN | 0 APE | 0.00949447 | ||||
Execute Round | 10752241 | 2 hrs ago | IN | 0 APE | 0.00949378 | ||||
Execute Round | 10752198 | 2 hrs ago | IN | 0 APE | 0.00949378 | ||||
Execute Round | 10752155 | 2 hrs ago | IN | 0 APE | 0.00949378 | ||||
Execute Round | 10752111 | 2 hrs ago | IN | 0 APE | 0.00949378 | ||||
Execute Round | 10752055 | 2 hrs ago | IN | 0 APE | 0.00949378 | ||||
Execute Round | 10752003 | 2 hrs ago | IN | 0 APE | 0.00949378 | ||||
Execute Round | 10751960 | 2 hrs ago | IN | 0 APE | 0.00949378 | ||||
Execute Round | 10751916 | 2 hrs ago | IN | 0 APE | 0.00949447 | ||||
Execute Round | 10751881 | 3 hrs ago | IN | 0 APE | 0.00949378 | ||||
Execute Round | 10751835 | 3 hrs ago | IN | 0 APE | 0.00949378 |
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
10751047 | 3 hrs ago | 2.82 APE |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
ApePredictV2
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; /** * @title ApePredictV2 * @notice Prediction contract that allows users to bet on price movements */ contract ApePredictV2 is Ownable, Pausable, ReentrancyGuard { using SafeERC20 for IERC20; bool public genesisLockOnce = false; bool public genesisStartOnce = false; address public adminAddress; address public operatorAddress; uint256 public bufferSeconds; uint256 public intervalSeconds; uint256 public minBetAmount; uint256 public treasuryFee; uint256 public treasuryAmount; uint256 public currentEpoch; uint256 public constant MAX_TREASURY_FEE = 1000; // 10% mapping(uint256 => mapping(address => BetInfo)) public ledger; mapping(uint256 => Round) public rounds; mapping(address => uint256[]) public userRounds; enum Position { Bull, Bear } struct Round { uint256 epoch; uint256 startTimestamp; uint256 lockTimestamp; uint256 closeTimestamp; int256 lockPrice; int256 closePrice; string lockPriceId; // Reference ID for lock price string closePriceId; // Reference ID for close price uint256 totalAmount; uint256 bullAmount; uint256 bearAmount; uint256 rewardBaseCalAmount; uint256 rewardAmount; bool oracleCalled; // Round has been executed } struct BetInfo { Position position; uint256 amount; bool claimed; } event BetBear(address indexed sender, uint256 indexed epoch, uint256 amount); event BetBull(address indexed sender, uint256 indexed epoch, uint256 amount); event Claim(address indexed sender, uint256 indexed epoch, uint256 amount); event EndRound(uint256 indexed epoch, int256 price); event LockRound(uint256 indexed epoch, int256 price); event NewAdminAddress(address admin); event NewBufferAndIntervalSeconds(uint256 bufferSeconds, uint256 intervalSeconds); event NewMinBetAmount(uint256 indexed epoch, uint256 minBetAmount); event NewTreasuryFee(uint256 indexed epoch, uint256 treasuryFee); event NewOperatorAddress(address operator); event Pause(uint256 indexed epoch); event RewardsCalculated( uint256 indexed epoch, uint256 rewardBaseCalAmount, uint256 rewardAmount, uint256 treasuryAmount ); event StartRound(uint256 indexed epoch); event TokenRecovery(address indexed token, uint256 amount); event TreasuryClaim(uint256 amount); event Unpause(uint256 indexed epoch); modifier onlyAdmin() { require(msg.sender == adminAddress, "Not admin"); _; } modifier onlyAdminOrOperator() { require(msg.sender == adminAddress || msg.sender == operatorAddress, "Not operator/admin"); _; } modifier onlyOperator() { require(msg.sender == operatorAddress, "Not operator"); _; } modifier notContract() { require(!_isContract(msg.sender), "Contract not allowed"); require(msg.sender == tx.origin, "Proxy contract not allowed"); _; } constructor( address _adminAddress, address _operatorAddress, uint256 _intervalSeconds, uint256 _bufferSeconds, uint256 _minBetAmount, uint256 _treasuryFee ) { require(_treasuryFee <= MAX_TREASURY_FEE, "Treasury fee too high"); adminAddress = _adminAddress; operatorAddress = _operatorAddress; intervalSeconds = _intervalSeconds; bufferSeconds = _bufferSeconds; minBetAmount = _minBetAmount; treasuryFee = _treasuryFee; } function betBear(uint256 epoch) external payable whenNotPaused nonReentrant notContract { require(epoch == currentEpoch, "Bet is too early/late"); require(_bettable(epoch), "Round not bettable"); require(msg.value >= minBetAmount, "Bet amount must be greater than minBetAmount"); require(ledger[epoch][msg.sender].amount == 0, "Can only bet once per round"); uint256 amount = msg.value; Round storage round = rounds[epoch]; round.totalAmount = round.totalAmount + amount; round.bearAmount = round.bearAmount + amount; BetInfo storage betInfo = ledger[epoch][msg.sender]; betInfo.position = Position.Bear; betInfo.amount = amount; userRounds[msg.sender].push(epoch); emit BetBear(msg.sender, epoch, amount); } function betBull(uint256 epoch) external payable whenNotPaused nonReentrant notContract { require(epoch == currentEpoch, "Bet is too early/late"); require(_bettable(epoch), "Round not bettable"); require(msg.value >= minBetAmount, "Bet amount must be greater than minBetAmount"); require(ledger[epoch][msg.sender].amount == 0, "Can only bet once per round"); uint256 amount = msg.value; Round storage round = rounds[epoch]; round.totalAmount = round.totalAmount + amount; round.bullAmount = round.bullAmount + amount; BetInfo storage betInfo = ledger[epoch][msg.sender]; betInfo.position = Position.Bull; betInfo.amount = amount; userRounds[msg.sender].push(epoch); emit BetBull(msg.sender, epoch, amount); } function claim(uint256[] calldata epochs) external nonReentrant notContract { uint256 reward; // Initializes reward for (uint256 i = 0; i < epochs.length; i++) { require(rounds[epochs[i]].startTimestamp != 0, "Round has not started"); require(block.timestamp > rounds[epochs[i]].closeTimestamp, "Round has not ended"); uint256 addedReward = 0; // Round valid, claim rewards if (rounds[epochs[i]].oracleCalled) { require(claimable(epochs[i], msg.sender), "Not eligible for claim"); Round memory round = rounds[epochs[i]]; addedReward = (ledger[epochs[i]][msg.sender].amount * round.rewardAmount) / round.rewardBaseCalAmount; } // Round invalid, refund bet amount else { require(refundable(epochs[i], msg.sender), "Not eligible for refund"); addedReward = ledger[epochs[i]][msg.sender].amount; } ledger[epochs[i]][msg.sender].claimed = true; reward += addedReward; emit Claim(msg.sender, epochs[i], addedReward); } if (reward > 0) { _safeTransferBNB(address(msg.sender), reward); } } function executeRound( int256 currentPrice, string calldata priceId ) external whenNotPaused onlyOperator { require( genesisStartOnce && genesisLockOnce, "Can only run after genesisStartRound and genesisLockRound is triggered" ); // CurrentEpoch refers to previous round (n-1) _safeLockRound(currentEpoch, currentPrice, priceId); _safeEndRound(currentEpoch - 1, currentPrice, priceId); _calculateRewards(currentEpoch - 1); // Increment currentEpoch to current round (n) currentEpoch = currentEpoch + 1; _safeStartRound(currentEpoch); } function genesisLockRound( int256 currentPrice, string calldata priceId ) external whenNotPaused onlyOperator { require(genesisStartOnce, "Can only run after genesisStartRound is triggered"); require(!genesisLockOnce, "Can only run genesisLockRound once"); _safeLockRound(currentEpoch, currentPrice, priceId); currentEpoch = currentEpoch + 1; _startRound(currentEpoch); genesisLockOnce = true; } function genesisStartRound() external whenNotPaused onlyOperator { require(!genesisStartOnce, "Can only run genesisStartRound once"); currentEpoch = currentEpoch + 1; _startRound(currentEpoch); genesisStartOnce = true; } function pause() external whenNotPaused onlyAdminOrOperator { _pause(); emit Pause(currentEpoch); } function unpause() external whenPaused onlyAdminOrOperator { genesisStartOnce = false; genesisLockOnce = false; _unpause(); emit Unpause(currentEpoch); } function claimTreasury() external nonReentrant onlyAdmin { uint256 currentTreasuryAmount = treasuryAmount; treasuryAmount = 0; _safeTransferBNB(adminAddress, currentTreasuryAmount); emit TreasuryClaim(currentTreasuryAmount); } function setBufferAndIntervalSeconds(uint256 _bufferSeconds, uint256 _intervalSeconds) external whenPaused onlyAdmin { require(_bufferSeconds < _intervalSeconds, "bufferSeconds must be inferior to intervalSeconds"); bufferSeconds = _bufferSeconds; intervalSeconds = _intervalSeconds; emit NewBufferAndIntervalSeconds(_bufferSeconds, _intervalSeconds); } function setMinBetAmount(uint256 _minBetAmount) external whenPaused onlyAdmin { require(_minBetAmount != 0, "Must be superior to 0"); minBetAmount = _minBetAmount; emit NewMinBetAmount(currentEpoch, minBetAmount); } function setOperator(address _operatorAddress) external onlyAdmin { require(_operatorAddress != address(0), "Cannot be zero address"); operatorAddress = _operatorAddress; emit NewOperatorAddress(_operatorAddress); } function setTreasuryFee(uint256 _treasuryFee) external whenPaused onlyAdmin { require(_treasuryFee <= MAX_TREASURY_FEE, "Treasury fee too high"); treasuryFee = _treasuryFee; emit NewTreasuryFee(currentEpoch, treasuryFee); } function recoverToken(address _token, uint256 _amount) external onlyOwner { IERC20(_token).safeTransfer(address(msg.sender), _amount); emit TokenRecovery(_token, _amount); } function setAdmin(address _adminAddress) external onlyOwner { require(_adminAddress != address(0), "Cannot be zero address"); adminAddress = _adminAddress; emit NewAdminAddress(_adminAddress); } function getUserRounds( address user, uint256 cursor, uint256 size ) external view returns ( uint256[] memory, BetInfo[] memory, uint256 ) { uint256 length = size; if (length > userRounds[user].length - cursor) { length = userRounds[user].length - cursor; } uint256[] memory values = new uint256[](length); BetInfo[] memory betInfo = new BetInfo[](length); for (uint256 i = 0; i < length; i++) { values[i] = userRounds[user][cursor + i]; betInfo[i] = ledger[values[i]][user]; } return (values, betInfo, cursor + length); } function getUserRoundsLength(address user) external view returns (uint256) { return userRounds[user].length; } function claimable(uint256 epoch, address user) public view returns (bool) { BetInfo memory betInfo = ledger[epoch][user]; Round memory round = rounds[epoch]; if (round.lockPrice == round.closePrice) { return false; } return round.oracleCalled && betInfo.amount != 0 && !betInfo.claimed && ((round.closePrice > round.lockPrice && betInfo.position == Position.Bull) || (round.closePrice < round.lockPrice && betInfo.position == Position.Bear)); } function refundable(uint256 epoch, address user) public view returns (bool) { BetInfo memory betInfo = ledger[epoch][user]; Round memory round = rounds[epoch]; return !round.oracleCalled && !betInfo.claimed && block.timestamp > round.closeTimestamp + bufferSeconds && betInfo.amount != 0; } function _calculateRewards(uint256 epoch) internal { require(rounds[epoch].rewardBaseCalAmount == 0 && rounds[epoch].rewardAmount == 0, "Rewards calculated"); Round storage round = rounds[epoch]; uint256 rewardBaseCalAmount; uint256 treasuryAmt; uint256 rewardAmount; // Bull wins if (round.closePrice > round.lockPrice) { rewardBaseCalAmount = round.bullAmount; treasuryAmt = (round.totalAmount * treasuryFee) / 10000; rewardAmount = round.totalAmount - treasuryAmt; } // Bear wins else if (round.closePrice < round.lockPrice) { rewardBaseCalAmount = round.bearAmount; treasuryAmt = (round.totalAmount * treasuryFee) / 10000; rewardAmount = round.totalAmount - treasuryAmt; } // House wins else { rewardBaseCalAmount = 0; rewardAmount = 0; treasuryAmt = round.totalAmount; } round.rewardBaseCalAmount = rewardBaseCalAmount; round.rewardAmount = rewardAmount; // Add to treasury treasuryAmount += treasuryAmt; emit RewardsCalculated(epoch, rewardBaseCalAmount, rewardAmount, treasuryAmt); } function _safeEndRound( uint256 epoch, int256 price, string calldata priceId ) internal { Round storage round = rounds[epoch]; require(round.lockTimestamp != 0, "Can only end round after round has locked"); require(round.lockPrice != 0, "Round not locked"); require(!round.oracleCalled, "Round already ended"); require(block.timestamp >= round.closeTimestamp, "Can only end round after closeTimestamp"); // Extend buffer if needed if (block.timestamp > round.closeTimestamp + bufferSeconds) { round.closeTimestamp = block.timestamp; } round.closePrice = price; round.closePriceId = priceId; round.oracleCalled = true; emit EndRound(epoch, round.closePrice); } function _safeLockRound( uint256 epoch, int256 price, string calldata priceId ) internal { Round storage round = rounds[epoch]; require(round.startTimestamp != 0, "Can only lock round after round has started"); require(block.timestamp >= round.lockTimestamp, "Can only lock round after lockTimestamp"); require(round.lockPrice == 0, "Round already locked"); // Update timestamps if we're past the buffer if (block.timestamp > round.lockTimestamp + bufferSeconds) { round.lockTimestamp = block.timestamp; round.closeTimestamp = block.timestamp + intervalSeconds; } else { round.closeTimestamp = round.lockTimestamp + intervalSeconds; } round.lockPrice = price; round.lockPriceId = priceId; emit LockRound(epoch, round.lockPrice); } function _safeStartRound(uint256 epoch) internal { require(genesisStartOnce, "Can only run after genesisStartRound is triggered"); require(rounds[epoch - 2].closeTimestamp != 0, "Can only start round after round n-2 has ended"); require( block.timestamp >= rounds[epoch - 2].closeTimestamp, "Can only start new round after round n-2 closeTimestamp" ); _startRound(epoch); } function _safeTransferBNB(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(""); require(success, "TransferHelper: BNB_TRANSFER_FAILED"); } function _startRound(uint256 epoch) internal { Round storage round = rounds[epoch]; round.startTimestamp = block.timestamp; round.lockTimestamp = block.timestamp + intervalSeconds; round.closeTimestamp = block.timestamp + (2 * intervalSeconds); round.epoch = epoch; round.totalAmount = 0; emit StartRound(epoch); } function _bettable(uint256 epoch) internal view returns (bool) { return rounds[epoch].startTimestamp != 0 && rounds[epoch].lockTimestamp != 0 && block.timestamp > rounds[epoch].startTimestamp && block.timestamp < rounds[epoch].lockTimestamp; } function _isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. 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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @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 amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "viaIR": true, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_adminAddress","type":"address"},{"internalType":"address","name":"_operatorAddress","type":"address"},{"internalType":"uint256","name":"_intervalSeconds","type":"uint256"},{"internalType":"uint256","name":"_bufferSeconds","type":"uint256"},{"internalType":"uint256","name":"_minBetAmount","type":"uint256"},{"internalType":"uint256","name":"_treasuryFee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BetBear","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BetBull","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"int256","name":"price","type":"int256"}],"name":"EndRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"int256","name":"price","type":"int256"}],"name":"LockRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"admin","type":"address"}],"name":"NewAdminAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bufferSeconds","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"intervalSeconds","type":"uint256"}],"name":"NewBufferAndIntervalSeconds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minBetAmount","type":"uint256"}],"name":"NewMinBetAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"}],"name":"NewOperatorAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"treasuryFee","type":"uint256"}],"name":"NewTreasuryFee","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":"epoch","type":"uint256"}],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardBaseCalAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"treasuryAmount","type":"uint256"}],"name":"RewardsCalculated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"StartRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenRecovery","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TreasuryClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"MAX_TREASURY_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adminAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"betBear","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"betBull","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"bufferSeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"epochs","type":"uint256[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"claimable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"currentPrice","type":"int256"},{"internalType":"string","name":"priceId","type":"string"}],"name":"executeRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"genesisLockOnce","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"currentPrice","type":"int256"},{"internalType":"string","name":"priceId","type":"string"}],"name":"genesisLockRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"genesisStartOnce","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"genesisStartRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"getUserRounds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"components":[{"internalType":"enum ApePredictV2.Position","name":"position","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"claimed","type":"bool"}],"internalType":"struct ApePredictV2.BetInfo[]","name":"","type":"tuple[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserRoundsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"intervalSeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"ledger","outputs":[{"internalType":"enum ApePredictV2.Position","name":"position","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"claimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBetAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"refundable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rounds","outputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"lockTimestamp","type":"uint256"},{"internalType":"uint256","name":"closeTimestamp","type":"uint256"},{"internalType":"int256","name":"lockPrice","type":"int256"},{"internalType":"int256","name":"closePrice","type":"int256"},{"internalType":"string","name":"lockPriceId","type":"string"},{"internalType":"string","name":"closePriceId","type":"string"},{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"bullAmount","type":"uint256"},{"internalType":"uint256","name":"bearAmount","type":"uint256"},{"internalType":"uint256","name":"rewardBaseCalAmount","type":"uint256"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"internalType":"bool","name":"oracleCalled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_adminAddress","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bufferSeconds","type":"uint256"},{"internalType":"uint256","name":"_intervalSeconds","type":"uint256"}],"name":"setBufferAndIntervalSeconds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minBetAmount","type":"uint256"}],"name":"setMinBetAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operatorAddress","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_treasuryFee","type":"uint256"}],"name":"setTreasuryFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userRounds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60803461016757601f612f7b38819003918201601f19168301916001600160401b0383118484101761016c5780849260c0946040528339810103126101675761004781610182565b9061005460208201610182565b604082015160608301519160a060808501519401519460005490604051913360018060a01b0382167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a36001600160a81b0319163360ff60a01b19161760005560018055600254916103e8881161012557506001600160b01b031990911660109190911b62010000600160b01b031617600255600380546001600160a01b0319166001600160a01b0392909216919091179055600555600455600655600755604051612de490816101978239f35b62461bcd60e51b815260206004820152601560248201527f54726561737572792066656520746f6f206869676800000000000000000000006044820152606490fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036101675756fe6080604052600436101561001257600080fd5b60003560e01c80623bdc7414611dd95780630f74174f14611db6578063127effb214611d8d578063273867d414611d535780632f94621c14611c89578063368acb0914611c6b5780633f4ba83a14611baa578063452fd75a14611af257806357fb096f146119d45780635c975abb146119ae5780636ba4c138146115a55780636c188593146114fa578063704b6c0214611470578063715018a6146114175780637285c58b146113ab578063766718081461138d57806377e741c7146112df5780637bf41254146112b95780637d1cd04f1461129b5780638456cb59146111d9578063890dc766146111015780638c65c81f1461100d5780638da5cb5b14610fe4578063951fd60014610d77578063a0c7f71c14610d47578063aa6b873a14610c22578063b29a814014610ab9578063b3ab15fb14610a36578063cc32d17614610a18578063dd1f7596146109bf578063eaba2361146109a1578063f2b3c80914610984578063f2fde38b146108bd578063f7fdec2814610897578063fa968eea14610879578063fc6f94681461084c5763fcf701c3146101b257600080fd5b34610847576101c036611e7c565b6101cb92919261286b565b6101e060018060a01b036003541633146120bd565b60025460ff8160081c16908161083c575b50156107c2576102058184846009546128b2565b6009546000198101939084116104fe5783600052600b60205260406000209160028301541561076b5760048301541561073357600d83019260ff8454166106f85760038101908154918242106106a3576102646007936004549061215e565b421161069a575b5060058101958655019167ffffffffffffffff82116106845761028e8354611edd565b601f811161063c575b50600090601f83116001146105b25791807fcee1a52460a80134ed9fbda5e300b8aecaf44ba60b7fe91a80a3fef96d5c5b7a969492602096946000926105a7575b50508160011b916000199060031b1c19161790555b805460ff1916600117905554604051908152a260095460001981019081116104fe5780600052600b602052600b60406000200154158061058e575b156105545780600052600b6020527f6dfdfcb09c8804d0058826cd2539f1acfbe3cb887c9be03d928035bce0f1a58d606060406000206000600582015460048301549081811360001461051457505050600981015490600c6008820154916103a0612710610398600754866123b7565b04809461256a565b9182915b85600b82015501556103b88260085461215e565b60085560405192835260208301526040820152a260095460018101908181116104fe57816009556103f060ff60025460081c166120f8565b60001901908082116104fe5781600052600b602052600360406000200154156104a2576000918252600b602052600360408320015442106104375761043490612b78565b80f35b60405162461bcd60e51b815260206004820152603760248201527f43616e206f6e6c79207374617274206e657720726f756e64206166746572207260448201527f6f756e64206e2d3220636c6f736554696d657374616d700000000000000000006064820152608490fd5b60405162461bcd60e51b815260206004820152602e60248201527f43616e206f6e6c7920737461727420726f756e6420616674657220726f756e6460448201526d081b8b4c881a185cc8195b99195960921b6064820152608490fd5b634e487b7160e01b600052601160045260246000fd5b12156105435750600a81015490600c60088201549161053b612710610398600754866123b7565b9182916103a4565b90600080600c6008840154936103a4565b60405162461bcd60e51b815260206004820152601260248201527114995dd85c991cc818d85b18dd5b185d195960721b6044820152606490fd5b5080600052600b602052600c6040600020015415610328565b0135905038806102d8565b8382526020822091601f198416815b8181106106245750926001928592602098967fcee1a52460a80134ed9fbda5e300b8aecaf44ba60b7fe91a80a3fef96d5c5b7a9a98961061060a575b505050811b0190556102ed565b0135600019600384901b60f8161c191690553880806105fd565b919360206001819287870135815501950192016105c1565b836000526020600020601f840160051c8101916020851061067a575b601f0160051c01905b81811061066e5750610297565b60008155600101610661565b9091508190610658565b634e487b7160e01b600052604160045260246000fd5b4290553861026b565b60405162461bcd60e51b815260206004820152602760248201527f43616e206f6e6c7920656e6420726f756e6420616674657220636c6f7365546960448201526606d657374616d760cc1b6064820152608490fd5b60405162461bcd60e51b8152602060048201526013602482015272149bdd5b9908185b1c9958591e48195b991959606a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd081b1bd8dad95960821b6044820152606490fd5b60405162461bcd60e51b815260206004820152602960248201527f43616e206f6e6c7920656e6420726f756e6420616674657220726f756e642068604482015268185cc81b1bd8dad95960ba1b6064820152608490fd5b60405162461bcd60e51b815260206004820152604660248201527f43616e206f6e6c792072756e2061667465722067656e6573697353746172745260448201527f6f756e6420616e642067656e657369734c6f636b526f756e642069732074726960648201526519d9d95c995960d21b608482015260a490fd5b60ff915016386101f1565b600080fd5b346108475760003660031901126108475760025460405160109190911c6001600160a01b03168152602090f35b34610847576000366003190112610847576020600654604051908152f35b3461084757600036600319011261084757602060ff60025460081c166040519015158152f35b34610847576020366003190112610847576108d6611e50565b6108de612cb9565b6001600160a01b0316801561093057600080546001600160a01b03198116831782556001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b346108475760003660031901126108475760206040516103e88152f35b34610847576000366003190112610847576020600454604051908152f35b34610847576040366003190112610847576109d8611e50565b6001600160a01b03166000908152600c602052604090208054602435919082101561084757602091610a0991612057565b90549060031b1c604051908152f35b34610847576000366003190112610847576020600754604051908152f35b34610847576020366003190112610847577fc47d127c07bdd56c5ccba00463ce3bd3c1bca71b4670eea6e5d0c02e4aa156e26020610a72611e50565b610a8a60018060a01b0360025460101c163314612085565b6001600160a01b0316610a9e8115156123ca565b600380546001600160a01b03191682179055604051908152a1005b3461084757604036600319011261084757610ad2611e50565b60243590610ade612cb9565b60018060a01b031690604051610b69602082019163a9059cbb60e01b835233602482015283604482015260448152610b17606482611f50565b600080604094855193610b2a8786611f50565b602085527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020860152519082895af1610b626127c1565b9086612d11565b8051908115918215610bff575b505015610ba9577f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e989160209151908152a2005b5162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b819250906020918101031261084757602001518015158103610847578480610b76565b602036600319011261084757600435610c3961286b565b610c4161276b565b610c4c333b156121ac565b610c573233146121ef565b610c64600954821461223b565b610c75610c7082612c3f565b61227f565b610c836006543410156122c0565b6000818152600a60209081526040808320338452909152902060010154610caa9015612321565b80600052600b602052600a604060002060088101610cc934825461215e565b905501610cd734825461215e565b90556000818152600a602090815260408083203384528252808320805460ff19166001908117825534910155600c9091529020610d1590829061236d565b6040513481527f0d8c1fe3e67ab767116a81f122b83c2557a8c2564019cb7c4f83de1aeb1f1f0d60203392a360018055005b34610847576040366003190112610847576020610d6d610d65611e66565b6004356125a3565b6040519015158152f35b3461084757606036600319011261084757610d90611e50565b6001600160a01b03166000818152600c60205260409020546024359160443591610dbb90849061256a565b8211610fc4575b610dcb82612577565b91610dd96040519384611f50565b808352610de581612577565b602084019490601f1901368637610dfb82612577565b92610e096040519485611f50565b828452601f19610e1884612577565b0160005b818110610f9857505060005b838110610ed757505090610e3b9161215e565b604051926060840190606085525180915260808401949060005b818110610ec15750505082840360208401526020808351958681520192016000945b808610610e8c57505082935060408301520390f35b90926020606060019260408751610ea4838251611ed0565b848101518584015201511515604082015201940195019490610e77565b8251875260209687019690920191600101610e55565b81600052600c602052610ef86040600020610ef2838661215e565b90612057565b90549060031b1c610f09828861258f565b52610f14818761258f565b51600052600a6020526040806000206000908482526020522090604051610f3a81611f34565b60ff835416926002841015610f8257600260ff91600195845285810154602085015201541615156040820152610f70828861258f565b52610f7b818761258f565b5001610e28565b634e487b7160e01b600052602160045260246000fd5b602090604051610fa781611f34565b600081526000838201526000604082015282828901015201610e1c565b809150600052600c602052610fde8260406000205461256a565b90610dc2565b34610847576000366003190112610847576000546040516001600160a01b039091168152602090f35b3461084757602036600319011261084757600435600052600b6020526040600020805460018201549160028101546003820154916004810154926005820154936006830161105a90611f72565b9461106760078501611f72565b600885015496600986015492600a87015494600b88015496600c89015498600d015460ff16996040519d8e809e81526020015260408d015260608c015260808b015260a08a015260c089016101c090526101c089016110c591612016565b88810360e08a01526110d691612016565b9561010088015261012087015261014086015261016085015261018084015215156101a08301520390f35b3461084757604036600319011261084757600435602435611120612bf3565b61113860018060a01b0360025460101c163314612085565b8082101561117a57816040917fe60149e0431fec12df63dfab5fce2a9cefe9a4d3df5f41cb626f579ae1f2b91a936004558060055582519182526020820152a1005b60405162461bcd60e51b815260206004820152603160248201527f6275666665725365636f6e6473206d75737420626520696e666572696f7220746044820152706f20696e74657276616c5365636f6e647360781b6064820152608490fd5b34610847576000366003190112610847576111f261286b565b6002543360109190911c6001600160a01b0316148015611287575b6112169061216b565b61121e61286b565b6000805460ff60a01b1916600160a01b1790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602090a16009547f68b095021b1f40fe513109f513c66692f0b3219aee674a69f4efc57badb8201d600080a2005b506003546001600160a01b0316331461120d565b34610847576000366003190112610847576020600554604051908152f35b34610847576040366003190112610847576020610d6d6112d7611e66565b60043561240f565b34610847576020366003190112610847576004356112fb612bf3565b61131360018060a01b0360025460101c163314612085565b6103e8811161135057806007557fb1c4ee38d35556741133da7ff9b6f7ab0fa88d0406133126ff128f635490a857602060095492604051908152a2005b60405162461bcd60e51b81526020600482015260156024820152740a8e4cac2e6eae4f240cccaca40e8dede40d0d2ced605b1b6044820152606490fd5b34610847576000366003190112610847576020600954604051908152f35b3461084757604036600319011261084757606060406113c8611e66565b600435600052600a6020528160002060009160018060a01b031682526020522060ff8154169060ff6002600183015492015416906114096040518094611ed0565b602083015215156040820152f35b3461084757600036600319011261084757611430612cb9565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610847576020366003190112610847577f137b621413925496477d46e5055ac0d56178bdd724ba8bf843afceef18268ba360206114ac611e50565b6114b4612cb9565b6001600160a01b038116906114ca8215156123ca565b6002805462010000600160b01b03191660109290921b62010000600160b01b0316919091179055604051908152a1005b3461084757602036600319011261084757600435611516612bf3565b61152e60018060a01b0360025460101c163314612085565b801561156857806006557f90eb87c560a0213754ceb3a7fa3012f01acab0a35602c1e1995adf69dabc9d50602060095492604051908152a2005b60405162461bcd60e51b815260206004820152601560248201527404d757374206265207375706572696f7220746f203605c1b6044820152606490fd5b346108475760203660031901126108475760043567ffffffffffffffff8111610847573660238201121561084757806004013567ffffffffffffffff8111610847576024820191602436918360051b0101116108475761160361276b565b61160e333b156121ac565b6116193233146121ef565b6000913390835b838110611644578480611634575b60018055005b61163e9033612801565b8061162e565b61164f8185846123a7565b35600052600b60205260016040600020015415611971576116718185846123a7565b35600052600b6020526003604060002001544211156119365760006116978286856123a7565b358152600b60205260408120600d015460ff16156118a757506116c5336116bf8387866123a7565b356125a3565b15611869576116d58185846123a7565b35600052600b60205260406000206117c7604051916116f383611f17565b8054835260018101546020840152600281015460408401526003810154606084015260048101546080840152600581015460a084015261173560068201611f72565b60c084015261174660078201611f72565b60e084015260088101546101008401526009810154610120840152600a810154610140840152600b8101549261016081019384526101a060ff600d600c85015494610180850195865201541615159101526117a28488876123a7565b35600052600a60205260016040806000206000908982526020522001549051906123b7565b90519060008215611855575060019291611815910480975b6117ea8489886123a7565b35600052600a60205260026040806000206000908a825260205220018560ff1982541617905561215e565b956118218287866123a7565b35906040519081527f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf760203392a301611620565b634e487b7160e01b81526012600452602490fd5b60405162461bcd60e51b81526020600482015260166024820152754e6f7420656c696769626c6520666f7220636c61696d60501b6044820152606490fd5b906118bd336118b78388876123a7565b3561240f565b156118f1576118156001604081946118d6858a896123a7565b358152600a60205281812088825260205220015480976117df565b60405162461bcd60e51b815260206004820152601760248201527f4e6f7420656c696769626c6520666f7220726566756e640000000000000000006044820152606490fd5b60405162461bcd60e51b8152602060048201526013602482015272149bdd5b99081a185cc81b9bdd08195b991959606a1b6044820152606490fd5b60405162461bcd60e51b8152602060048201526015602482015274149bdd5b99081a185cc81b9bdd081cdd185c9d1959605a1b6044820152606490fd5b3461084757600036600319011261084757602060ff60005460a01c166040519015158152f35b6020366003190112610847576004356119eb61286b565b6119f361276b565b6119fe333b156121ac565b611a093233146121ef565b611a16600954821461223b565b611a22610c7082612c3f565b611a306006543410156122c0565b6000818152600a60209081526040808320338452909152902060010154611a579015612321565b80600052600b6020526009604060002060088101611a7634825461215e565b905501611a8434825461215e565b90556000818152600a602090815260408083203384528252808320805460ff1916815534600190910155600c9091529020611ac090829061236d565b6040513481527f438122d8cff518d18388099a5181f0d17a12b4f1b55faedf6e4a6acee0060c1260203392a360018055005b3461084757600036600319011261084757611b0b61286b565b611b2060018060a01b036003541633146120bd565b60ff60025460081c16611b5957600954600181018091116104fe5780611b4891600955612b78565b6002805461ff001916610100179055005b60405162461bcd60e51b815260206004820152602360248201527f43616e206f6e6c792072756e2067656e657369735374617274526f756e64206f6044820152626e636560e81b6064820152608490fd5b3461084757600036600319011261084757611bc3612bf3565b60025433601082901c6001600160a01b0316148015611c57575b611be69061216b565b61ffff1916600255611bf6612bf3565b60ff60a01b19600054166000557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a16009547faaa520fdd7d2c83061d632fa017b0432407e798818af63ea908589fceda39ab7600080a2005b506003546001600160a01b03163314611bdd565b34610847576000366003190112610847576020600854604051908152f35b3461084757611c9736611e7c565b90611ca061286b565b611cb560018060a01b036003541633146120bd565b60ff600254611cc8828260081c166120f8565b16611d0357611cd9926009546128b2565b600954600181018091116104fe5780611cf491600955612b78565b6002805460ff19166001179055005b60405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792072756e2067656e657369734c6f636b526f756e64206f6e604482015261636560f01b6064820152608490fd5b34610847576020366003190112610847576001600160a01b03611d74611e50565b16600052600c6020526020604060002054604051908152f35b34610847576000366003190112610847576003546040516001600160a01b039091168152602090f35b3461084757600036600319011261084757602060ff600254166040519015158152f35b3461084757600036600319011261084757611df261276b565b6002547fb9197c6b8e21274bd1e2d9c956a88af5cfee510f630fab3f046300f88b4223619060209060101c6001600160a01b0316611e31338214612085565b611e4360085480926000600855612801565b604051908152a160018055005b600435906001600160a01b038216820361084757565b602435906001600160a01b038216820361084757565b6040600319820112610847576004359160243567ffffffffffffffff811161084757826023820112156108475780600401359267ffffffffffffffff84116108475760248483010111610847576024019190565b906002821015610f825752565b90600182811c92168015611f0d575b6020831014611ef757565b634e487b7160e01b600052602260045260246000fd5b91607f1691611eec565b6101c0810190811067ffffffffffffffff82111761068457604052565b6060810190811067ffffffffffffffff82111761068457604052565b90601f8019910116810190811067ffffffffffffffff82111761068457604052565b9060405191826000825492611f8684611edd565b8084529360018116908115611ff45750600114611fad575b50611fab92500383611f50565b565b90506000929192526020600020906000915b818310611fd8575050906020611fab9282010138611f9e565b6020919350806001915483858901015201910190918492611fbf565b905060209250611fab94915060ff191682840152151560051b82010138611f9e565b919082519283825260005b848110612042575050826000602080949584010152601f8019910116010190565b80602080928401015182828601015201612021565b805482101561206f5760005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b1561208c57565b60405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b6044820152606490fd5b156120c457565b60405162461bcd60e51b815260206004820152600c60248201526b2737ba1037b832b930ba37b960a11b6044820152606490fd5b156120ff57565b60405162461bcd60e51b815260206004820152603160248201527f43616e206f6e6c792072756e2061667465722067656e657369735374617274526044820152701bdd5b99081a5cc81d1c9a59d9d95c9959607a1b6064820152608490fd5b919082018092116104fe57565b1561217257565b60405162461bcd60e51b81526020600482015260126024820152712737ba1037b832b930ba37b917b0b236b4b760711b6044820152606490fd5b156121b357565b60405162461bcd60e51b815260206004820152601460248201527310dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b6044820152606490fd5b156121f657565b60405162461bcd60e51b815260206004820152601a60248201527f50726f787920636f6e7472616374206e6f7420616c6c6f7765640000000000006044820152606490fd5b1561224257565b60405162461bcd60e51b815260206004820152601560248201527442657420697320746f6f206561726c792f6c61746560581b6044820152606490fd5b1561228657565b60405162461bcd60e51b8152602060048201526012602482015271526f756e64206e6f74206265747461626c6560701b6044820152606490fd5b156122c757565b60405162461bcd60e51b815260206004820152602c60248201527f42657420616d6f756e74206d7573742062652067726561746572207468616e2060448201526b1b5a5b90995d105b5bdd5b9d60a21b6064820152608490fd5b1561232857565b60405162461bcd60e51b815260206004820152601b60248201527f43616e206f6e6c7920626574206f6e63652070657220726f756e6400000000006044820152606490fd5b8054680100000000000000008110156106845761238f91600182018155612057565b819291549060031b91821b91600019901b1916179055565b919081101561206f5760051b0190565b818102929181159184041417156104fe57565b156123d157565b60405162461bcd60e51b815260206004820152601660248201527543616e6e6f74206265207a65726f206164647265737360501b6044820152606490fd5b9060409082600052600a6020528160002060009160018060a01b03168252602052206040519161243e83611f34565b60ff8254166002811015610f82578352604060ff60026001850154946020870195865201541693019215158352600052600b60205260406000206040519261248584611f17565b81548452600182015460208501526002820154604085015260ff600d6003840154936060870194855260048101546080880152600581015460a08801526124ce60068201611f72565b60c08801526124df60078201611f72565b60e088015260088101546101008801526009810154610120880152600a810154610140880152600b810154610160880152600c81015461018088015201541615936101a0851591015283612560575b5082612547575b508161253f575090565b905051151590565b612557919250516004549061215e565b42119038612535565b511592503861252e565b919082039182116104fe57565b67ffffffffffffffff81116106845760051b60200190565b805182101561206f5760209160051b010190565b6000818152600a602090815260408083206001600160a01b03909516835293905282902091516125d281611f34565b60ff835416926002841015610f82576101a093825260ff60026001830154926020850193845201541692604083019315158452600052600b6020526040600020926040519161262083611f17565b845483526001850154602084015260028501546040840152600385015460608401526004850154926080810193845260ff600d60058801549760a0840198895261266c60068201611f72565b60c085015261267d60078201611f72565b60e085015260088101546101008501526009810154610120850152600a810154610140850152600b810154610160850152600c8101546101808501520154161515968791015282519185519182841461275e5787612753575b5086612749575b50856126ec575b505050505090565b139350909183612735575b831561270b575b50505038808080806126e4565b51905113915081612720575b503880806126fe565b9050516002811015610f825760011438612717565b925081516002811015610f825715926126f7565b51159550386126dd565b5115159650386126d6565b5050505050505050600090565b60026001541461277c576002600155565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b3d156127fc573d9067ffffffffffffffff821161068457604051916127f0601f8201601f191660200184611f50565b82523d6000602084013e565b606090565b600080809381935af16128126127c1565b501561281a57565b60405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a20424e425f5452414e534645525f46414960448201526213115160ea1b6064820152608490fd5b60ff60005460a01c1661287a57565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b9291909183600052600b602052604060002092600184015415612b1f576002840193845491824210612aca5760048201958654612a8e576006936128f86004548261215e565b421115612a76575042905561290f6005544261215e565b60038301555b8555019167ffffffffffffffff8211610684576129328354611edd565b601f8111612a2e575b50600090601f83116001146129a5579180602094927feef94cbda40aa01b9b02b7dbd6075caa3662c0fabf77a84ed674b09b0ff9cb1e969460009261299a575b50508160011b916000199060031b1c19161790555b54604051908152a2565b01359050388061297b565b8382526020822091601f198416815b818110612a1657509260019285927feef94cbda40aa01b9b02b7dbd6075caa3662c0fabf77a84ed674b09b0ff9cb1e989660209896106129fc575b505050811b019055612990565b0135600019600384901b60f8161c191690553880806129ef565b919360206001819287870135815501950192016129b4565b836000526020600020601f840160051c81019160208510612a6c575b601f0160051c01905b818110612a60575061293b565b60008155600101612a53565b9091508190612a4a565b612a8491506005549061215e565b6003830155612915565b60405162461bcd60e51b8152602060048201526014602482015273149bdd5b9908185b1c9958591e481b1bd8dad95960621b6044820152606490fd5b60405162461bcd60e51b815260206004820152602760248201527f43616e206f6e6c79206c6f636b20726f756e64206166746572206c6f636b546960448201526606d657374616d760cc1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602b60248201527f43616e206f6e6c79206c6f636b20726f756e6420616674657220726f756e642060448201526a1a185cc81cdd185c9d195960aa1b6064820152608490fd5b80600052600b6020526040600020426001820155612b986005544261215e565b60028201556005546001600160ff1b03811681036104fe57600091612bc260089260011b4261215e565b600382015583815501557f939f42374aa9bf1d8d8cd56d8a9110cb040cd8dfeae44080c6fcf2645e51b452600080a2565b60ff60005460a01c1615612c0357565b60405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606490fd5b80600052600b60205260016040600020015415159081612c9d575b81612c81575b81612c69575090565b9050600052600b602052600260406000200154421090565b809150600052600b602052600160406000200154421190612c60565b809150600052600b602052600260406000200154151590612c5a565b6000546001600160a01b03163303612ccd57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b91929015612d735750815115612d25575090565b3b15612d2e5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015612d865750805190602001fd5b60405162461bcd60e51b815260206004820152908190612daa906024830190612016565b0390fdfea2646970667358221220ae50fec179f64bf2487f5118630915b8f2510fed7bde447b9e0a586b9c373b4364736f6c634300081c00330000000000000000000000007493fdf8de3b37b92281fe777894c740fcfe3841000000000000000000000000129c15ca41b1367a5e9e675b27db43162995d3ae000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000258
Deployed Bytecode
0x6080604052600436101561001257600080fd5b60003560e01c80623bdc7414611dd95780630f74174f14611db6578063127effb214611d8d578063273867d414611d535780632f94621c14611c89578063368acb0914611c6b5780633f4ba83a14611baa578063452fd75a14611af257806357fb096f146119d45780635c975abb146119ae5780636ba4c138146115a55780636c188593146114fa578063704b6c0214611470578063715018a6146114175780637285c58b146113ab578063766718081461138d57806377e741c7146112df5780637bf41254146112b95780637d1cd04f1461129b5780638456cb59146111d9578063890dc766146111015780638c65c81f1461100d5780638da5cb5b14610fe4578063951fd60014610d77578063a0c7f71c14610d47578063aa6b873a14610c22578063b29a814014610ab9578063b3ab15fb14610a36578063cc32d17614610a18578063dd1f7596146109bf578063eaba2361146109a1578063f2b3c80914610984578063f2fde38b146108bd578063f7fdec2814610897578063fa968eea14610879578063fc6f94681461084c5763fcf701c3146101b257600080fd5b34610847576101c036611e7c565b6101cb92919261286b565b6101e060018060a01b036003541633146120bd565b60025460ff8160081c16908161083c575b50156107c2576102058184846009546128b2565b6009546000198101939084116104fe5783600052600b60205260406000209160028301541561076b5760048301541561073357600d83019260ff8454166106f85760038101908154918242106106a3576102646007936004549061215e565b421161069a575b5060058101958655019167ffffffffffffffff82116106845761028e8354611edd565b601f811161063c575b50600090601f83116001146105b25791807fcee1a52460a80134ed9fbda5e300b8aecaf44ba60b7fe91a80a3fef96d5c5b7a969492602096946000926105a7575b50508160011b916000199060031b1c19161790555b805460ff1916600117905554604051908152a260095460001981019081116104fe5780600052600b602052600b60406000200154158061058e575b156105545780600052600b6020527f6dfdfcb09c8804d0058826cd2539f1acfbe3cb887c9be03d928035bce0f1a58d606060406000206000600582015460048301549081811360001461051457505050600981015490600c6008820154916103a0612710610398600754866123b7565b04809461256a565b9182915b85600b82015501556103b88260085461215e565b60085560405192835260208301526040820152a260095460018101908181116104fe57816009556103f060ff60025460081c166120f8565b60001901908082116104fe5781600052600b602052600360406000200154156104a2576000918252600b602052600360408320015442106104375761043490612b78565b80f35b60405162461bcd60e51b815260206004820152603760248201527f43616e206f6e6c79207374617274206e657720726f756e64206166746572207260448201527f6f756e64206e2d3220636c6f736554696d657374616d700000000000000000006064820152608490fd5b60405162461bcd60e51b815260206004820152602e60248201527f43616e206f6e6c7920737461727420726f756e6420616674657220726f756e6460448201526d081b8b4c881a185cc8195b99195960921b6064820152608490fd5b634e487b7160e01b600052601160045260246000fd5b12156105435750600a81015490600c60088201549161053b612710610398600754866123b7565b9182916103a4565b90600080600c6008840154936103a4565b60405162461bcd60e51b815260206004820152601260248201527114995dd85c991cc818d85b18dd5b185d195960721b6044820152606490fd5b5080600052600b602052600c6040600020015415610328565b0135905038806102d8565b8382526020822091601f198416815b8181106106245750926001928592602098967fcee1a52460a80134ed9fbda5e300b8aecaf44ba60b7fe91a80a3fef96d5c5b7a9a98961061060a575b505050811b0190556102ed565b0135600019600384901b60f8161c191690553880806105fd565b919360206001819287870135815501950192016105c1565b836000526020600020601f840160051c8101916020851061067a575b601f0160051c01905b81811061066e5750610297565b60008155600101610661565b9091508190610658565b634e487b7160e01b600052604160045260246000fd5b4290553861026b565b60405162461bcd60e51b815260206004820152602760248201527f43616e206f6e6c7920656e6420726f756e6420616674657220636c6f7365546960448201526606d657374616d760cc1b6064820152608490fd5b60405162461bcd60e51b8152602060048201526013602482015272149bdd5b9908185b1c9958591e48195b991959606a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd081b1bd8dad95960821b6044820152606490fd5b60405162461bcd60e51b815260206004820152602960248201527f43616e206f6e6c7920656e6420726f756e6420616674657220726f756e642068604482015268185cc81b1bd8dad95960ba1b6064820152608490fd5b60405162461bcd60e51b815260206004820152604660248201527f43616e206f6e6c792072756e2061667465722067656e6573697353746172745260448201527f6f756e6420616e642067656e657369734c6f636b526f756e642069732074726960648201526519d9d95c995960d21b608482015260a490fd5b60ff915016386101f1565b600080fd5b346108475760003660031901126108475760025460405160109190911c6001600160a01b03168152602090f35b34610847576000366003190112610847576020600654604051908152f35b3461084757600036600319011261084757602060ff60025460081c166040519015158152f35b34610847576020366003190112610847576108d6611e50565b6108de612cb9565b6001600160a01b0316801561093057600080546001600160a01b03198116831782556001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b346108475760003660031901126108475760206040516103e88152f35b34610847576000366003190112610847576020600454604051908152f35b34610847576040366003190112610847576109d8611e50565b6001600160a01b03166000908152600c602052604090208054602435919082101561084757602091610a0991612057565b90549060031b1c604051908152f35b34610847576000366003190112610847576020600754604051908152f35b34610847576020366003190112610847577fc47d127c07bdd56c5ccba00463ce3bd3c1bca71b4670eea6e5d0c02e4aa156e26020610a72611e50565b610a8a60018060a01b0360025460101c163314612085565b6001600160a01b0316610a9e8115156123ca565b600380546001600160a01b03191682179055604051908152a1005b3461084757604036600319011261084757610ad2611e50565b60243590610ade612cb9565b60018060a01b031690604051610b69602082019163a9059cbb60e01b835233602482015283604482015260448152610b17606482611f50565b600080604094855193610b2a8786611f50565b602085527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020860152519082895af1610b626127c1565b9086612d11565b8051908115918215610bff575b505015610ba9577f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e989160209151908152a2005b5162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b819250906020918101031261084757602001518015158103610847578480610b76565b602036600319011261084757600435610c3961286b565b610c4161276b565b610c4c333b156121ac565b610c573233146121ef565b610c64600954821461223b565b610c75610c7082612c3f565b61227f565b610c836006543410156122c0565b6000818152600a60209081526040808320338452909152902060010154610caa9015612321565b80600052600b602052600a604060002060088101610cc934825461215e565b905501610cd734825461215e565b90556000818152600a602090815260408083203384528252808320805460ff19166001908117825534910155600c9091529020610d1590829061236d565b6040513481527f0d8c1fe3e67ab767116a81f122b83c2557a8c2564019cb7c4f83de1aeb1f1f0d60203392a360018055005b34610847576040366003190112610847576020610d6d610d65611e66565b6004356125a3565b6040519015158152f35b3461084757606036600319011261084757610d90611e50565b6001600160a01b03166000818152600c60205260409020546024359160443591610dbb90849061256a565b8211610fc4575b610dcb82612577565b91610dd96040519384611f50565b808352610de581612577565b602084019490601f1901368637610dfb82612577565b92610e096040519485611f50565b828452601f19610e1884612577565b0160005b818110610f9857505060005b838110610ed757505090610e3b9161215e565b604051926060840190606085525180915260808401949060005b818110610ec15750505082840360208401526020808351958681520192016000945b808610610e8c57505082935060408301520390f35b90926020606060019260408751610ea4838251611ed0565b848101518584015201511515604082015201940195019490610e77565b8251875260209687019690920191600101610e55565b81600052600c602052610ef86040600020610ef2838661215e565b90612057565b90549060031b1c610f09828861258f565b52610f14818761258f565b51600052600a6020526040806000206000908482526020522090604051610f3a81611f34565b60ff835416926002841015610f8257600260ff91600195845285810154602085015201541615156040820152610f70828861258f565b52610f7b818761258f565b5001610e28565b634e487b7160e01b600052602160045260246000fd5b602090604051610fa781611f34565b600081526000838201526000604082015282828901015201610e1c565b809150600052600c602052610fde8260406000205461256a565b90610dc2565b34610847576000366003190112610847576000546040516001600160a01b039091168152602090f35b3461084757602036600319011261084757600435600052600b6020526040600020805460018201549160028101546003820154916004810154926005820154936006830161105a90611f72565b9461106760078501611f72565b600885015496600986015492600a87015494600b88015496600c89015498600d015460ff16996040519d8e809e81526020015260408d015260608c015260808b015260a08a015260c089016101c090526101c089016110c591612016565b88810360e08a01526110d691612016565b9561010088015261012087015261014086015261016085015261018084015215156101a08301520390f35b3461084757604036600319011261084757600435602435611120612bf3565b61113860018060a01b0360025460101c163314612085565b8082101561117a57816040917fe60149e0431fec12df63dfab5fce2a9cefe9a4d3df5f41cb626f579ae1f2b91a936004558060055582519182526020820152a1005b60405162461bcd60e51b815260206004820152603160248201527f6275666665725365636f6e6473206d75737420626520696e666572696f7220746044820152706f20696e74657276616c5365636f6e647360781b6064820152608490fd5b34610847576000366003190112610847576111f261286b565b6002543360109190911c6001600160a01b0316148015611287575b6112169061216b565b61121e61286b565b6000805460ff60a01b1916600160a01b1790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602090a16009547f68b095021b1f40fe513109f513c66692f0b3219aee674a69f4efc57badb8201d600080a2005b506003546001600160a01b0316331461120d565b34610847576000366003190112610847576020600554604051908152f35b34610847576040366003190112610847576020610d6d6112d7611e66565b60043561240f565b34610847576020366003190112610847576004356112fb612bf3565b61131360018060a01b0360025460101c163314612085565b6103e8811161135057806007557fb1c4ee38d35556741133da7ff9b6f7ab0fa88d0406133126ff128f635490a857602060095492604051908152a2005b60405162461bcd60e51b81526020600482015260156024820152740a8e4cac2e6eae4f240cccaca40e8dede40d0d2ced605b1b6044820152606490fd5b34610847576000366003190112610847576020600954604051908152f35b3461084757604036600319011261084757606060406113c8611e66565b600435600052600a6020528160002060009160018060a01b031682526020522060ff8154169060ff6002600183015492015416906114096040518094611ed0565b602083015215156040820152f35b3461084757600036600319011261084757611430612cb9565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610847576020366003190112610847577f137b621413925496477d46e5055ac0d56178bdd724ba8bf843afceef18268ba360206114ac611e50565b6114b4612cb9565b6001600160a01b038116906114ca8215156123ca565b6002805462010000600160b01b03191660109290921b62010000600160b01b0316919091179055604051908152a1005b3461084757602036600319011261084757600435611516612bf3565b61152e60018060a01b0360025460101c163314612085565b801561156857806006557f90eb87c560a0213754ceb3a7fa3012f01acab0a35602c1e1995adf69dabc9d50602060095492604051908152a2005b60405162461bcd60e51b815260206004820152601560248201527404d757374206265207375706572696f7220746f203605c1b6044820152606490fd5b346108475760203660031901126108475760043567ffffffffffffffff8111610847573660238201121561084757806004013567ffffffffffffffff8111610847576024820191602436918360051b0101116108475761160361276b565b61160e333b156121ac565b6116193233146121ef565b6000913390835b838110611644578480611634575b60018055005b61163e9033612801565b8061162e565b61164f8185846123a7565b35600052600b60205260016040600020015415611971576116718185846123a7565b35600052600b6020526003604060002001544211156119365760006116978286856123a7565b358152600b60205260408120600d015460ff16156118a757506116c5336116bf8387866123a7565b356125a3565b15611869576116d58185846123a7565b35600052600b60205260406000206117c7604051916116f383611f17565b8054835260018101546020840152600281015460408401526003810154606084015260048101546080840152600581015460a084015261173560068201611f72565b60c084015261174660078201611f72565b60e084015260088101546101008401526009810154610120840152600a810154610140840152600b8101549261016081019384526101a060ff600d600c85015494610180850195865201541615159101526117a28488876123a7565b35600052600a60205260016040806000206000908982526020522001549051906123b7565b90519060008215611855575060019291611815910480975b6117ea8489886123a7565b35600052600a60205260026040806000206000908a825260205220018560ff1982541617905561215e565b956118218287866123a7565b35906040519081527f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf760203392a301611620565b634e487b7160e01b81526012600452602490fd5b60405162461bcd60e51b81526020600482015260166024820152754e6f7420656c696769626c6520666f7220636c61696d60501b6044820152606490fd5b906118bd336118b78388876123a7565b3561240f565b156118f1576118156001604081946118d6858a896123a7565b358152600a60205281812088825260205220015480976117df565b60405162461bcd60e51b815260206004820152601760248201527f4e6f7420656c696769626c6520666f7220726566756e640000000000000000006044820152606490fd5b60405162461bcd60e51b8152602060048201526013602482015272149bdd5b99081a185cc81b9bdd08195b991959606a1b6044820152606490fd5b60405162461bcd60e51b8152602060048201526015602482015274149bdd5b99081a185cc81b9bdd081cdd185c9d1959605a1b6044820152606490fd5b3461084757600036600319011261084757602060ff60005460a01c166040519015158152f35b6020366003190112610847576004356119eb61286b565b6119f361276b565b6119fe333b156121ac565b611a093233146121ef565b611a16600954821461223b565b611a22610c7082612c3f565b611a306006543410156122c0565b6000818152600a60209081526040808320338452909152902060010154611a579015612321565b80600052600b6020526009604060002060088101611a7634825461215e565b905501611a8434825461215e565b90556000818152600a602090815260408083203384528252808320805460ff1916815534600190910155600c9091529020611ac090829061236d565b6040513481527f438122d8cff518d18388099a5181f0d17a12b4f1b55faedf6e4a6acee0060c1260203392a360018055005b3461084757600036600319011261084757611b0b61286b565b611b2060018060a01b036003541633146120bd565b60ff60025460081c16611b5957600954600181018091116104fe5780611b4891600955612b78565b6002805461ff001916610100179055005b60405162461bcd60e51b815260206004820152602360248201527f43616e206f6e6c792072756e2067656e657369735374617274526f756e64206f6044820152626e636560e81b6064820152608490fd5b3461084757600036600319011261084757611bc3612bf3565b60025433601082901c6001600160a01b0316148015611c57575b611be69061216b565b61ffff1916600255611bf6612bf3565b60ff60a01b19600054166000557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a16009547faaa520fdd7d2c83061d632fa017b0432407e798818af63ea908589fceda39ab7600080a2005b506003546001600160a01b03163314611bdd565b34610847576000366003190112610847576020600854604051908152f35b3461084757611c9736611e7c565b90611ca061286b565b611cb560018060a01b036003541633146120bd565b60ff600254611cc8828260081c166120f8565b16611d0357611cd9926009546128b2565b600954600181018091116104fe5780611cf491600955612b78565b6002805460ff19166001179055005b60405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792072756e2067656e657369734c6f636b526f756e64206f6e604482015261636560f01b6064820152608490fd5b34610847576020366003190112610847576001600160a01b03611d74611e50565b16600052600c6020526020604060002054604051908152f35b34610847576000366003190112610847576003546040516001600160a01b039091168152602090f35b3461084757600036600319011261084757602060ff600254166040519015158152f35b3461084757600036600319011261084757611df261276b565b6002547fb9197c6b8e21274bd1e2d9c956a88af5cfee510f630fab3f046300f88b4223619060209060101c6001600160a01b0316611e31338214612085565b611e4360085480926000600855612801565b604051908152a160018055005b600435906001600160a01b038216820361084757565b602435906001600160a01b038216820361084757565b6040600319820112610847576004359160243567ffffffffffffffff811161084757826023820112156108475780600401359267ffffffffffffffff84116108475760248483010111610847576024019190565b906002821015610f825752565b90600182811c92168015611f0d575b6020831014611ef757565b634e487b7160e01b600052602260045260246000fd5b91607f1691611eec565b6101c0810190811067ffffffffffffffff82111761068457604052565b6060810190811067ffffffffffffffff82111761068457604052565b90601f8019910116810190811067ffffffffffffffff82111761068457604052565b9060405191826000825492611f8684611edd565b8084529360018116908115611ff45750600114611fad575b50611fab92500383611f50565b565b90506000929192526020600020906000915b818310611fd8575050906020611fab9282010138611f9e565b6020919350806001915483858901015201910190918492611fbf565b905060209250611fab94915060ff191682840152151560051b82010138611f9e565b919082519283825260005b848110612042575050826000602080949584010152601f8019910116010190565b80602080928401015182828601015201612021565b805482101561206f5760005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b1561208c57565b60405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b6044820152606490fd5b156120c457565b60405162461bcd60e51b815260206004820152600c60248201526b2737ba1037b832b930ba37b960a11b6044820152606490fd5b156120ff57565b60405162461bcd60e51b815260206004820152603160248201527f43616e206f6e6c792072756e2061667465722067656e657369735374617274526044820152701bdd5b99081a5cc81d1c9a59d9d95c9959607a1b6064820152608490fd5b919082018092116104fe57565b1561217257565b60405162461bcd60e51b81526020600482015260126024820152712737ba1037b832b930ba37b917b0b236b4b760711b6044820152606490fd5b156121b357565b60405162461bcd60e51b815260206004820152601460248201527310dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b6044820152606490fd5b156121f657565b60405162461bcd60e51b815260206004820152601a60248201527f50726f787920636f6e7472616374206e6f7420616c6c6f7765640000000000006044820152606490fd5b1561224257565b60405162461bcd60e51b815260206004820152601560248201527442657420697320746f6f206561726c792f6c61746560581b6044820152606490fd5b1561228657565b60405162461bcd60e51b8152602060048201526012602482015271526f756e64206e6f74206265747461626c6560701b6044820152606490fd5b156122c757565b60405162461bcd60e51b815260206004820152602c60248201527f42657420616d6f756e74206d7573742062652067726561746572207468616e2060448201526b1b5a5b90995d105b5bdd5b9d60a21b6064820152608490fd5b1561232857565b60405162461bcd60e51b815260206004820152601b60248201527f43616e206f6e6c7920626574206f6e63652070657220726f756e6400000000006044820152606490fd5b8054680100000000000000008110156106845761238f91600182018155612057565b819291549060031b91821b91600019901b1916179055565b919081101561206f5760051b0190565b818102929181159184041417156104fe57565b156123d157565b60405162461bcd60e51b815260206004820152601660248201527543616e6e6f74206265207a65726f206164647265737360501b6044820152606490fd5b9060409082600052600a6020528160002060009160018060a01b03168252602052206040519161243e83611f34565b60ff8254166002811015610f82578352604060ff60026001850154946020870195865201541693019215158352600052600b60205260406000206040519261248584611f17565b81548452600182015460208501526002820154604085015260ff600d6003840154936060870194855260048101546080880152600581015460a08801526124ce60068201611f72565b60c08801526124df60078201611f72565b60e088015260088101546101008801526009810154610120880152600a810154610140880152600b810154610160880152600c81015461018088015201541615936101a0851591015283612560575b5082612547575b508161253f575090565b905051151590565b612557919250516004549061215e565b42119038612535565b511592503861252e565b919082039182116104fe57565b67ffffffffffffffff81116106845760051b60200190565b805182101561206f5760209160051b010190565b6000818152600a602090815260408083206001600160a01b03909516835293905282902091516125d281611f34565b60ff835416926002841015610f82576101a093825260ff60026001830154926020850193845201541692604083019315158452600052600b6020526040600020926040519161262083611f17565b845483526001850154602084015260028501546040840152600385015460608401526004850154926080810193845260ff600d60058801549760a0840198895261266c60068201611f72565b60c085015261267d60078201611f72565b60e085015260088101546101008501526009810154610120850152600a810154610140850152600b810154610160850152600c8101546101808501520154161515968791015282519185519182841461275e5787612753575b5086612749575b50856126ec575b505050505090565b139350909183612735575b831561270b575b50505038808080806126e4565b51905113915081612720575b503880806126fe565b9050516002811015610f825760011438612717565b925081516002811015610f825715926126f7565b51159550386126dd565b5115159650386126d6565b5050505050505050600090565b60026001541461277c576002600155565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b3d156127fc573d9067ffffffffffffffff821161068457604051916127f0601f8201601f191660200184611f50565b82523d6000602084013e565b606090565b600080809381935af16128126127c1565b501561281a57565b60405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a20424e425f5452414e534645525f46414960448201526213115160ea1b6064820152608490fd5b60ff60005460a01c1661287a57565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b9291909183600052600b602052604060002092600184015415612b1f576002840193845491824210612aca5760048201958654612a8e576006936128f86004548261215e565b421115612a76575042905561290f6005544261215e565b60038301555b8555019167ffffffffffffffff8211610684576129328354611edd565b601f8111612a2e575b50600090601f83116001146129a5579180602094927feef94cbda40aa01b9b02b7dbd6075caa3662c0fabf77a84ed674b09b0ff9cb1e969460009261299a575b50508160011b916000199060031b1c19161790555b54604051908152a2565b01359050388061297b565b8382526020822091601f198416815b818110612a1657509260019285927feef94cbda40aa01b9b02b7dbd6075caa3662c0fabf77a84ed674b09b0ff9cb1e989660209896106129fc575b505050811b019055612990565b0135600019600384901b60f8161c191690553880806129ef565b919360206001819287870135815501950192016129b4565b836000526020600020601f840160051c81019160208510612a6c575b601f0160051c01905b818110612a60575061293b565b60008155600101612a53565b9091508190612a4a565b612a8491506005549061215e565b6003830155612915565b60405162461bcd60e51b8152602060048201526014602482015273149bdd5b9908185b1c9958591e481b1bd8dad95960621b6044820152606490fd5b60405162461bcd60e51b815260206004820152602760248201527f43616e206f6e6c79206c6f636b20726f756e64206166746572206c6f636b546960448201526606d657374616d760cc1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602b60248201527f43616e206f6e6c79206c6f636b20726f756e6420616674657220726f756e642060448201526a1a185cc81cdd185c9d195960aa1b6064820152608490fd5b80600052600b6020526040600020426001820155612b986005544261215e565b60028201556005546001600160ff1b03811681036104fe57600091612bc260089260011b4261215e565b600382015583815501557f939f42374aa9bf1d8d8cd56d8a9110cb040cd8dfeae44080c6fcf2645e51b452600080a2565b60ff60005460a01c1615612c0357565b60405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606490fd5b80600052600b60205260016040600020015415159081612c9d575b81612c81575b81612c69575090565b9050600052600b602052600260406000200154421090565b809150600052600b602052600160406000200154421190612c60565b809150600052600b602052600260406000200154151590612c5a565b6000546001600160a01b03163303612ccd57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b91929015612d735750815115612d25575090565b3b15612d2e5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015612d865750805190602001fd5b60405162461bcd60e51b815260206004820152908190612daa906024830190612016565b0390fdfea2646970667358221220ae50fec179f64bf2487f5118630915b8f2510fed7bde447b9e0a586b9c373b4364736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007493fdf8de3b37b92281fe777894c740fcfe3841000000000000000000000000129c15ca41b1367a5e9e675b27db43162995d3ae000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000258
-----Decoded View---------------
Arg [0] : _adminAddress (address): 0x7493fdF8dE3b37b92281Fe777894c740Fcfe3841
Arg [1] : _operatorAddress (address): 0x129c15ca41B1367A5e9E675b27db43162995d3AE
Arg [2] : _intervalSeconds (uint256): 60
Arg [3] : _bufferSeconds (uint256): 30
Arg [4] : _minBetAmount (uint256): 100000000000000000
Arg [5] : _treasuryFee (uint256): 600
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000007493fdf8de3b37b92281fe777894c740fcfe3841
Arg [1] : 000000000000000000000000129c15ca41b1367a5e9e675b27db43162995d3ae
Arg [2] : 000000000000000000000000000000000000000000000000000000000000003c
Arg [3] : 000000000000000000000000000000000000000000000000000000000000001e
Arg [4] : 000000000000000000000000000000000000000000000000016345785d8a0000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000258
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
APE | 100.00% | $0.606928 | 0.3765 | $0.228522 |
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.