Overview
ETH Balance
0.007508396953950464 ETH
ETH Value
$18.20 (@ $2,424.37/ETH)More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 5,606 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Play | 17222077 | 11 hrs ago | IN | 0.00000296 ETH | 0.00000038 | ||||
Play | 17222068 | 11 hrs ago | IN | 0.00000296 ETH | 0.00000038 | ||||
Play | 17222058 | 11 hrs ago | IN | 0.00000296 ETH | 0.00000038 | ||||
Play | 17222045 | 11 hrs ago | IN | 0.00000296 ETH | 0.00000038 | ||||
Play | 17137068 | 2 days ago | IN | 0.00000177 ETH | 0.00000042 | ||||
Play | 17137057 | 2 days ago | IN | 0.00000177 ETH | 0.00000042 | ||||
Play | 17005541 | 5 days ago | IN | 0.00000239 ETH | 0.00000038 | ||||
Play | 17005529 | 5 days ago | IN | 0.00000239 ETH | 0.00000038 | ||||
Play | 17005520 | 5 days ago | IN | 0.00000239 ETH | 0.00000038 | ||||
Play | 17005460 | 5 days ago | IN | 0.00000243 ETH | 0.00000042 | ||||
Play | 17005449 | 5 days ago | IN | 0.00000243 ETH | 0.00000046 | ||||
Play | 16886993 | 8 days ago | IN | 0.00000144 ETH | 0.00000037 | ||||
Play | 16886980 | 8 days ago | IN | 0.00000145 ETH | 0.00000037 | ||||
Play | 16886965 | 8 days ago | IN | 0.00000145 ETH | 0.00000037 | ||||
Play | 16886953 | 8 days ago | IN | 0.00000143 ETH | 0.00000037 | ||||
Play | 16886940 | 8 days ago | IN | 0.00000145 ETH | 0.00000037 | ||||
Play | 16878183 | 8 days ago | IN | 0.0000017 ETH | 0.00000037 | ||||
Play | 16878165 | 8 days ago | IN | 0.00000168 ETH | 0.00000037 | ||||
Play | 16878155 | 8 days ago | IN | 0.00000168 ETH | 0.00000037 | ||||
Play | 16878136 | 8 days ago | IN | 0.00000166 ETH | 0.00000037 | ||||
Play | 16878126 | 8 days ago | IN | 0.00000167 ETH | 0.00000037 | ||||
Play | 16878112 | 8 days ago | IN | 0.00000165 ETH | 0.00000037 | ||||
Play | 16878102 | 8 days ago | IN | 0.00000167 ETH | 0.00000037 | ||||
Play | 16878092 | 8 days ago | IN | 0.00000165 ETH | 0.00000037 | ||||
Play | 16878073 | 8 days ago | IN | 0.00000164 ETH | 0.00000037 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
17222077 | 11 hrs ago | 0.00000039 ETH | ||||
17222068 | 11 hrs ago | 0.00000052 ETH | ||||
17222058 | 11 hrs ago | 0.0000005 ETH | ||||
17222045 | 11 hrs ago | 0.00000049 ETH | ||||
17137068 | 2 days ago | 0.00000029 ETH | ||||
17137057 | 2 days ago | 0.00000027 ETH | ||||
17005541 | 5 days ago | 0.00000042 ETH | ||||
17005529 | 5 days ago | 0.00000043 ETH | ||||
17005520 | 5 days ago | 0.00000041 ETH | ||||
17005460 | 5 days ago | 0.00000037 ETH | ||||
17005449 | 5 days ago | 0.0000004 ETH | ||||
16886993 | 8 days ago | 0.00000024 ETH | ||||
16886980 | 8 days ago | 0.00000024 ETH | ||||
16886965 | 8 days ago | 0.00000024 ETH | ||||
16886953 | 8 days ago | 0.00000023 ETH | ||||
16886940 | 8 days ago | 0.00000025 ETH | ||||
16878183 | 8 days ago | 0.00000028 ETH | ||||
16878165 | 8 days ago | 0.00000027 ETH | ||||
16878155 | 8 days ago | 0.00000027 ETH | ||||
16878136 | 8 days ago | 0.00000027 ETH | ||||
16878126 | 8 days ago | 0.00000028 ETH | ||||
16878112 | 8 days ago | 0.00000026 ETH | ||||
16878102 | 8 days ago | 0.00000029 ETH | ||||
16878092 | 8 days ago | 0.00000025 ETH | ||||
16878073 | 8 days ago | 0.00000024 ETH |
Loading...
Loading
Contract Name:
ZapankiRangeKroma
Compiler Version
v0.8.20+commit.a1b79de6
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "./common/ZapankiGamesKroma.sol"; contract ZapankiRangeKroma is ZapankiGamesKroma { using SafeERC20 for IERC20; constructor( address _vrfCoordinator, IBankroll _bankroll, address _trustedForwarder, address _vrfDepositor ) ZapankiGamesKroma(_vrfCoordinator, _bankroll, _trustedForwarder, _vrfDepositor) {} struct RangeGame { uint256 wager; uint256 stopGain; uint256 stopLoss; uint256 vrfId; address tokenAddress; uint64 blockNumber; uint32 numBets; uint32 multiplier; bool isOver; } mapping(address => RangeGame) rangeGames; mapping(uint256 => address) vrfPendingPlayer; struct RangeFulfilledData { address playerAddress; uint256 wager; uint256 payout; address tokenAddress; uint32 multiplier; bool isOver; uint256[] rangeOutcomes; uint256[] payouts; uint32 numGames; uint256 l2eAmount; } event RangeFulfilled(RangeFulfilledData eventData); event RangeRefund(address indexed player, uint256 wager, address tokenAddress); function getCurrentUserState(address player) external view returns (RangeGame memory) { return (rangeGames[player]); } function play( uint256 wager, uint32 multiplier, address tokenAddress, bool isOver, uint32 numBets, uint256 stopGain, uint256 stopLoss ) external payable nonReentrant { address msgSender = _msgSender(); require(10421 <= multiplier && multiplier <= 9900000, "Invalid multiplier"); require(rangeGames[msgSender].vrfId == 0, "Waiting VRF request"); require(0 < numBets && numBets <= 100, "Invalid numBets"); _checkMaxWager(wager, tokenAddress, multiplier); _processWager(tokenAddress, wager * numBets, 1000000, msgSender); uint256 id = _requestRandomWords(numBets); rangeGames[msgSender] = RangeGame( wager, stopGain, stopLoss, id, tokenAddress, uint64(block.number), numBets, multiplier, isOver ); vrfPendingPlayer[id] = msgSender; callback.onPlay(5, msgSender, tokenAddress, wager, numBets); } /** * @dev Function to refund user in case of VRF request failling */ function refund() external nonReentrant { address msgSender = _msgSender(); RangeGame storage game = rangeGames[msgSender]; require(rangeGames[msgSender].vrfId != 0, "Not waiting VRF request"); require(game.blockNumber + BLOCK_REFUND_COOLDOWN + 10 <= block.number, "Too early"); uint256 wager = game.wager * game.numBets; address tokenAddress = game.tokenAddress; if (tokenAddress == address(0)) { (bool success, ) = payable(msgSender).call{value: wager}(""); require(success, "Transfer failed"); } else { IERC20(tokenAddress).safeTransfer(msgSender, wager); } emit RangeRefund(msgSender, wager, tokenAddress); delete (vrfPendingPlayer[game.vrfId]); delete (rangeGames[msgSender]); } function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal override { address playerAddress = vrfPendingPlayer[requestId]; if (playerAddress == address(0)) return; RangeGame storage game = rangeGames[playerAddress]; if (block.number > game.blockNumber + BLOCK_REFUND_COOLDOWN) return; int256 totalValue; uint256 payout; uint32 gamePlayed; uint256[] memory rangeOutcomes = new uint256[](game.numBets); uint256[] memory payouts = new uint256[](game.numBets); uint256 winChance = 99000000000 / game.multiplier; uint256 numberToRollOver = 10000000 - winChance; uint256 gamePayout = (game.multiplier * game.wager) / 10000; address tokenAddress = game.tokenAddress; for (gamePlayed = 0; gamePlayed < game.numBets; gamePlayed++) { if (totalValue >= int256(game.stopGain)) { break; } if (totalValue <= -int256(game.stopLoss)) { break; } rangeOutcomes[gamePlayed] = randomWords[gamePlayed] % 10000000; if (rangeOutcomes[gamePlayed] >= numberToRollOver && game.isOver == true) { totalValue += int256(gamePayout - game.wager); payout += gamePayout; payouts[gamePlayed] = gamePayout; continue; } if (rangeOutcomes[gamePlayed] <= winChance && game.isOver == false) { totalValue += int256(gamePayout - game.wager); payout += gamePayout; payouts[gamePlayed] = gamePayout; continue; } totalValue -= int256(game.wager); } payout += (game.numBets - gamePlayed) * game.wager; _transferToBankroll(tokenAddress, game.wager * game.numBets); if (payout != 0) { _payoutBankrollToPlayer(playerAddress, payout, tokenAddress); } callback.onEnd(5, playerAddress, game.tokenAddress, game.wager, gamePlayed, payout); delete (vrfPendingPlayer[requestId]); uint256 totalWager = game.wager * gamePlayed; uint256 l2eAmount = bankroll.payoutL2E(playerAddress, tokenAddress, totalWager, payout); RangeFulfilledData memory data = RangeFulfilledData( playerAddress, game.wager, payout, tokenAddress, game.multiplier, game.isOver, rangeOutcomes, payouts, gamePlayed, l2eAmount ); emit RangeFulfilled(data); delete (rangeGames[playerAddress]); } /** * @dev calculates the maximum wager allowed based on the bankroll size */ function _checkMaxWager(uint256 wager, address tokenAddress, uint256 multiplier) internal view { uint256 balance; if (tokenAddress == address(0)) { balance = address(bankroll).balance; } else { balance = IERC20(tokenAddress).balanceOf(address(bankroll)); } uint256 maxWager = (balance * (11000 - 10890)) / (multiplier - 10000); require(wager <= maxWager, "Too many wager"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @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 v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC20Permit} from "../extensions/IERC20Permit.sol"; import {Address} from "../../../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 An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, 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); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @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.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @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); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @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(token).code.length > 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @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 or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * 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. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @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`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) 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 FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; uint256 private _status; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); constructor() { _status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be NOT_ENTERED if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../../../interfaces/ISupraRouter.sol"; import "../../../interfaces/IBankroll.sol"; import "../../../interfaces/ICallback.sol"; import "../../../interfaces/IKromaGasPriceOracle.sol"; abstract contract ZapankiGamesKroma is ReentrancyGuard { using SafeERC20 for IERC20; IKromaGasPriceOracle private constant KROMA_GAS_ORACLE = IKromaGasPriceOracle(0x420000000000000000000000000000000000000F); uint256 public constant ECOTONE_GAS_CALC_CONSTANT = 16; ISupraRouter public vrfCoordinator; address public vrfDepositor; IBankroll public bankroll; ICallback public callback; address public trustedForwarder; bytes32 vrfKeyHash; uint256 public claimableVRFFee; uint64 constant BLOCK_REFUND_COOLDOWN = 1000; uint64 vrfSubId; uint32 vrfCallbackGasLimit; modifier onlyOwner() { require(msg.sender == bankroll.owner(), "Not Owner"); _; } constructor(address _vrfCoordinator, IBankroll _bankroll, address _trustedForwarder, address _vrfDepositor) { vrfCoordinator = ISupraRouter(_vrfCoordinator); bankroll = _bankroll; callback = ICallback(address(_bankroll)); trustedForwarder = _trustedForwarder; vrfDepositor = _vrfDepositor; } function isTrustedForwarder(address forwarder) public view virtual returns (bool) { return forwarder == trustedForwarder; } function _msgSender() internal view returns (address sender) { if (isTrustedForwarder(msg.sender)) { // The assembly code is more direct than the Solidity version using `abi.decode`. /// @solidity memory-safe-assembly assembly { sender := shr(96, calldataload(sub(calldatasize(), 20))) } } else { return msg.sender; } } function _shouldStop(int256 value, uint256 stopGain, uint256 stopLoss) internal pure returns (bool) { return value >= int256(stopGain) || value <= -int256(stopLoss); } function _processWager(address tokenAddress, uint256 wager, uint256 gasAmount, address msgSender) internal { require(bankroll.getIsValidWager(address(this), tokenAddress), "Token not approved"); require(wager != 0, "Wager must be greater than 0"); if (tokenAddress == address(0)) { _chargeVRFFee(msg.value - wager, gasAmount); } else { _chargeVRFFee(msg.value, gasAmount); IERC20(tokenAddress).safeTransferFrom(msgSender, address(this), wager); } } function _transferToBankroll(address tokenAddress, uint256 amount) internal { if (tokenAddress == address(0)) { (bool success, ) = payable(address(bankroll)).call{value: amount}(""); require(success, "refund failed"); } else { IERC20(tokenAddress).safeTransfer(address(bankroll), amount); } } function getVRFFee(uint256 gasAmount) public view returns (uint256 fee) { uint256 scaledBaseFee = KROMA_GAS_ORACLE.baseFeeScalar() * ECOTONE_GAS_CALC_CONSTANT * KROMA_GAS_ORACLE.l1BaseFee(); uint256 scaledBlobBaseFee = KROMA_GAS_ORACLE.blobBaseFeeScalar() * KROMA_GAS_ORACLE.blobBaseFee(); uint256 _l1GasFee = (6700 * (scaledBaseFee + scaledBlobBaseFee)) / (ECOTONE_GAS_CALC_CONSTANT * 10 ** KROMA_GAS_ORACLE.decimals()); fee = (1000252 * gasAmount) + _l1GasFee; } function _refundVRFFee(uint256 refundableAmount) internal { if (refundableAmount > 0) { (bool success, ) = payable(msg.sender).call{value: refundableAmount}(""); require(success, "refund failed"); } } function _chargeVRFFee(uint256 vrfFeeProvided, uint256 gasAmount) internal { uint256 _vrfFee = getVRFFee(gasAmount); require(vrfFeeProvided >= _vrfFee, "Insufficient vrf fee"); _refundVRFFee(vrfFeeProvided - _vrfFee); claimableVRFFee += _vrfFee; } function collectVrfFee() external nonReentrant onlyOwner { uint256 fee = claimableVRFFee; claimableVRFFee = 0; (bool success, ) = payable(address(msg.sender)).call{value: fee}(""); require(success, "transfer failed"); } function _payoutBankrollToPlayer(address player, uint256 payout, address tokenAddress) internal { bankroll.transferPayout(player, payout, tokenAddress); } function _requestRandomWords(uint32 numWords) internal returns (uint256 s_requestId) { s_requestId = vrfCoordinator.generateRequest( "rawFulfillRandomWords(uint256,uint256[])", uint8(numWords), 1, vrfDepositor ); } function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual; function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external { require(msg.sender == address(vrfCoordinator)); fulfillRandomWords(requestId, randomWords); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IBankroll { function getIsGame(address game) external view returns (bool); function getIsValidWager(address game, address tokenAddress) external view returns (bool); function transferPayout(address player, uint256 payout, address token) external; function owner() external view returns (address); function payoutL2E( address player, address wagerToken, uint256 wager, uint256 payout ) external returns (uint256 l2eAmount); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ICallback { function onPlay(uint32 game, address playerAddress, address tokenAddress, uint256 wager, uint256 numGames) external; function onEnd( uint32 game, address playerAddress, address tokenAddress, uint256 wager, uint256 numGames, uint totalPayout ) external; }
interface IKromaGasPriceOracle { //returns the gas price for the network function l1BaseFee() external view returns (uint256); //returns which fork (Ecotone or Bedrock) is used by OP Stack L2 for the network function isEcotone() external view returns (bool); //returns the overhead for the network function overhead() external view returns (uint256); //returns the scalar value for the network function scalar() external view returns (uint256); //returns the decimal value for the network function decimals() external view returns (uint256); //returns the decimal value for the network function DECIMALS() external view returns (uint256); /// @notice Retrieves the current blob base fee. /// @return Current blob base fee. function blobBaseFee() external view returns (uint256); /// @notice Retrieves the current base fee scalar. /// @return Current base fee scalar. function baseFeeScalar() external view returns (uint32); /// @notice Retrieves the current blob base fee scalar. /// @return Current blob base fee scalar. function blobBaseFeeScalar() external view returns (uint32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ISupraRouter { function generateRequest( string memory _functionSig, uint8 _rngCount, uint256 _numConfirmations, address _clientWalletAddress ) external returns (uint256); }
{ "evmVersion": "paris", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_vrfCoordinator","type":"address"},{"internalType":"contract IBankroll","name":"_bankroll","type":"address"},{"internalType":"address","name":"_trustedForwarder","type":"address"},{"internalType":"address","name":"_vrfDepositor","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"playerAddress","type":"address"},{"internalType":"uint256","name":"wager","type":"uint256"},{"internalType":"uint256","name":"payout","type":"uint256"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint32","name":"multiplier","type":"uint32"},{"internalType":"bool","name":"isOver","type":"bool"},{"internalType":"uint256[]","name":"rangeOutcomes","type":"uint256[]"},{"internalType":"uint256[]","name":"payouts","type":"uint256[]"},{"internalType":"uint32","name":"numGames","type":"uint32"},{"internalType":"uint256","name":"l2eAmount","type":"uint256"}],"indexed":false,"internalType":"struct ZapankiRangeKroma.RangeFulfilledData","name":"eventData","type":"tuple"}],"name":"RangeFulfilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint256","name":"wager","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"}],"name":"RangeRefund","type":"event"},{"inputs":[],"name":"ECOTONE_GAS_CALC_CONSTANT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bankroll","outputs":[{"internalType":"contract IBankroll","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callback","outputs":[{"internalType":"contract ICallback","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimableVRFFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collectVrfFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"player","type":"address"}],"name":"getCurrentUserState","outputs":[{"components":[{"internalType":"uint256","name":"wager","type":"uint256"},{"internalType":"uint256","name":"stopGain","type":"uint256"},{"internalType":"uint256","name":"stopLoss","type":"uint256"},{"internalType":"uint256","name":"vrfId","type":"uint256"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint64","name":"blockNumber","type":"uint64"},{"internalType":"uint32","name":"numBets","type":"uint32"},{"internalType":"uint32","name":"multiplier","type":"uint32"},{"internalType":"bool","name":"isOver","type":"bool"}],"internalType":"struct ZapankiRangeKroma.RangeGame","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gasAmount","type":"uint256"}],"name":"getVRFFee","outputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"wager","type":"uint256"},{"internalType":"uint32","name":"multiplier","type":"uint32"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"bool","name":"isOver","type":"bool"},{"internalType":"uint32","name":"numBets","type":"uint32"},{"internalType":"uint256","name":"stopGain","type":"uint256"},{"internalType":"uint256","name":"stopLoss","type":"uint256"}],"name":"play","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vrfCoordinator","outputs":[{"internalType":"contract ISupraRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vrfDepositor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200242e3803806200242e8339810160408190526200003491620000af565b6001600081905580546001600160a01b039586166001600160a01b031991821617909155600380549486169482168517905560048054821690941790935560058054928516928416929092179091556002805491909316911617905562000117565b6001600160a01b0381168114620000ac57600080fd5b50565b60008060008060808587031215620000c657600080fd5b8451620000d38162000096565b6020860151909450620000e68162000096565b6040860151909350620000f98162000096565b60608601519092506200010c8162000096565b939692955090935050565b61230780620001276000396000f3fe6080604052600436106100dd5760003560e01c806374b0a7891161007f57806380cfa5271161005957806380cfa527146103395780638bd161141461034f578063a3e56fa81461036f578063a50ce2f71461038f57600080fd5b806374b0a789146101eb57806376fca03d146102005780637da0a8771461031957600080fd5b80631fe543e3116100bb5780631fe543e3146101545780633371619414610174578063572b6c0514610197578063590e1ae3146101d657600080fd5b8063083b2732146100e25780630c657eb01461011f5780631f3302181461013f575b600080fd5b3480156100ee57600080fd5b50600454610102906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012b57600080fd5b50600354610102906001600160a01b031681565b61015261014d366004611c7f565b6103af565b005b34801561016057600080fd5b5061015261016f366004611d0f565b610792565b34801561018057600080fd5b50610189601081565b604051908152602001610116565b3480156101a357600080fd5b506101c66101b2366004611dd8565b6005546001600160a01b0391821691161490565b6040519015158152602001610116565b3480156101e257600080fd5b506101526107b7565b3480156101f757600080fd5b50610152610a46565b34801561020c57600080fd5b5061030c61021b366004611dd8565b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810191909152506001600160a01b03908116600090815260096020908152604091829020825161012081018452815481526001820154928101929092526002810154928201929092526003820154606082015260048201549283166080820152600160a01b83046001600160401b031660a0820152600160e01b90920463ffffffff90811660c084015260059091015490811660e0830152640100000000900460ff16151561010082015290565b6040516101169190611df5565b34801561032557600080fd5b50600554610102906001600160a01b031681565b34801561034557600080fd5b5061018960075481565b34801561035b57600080fd5b5061018961036a366004611e8c565b610bb1565b34801561037b57600080fd5b50600154610102906001600160a01b031681565b34801561039b57600080fd5b50600254610102906001600160a01b031681565b6103b7610e4e565b60006103c1610e78565b90508663ffffffff166128b5111580156103e4575062970fe08763ffffffff1611155b61042a5760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21036bab63a34b83634b2b960711b60448201526064015b60405180910390fd5b6001600160a01b038116600090815260096020526040902060030154156104895760405162461bcd60e51b815260206004820152601360248201527215d85a5d1a5b99c8159491881c995c5d595cdd606a1b6044820152606401610421565b8363ffffffff1660001080156104a6575060648463ffffffff1611155b6104e45760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206e756d4265747360881b6044820152606401610421565b6104f588878963ffffffff16610e9f565b6105138661050963ffffffff87168b611ebb565b620f424084610fa0565b600061051e856110f0565b90506040518061012001604052808a8152602001858152602001848152602001828152602001886001600160a01b03168152602001436001600160401b031681526020018663ffffffff1681526020018963ffffffff16815260200187151581525060096000846001600160a01b03166001600160a01b031681526020019081526020016000206000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060a08201518160040160146101000a8154816001600160401b0302191690836001600160401b0316021790555060c082015181600401601c6101000a81548163ffffffff021916908363ffffffff16021790555060e08201518160050160006101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160050160046101000a81548160ff02191690831515021790555090505081600a600083815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600460009054906101000a90046001600160a01b03166001600160a01b03166327ffe8436005848a8d8a6040518663ffffffff1660e01b815260040161074b95949392919063ffffffff95861681526001600160a01b03948516602082015292909316604083015260608201529116608082015260a00190565b600060405180830381600087803b15801561076557600080fd5b505af1158015610779573d6000803e3d6000fd5b5050505050506107896001600055565b50505050505050565b6001546001600160a01b031633146107a957600080fd5b6107b382826111c2565b5050565b6107bf610e4e565b60006107c9610e78565b6001600160a01b038116600090815260096020526040812060038101549293509190036108385760405162461bcd60e51b815260206004820152601760248201527f4e6f742077616974696e672056524620726571756573740000000000000000006044820152606401610421565b6004810154439061085c906103e890600160a01b90046001600160401b0316611ed2565b61086790600a611ed2565b6001600160401b031611156108aa5760405162461bcd60e51b8152602060048201526009602482015268546f6f206561726c7960b81b6044820152606401610421565b600481015481546000916108cc91600160e01b90910463ffffffff1690611ebb565b60048301549091506001600160a01b03168061097d576000846001600160a01b03168360405160006040518083038185875af1925050503d806000811461092f576040519150601f19603f3d011682016040523d82523d6000602084013e610934565b606091505b50509050806109775760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610421565b50610991565b6109916001600160a01b03821685846117db565b604080518381526001600160a01b0383811660208301528616917f97708e28150f34c8526fef7a5eb506b2b08e2e667a559124edb8697980df604f910160405180910390a250506003908101546000908152600a6020908152604080832080546001600160a01b03191690556001600160a01b039490941682526009905291822082815560018181018490556002820184905591810183905560048101839055600501805464ffffffffff191690559055565b565b610a4e610e4e565b600360009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac59190611ef9565b6001600160a01b0316336001600160a01b031614610b115760405162461bcd60e51b81526020600482015260096024820152682737ba1027bbb732b960b91b6044820152606401610421565b60078054600091829055604051909190339083908381818185875af1925050503d8060008114610b5d576040519150601f19603f3d011682016040523d82523d6000602084013e610b62565b606091505b5050905080610ba55760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b6044820152606401610421565b5050610a446001600055565b600080600f602160991b016001600160a01b031663519b4bd36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bf9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1d9190611f16565b6010600f602160991b016001600160a01b031663c59859186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c889190611f2f565b63ffffffff16610c989190611ebb565b610ca29190611ebb565b90506000600f602160991b016001600160a01b031663f82061406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ceb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0f9190611f16565b600f602160991b016001600160a01b03166368d5dca66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d789190611f2f565b63ffffffff16610d889190611ebb565b90506000600f602160991b016001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df59190611f16565b610e0090600a612030565b610e0b906010611ebb565b610e15838561203c565b610e2190611a2c611ebb565b610e2b9190612065565b905080610e3b86620f433c611ebb565b610e45919061203c565b95945050505050565b600260005403610e7157604051633ee5aeb560e01b815260040160405180910390fd5b6002600055565b6005546000906001600160a01b03163303610e9a575060131936013560601c90565b503390565b60006001600160a01b038316610ec257506003546001600160a01b031631610f33565b6003546040516370a0823160e01b81526001600160a01b039182166004820152908416906370a0823190602401602060405180830381865afa158015610f0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f309190611f16565b90505b6000610f4161271084612079565b610f4c83606e611ebb565b610f569190612065565b905080851115610f995760405162461bcd60e51b815260206004820152600e60248201526d2a37b79036b0b73c903bb0b3b2b960911b6044820152606401610421565b5050505050565b600354604051632ff5fe7360e21b81523060048201526001600160a01b0386811660248301529091169063bfd7f9cc90604401602060405180830381865afa158015610ff0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611014919061208c565b6110555760405162461bcd60e51b8152602060048201526012602482015271151bdad95b881b9bdd08185c1c1c9bdd995960721b6044820152606401610421565b826000036110a55760405162461bcd60e51b815260206004820152601c60248201527f5761676572206d7573742062652067726561746572207468616e2030000000006044820152606401610421565b6001600160a01b0384166110cb576110c66110c08434612079565b8361183f565b6110ea565b6110d5348361183f565b6110ea6001600160a01b0385168230866118c1565b50505050565b6001805460025460405163d291ba0960e01b815260806004820152602860848201527f72617746756c66696c6c52616e646f6d576f7264732875696e743235362c756960a4820152676e743235365b5d2960c01b60c482015260ff8516602482015260448101939093526001600160a01b03908116606484015260009291169063d291ba099060e4016020604051808303816000875af1158015611198573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111bc9190611f16565b92915050565b6000828152600a60205260409020546001600160a01b0316806111e457505050565b6001600160a01b0381166000908152600960205260409020600481015461121e906103e890600160a01b90046001600160401b0316611ed2565b6001600160401b03164311156112345750505050565b6004810154600090819081908190600160e01b900463ffffffff166001600160401b0381111561126657611266611cf9565b60405190808252806020026020018201604052801561128f578160200160208202803683370190505b506004860154909150600090600160e01b900463ffffffff166001600160401b038111156112bf576112bf611cf9565b6040519080825280602002602001820160405280156112e8578160200160208202803683370190505b5060058701549091506000906113099063ffffffff1664170cdc1e006120a9565b64ffffffffff16905060006113218262989680612079565b885460058a0154919250600091612710916113419163ffffffff16611ebb565b61134b9190612065565b60048a0154600097509091506001600160a01b03165b60048a015463ffffffff600160e01b909104811690881610156114f25789600101548912156114f2578960020154611398906120cd565b8913156114f257629896808c8863ffffffff16815181106113bb576113bb6120e9565b60200260200101516113cd91906120ff565b868863ffffffff16815181106113e5576113e56120e9565b60200260200101818152505082868863ffffffff168151811061140a5761140a6120e9565b602002602001015110158015611431575060058a0154640100000000900460ff1615156001145b156114845789546114429083612079565b61144c908a612113565b9850611458828961203c565b975081858863ffffffff1681518110611473576114736120e9565b6020026020010181815250506114e0565b83868863ffffffff168151811061149d5761149d6120e9565b6020026020010151111580156114c0575060058a0154640100000000900460ff16155b156114d15789546114429083612079565b89546114dd908a612133565b98505b866114ea81612153565b975050611361565b895460048b0154611511908990600160e01b900463ffffffff16612176565b63ffffffff166115219190611ebb565b61152b908961203c565b60048b01548b5491995061155891839161155391600160e01b90910463ffffffff1690611ebb565b6118fa565b8715611569576115698b89836119b5565b600480548b8201548c5460405163e2382aa160e01b81526005948101949094526001600160a01b038f811660248601529182166044850152606484015263ffffffff8a16608484015260a483018b9052169063e2382aa19060c401600060405180830381600087803b1580156115de57600080fd5b505af11580156115f2573d6000803e3d6000fd5b50505060008e8152600a6020526040812080546001600160a01b03191690558b549091506116279063ffffffff8a1690611ebb565b60035460405160016292610160e01b031981526001600160a01b038f81166004830152858116602483015260448201849052606482018d90529293506000929091169063ff6d9eff906084016020604051808303816000875af1158015611692573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b69190611f16565b905060006040518061014001604052808f6001600160a01b031681526020018e6000015481526020018c8152602001856001600160a01b031681526020018e60050160009054906101000a900463ffffffff1663ffffffff1681526020018e60050160049054906101000a900460ff16151581526020018a81526020018981526020018b63ffffffff1681526020018381525090507f8796220875a792521dbd0c98d237f91e8d7f59f8a477af4d30995874aef93be88160405161177a91906121ce565b60405180910390a15050506001600160a01b03909a1660009081526009602052604081208181556001810182905560028101829055600381018290556004810191909155600501805464ffffffffff19169055505050505050505050505050565b6040516001600160a01b0383811660248301526044820183905261183a91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611a1f565b505050565b600061184a82610bb1565b9050808310156118935760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e74207672662066656560601b6044820152606401610421565b6118a56118a08285612079565b611a82565b80600760008282546118b7919061203c565b9091555050505050565b6040516001600160a01b0384811660248301528381166044830152606482018390526110ea9186918216906323b872dd90608401611808565b6001600160a01b03821661199b576003546040516000916001600160a01b03169083908381818185875af1925050503d8060008114611955576040519150601f19603f3d011682016040523d82523d6000602084013e61195a565b606091505b505090508061183a5760405162461bcd60e51b815260206004820152600d60248201526c1c99599d5b990819985a5b1959609a1b6044820152606401610421565b6003546107b3906001600160a01b038481169116836117db565b6003546040516336012f6160e11b81526001600160a01b03858116600483015260248201859052838116604483015290911690636c025ec290606401600060405180830381600087803b158015611a0b57600080fd5b505af1158015610789573d6000803e3d6000fd5b6000611a346001600160a01b03841683611b13565b90508051600014158015611a59575080806020019051810190611a57919061208c565b155b1561183a57604051635274afe760e01b81526001600160a01b0384166004820152602401610421565b8015611b1057604051600090339083908381818185875af1925050503d8060008114611aca576040519150601f19603f3d011682016040523d82523d6000602084013e611acf565b606091505b50509050806107b35760405162461bcd60e51b815260206004820152600d60248201526c1c99599d5b990819985a5b1959609a1b6044820152606401610421565b50565b6060611b2183836000611b28565b9392505050565b606081471015611b4d5760405163cd78605960e01b8152306004820152602401610421565b600080856001600160a01b03168486604051611b6991906122a2565b60006040518083038185875af1925050503d8060008114611ba6576040519150601f19603f3d011682016040523d82523d6000602084013e611bab565b606091505b5091509150611bbb868383611bc5565b9695505050505050565b606082611bda57611bd582611c21565b611b21565b8151158015611bf157506001600160a01b0384163b155b15611c1a57604051639996b31560e01b81526001600160a01b0385166004820152602401610421565b5080611b21565b805115611c315780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b63ffffffff81168114611b1057600080fd5b6001600160a01b0381168114611b1057600080fd5b8015158114611b1057600080fd5b600080600080600080600060e0888a031215611c9a57600080fd5b873596506020880135611cac81611c4a565b95506040880135611cbc81611c5c565b94506060880135611ccc81611c71565b93506080880135611cdc81611c4a565b9699959850939692959460a0840135945060c09093013592915050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215611d2257600080fd5b823591506020808401356001600160401b0380821115611d4157600080fd5b818601915086601f830112611d5557600080fd5b813581811115611d6757611d67611cf9565b8060051b604051601f19603f83011681018181108582111715611d8c57611d8c611cf9565b604052918252848201925083810185019189831115611daa57600080fd5b938501935b82851015611dc857843584529385019392850192611daf565b8096505050505050509250929050565b600060208284031215611dea57600080fd5b8135611b2181611c5c565b6000610120820190508251825260208301516020830152604083015160408301526060830151606083015260018060a01b0360808401511660808301526001600160401b0360a08401511660a083015260c0830151611e5c60c084018263ffffffff169052565b5060e0830151611e7460e084018263ffffffff169052565b5061010083810151801515848301525b505092915050565b600060208284031215611e9e57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176111bc576111bc611ea5565b6001600160401b03818116838216019080821115611ef257611ef2611ea5565b5092915050565b600060208284031215611f0b57600080fd5b8151611b2181611c5c565b600060208284031215611f2857600080fd5b5051919050565b600060208284031215611f4157600080fd5b8151611b2181611c4a565b600181815b80851115611f87578160001904821115611f6d57611f6d611ea5565b80851615611f7a57918102915b93841c9390800290611f51565b509250929050565b600082611f9e575060016111bc565b81611fab575060006111bc565b8160018114611fc15760028114611fcb57611fe7565b60019150506111bc565b60ff841115611fdc57611fdc611ea5565b50506001821b6111bc565b5060208310610133831016604e8410600b841016171561200a575081810a6111bc565b6120148383611f4c565b806000190482111561202857612028611ea5565b029392505050565b6000611b218383611f8f565b808201808211156111bc576111bc611ea5565b634e487b7160e01b600052601260045260246000fd5b6000826120745761207461204f565b500490565b818103818111156111bc576111bc611ea5565b60006020828403121561209e57600080fd5b8151611b2181611c71565b600064ffffffffff808416806120c1576120c161204f565b92169190910492915050565b6000600160ff1b82016120e2576120e2611ea5565b5060000390565b634e487b7160e01b600052603260045260246000fd5b60008261210e5761210e61204f565b500690565b8082018281126000831280158216821582161715611e8457611e84611ea5565b8181036000831280158383131683831282161715611ef257611ef2611ea5565b600063ffffffff80831681810361216c5761216c611ea5565b6001019392505050565b63ffffffff828116828216039080821115611ef257611ef2611ea5565b600081518084526020808501945080840160005b838110156121c3578151875295820195908201906001016121a7565b509495945050505050565b602081526121e86020820183516001600160a01b03169052565b60208201516040820152604082015160608201526000606083015161221860808401826001600160a01b03169052565b50608083015163ffffffff811660a08401525060a083015180151560c08401525060c08301516101408060e0850152612255610160850183612193565b915060e0850151610100601f1986850301818701526122748483612193565b9350808701519150506101206122918187018363ffffffff169052565b959095015193019290925250919050565b6000825160005b818110156122c357602081860181015185830152016122a9565b50600092019182525091905056fea264697066735822122061bdac9be8b283c8dcdcd9a091281d3ba645abdf8519e474b2224cb911d1777364736f6c63430008140033000000000000000000000000589b45f2c65796fc60b1b61802b10d7c7de86cc70000000000000000000000004334b45b8eb99b68c37d75ccad4a1559b865c2120000000000000000000000004334b45b8eb99b68c37d75ccad4a1559b865c21200000000000000000000000027280e40b343995210ce79ca04000e753fa6d031
Deployed Bytecode
0x6080604052600436106100dd5760003560e01c806374b0a7891161007f57806380cfa5271161005957806380cfa527146103395780638bd161141461034f578063a3e56fa81461036f578063a50ce2f71461038f57600080fd5b806374b0a789146101eb57806376fca03d146102005780637da0a8771461031957600080fd5b80631fe543e3116100bb5780631fe543e3146101545780633371619414610174578063572b6c0514610197578063590e1ae3146101d657600080fd5b8063083b2732146100e25780630c657eb01461011f5780631f3302181461013f575b600080fd5b3480156100ee57600080fd5b50600454610102906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012b57600080fd5b50600354610102906001600160a01b031681565b61015261014d366004611c7f565b6103af565b005b34801561016057600080fd5b5061015261016f366004611d0f565b610792565b34801561018057600080fd5b50610189601081565b604051908152602001610116565b3480156101a357600080fd5b506101c66101b2366004611dd8565b6005546001600160a01b0391821691161490565b6040519015158152602001610116565b3480156101e257600080fd5b506101526107b7565b3480156101f757600080fd5b50610152610a46565b34801561020c57600080fd5b5061030c61021b366004611dd8565b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810191909152506001600160a01b03908116600090815260096020908152604091829020825161012081018452815481526001820154928101929092526002810154928201929092526003820154606082015260048201549283166080820152600160a01b83046001600160401b031660a0820152600160e01b90920463ffffffff90811660c084015260059091015490811660e0830152640100000000900460ff16151561010082015290565b6040516101169190611df5565b34801561032557600080fd5b50600554610102906001600160a01b031681565b34801561034557600080fd5b5061018960075481565b34801561035b57600080fd5b5061018961036a366004611e8c565b610bb1565b34801561037b57600080fd5b50600154610102906001600160a01b031681565b34801561039b57600080fd5b50600254610102906001600160a01b031681565b6103b7610e4e565b60006103c1610e78565b90508663ffffffff166128b5111580156103e4575062970fe08763ffffffff1611155b61042a5760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21036bab63a34b83634b2b960711b60448201526064015b60405180910390fd5b6001600160a01b038116600090815260096020526040902060030154156104895760405162461bcd60e51b815260206004820152601360248201527215d85a5d1a5b99c8159491881c995c5d595cdd606a1b6044820152606401610421565b8363ffffffff1660001080156104a6575060648463ffffffff1611155b6104e45760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206e756d4265747360881b6044820152606401610421565b6104f588878963ffffffff16610e9f565b6105138661050963ffffffff87168b611ebb565b620f424084610fa0565b600061051e856110f0565b90506040518061012001604052808a8152602001858152602001848152602001828152602001886001600160a01b03168152602001436001600160401b031681526020018663ffffffff1681526020018963ffffffff16815260200187151581525060096000846001600160a01b03166001600160a01b031681526020019081526020016000206000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060a08201518160040160146101000a8154816001600160401b0302191690836001600160401b0316021790555060c082015181600401601c6101000a81548163ffffffff021916908363ffffffff16021790555060e08201518160050160006101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160050160046101000a81548160ff02191690831515021790555090505081600a600083815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600460009054906101000a90046001600160a01b03166001600160a01b03166327ffe8436005848a8d8a6040518663ffffffff1660e01b815260040161074b95949392919063ffffffff95861681526001600160a01b03948516602082015292909316604083015260608201529116608082015260a00190565b600060405180830381600087803b15801561076557600080fd5b505af1158015610779573d6000803e3d6000fd5b5050505050506107896001600055565b50505050505050565b6001546001600160a01b031633146107a957600080fd5b6107b382826111c2565b5050565b6107bf610e4e565b60006107c9610e78565b6001600160a01b038116600090815260096020526040812060038101549293509190036108385760405162461bcd60e51b815260206004820152601760248201527f4e6f742077616974696e672056524620726571756573740000000000000000006044820152606401610421565b6004810154439061085c906103e890600160a01b90046001600160401b0316611ed2565b61086790600a611ed2565b6001600160401b031611156108aa5760405162461bcd60e51b8152602060048201526009602482015268546f6f206561726c7960b81b6044820152606401610421565b600481015481546000916108cc91600160e01b90910463ffffffff1690611ebb565b60048301549091506001600160a01b03168061097d576000846001600160a01b03168360405160006040518083038185875af1925050503d806000811461092f576040519150601f19603f3d011682016040523d82523d6000602084013e610934565b606091505b50509050806109775760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610421565b50610991565b6109916001600160a01b03821685846117db565b604080518381526001600160a01b0383811660208301528616917f97708e28150f34c8526fef7a5eb506b2b08e2e667a559124edb8697980df604f910160405180910390a250506003908101546000908152600a6020908152604080832080546001600160a01b03191690556001600160a01b039490941682526009905291822082815560018181018490556002820184905591810183905560048101839055600501805464ffffffffff191690559055565b565b610a4e610e4e565b600360009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac59190611ef9565b6001600160a01b0316336001600160a01b031614610b115760405162461bcd60e51b81526020600482015260096024820152682737ba1027bbb732b960b91b6044820152606401610421565b60078054600091829055604051909190339083908381818185875af1925050503d8060008114610b5d576040519150601f19603f3d011682016040523d82523d6000602084013e610b62565b606091505b5050905080610ba55760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b6044820152606401610421565b5050610a446001600055565b600080600f602160991b016001600160a01b031663519b4bd36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bf9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1d9190611f16565b6010600f602160991b016001600160a01b031663c59859186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c889190611f2f565b63ffffffff16610c989190611ebb565b610ca29190611ebb565b90506000600f602160991b016001600160a01b031663f82061406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ceb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0f9190611f16565b600f602160991b016001600160a01b03166368d5dca66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d789190611f2f565b63ffffffff16610d889190611ebb565b90506000600f602160991b016001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df59190611f16565b610e0090600a612030565b610e0b906010611ebb565b610e15838561203c565b610e2190611a2c611ebb565b610e2b9190612065565b905080610e3b86620f433c611ebb565b610e45919061203c565b95945050505050565b600260005403610e7157604051633ee5aeb560e01b815260040160405180910390fd5b6002600055565b6005546000906001600160a01b03163303610e9a575060131936013560601c90565b503390565b60006001600160a01b038316610ec257506003546001600160a01b031631610f33565b6003546040516370a0823160e01b81526001600160a01b039182166004820152908416906370a0823190602401602060405180830381865afa158015610f0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f309190611f16565b90505b6000610f4161271084612079565b610f4c83606e611ebb565b610f569190612065565b905080851115610f995760405162461bcd60e51b815260206004820152600e60248201526d2a37b79036b0b73c903bb0b3b2b960911b6044820152606401610421565b5050505050565b600354604051632ff5fe7360e21b81523060048201526001600160a01b0386811660248301529091169063bfd7f9cc90604401602060405180830381865afa158015610ff0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611014919061208c565b6110555760405162461bcd60e51b8152602060048201526012602482015271151bdad95b881b9bdd08185c1c1c9bdd995960721b6044820152606401610421565b826000036110a55760405162461bcd60e51b815260206004820152601c60248201527f5761676572206d7573742062652067726561746572207468616e2030000000006044820152606401610421565b6001600160a01b0384166110cb576110c66110c08434612079565b8361183f565b6110ea565b6110d5348361183f565b6110ea6001600160a01b0385168230866118c1565b50505050565b6001805460025460405163d291ba0960e01b815260806004820152602860848201527f72617746756c66696c6c52616e646f6d576f7264732875696e743235362c756960a4820152676e743235365b5d2960c01b60c482015260ff8516602482015260448101939093526001600160a01b03908116606484015260009291169063d291ba099060e4016020604051808303816000875af1158015611198573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111bc9190611f16565b92915050565b6000828152600a60205260409020546001600160a01b0316806111e457505050565b6001600160a01b0381166000908152600960205260409020600481015461121e906103e890600160a01b90046001600160401b0316611ed2565b6001600160401b03164311156112345750505050565b6004810154600090819081908190600160e01b900463ffffffff166001600160401b0381111561126657611266611cf9565b60405190808252806020026020018201604052801561128f578160200160208202803683370190505b506004860154909150600090600160e01b900463ffffffff166001600160401b038111156112bf576112bf611cf9565b6040519080825280602002602001820160405280156112e8578160200160208202803683370190505b5060058701549091506000906113099063ffffffff1664170cdc1e006120a9565b64ffffffffff16905060006113218262989680612079565b885460058a0154919250600091612710916113419163ffffffff16611ebb565b61134b9190612065565b60048a0154600097509091506001600160a01b03165b60048a015463ffffffff600160e01b909104811690881610156114f25789600101548912156114f2578960020154611398906120cd565b8913156114f257629896808c8863ffffffff16815181106113bb576113bb6120e9565b60200260200101516113cd91906120ff565b868863ffffffff16815181106113e5576113e56120e9565b60200260200101818152505082868863ffffffff168151811061140a5761140a6120e9565b602002602001015110158015611431575060058a0154640100000000900460ff1615156001145b156114845789546114429083612079565b61144c908a612113565b9850611458828961203c565b975081858863ffffffff1681518110611473576114736120e9565b6020026020010181815250506114e0565b83868863ffffffff168151811061149d5761149d6120e9565b6020026020010151111580156114c0575060058a0154640100000000900460ff16155b156114d15789546114429083612079565b89546114dd908a612133565b98505b866114ea81612153565b975050611361565b895460048b0154611511908990600160e01b900463ffffffff16612176565b63ffffffff166115219190611ebb565b61152b908961203c565b60048b01548b5491995061155891839161155391600160e01b90910463ffffffff1690611ebb565b6118fa565b8715611569576115698b89836119b5565b600480548b8201548c5460405163e2382aa160e01b81526005948101949094526001600160a01b038f811660248601529182166044850152606484015263ffffffff8a16608484015260a483018b9052169063e2382aa19060c401600060405180830381600087803b1580156115de57600080fd5b505af11580156115f2573d6000803e3d6000fd5b50505060008e8152600a6020526040812080546001600160a01b03191690558b549091506116279063ffffffff8a1690611ebb565b60035460405160016292610160e01b031981526001600160a01b038f81166004830152858116602483015260448201849052606482018d90529293506000929091169063ff6d9eff906084016020604051808303816000875af1158015611692573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b69190611f16565b905060006040518061014001604052808f6001600160a01b031681526020018e6000015481526020018c8152602001856001600160a01b031681526020018e60050160009054906101000a900463ffffffff1663ffffffff1681526020018e60050160049054906101000a900460ff16151581526020018a81526020018981526020018b63ffffffff1681526020018381525090507f8796220875a792521dbd0c98d237f91e8d7f59f8a477af4d30995874aef93be88160405161177a91906121ce565b60405180910390a15050506001600160a01b03909a1660009081526009602052604081208181556001810182905560028101829055600381018290556004810191909155600501805464ffffffffff19169055505050505050505050505050565b6040516001600160a01b0383811660248301526044820183905261183a91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611a1f565b505050565b600061184a82610bb1565b9050808310156118935760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e74207672662066656560601b6044820152606401610421565b6118a56118a08285612079565b611a82565b80600760008282546118b7919061203c565b9091555050505050565b6040516001600160a01b0384811660248301528381166044830152606482018390526110ea9186918216906323b872dd90608401611808565b6001600160a01b03821661199b576003546040516000916001600160a01b03169083908381818185875af1925050503d8060008114611955576040519150601f19603f3d011682016040523d82523d6000602084013e61195a565b606091505b505090508061183a5760405162461bcd60e51b815260206004820152600d60248201526c1c99599d5b990819985a5b1959609a1b6044820152606401610421565b6003546107b3906001600160a01b038481169116836117db565b6003546040516336012f6160e11b81526001600160a01b03858116600483015260248201859052838116604483015290911690636c025ec290606401600060405180830381600087803b158015611a0b57600080fd5b505af1158015610789573d6000803e3d6000fd5b6000611a346001600160a01b03841683611b13565b90508051600014158015611a59575080806020019051810190611a57919061208c565b155b1561183a57604051635274afe760e01b81526001600160a01b0384166004820152602401610421565b8015611b1057604051600090339083908381818185875af1925050503d8060008114611aca576040519150601f19603f3d011682016040523d82523d6000602084013e611acf565b606091505b50509050806107b35760405162461bcd60e51b815260206004820152600d60248201526c1c99599d5b990819985a5b1959609a1b6044820152606401610421565b50565b6060611b2183836000611b28565b9392505050565b606081471015611b4d5760405163cd78605960e01b8152306004820152602401610421565b600080856001600160a01b03168486604051611b6991906122a2565b60006040518083038185875af1925050503d8060008114611ba6576040519150601f19603f3d011682016040523d82523d6000602084013e611bab565b606091505b5091509150611bbb868383611bc5565b9695505050505050565b606082611bda57611bd582611c21565b611b21565b8151158015611bf157506001600160a01b0384163b155b15611c1a57604051639996b31560e01b81526001600160a01b0385166004820152602401610421565b5080611b21565b805115611c315780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b63ffffffff81168114611b1057600080fd5b6001600160a01b0381168114611b1057600080fd5b8015158114611b1057600080fd5b600080600080600080600060e0888a031215611c9a57600080fd5b873596506020880135611cac81611c4a565b95506040880135611cbc81611c5c565b94506060880135611ccc81611c71565b93506080880135611cdc81611c4a565b9699959850939692959460a0840135945060c09093013592915050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215611d2257600080fd5b823591506020808401356001600160401b0380821115611d4157600080fd5b818601915086601f830112611d5557600080fd5b813581811115611d6757611d67611cf9565b8060051b604051601f19603f83011681018181108582111715611d8c57611d8c611cf9565b604052918252848201925083810185019189831115611daa57600080fd5b938501935b82851015611dc857843584529385019392850192611daf565b8096505050505050509250929050565b600060208284031215611dea57600080fd5b8135611b2181611c5c565b6000610120820190508251825260208301516020830152604083015160408301526060830151606083015260018060a01b0360808401511660808301526001600160401b0360a08401511660a083015260c0830151611e5c60c084018263ffffffff169052565b5060e0830151611e7460e084018263ffffffff169052565b5061010083810151801515848301525b505092915050565b600060208284031215611e9e57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176111bc576111bc611ea5565b6001600160401b03818116838216019080821115611ef257611ef2611ea5565b5092915050565b600060208284031215611f0b57600080fd5b8151611b2181611c5c565b600060208284031215611f2857600080fd5b5051919050565b600060208284031215611f4157600080fd5b8151611b2181611c4a565b600181815b80851115611f87578160001904821115611f6d57611f6d611ea5565b80851615611f7a57918102915b93841c9390800290611f51565b509250929050565b600082611f9e575060016111bc565b81611fab575060006111bc565b8160018114611fc15760028114611fcb57611fe7565b60019150506111bc565b60ff841115611fdc57611fdc611ea5565b50506001821b6111bc565b5060208310610133831016604e8410600b841016171561200a575081810a6111bc565b6120148383611f4c565b806000190482111561202857612028611ea5565b029392505050565b6000611b218383611f8f565b808201808211156111bc576111bc611ea5565b634e487b7160e01b600052601260045260246000fd5b6000826120745761207461204f565b500490565b818103818111156111bc576111bc611ea5565b60006020828403121561209e57600080fd5b8151611b2181611c71565b600064ffffffffff808416806120c1576120c161204f565b92169190910492915050565b6000600160ff1b82016120e2576120e2611ea5565b5060000390565b634e487b7160e01b600052603260045260246000fd5b60008261210e5761210e61204f565b500690565b8082018281126000831280158216821582161715611e8457611e84611ea5565b8181036000831280158383131683831282161715611ef257611ef2611ea5565b600063ffffffff80831681810361216c5761216c611ea5565b6001019392505050565b63ffffffff828116828216039080821115611ef257611ef2611ea5565b600081518084526020808501945080840160005b838110156121c3578151875295820195908201906001016121a7565b509495945050505050565b602081526121e86020820183516001600160a01b03169052565b60208201516040820152604082015160608201526000606083015161221860808401826001600160a01b03169052565b50608083015163ffffffff811660a08401525060a083015180151560c08401525060c08301516101408060e0850152612255610160850183612193565b915060e0850151610100601f1986850301818701526122748483612193565b9350808701519150506101206122918187018363ffffffff169052565b959095015193019290925250919050565b6000825160005b818110156122c357602081860181015185830152016122a9565b50600092019182525091905056fea264697066735822122061bdac9be8b283c8dcdcd9a091281d3ba645abdf8519e474b2224cb911d1777364736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000589b45f2c65796fc60b1b61802b10d7c7de86cc70000000000000000000000004334b45b8eb99b68c37d75ccad4a1559b865c2120000000000000000000000004334b45b8eb99b68c37d75ccad4a1559b865c21200000000000000000000000027280e40b343995210ce79ca04000e753fa6d031
-----Decoded View---------------
Arg [0] : _vrfCoordinator (address): 0x589b45F2c65796fc60b1b61802B10d7C7de86cc7
Arg [1] : _bankroll (address): 0x4334b45B8eb99b68c37d75ccad4a1559B865c212
Arg [2] : _trustedForwarder (address): 0x4334b45B8eb99b68c37d75ccad4a1559B865c212
Arg [3] : _vrfDepositor (address): 0x27280E40b343995210cE79CA04000e753Fa6d031
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000589b45f2c65796fc60b1b61802b10d7c7de86cc7
Arg [1] : 0000000000000000000000004334b45b8eb99b68c37d75ccad4a1559b865c212
Arg [2] : 0000000000000000000000004334b45b8eb99b68c37d75ccad4a1559b865c212
Arg [3] : 00000000000000000000000027280e40b343995210ce79ca04000e753fa6d031
Loading...
Loading
OVERVIEW
Range contract of ZapankiSwap gamesLoading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
KROMA | Ether (ETH) | 100.00% | $2,424.37 | 0.0075084 | $18.2 |
[ 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.