Contract 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254

Contract Overview

Balance:
0 BNB
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x214f74286b9d324de9c21c673f4f44b440cf6737ca9e2dcb34001a4577d041f00x60c06040110032032021-07-29 3:55:3161 days 9 hrs ago0xb9d1d56b05b692f44bd60f8427aef0f8ffda5c15 IN  Contract Creation0 BNB0.02065032
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xa85c66a7bb290cd331864834856e40eddce046850715d6a8b8a0fa030c53b498113309962021-08-09 13:37:2750 days 16 mins ago 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254 0xdd91ab049082721670846ccb64ccc4dc5301c4e00 BNB
0xa85c66a7bb290cd331864834856e40eddce046850715d6a8b8a0fa030c53b498113309962021-08-09 13:37:2750 days 16 mins ago 0xa555fc018435bef5a13c6c6870a9d4c11dec329c 0x68a8567c2f3ff0c4a0917ae4180df06b048b72540 BNB
0x899e9f4497f6dca4eaf59da8add56a07c84c8db1fc606655007695a3fb32edeb113309802021-08-09 13:36:3950 days 17 mins ago 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254 0x84b9b910527ad5c03a9ca831909e21e236ea7b060 BNB
0x899e9f4497f6dca4eaf59da8add56a07c84c8db1fc606655007695a3fb32edeb113309802021-08-09 13:36:3950 days 17 mins ago 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254 0x84b9b910527ad5c03a9ca831909e21e236ea7b060 BNB
0x899e9f4497f6dca4eaf59da8add56a07c84c8db1fc606655007695a3fb32edeb113309802021-08-09 13:36:3950 days 17 mins ago 0xdd91ab049082721670846ccb64ccc4dc5301c4e0 0x68a8567c2f3ff0c4a0917ae4180df06b048b72540 BNB
0x36fa3cf0d4f7bd189de1b8bb943d5bc241a44936455b5781e29ef90c7e80a5f7113288162021-08-09 11:48:2650 days 2 hrs ago 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254 0xdd91ab049082721670846ccb64ccc4dc5301c4e00 BNB
0x36fa3cf0d4f7bd189de1b8bb943d5bc241a44936455b5781e29ef90c7e80a5f7113288162021-08-09 11:48:2650 days 2 hrs ago 0xa555fc018435bef5a13c6c6870a9d4c11dec329c 0x68a8567c2f3ff0c4a0917ae4180df06b048b72540 BNB
0x2cbac354d5598e16124d0e5e68a5a73ce830bfbb11e6e9afd2ff2de7da30c141113288012021-08-09 11:47:4150 days 2 hrs ago 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254 0x84b9b910527ad5c03a9ca831909e21e236ea7b060 BNB
0x2cbac354d5598e16124d0e5e68a5a73ce830bfbb11e6e9afd2ff2de7da30c141113288012021-08-09 11:47:4150 days 2 hrs ago 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254 0x84b9b910527ad5c03a9ca831909e21e236ea7b060 BNB
0x2cbac354d5598e16124d0e5e68a5a73ce830bfbb11e6e9afd2ff2de7da30c141113288012021-08-09 11:47:4150 days 2 hrs ago 0xdd91ab049082721670846ccb64ccc4dc5301c4e0 0x68a8567c2f3ff0c4a0917ae4180df06b048b72540 BNB
0x1b28a53b8e6d2aa2c64171d5eb587c3907f58aadc775bbb1fd24549173699736113262162021-08-09 9:38:2650 days 4 hrs ago 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254 0xdd91ab049082721670846ccb64ccc4dc5301c4e00 BNB
0x1b28a53b8e6d2aa2c64171d5eb587c3907f58aadc775bbb1fd24549173699736113262162021-08-09 9:38:2650 days 4 hrs ago 0xa555fc018435bef5a13c6c6870a9d4c11dec329c 0x68a8567c2f3ff0c4a0917ae4180df06b048b72540 BNB
0x39596797d63cce9d92219919427c885e785b5ce968989b654de4019e7620d09e113262002021-08-09 9:37:3850 days 4 hrs ago 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254 0x84b9b910527ad5c03a9ca831909e21e236ea7b060 BNB
0x39596797d63cce9d92219919427c885e785b5ce968989b654de4019e7620d09e113262002021-08-09 9:37:3850 days 4 hrs ago 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254 0x84b9b910527ad5c03a9ca831909e21e236ea7b060 BNB
0x39596797d63cce9d92219919427c885e785b5ce968989b654de4019e7620d09e113262002021-08-09 9:37:3850 days 4 hrs ago 0xdd91ab049082721670846ccb64ccc4dc5301c4e0 0x68a8567c2f3ff0c4a0917ae4180df06b048b72540 BNB
0x7db9e6928a4bf605c87d31bdeff28a4d3c117d16f4c3a17b2d58e3c812195610113237962021-08-09 7:37:2650 days 6 hrs ago 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254 0xdd91ab049082721670846ccb64ccc4dc5301c4e00 BNB
0x7db9e6928a4bf605c87d31bdeff28a4d3c117d16f4c3a17b2d58e3c812195610113237962021-08-09 7:37:2650 days 6 hrs ago 0xa555fc018435bef5a13c6c6870a9d4c11dec329c 0x68a8567c2f3ff0c4a0917ae4180df06b048b72540 BNB
0x8812b4e5ad9f64fe305d4e8d6252e99e71320af2ab213669e3e04832cecb7ae1113237802021-08-09 7:36:3850 days 6 hrs ago 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254 0x84b9b910527ad5c03a9ca831909e21e236ea7b060 BNB
0x8812b4e5ad9f64fe305d4e8d6252e99e71320af2ab213669e3e04832cecb7ae1113237802021-08-09 7:36:3850 days 6 hrs ago 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254 0x84b9b910527ad5c03a9ca831909e21e236ea7b060 BNB
0x8812b4e5ad9f64fe305d4e8d6252e99e71320af2ab213669e3e04832cecb7ae1113237802021-08-09 7:36:3850 days 6 hrs ago 0xdd91ab049082721670846ccb64ccc4dc5301c4e0 0x68a8567c2f3ff0c4a0917ae4180df06b048b72540 BNB
0x596dd784b4daf8768beaa8289ff1298dc9c951b28e413e55b276cc2ec06109d9113213792021-08-09 5:36:2850 days 8 hrs ago 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254 0xdd91ab049082721670846ccb64ccc4dc5301c4e00 BNB
0x596dd784b4daf8768beaa8289ff1298dc9c951b28e413e55b276cc2ec06109d9113213792021-08-09 5:36:2850 days 8 hrs ago 0xa555fc018435bef5a13c6c6870a9d4c11dec329c 0x68a8567c2f3ff0c4a0917ae4180df06b048b72540 BNB
0x0be15b64ebc06e895dce2bc450e8f3b52ff8e9bafc33f720f3e551850e08077b113213632021-08-09 5:35:4050 days 8 hrs ago 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254 0x84b9b910527ad5c03a9ca831909e21e236ea7b060 BNB
0x0be15b64ebc06e895dce2bc450e8f3b52ff8e9bafc33f720f3e551850e08077b113213632021-08-09 5:35:4050 days 8 hrs ago 0x68a8567c2f3ff0c4a0917ae4180df06b048b7254 0x84b9b910527ad5c03a9ca831909e21e236ea7b060 BNB
0x0be15b64ebc06e895dce2bc450e8f3b52ff8e9bafc33f720f3e551850e08077b113213632021-08-09 5:35:4050 days 8 hrs ago 0xdd91ab049082721670846ccb64ccc4dc5301c4e0 0x68a8567c2f3ff0c4a0917ae4180df06b048b72540 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GoongeryRandomGenerator

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 10 : GoongeryRandomGenerator.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "@chainlink/contracts/src/v0.6/VRFConsumerBase.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IGoongery.sol";
import "./libs/IBEP20.sol";

contract GoongeryRandomGenerator is VRFConsumerBase, Ownable {
    bytes32 internal keyHash;
    uint256 internal fee;
    address internal requester;
    address public link;
    uint256 public randomResult;
    IGoongery public goongery;
    uint256 public roundNumber;

    modifier onlyGoongery() {
        require(msg.sender == address(goongery), "Caller must be Goongery");
        _;
    }

    constructor(
        address _vrfCoordinator,
        address _linkToken,
        address _goongery,
        bytes32 _keyHash,
        uint256 _fee
    ) public VRFConsumerBase(_vrfCoordinator, _linkToken) {
        goongery = IGoongery(_goongery);
        fee = _fee;
        link = _linkToken;
        keyHash = _keyHash;
    }

    function getRandomNumber(uint256 _roundNumber)
        external
        onlyGoongery
        returns (bytes32 requestId)
    {
        require(keyHash != bytes32(0), "Must have valid key hash");
        require(
            LINK.balanceOf(address(this)) >= fee,
            "Not enough LINK - fill contract with faucet"
        );
        requester = msg.sender;
        roundNumber = _roundNumber;
        return requestRandomness(keyHash, fee);
    }

    function fulfillRandomness(bytes32 requestId, uint256 randomness)
        internal
        override
    {
        IGoongery(requester).drawWinningNumbersCallback(
            roundNumber,
            requestId,
            randomness
        );
        randomResult = randomness;
    }

    function withdrawLink(uint256 amount) public onlyOwner {
        IBEP20(link).transfer(msg.sender, amount);
    }
}

File 2 of 10 : VRFConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

import "./vendor/SafeMathChainlink.sol";

import "./interfaces/LinkTokenInterface.sol";

import "./VRFRequestIDBase.sol";

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constuctor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator, _link) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash), and have told you the minimum LINK
 * @dev price for VRF service. Make sure your contract has sufficient LINK, and
 * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you
 * @dev want to generate randomness from.
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomness method.
 *
 * @dev The randomness argument to fulfillRandomness is the actual random value
 * @dev generated from your seed.
 *
 * @dev The requestId argument is generated from the keyHash and the seed by
 * @dev makeRequestId(keyHash, seed). If your contract could have concurrent
 * @dev requests open, you can use the requestId to track which seed is
 * @dev associated with which randomness. See VRFRequestIDBase.sol for more
 * @dev details. (See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.)
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ. (Which is critical to making unpredictable randomness! See the
 * @dev next section.)
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the ultimate input to the VRF is mixed with the block hash of the
 * @dev block in which the request is made, user-provided seeds have no impact
 * @dev on its economic security properties. They are only included for API
 * @dev compatability with previous versions of this contract.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request.
 */
abstract contract VRFConsumerBase is VRFRequestIDBase {

  using SafeMathChainlink for uint256;

  /**
   * @notice fulfillRandomness handles the VRF response. Your contract must
   * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
   * @notice principles to keep in mind when implementing your fulfillRandomness
   * @notice method.
   *
   * @dev VRFConsumerBase expects its subcontracts to have a method with this
   * @dev signature, and will call it once it has verified the proof
   * @dev associated with the randomness. (It is triggered via a call to
   * @dev rawFulfillRandomness, below.)
   *
   * @param requestId The Id initially returned by requestRandomness
   * @param randomness the VRF output
   */
  function fulfillRandomness(bytes32 requestId, uint256 randomness)
    internal virtual;

  /**
   * @dev In order to keep backwards compatibility we have kept the user
   * seed field around. We remove the use of it because given that the blockhash
   * enters later, it overrides whatever randomness the used seed provides.
   * Given that it adds no security, and can easily lead to misunderstandings,
   * we have removed it from usage and can now provide a simpler API.
   */
  uint256 constant private USER_SEED_PLACEHOLDER = 0;

  /**
   * @notice requestRandomness initiates a request for VRF output given _seed
   *
   * @dev The fulfillRandomness method receives the output, once it's provided
   * @dev by the Oracle, and verified by the vrfCoordinator.
   *
   * @dev The _keyHash must already be registered with the VRFCoordinator, and
   * @dev the _fee must exceed the fee specified during registration of the
   * @dev _keyHash.
   *
   * @dev The _seed parameter is vestigial, and is kept only for API
   * @dev compatibility with older versions. It can't *hurt* to mix in some of
   * @dev your own randomness, here, but it's not necessary because the VRF
   * @dev oracle will mix the hash of the block containing your request into the
   * @dev VRF seed it ultimately uses.
   *
   * @param _keyHash ID of public key against which randomness is generated
   * @param _fee The amount of LINK to send with the request
   *
   * @return requestId unique ID for this request
   *
   * @dev The returned requestId can be used to distinguish responses to
   * @dev concurrent requests. It is passed as the first argument to
   * @dev fulfillRandomness.
   */
  function requestRandomness(bytes32 _keyHash, uint256 _fee)
    internal returns (bytes32 requestId)
  {
    LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER));
    // This is the seed passed to VRFCoordinator. The oracle will mix this with
    // the hash of the block containing this request to obtain the seed/input
    // which is finally passed to the VRF cryptographic machinery.
    uint256 vRFSeed  = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]);
    // nonces[_keyHash] must stay in sync with
    // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above
    // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).
    // This provides protection against the user repeating their input seed,
    // which would result in a predictable/duplicate output, if multiple such
    // requests appeared in the same block.
    nonces[_keyHash] = nonces[_keyHash].add(1);
    return makeRequestId(_keyHash, vRFSeed);
  }

  LinkTokenInterface immutable internal LINK;
  address immutable private vrfCoordinator;

  // Nonces for each VRF key from which randomness has been requested.
  //
  // Must stay in sync with VRFCoordinator[_keyHash][this]
  mapping(bytes32 /* keyHash */ => uint256 /* nonce */) private nonces;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   * @param _link address of LINK token contract
   *
   * @dev https://docs.chain.link/docs/link-token-contracts
   */
  constructor(address _vrfCoordinator, address _link) public {
    vrfCoordinator = _vrfCoordinator;
    LINK = LinkTokenInterface(_link);
  }

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomness(bytes32 requestId, uint256 randomness) external {
    require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill");
    fulfillRandomness(requestId, randomness);
  }
}

File 3 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 4 of 10 : IGoongery.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "../libs/GoongeryOption.sol";

interface IGoongery {
    // All goongery infos including past rounds.
    struct GoongeryInfo {
        Status status;
        uint64[3] allocation;
        uint256 goongPerTicket;
        uint256 openingTimestamp;
        uint256 closingTimestamp;
        uint256[] tokenIds;
        uint8[3] winningNumbers;
        uint256 totalGoongPrize;
        uint256 burnAmount;
    }

    // Represents the status of the goongery
    enum Status {
        NotStarted, // The goongery has not started yet
        Open, // The goongery is open for ticket purchases
        Closed, // The goongery is no longer open for ticket purchases
        Completed // The goongery has been closed and the numbers drawn
    }

    function drawWinningNumbersCallback(
        uint256 roundNumber,
        bytes32 requestId,
        uint256 randomNumber
    ) external;
}

File 5 of 10 : IBEP20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.4;

interface IBEP20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the token decimals.
     */
    function decimals() external view returns (uint8);

    /**
     * @dev Returns the token symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the token name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the bep token owner.
     */
    function getOwner() external view returns (address);

    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @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);
}

File 6 of 10 : SafeMathChainlink.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMathChainlink {
  /**
    * @dev Returns the addition of two unsigned integers, reverting on
    * overflow.
    *
    * Counterpart to Solidity's `+` operator.
    *
    * Requirements:
    * - Addition cannot overflow.
    */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, "SafeMath: addition overflow");

    return c;
  }

  /**
    * @dev Returns the subtraction of two unsigned integers, reverting on
    * overflow (when the result is negative).
    *
    * Counterpart to Solidity's `-` operator.
    *
    * Requirements:
    * - Subtraction cannot overflow.
    */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b <= a, "SafeMath: subtraction overflow");
    uint256 c = a - b;

    return c;
  }

  /**
    * @dev Returns the multiplication of two unsigned integers, reverting on
    * overflow.
    *
    * Counterpart to Solidity's `*` operator.
    *
    * Requirements:
    * - Multiplication cannot overflow.
    */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b, "SafeMath: multiplication overflow");

    return c;
  }

  /**
    * @dev Returns the integer division of two unsigned integers. Reverts on
    * division by zero. The result is rounded towards zero.
    *
    * Counterpart to Solidity's `/` operator. Note: this function uses a
    * `revert` opcode (which leaves remaining gas untouched) while Solidity
    * uses an invalid opcode to revert (consuming all remaining gas).
    *
    * Requirements:
    * - The divisor cannot be zero.
    */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // Solidity only automatically asserts when dividing by 0
    require(b > 0, "SafeMath: division by zero");
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }

  /**
    * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
    * Reverts when dividing by zero.
    *
    * Counterpart to Solidity's `%` operator. This function uses a `revert`
    * opcode (which leaves remaining gas untouched) while Solidity uses an
    * invalid opcode to revert (consuming all remaining gas).
    *
    * Requirements:
    * - The divisor cannot be zero.
    */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0, "SafeMath: modulo by zero");
    return a % b;
  }
}

File 7 of 10 : LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

interface LinkTokenInterface {
  function allowance(address owner, address spender) external view returns (uint256 remaining);
  function approve(address spender, uint256 value) external returns (bool success);
  function balanceOf(address owner) external view returns (uint256 balance);
  function decimals() external view returns (uint8 decimalPlaces);
  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);
  function increaseApproval(address spender, uint256 subtractedValue) external;
  function name() external view returns (string memory tokenName);
  function symbol() external view returns (string memory tokenSymbol);
  function totalSupply() external view returns (uint256 totalTokensIssued);
  function transfer(address to, uint256 value) external returns (bool success);
  function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool success);
  function transferFrom(address from, address to, uint256 value) external returns (bool success);
}

File 8 of 10 : VRFRequestIDBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

contract VRFRequestIDBase {

  /**
   * @notice returns the seed which is actually input to the VRF coordinator
   *
   * @dev To prevent repetition of VRF output due to repetition of the
   * @dev user-supplied seed, that seed is combined in a hash with the
   * @dev user-specific nonce, and the address of the consuming contract. The
   * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in
   * @dev the final seed, but the nonce does protect against repetition in
   * @dev requests which are included in a single block.
   *
   * @param _userSeed VRF seed input provided by user
   * @param _requester Address of the requesting contract
   * @param _nonce User-specific nonce at the time of the request
   */
  function makeVRFInputSeed(bytes32 _keyHash, uint256 _userSeed,
    address _requester, uint256 _nonce)
    internal pure returns (uint256)
  {
    return  uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce)));
  }

  /**
   * @notice Returns the id for this request
   * @param _keyHash The serviceAgreement ID to be used for this request
   * @param _vRFInputSeed The seed to be passed directly to the VRF
   * @return The id for this request
   *
   * @dev Note that _vRFInputSeed is not the seed passed by the consuming
   * @dev contract, but the one generated by makeVRFInputSeed
   */
  function makeRequestId(
    bytes32 _keyHash, uint256 _vRFInputSeed) internal pure returns (bytes32) {
    return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed));
  }
}

File 9 of 10 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 10 of 10 : GoongeryOption.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

contract GoongeryOption {
    enum Buy {
        ExactThreeDigits,
        PermutableThreeDigits,
        LastTwoDigits
    }
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_vrfCoordinator","type":"address"},{"internalType":"address","name":"_linkToken","type":"address"},{"internalType":"address","name":"_goongery","type":"address"},{"internalType":"bytes32","name":"_keyHash","type":"bytes32"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"_roundNumber","type":"uint256"}],"name":"getRandomNumber","outputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"goongery","outputs":[{"internalType":"contract IGoongery","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"link","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":"randomResult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"roundNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawLink","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405234801561001057600080fd5b50604051611217380380611217833981810160405260a081101561003357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505084848173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b81525050505060006100ee61022760201b60201c565b905080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35082600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060038190555083600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600281905550505050505061022f565b600033905090565b60805160601c60a05160601c610fb5610262600039806105e65280610c535250806107f85280610c175250610fb56000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80637a8042bd116100665780637a8042bd146101515780638da5cb5b1461017f57806394985ddd146101b3578063b37217a4146101eb578063f2fde38b1461022d5761009e565b8063189e4aa7146100a35780631c4695f4146100d757806342619f661461010b5780634e2786fb14610129578063715018a614610147575b600080fd5b6100ab610271565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100df610297565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101136102bd565b6040518082815260200191505060405180910390f35b6101316102c3565b6040518082815260200191505060405180910390f35b61014f6102c9565b005b61017d6004803603602081101561016757600080fd5b8101908080359060200190929190505050610439565b005b6101876105ba565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101e9600480360360408110156101c957600080fd5b8101908080359060200190929190803590602001909291905050506105e4565b005b6102176004803603602081101561020157600080fd5b81019080803590602001909291905050506106b3565b6040518082815260200191505060405180910390f35b61026f6004803603602081101561024357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061096c565b005b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b60085481565b6102d1610b61565b73ffffffffffffffffffffffffffffffffffffffff166102ef6105ba565b73ffffffffffffffffffffffffffffffffffffffff1614610378576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610441610b61565b73ffffffffffffffffffffffffffffffffffffffff1661045f6105ba565b73ffffffffffffffffffffffffffffffffffffffff16146104e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561057b57600080fd5b505af115801561058f573d6000803e3d6000fd5b505050506040513d60208110156105a557600080fd5b81019080805190602001909291905050505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c0081525060200191505060405180910390fd5b6106af8282610b69565b5050565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610778576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206d75737420626520476f6f6e6765727900000000000000000081525060200191505060405180910390fd5b6000801b60025414156107f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4d75737420686176652076616c6964206b65792068617368000000000000000081525060200191505060405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561087d57600080fd5b505afa158015610891573d6000803e3d6000fd5b505050506040513d60208110156108a757600080fd5b8101908080519060200190929190505050101561090f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180610f55602b913960400191505060405180910390fd5b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600881905550610965600254600354610c13565b9050919050565b610974610b61565b73ffffffffffffffffffffffffffffffffffffffff166109926105ba565b73ffffffffffffffffffffffffffffffffffffffff1614610a1b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610aa1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610f2f6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ded6be7160085484846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015610bf057600080fd5b505af1158015610c04573d6000803e3d6000fd5b50505050806006819055505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea07f00000000000000000000000000000000000000000000000000000000000000008486600060405160200180838152602001828152602001925050506040516020818303038152906040526040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d0d578082015181840152602081019050610cf2565b50505050905090810190601f168015610d3a5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b158015610d5b57600080fd5b505af1158015610d6f573d6000803e3d6000fd5b505050506040513d6020811015610d8557600080fd5b8101908080519060200190929190505050506000610db88460003060008089815260200190815260200160002054610e09565b9050610de0600160008087815260200190815260200160002054610e6d90919063ffffffff16565b60008086815260200190815260200160002081905550610e008482610ef5565b91505092915050565b600084848484604051602001808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019450505050506040516020818303038152906040528051906020012060001c9050949350505050565b600080828401905083811015610eeb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000828260405160200180838152602001828152602001925050506040516020818303038152906040528051906020012090509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e7472616374207769746820666175636574a2646970667358221220e5b9d8f47922c324464237cb5471f8bf3fb0353cc96d3a775a2678f88185988b64736f6c634300060c0033000000000000000000000000a555fc018435bef5a13c6c6870a9d4c11dec329c00000000000000000000000084b9b910527ad5c03a9ca831909e21e236ea7b06000000000000000000000000dd91ab049082721670846ccb64ccc4dc5301c4e0caf3c3727e033261d383b315559476f48034c13b18f8cafed4d871abe5049186000000000000000000000000000000000000000000000000016345785d8a0000

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000a555fc018435bef5a13c6c6870a9d4c11dec329c00000000000000000000000084b9b910527ad5c03a9ca831909e21e236ea7b06000000000000000000000000dd91ab049082721670846ccb64ccc4dc5301c4e0caf3c3727e033261d383b315559476f48034c13b18f8cafed4d871abe5049186000000000000000000000000000000000000000000000000016345785d8a0000
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000a555fc018435bef5a13c6c6870a9d4c11dec329c
Arg [1] : 00000000000000000000000084b9b910527ad5c03a9ca831909e21e236ea7b06
Arg [2] : 000000000000000000000000dd91ab049082721670846ccb64ccc4dc5301c4e0
Arg [3] : caf3c3727e033261d383b315559476f48034c13b18f8cafed4d871abe5049186
Arg [4] : 000000000000000000000000000000000000000000000000016345785d8a0000


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading