ETH Price: $3,386.60 (+0.34%)

Contract

0xbe53D018Dc774c0d263f0F435f3B4749D80E2566
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Get Random Numbe...150590712022-07-01 21:53:19875 days ago1656712399IN
0xbe53D018...9D80E2566
0 ETH0.006538456.15597787
Get Random Numbe...150374932022-06-28 2:28:30879 days ago1656383310IN
0xbe53D018...9D80E2566
0 ETH0.0054826245.22390592
Get Random Numbe...141821352022-02-11 2:45:231016 days ago1644547523IN
0xbe53D018...9D80E2566
0 ETH0.0099561866.09561833
0x60c06040141688342022-02-09 1:11:101018 days ago1644369070IN
 Create: OCMRandomizer
0 ETH0.0576617669.39600292

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OCMRandomizer

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Multiple files format)

File 1 of 6: OCMRandomizer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import "./VRFConsumerBase.sol";
import "./Ownable.sol";

//
//   
//    ______     __   __     ______     __  __     ______     __     __   __    
//   /\  __ \   /\ "-.\ \   /\  ___\   /\ \_\ \   /\  __ \   /\ \   /\ "-.\ \   
//   \ \ \/\ \  \ \ \-.  \  \ \ \____  \ \  __ \  \ \  __ \  \ \ \  \ \ \-.  \  
//    \ \_____\  \ \_\\"\_\  \ \_____\  \ \_\ \_\  \ \_\ \_\  \ \_\  \ \_\\"\_\ 
//     \/_____/   \/_/ \/_/   \/_____/   \/_/\/_/   \/_/\/_/   \/_/   \/_/ \/_/ 
//                                                                              
//    __    __     ______     __   __     __  __     ______     __  __          
//   /\ "-./  \   /\  __ \   /\ "-.\ \   /\ \/ /    /\  ___\   /\ \_\ \         
//   \ \ \-./\ \  \ \ \/\ \  \ \ \-.  \  \ \  _"-.  \ \  __\   \ \____ \        
//    \ \_\ \ \_\  \ \_____\  \ \_\\"\_\  \ \_\ \_\  \ \_____\  \/\_____\       
//     \/_/  \/_/   \/_____/   \/_/ \/_/   \/_/\/_/   \/_____/   \/_____/       
//                                                                              
//   
// 
// OnChainMonkey (OCM) Genesis was the first 100% On-Chain PFP collection in 1 transaction 
// (contract: 0x960b7a6BCD451c9968473f7bbFd9Be826EFd549A)
// 
// created by Metagood
//
// OCM Desserts will be an On-Chain collection that OCM Genesis can eat (burn) to create the
// new Karma collection.
//
// OCM Desserts, being 100% On-Chain, will also live forever, just like OCM Genesis. However,
// the Desserts will need to be burned to create Karma, so the Dessert supply will be 
// decreasing over time.
//
// This is not the OCM Dessert contract, but the official OCM randomizer. This smart contract
// will be the fair and transparent way to generate randomness on chain by using the Chainlink 
// VRF (Verifiable Random Function).
//
// The first call will generate the OCM Dessert distribution.
//
//....................................................................................................
//....................................................................................................
//....................................................................................................
//....................................................................................................
//......................................':ldk0KNWWMMMMWWNK0kdl:'......................................
//..................................:oONMMMMMMMMMMMMMMMMMMMMMMMMNOo;..................................
//..............................'lONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWOl'..............................
//............................cOWMMMMMMMMMMWX0kdolllcllodk0XWMMMMMMMMMMWOc............................
//..........................dXMMMMMMMMWKxl,..................,lxKWMMMMMMMMXd..........................
//........................oNMMMMMMMWOl'..........................'lOWMMMMMMMNo........................
//......................lXMMMMMMW0l..................................l0MMMMMMMXl......................
//....................'0MMMMMMMO;......................................;OMMMMMMMO'....................
//...................,XMMMMMMX:..........................................:XMMMMMMX,...................
//..................;NMMMMMMO..............................................OMMMMMMN;..................
//.................'XMMMMMMx...kKKKKKKKKKKKKKKKKc........'KKKKKKKKKKKKKKk...xMMMMMMX'.................
//..........'coxkOkKMMMMMMx....kXXXXXXXXXXXXXXXXc........'XXXXXXXXXXXXXXk....xMMMMMMKkOkxoc,..........
//.......'dXMMMMMMMMMMMMM0....................................................0MMMMMMMMMMMMMXd'.......
//.....'kWMMMMMMMMMMMMMMW,......,ooc...loc...loo'........'l...col...cooc......;WMMMMMMMMMMMMMMWk......
//....,XMMMMMMWKOKMMMMMMk.......'XMW:..':...dMMO.........,Wd...:'..cWMMO.......kMMMMMMKkKWMMMMMMX'....
//....OMMMMMMO,..oMMMMMMl........'kWWOl;;:oKMNo...........cWKo:;:lOWMM0'.......lMMMMMMd..,OMMMMMMO....
//...'WMMMMMK....xMMMMMM:..........'lkKXNX0xc..............'dXMMMMMW0c.........:MMMMMMx....KMMMMMW'...
//...'WMMMMMX....xMMMMMM:.....................................';:;,............:MMMMMMx....XMMMMMW'...
//....kMMMMMM0:..oMMMMMMo......................................................oMMMMMMo..:0MMMMMMk....
//.....KMMMMMMMNKXMMMMMMO......................................................OMMMMMMXKNMMMMMMMK'....
//......dNMMMMMMMMMMMMMMW:................',:clooddddddoolc:,'................:WMMMMMMMMMMMMMMNd......
//........l0WMMMMMMMMMMMMK...........:dOXWMMMMXokMMMMMMkoXMMMMWXOd:...........KMMMMMMMMMMMMW0l........
//...........;coddd0MMMMMMk.......l0WMMMMMMMMMXokMMMMMMkoXMMMMMMMMMW0l.......OMMMMMM0dddoc;...........
//..................KMMMMMMO....'XMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK'....kMMMMMMK..................
//..................,XMMMMMM0'..cMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMc..'0MMMMMMX'..................
//...................'KMMMMMMNo..oNMMMMWWWWWWWWWWWWWWWWWWWWWWWWWWMMMMNo..lNMMMMMMK'...................
//.....................kMMMMMMMKc..ckXWxllllllllllllllllllllllllxWXkc..cKMMMMMMMk.....................
//......................:KMMMMMMMXd,..';ldkOKXNWWMMMMMMWWNXKOkdl;...,dXMMMMMMMK:......................
//........................cXMMMMMMMMKd;..........................;dKMMMMMMMMXc........................
//..........................cKMMMMMMMMMNOd:,................,:dONMMMMMMMMMKc..........................
//............................;xNMMMMMMMMMMMWX0kxddddddxk0XWMMMMMMMMMMMNx;............................
//...............................:xXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXx:...............................
//..................................'cx0NMMMMMMMMMMMMMMMMMMMMMMN0xc'..................................
//.......................................,:ldkO0KXNNNNXXKOkdl:,.......................................
//....................................................................................................
//....................................................................................................
//....................................................................................................

library Strings {
    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }
}

//
// Use ChainLink's VRF to distribute the Desserts for OnChainMonkey
//
// First call sets the Desserts
// Later calls to the VRF generate random numbers to be used in future features
//
contract OCMRandomizer is VRFConsumerBase, Ownable {
    using Strings for uint256;
    bytes32 internal keyHash;
    uint256 internal fee;
    
    uint256[] public randomResults; // track all random numbers, first random number is used for Desserts
    uint256 public counter = 0;     // counter of random numbers generated
    uint256 public offset;          // offset of Desserts, set once and locked after first random number

    event RandomRequested(bytes32 indexed requestId, address indexed requester);
    event RandomFullfilled(bytes32 indexed requestId, uint256 indexed result);

    /**
     * Constructor inherits VRFConsumerBase
     * 
     * Network: Kovan
     * Chainlink VRF Coordinator address: 0xdD3782915140c8f3b190B5D67eAc6dc5760C46E9
     * LINK token address:                0xa36085F69e2889c224210F603D836748e7dC0088
     * Key Hash: 0x6c3699283bda56ad74f6b855546325b68d482e983852a7a82979cc4807b641f4
     * Request testnet LINK and ETH here: https://faucets.chain.link/
     *
     * retreived from: https://docs.chain.link/docs/vrf-contracts/
     * Network: Mainnet
     * LINK Token  0x514910771AF9Ca656af840dff83E8264EcF986CA
     * VRF Coordinator  0xf0d54349aDdcf704F77AE15b96510dEA15cb7952
     * Key Hash  0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445
     */
    constructor() 
        VRFConsumerBase(
            0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
            0x514910771AF9Ca656af840dff83E8264EcF986CA  // LINK Token
        )
    {
        keyHash = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445;
        fee = 2 * 10 ** 18; // 2 LINK (Varies by network)
    }
    
    /** 
     * Requests randomness, first call is used for Desserts 
     */
    function getRandomNumber() external onlyOwner returns (bytes32 requestId) {
        require(block.number > 14181581, "Not time yet");
        require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK");
        requestId = requestRandomness(keyHash, fee);
        emit RandomRequested(requestId, msg.sender);
        return requestId;
    }

    //
    // Dessert distribution for each OCM# (j)
    //
    // If offset is 0, 15 Dessert3s at j = 364, 1301, 1453, 1527, 1601, 1629, 2214, 4097, 5227, 5956, 6694, 6754, 7442, 9132, 9850
    // Overall distribution of Desserts is 15 Dessert3, 4485 Dessert2, 5500 Dessert1
    //
    function dessert(uint256 j) public view returns (uint256) {
        require(counter > 0, "Dessert not served");
        require(j>0 && j<10001, 'error');
        j = (j + offset) % 10000; // this is the fair and random offset from the VRF
        uint256 r = (uint256(keccak256(abi.encode(j.toString())))) % 10000; // this is the fixed sequence with the desired rarity distribution
        if (r < 8) {
            return 3; // Dessert3
        } else if (r >= 5538) {
            return 2; // Dessert2
        } else {
            return 1; // Dessert1
        }
    }    

    /**
     * Callback function used by VRF Coordinator
     */
    function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
        randomResults.push(randomness);
        if (counter == 0) {
            offset = randomness % 10000; // There is very minor bias in ideal uniform probability distribution because randomness 2**256 % 10000 != 0
        }
        counter++; // Counter could wrap around to 2**256 in theory, but not in practice
        emit RandomFullfilled(requestId, randomness);        
    }

    // Withdraw function to avoid locking LINK in the contract
    function withdrawLink() external onlyOwner {
        LINK.transfer(owner(), LINK.balanceOf(address(this)));
    }
}

File 2 of 6: Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 3 of 6: LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.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 4 of 6: Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "./Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev 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 {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 5 of 6: VRFConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./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 {
  /**
   * @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 private constant 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] + 1;
    return makeRequestId(_keyHash, vRFSeed);
  }

  LinkTokenInterface internal immutable LINK;
  address private immutable vrfCoordinator;

  // Nonces for each VRF key from which randomness has been requested.
  //
  // Must stay in sync with VRFCoordinator[_keyHash][this]
  mapping(bytes32 => uint256) /* keyHash */ /* 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) {
    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 6 of 6: VRFRequestIDBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.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));
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"result","type":"uint256"}],"name":"RandomFullfilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"requester","type":"address"}],"name":"RandomRequested","type":"event"},{"inputs":[],"name":"counter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"j","type":"uint256"}],"name":"dessert","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRandomNumber","outputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"offset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"randomResults","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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawLink","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052600060055534801561001557600080fd5b507ff0d54349addcf704f77ae15b96510dea15cb795200000000000000000000000060a0527f514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000006080526100673361009c565b7faa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445600255671bc16d674ec800006003556100ee565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60805160601c60a05160601c610cc46101356000396000818161044d01526109060152600081816102eb0152818161033f0152818161054e01526108d70152610cc46000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80638dc654a2116100665780638dc654a21461010a57806394985ddd14610112578063d555654414610125578063dbdff2c11461012e578063f2fde38b1461013657600080fd5b806319ca99c5146100a3578063219be114146100c957806361bc221a146100dc578063715018a6146100e55780638da5cb5b146100ef575b600080fd5b6100b66100b1366004610acd565b610149565b6040519081526020015b60405180910390f35b6100b66100d7366004610acd565b610268565b6100b660055481565b6100ed610289565b005b6001546040516001600160a01b0390911681526020016100c0565b6100ed6102bf565b6100ed610120366004610aab565b610442565b6100b660065481565b6100b66104c8565b6100ed610144366004610a59565b610651565b600080600554116101965760405162461bcd60e51b815260206004820152601260248201527111195cdcd95c9d081b9bdd081cd95c9d995960721b60448201526064015b60405180910390fd5b6000821180156101a7575061271182105b6101db5760405162461bcd60e51b815260206004820152600560248201526432b93937b960d91b604482015260640161018d565b612710600654836101ec9190610bc4565b6101f69190610c22565b91506000612710610206846106e9565b6040516020016102169190610b7c565b6040516020818303038152906040528051906020012060001c6102399190610c22565b9050600881101561024d5750600392915050565b6115a2811061025f5750600292915050565b50600192915050565b6004818154811061027857600080fd5b600091825260209091200154905081565b6001546001600160a01b031633146102b35760405162461bcd60e51b815260040161018d90610b8f565b6102bd60006107ef565b565b6001546001600160a01b031633146102e95760405162461bcd60e51b815260040161018d90610b8f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb61032a6001546001600160a01b031690565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561038957600080fd5b505afa15801561039d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c19190610ae6565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561040757600080fd5b505af115801561041b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043f9190610a89565b50565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ba5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604482015260640161018d565b6104c48282610841565b5050565b6001546000906001600160a01b031633146104f55760405162461bcd60e51b815260040161018d90610b8f565b62d864cd43116105365760405162461bcd60e51b815260206004820152600c60248201526b139bdd081d1a5b59481e595d60a21b604482015260640161018d565b6003546040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561059857600080fd5b505afa1580156105ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d09190610ae6565b10156106105760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420656e6f756768204c494e4b60881b604482015260640161018d565b61061e6002546003546108d3565b604051909150339082907fa00b6dcd53004878ffcf2b27319eb18fecd60d5ab31c5332a2892ba935eba97090600090a390565b6001546001600160a01b0316331461067b5760405162461bcd60e51b815260040161018d90610b8f565b6001600160a01b0381166106e05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161018d565b61043f816107ef565b60608161070d5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610737578061072181610c07565b91506107309050600a83610bdc565b9150610711565b60008167ffffffffffffffff81111561075257610752610c78565b6040519080825280601f01601f19166020018201604052801561077c576020820181803683370190505b5090505b84156107e757610791600183610bf0565b915061079e600a86610c22565b6107a9906030610bc4565b60f81b8183815181106107be576107be610c62565b60200101906001600160f81b031916908160001a9053506107e0600a86610bdc565b9450610780565b949350505050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0181905560055461088d5761088961271082610c22565b6006555b6005805490600061089d83610c07565b9091555050604051819083907f6b96221d5d7279083a04053f570b1e9328dfc3591e9042abd208744233efcac190600090a35050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001610943929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161097093929190610b4c565b602060405180830381600087803b15801561098a57600080fd5b505af115801561099e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c29190610a89565b5060008381526020818152604080832054815180840188905280830185905230606082015260808082018390528351808303909101815260a090910190925281519183019190912086845292909152610a1c906001610bc4565b60008581526020818152604091829020929092558051808301879052808201849052815180820383018152606090910190915280519101206107e7565b600060208284031215610a6b57600080fd5b81356001600160a01b0381168114610a8257600080fd5b9392505050565b600060208284031215610a9b57600080fd5b81518015158114610a8257600080fd5b60008060408385031215610abe57600080fd5b50508035926020909101359150565b600060208284031215610adf57600080fd5b5035919050565b600060208284031215610af857600080fd5b5051919050565b6000815180845260005b81811015610b2557602081850181015186830182015201610b09565b81811115610b37576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b0384168152826020820152606060408201526000610b736060830184610aff565b95945050505050565b602081526000610a826020830184610aff565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610bd757610bd7610c36565b500190565b600082610beb57610beb610c4c565b500490565b600082821015610c0257610c02610c36565b500390565b6000600019821415610c1b57610c1b610c36565b5060010190565b600082610c3157610c31610c4c565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220ddc7b51d4fd0f5ad889649c1e22358adde31c38810d6b58afb414ef867dccb7264736f6c63430008070033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80638dc654a2116100665780638dc654a21461010a57806394985ddd14610112578063d555654414610125578063dbdff2c11461012e578063f2fde38b1461013657600080fd5b806319ca99c5146100a3578063219be114146100c957806361bc221a146100dc578063715018a6146100e55780638da5cb5b146100ef575b600080fd5b6100b66100b1366004610acd565b610149565b6040519081526020015b60405180910390f35b6100b66100d7366004610acd565b610268565b6100b660055481565b6100ed610289565b005b6001546040516001600160a01b0390911681526020016100c0565b6100ed6102bf565b6100ed610120366004610aab565b610442565b6100b660065481565b6100b66104c8565b6100ed610144366004610a59565b610651565b600080600554116101965760405162461bcd60e51b815260206004820152601260248201527111195cdcd95c9d081b9bdd081cd95c9d995960721b60448201526064015b60405180910390fd5b6000821180156101a7575061271182105b6101db5760405162461bcd60e51b815260206004820152600560248201526432b93937b960d91b604482015260640161018d565b612710600654836101ec9190610bc4565b6101f69190610c22565b91506000612710610206846106e9565b6040516020016102169190610b7c565b6040516020818303038152906040528051906020012060001c6102399190610c22565b9050600881101561024d5750600392915050565b6115a2811061025f5750600292915050565b50600192915050565b6004818154811061027857600080fd5b600091825260209091200154905081565b6001546001600160a01b031633146102b35760405162461bcd60e51b815260040161018d90610b8f565b6102bd60006107ef565b565b6001546001600160a01b031633146102e95760405162461bcd60e51b815260040161018d90610b8f565b7f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b031663a9059cbb61032a6001546001600160a01b031690565b6040516370a0823160e01b81523060048201527f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316906370a082319060240160206040518083038186803b15801561038957600080fd5b505afa15801561039d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c19190610ae6565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561040757600080fd5b505af115801561041b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043f9190610a89565b50565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795216146104ba5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604482015260640161018d565b6104c48282610841565b5050565b6001546000906001600160a01b031633146104f55760405162461bcd60e51b815260040161018d90610b8f565b62d864cd43116105365760405162461bcd60e51b815260206004820152600c60248201526b139bdd081d1a5b59481e595d60a21b604482015260640161018d565b6003546040516370a0823160e01b81523060048201527f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316906370a082319060240160206040518083038186803b15801561059857600080fd5b505afa1580156105ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d09190610ae6565b10156106105760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420656e6f756768204c494e4b60881b604482015260640161018d565b61061e6002546003546108d3565b604051909150339082907fa00b6dcd53004878ffcf2b27319eb18fecd60d5ab31c5332a2892ba935eba97090600090a390565b6001546001600160a01b0316331461067b5760405162461bcd60e51b815260040161018d90610b8f565b6001600160a01b0381166106e05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161018d565b61043f816107ef565b60608161070d5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610737578061072181610c07565b91506107309050600a83610bdc565b9150610711565b60008167ffffffffffffffff81111561075257610752610c78565b6040519080825280601f01601f19166020018201604052801561077c576020820181803683370190505b5090505b84156107e757610791600183610bf0565b915061079e600a86610c22565b6107a9906030610bc4565b60f81b8183815181106107be576107be610c62565b60200101906001600160f81b031916908160001a9053506107e0600a86610bdc565b9450610780565b949350505050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0181905560055461088d5761088961271082610c22565b6006555b6005805490600061089d83610c07565b9091555050604051819083907f6b96221d5d7279083a04053f570b1e9328dfc3591e9042abd208744233efcac190600090a35050565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795284866000604051602001610943929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161097093929190610b4c565b602060405180830381600087803b15801561098a57600080fd5b505af115801561099e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c29190610a89565b5060008381526020818152604080832054815180840188905280830185905230606082015260808082018390528351808303909101815260a090910190925281519183019190912086845292909152610a1c906001610bc4565b60008581526020818152604091829020929092558051808301879052808201849052815180820383018152606090910190915280519101206107e7565b600060208284031215610a6b57600080fd5b81356001600160a01b0381168114610a8257600080fd5b9392505050565b600060208284031215610a9b57600080fd5b81518015158114610a8257600080fd5b60008060408385031215610abe57600080fd5b50508035926020909101359150565b600060208284031215610adf57600080fd5b5035919050565b600060208284031215610af857600080fd5b5051919050565b6000815180845260005b81811015610b2557602081850181015186830182015201610b09565b81811115610b37576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b0384168152826020820152606060408201526000610b736060830184610aff565b95945050505050565b602081526000610a826020830184610aff565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610bd757610bd7610c36565b500190565b600082610beb57610beb610c4c565b500490565b600082821015610c0257610c02610c36565b500390565b6000600019821415610c1b57610c1b610c36565b5060010190565b600082610c3157610c31610c4c565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220ddc7b51d4fd0f5ad889649c1e22358adde31c38810d6b58afb414ef867dccb7264736f6c63430008070033

Deployed Bytecode Sourcemap

7147:3692:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9541:569;;;;;;:::i;:::-;;:::i;:::-;;;2965:25:6;;;2953:2;2938:18;9541:569:2;;;;;;;;7296:30;;;;;;:::i;:::-;;:::i;7402:26::-;;;;;;1661:101:3;;;:::i;:::-;;1029:85;1101:6;;1029:85;;-1:-1:-1;;;;;1101:6:3;;;2088:51:6;;2076:2;2061:18;1029:85:3;1942:203:6;10724:113:2;;;:::i;9564:207:4:-;;;;;;:::i;:::-;;:::i;7477:21:2:-;;;;;;8907:345;;;:::i;1911:198:3:-;;;;;;:::i;:::-;;:::i;9541:569:2:-;9590:7;9627:1;9617:7;;:11;9609:42;;;;-1:-1:-1;;;9609:42:2;;4842:2:6;9609:42:2;;;4824:21:6;4881:2;4861:18;;;4854:30;-1:-1:-1;;;4900:18:6;;;4893:48;4958:18;;9609:42:2;;;;;;;;;9671:1;9669;:3;:14;;;;;9678:5;9676:1;:7;9669:14;9661:32;;;;-1:-1:-1;;;9661:32:2;;4102:2:6;9661:32:2;;;4084:21:6;4141:1;4121:18;;;4114:29;-1:-1:-1;;;4159:18:6;;;4152:35;4204:18;;9661:32:2;3900:328:6;9661:32:2;9722:5;9712:6;;9708:1;:10;;;;:::i;:::-;9707:20;;;;:::i;:::-;9703:24;;9788:9;9849:5;9830:12;:1;:10;:12::i;:::-;9819:24;;;;;;;;:::i;:::-;;;;;;;;;;;;;9809:35;;;;;;9801:44;;9800:54;;;;:::i;:::-;9788:66;;9939:1;9935;:5;9931:173;;;-1:-1:-1;9963:1:2;;9541:569;-1:-1:-1;;9541:569:2:o;9931:173::-;10002:4;9997:1;:9;9993:111;;-1:-1:-1;10029:1:2;;9541:569;-1:-1:-1;;9541:569:2:o;9993:111::-;-1:-1:-1;10080:1:2;;9541:569;-1:-1:-1;;9541:569:2:o;7296:30::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7296:30:2;:::o;1661:101:3:-;1101:6;;-1:-1:-1;;;;;1101:6:3;719:10:0;1241:23:3;1233:68;;;;-1:-1:-1;;;1233:68:3;;;;;;;:::i;:::-;1725:30:::1;1752:1;1725:18;:30::i;:::-;1661:101::o:0;10724:113:2:-;1101:6:3;;-1:-1:-1;;;;;1101:6:3;719:10:0;1241:23:3;1233:68;;;;-1:-1:-1;;;1233:68:3;;;;;;;:::i;:::-;10777:4:2::1;-1:-1:-1::0;;;;;10777:13:2::1;;10791:7;1101:6:3::0;;-1:-1:-1;;;;;1101:6:3;;1029:85;10791:7:2::1;10800:29;::::0;-1:-1:-1;;;10800:29:2;;10823:4:::1;10800:29;::::0;::::1;2088:51:6::0;10800:4:2::1;-1:-1:-1::0;;;;;10800:14:2::1;::::0;::::1;::::0;2061:18:6;;10800:29:2::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10777:53;::::0;-1:-1:-1;;;;;;10777:53:2::1;::::0;;;;;;-1:-1:-1;;;;;2342:32:6;;;10777:53:2::1;::::0;::::1;2324:51:6::0;2391:18;;;2384:34;2297:18;;10777:53:2::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;10724:113::o:0;9564:207:4:-;9656:10;-1:-1:-1;;;;;9670:14:4;9656:28;;9648:72;;;;-1:-1:-1;;;9648:72:4;;6235:2:6;9648:72:4;;;6217:21:6;6274:2;6254:18;;;6247:30;6313:33;6293:18;;;6286:61;6364:18;;9648:72:4;6033:355:6;9648:72:4;9726:40;9744:9;9755:10;9726:17;:40::i;:::-;9564:207;;:::o;8907:345:2:-;1101:6:3;;8962:17:2;;-1:-1:-1;;;;;1101:6:3;719:10:0;1241:23:3;1233:68;;;;-1:-1:-1;;;1233:68:3;;;;;;;:::i;:::-;9014:8:2::1;8999:12;:23;8991:48;;;::::0;-1:-1:-1;;;8991:48:2;;5189:2:6;8991:48:2::1;::::0;::::1;5171:21:6::0;5228:2;5208:18;;;5201:30;-1:-1:-1;;;5247:18:6;;;5240:42;5299:18;;8991:48:2::1;4987:336:6::0;8991:48:2::1;9090:3;::::0;9057:29:::1;::::0;-1:-1:-1;;;9057:29:2;;9080:4:::1;9057:29;::::0;::::1;2088:51:6::0;9057:4:2::1;-1:-1:-1::0;;;;;9057:14:2::1;::::0;::::1;::::0;2061:18:6;;9057:29:2::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:36;;9049:64;;;::::0;-1:-1:-1;;;9049:64:2;;5530:2:6;9049:64:2::1;::::0;::::1;5512:21:6::0;5569:2;5549:18;;;5542:30;-1:-1:-1;;;5588:18:6;;;5581:45;5643:18;;9049:64:2::1;5328:339:6::0;9049:64:2::1;9135:31;9153:7;;9162:3;;9135:17;:31::i;:::-;9181:38;::::0;9123:43;;-1:-1:-1;9208:10:2::1;::::0;9123:43;;9181:38:::1;::::0;;;::::1;8907:345:::0;:::o;1911:198:3:-;1101:6;;-1:-1:-1;;;;;1101:6:3;719:10:0;1241:23:3;1233:68;;;;-1:-1:-1;;;1233:68:3;;;;;;;:::i;:::-;-1:-1:-1;;;;;1999:22:3;::::1;1991:73;;;::::0;-1:-1:-1;;;1991:73:3;;4435:2:6;1991:73:3::1;::::0;::::1;4417:21:6::0;4474:2;4454:18;;;4447:30;4513:34;4493:18;;;4486:62;-1:-1:-1;;;4564:18:6;;;4557:36;4610:19;;1991:73:3::1;4233:402:6::0;1991:73:3::1;2074:28;2093:8;2074:18;:28::i;6251:703:2:-:0;6307:13;6524:10;6520:51;;-1:-1:-1;;6550:10:2;;;;;;;;;;;;-1:-1:-1;;;6550:10:2;;;;;6251:703::o;6520:51::-;6595:5;6580:12;6634:75;6641:9;;6634:75;;6666:8;;;;:::i;:::-;;-1:-1:-1;6688:10:2;;-1:-1:-1;6696:2:2;6688:10;;:::i;:::-;;;6634:75;;;6718:19;6750:6;6740:17;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6740:17:2;;6718:39;;6767:150;6774:10;;6767:150;;6800:11;6810:1;6800:11;;:::i;:::-;;-1:-1:-1;6868:10:2;6876:2;6868:5;:10;:::i;:::-;6855:24;;:2;:24;:::i;:::-;6842:39;;6825:6;6832;6825:14;;;;;;;;:::i;:::-;;;;:56;-1:-1:-1;;;;;6825:56:2;;;;;;;;-1:-1:-1;6895:11:2;6904:2;6895:11;;:::i;:::-;;;6767:150;;;6940:6;6251:703;-1:-1:-1;;;;6251:703:2:o;2263:187:3:-;2355:6;;;-1:-1:-1;;;;;2371:17:3;;;-1:-1:-1;;;;;;2371:17:3;;;;;;;2403:40;;2355:6;;;2371:17;2355:6;;2403:40;;2336:16;;2403:40;2326:124;2263:187;:::o;10185:470:2:-;10279:13;:30;;;;;;;-1:-1:-1;10279:30:2;;;;;;;;;10323:7;;10319:179;;10360:18;10373:5;10360:10;:18;:::i;:::-;10351:6;:27;10319:179;10507:7;:9;;;:7;:9;;;:::i;:::-;;;;-1:-1:-1;;10601:39:2;;10629:10;;10618:9;;10601:39;;;;;10185:470;;:::o;7720:1020:4:-;7797:17;7822:4;-1:-1:-1;;;;;7822:20:4;;7843:14;7859:4;7876:8;6577:1;7865:43;;;;;;;;3175:25:6;;;3231:2;3216:18;;3209:34;3163:2;3148:18;;3001:248;7865:43:4;;;;;;;;;;;;;7822:87;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;8140:15:4;8223:16;;;;;;;;;;;;978:51:5;;;;;3485:25:6;;;3526:18;;;3519:34;;;8216:4:4;3569:18:6;;;3562:60;3638:18;;;;3631:34;;;978:51:5;;;;;;;;;;3457:19:6;;;;978:51:5;;;968:62;;;;;;;;;8670:16:4;;;;;;;:20;;8689:1;8670:20;:::i;:::-;8651:6;:16;;;;;;;;;;;;:39;;;;1535:41:5;;;;;1847:19:6;;;1882:12;;;1875:28;;;1535:41:5;;;;;;;;;1919:12:6;;;;1535:41:5;;;1525:52;;;;;8703:32:4;1416:166:5;14:286:6;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;168:23;;-1:-1:-1;;;;;220:31:6;;210:42;;200:70;;266:1;263;256:12;200:70;289:5;14:286;-1:-1:-1;;;14:286:6:o;305:277::-;372:6;425:2;413:9;404:7;400:23;396:32;393:52;;;441:1;438;431:12;393:52;473:9;467:16;526:5;519:13;512:21;505:5;502:32;492:60;;548:1;545;538:12;587:248;655:6;663;716:2;704:9;695:7;691:23;687:32;684:52;;;732:1;729;722:12;684:52;-1:-1:-1;;755:23:6;;;825:2;810:18;;;797:32;;-1:-1:-1;587:248:6:o;840:180::-;899:6;952:2;940:9;931:7;927:23;923:32;920:52;;;968:1;965;958:12;920:52;-1:-1:-1;991:23:6;;840:180;-1:-1:-1;840:180:6:o;1025:184::-;1095:6;1148:2;1136:9;1127:7;1123:23;1119:32;1116:52;;;1164:1;1161;1154:12;1116:52;-1:-1:-1;1187:16:6;;1025:184;-1:-1:-1;1025:184:6:o;1214:471::-;1255:3;1293:5;1287:12;1320:6;1315:3;1308:19;1345:1;1355:162;1369:6;1366:1;1363:13;1355:162;;;1431:4;1487:13;;;1483:22;;1477:29;1459:11;;;1455:20;;1448:59;1384:12;1355:162;;;1535:6;1532:1;1529:13;1526:87;;;1601:1;1594:4;1585:6;1580:3;1576:16;1572:27;1565:38;1526:87;-1:-1:-1;1667:2:6;1646:15;-1:-1:-1;;1642:29:6;1633:39;;;;1674:4;1629:50;;1214:471;-1:-1:-1;;1214:471:6:o;2429:385::-;2661:1;2657;2652:3;2648:11;2644:19;2636:6;2632:32;2621:9;2614:51;2701:6;2696:2;2685:9;2681:18;2674:34;2744:2;2739;2728:9;2724:18;2717:30;2595:4;2764:44;2804:2;2793:9;2789:18;2781:6;2764:44;:::i;:::-;2756:52;2429:385;-1:-1:-1;;;;;2429:385:6:o;3676:219::-;3825:2;3814:9;3807:21;3788:4;3845:44;3885:2;3874:9;3870:18;3862:6;3845:44;:::i;5672:356::-;5874:2;5856:21;;;5893:18;;;5886:30;5952:34;5947:2;5932:18;;5925:62;6019:2;6004:18;;5672:356::o;6575:128::-;6615:3;6646:1;6642:6;6639:1;6636:13;6633:39;;;6652:18;;:::i;:::-;-1:-1:-1;6688:9:6;;6575:128::o;6708:120::-;6748:1;6774;6764:35;;6779:18;;:::i;:::-;-1:-1:-1;6813:9:6;;6708:120::o;6833:125::-;6873:4;6901:1;6898;6895:8;6892:34;;;6906:18;;:::i;:::-;-1:-1:-1;6943:9:6;;6833:125::o;6963:135::-;7002:3;-1:-1:-1;;7023:17:6;;7020:43;;;7043:18;;:::i;:::-;-1:-1:-1;7090:1:6;7079:13;;6963:135::o;7103:112::-;7135:1;7161;7151:35;;7166:18;;:::i;:::-;-1:-1:-1;7200:9:6;;7103:112::o;7220:127::-;7281:10;7276:3;7272:20;7269:1;7262:31;7312:4;7309:1;7302:15;7336:4;7333:1;7326:15;7352:127;7413:10;7408:3;7404:20;7401:1;7394:31;7444:4;7441:1;7434:15;7468:4;7465:1;7458:15;7484:127;7545:10;7540:3;7536:20;7533:1;7526:31;7576:4;7573:1;7566:15;7600:4;7597:1;7590:15;7616:127;7677:10;7672:3;7668:20;7665:1;7658:31;7708:4;7705:1;7698:15;7732:4;7729:1;7722:15

Swarm Source

ipfs://ddc7b51d4fd0f5ad889649c1e22358adde31c38810d6b58afb414ef867dccb72

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.