GLMR Price: $0.020855 (-1.94%)

Contract

0x0d8D79184104831B249b0266A8Dcd0F5E36b04e1

Overview

GLMR Balance

Moonbeam Chain LogoMoonbeam Chain LogoMoonbeam Chain Logo0 GLMR

GLMR Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Set Request Para...46356442023-10-13 0:58:12836 days ago1697158692IN
0x0d8D7918...5E36b04e1
0 GLMR0.00862125250
Set Request Para...46355872023-10-13 0:45:54836 days ago1697157954IN
0x0d8D7918...5E36b04e1
0 GLMR0.00862425250
Set Request Para...46355422023-10-13 0:36:54836 days ago1697157414IN
0x0d8D7918...5E36b04e1
0 GLMR0.00862425250
Set Request Para...39891302023-07-14 4:17:06927 days ago1689308226IN
0x0d8D7918...5E36b04e1
0 GLMR0.006897200
Set Fulfillment ...39890432023-07-14 3:59:42927 days ago1689307182IN
0x0d8D7918...5E36b04e1
0 GLMR0.009268200
Set Request Para...39890412023-07-14 3:59:18927 days ago1689307158IN
0x0d8D7918...5E36b04e1
0 GLMR0.018277200

View more zero value Internal Transactions in Advanced View mode

Cross-Chain Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x98fE3519...c6d219A8c
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
EvrlootQrngV2

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 175 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

import "@api3/airnode-protocol/contracts/rrp/requesters/RrpRequesterV0.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

error NotFullfillmentAddress();

contract EvrlootQrngV2 is RrpRequesterV0, Ownable {
    // Events
    event RequestedUint256(bytes32 indexed requestId);

    // State variables
    address public airnode;
    bytes32 public endpointIdUint256;
    address public sponsorWallet;
    mapping(address => uint256) fulfillmentAddresses;

    constructor(
        address _airnodeRrpAddress
    ) RrpRequesterV0(_airnodeRrpAddress) {}

    modifier callerIsFullfillmentAddress() {
        if (fulfillmentAddresses[msg.sender] == 0)
            revert NotFullfillmentAddress();
        _;
    }

    /*
     * @notice Sets parameters used in requesting QRNG services
     * @param _airnode Airnode address
     * @param _endpointIdUint256 Endpoint ID used to request a `uint256`
     * @param _sponsorWallet Sponsor wallet address
     * */
    function setRequestParameters(
        address _airnode,
        bytes32 _endpointIdUint256,
        address _sponsorWallet
    ) external onlyOwner {
        airnode = _airnode;
        endpointIdUint256 = _endpointIdUint256;
        sponsorWallet = _sponsorWallet;
    }

    /**
     * @notice Sets fulfillment address
     * @dev This address is permitted to call the makeRequestUint256 function with a selector for callback
     * @param _fulfillmentAddress fulfillment address (permitted caller)
     * @param enable enable/disable flag
     */
    function setFulfillmentAddress(
        address _fulfillmentAddress,
        uint256 enable
    ) external onlyOwner {
        fulfillmentAddresses[_fulfillmentAddress] = enable;
    }

    /**
     * @notice This function is called by the game contract when it requires an RNG
     * @dev the caller must be a permitted fulfillment address (it will be called by AirnodeRrp using the provided selector)
     * @param _selector The function selector of the function that will be called by AirnodeRrp with the Rng response
     * @return requestId The ID of the request
     */
    function makeRequestUint256(
        bytes4 _selector
    ) public callerIsFullfillmentAddress returns (bytes32) {
        bytes32 requestId = airnodeRrp.makeFullRequest(
            airnode,
            endpointIdUint256,
            address(this),
            sponsorWallet,
            msg.sender,
            _selector,
            ""
        );
        emit RequestedUint256(requestId);
        return requestId;
    }

    /// @notice Handles when funds are sent directly to the contract address
    receive() external payable {}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./IAuthorizationUtilsV0.sol";
import "./ITemplateUtilsV0.sol";
import "./IWithdrawalUtilsV0.sol";

interface IAirnodeRrpV0 is
    IAuthorizationUtilsV0,
    ITemplateUtilsV0,
    IWithdrawalUtilsV0
{
    event SetSponsorshipStatus(
        address indexed sponsor,
        address indexed requester,
        bool sponsorshipStatus
    );

    event MadeTemplateRequest(
        address indexed airnode,
        bytes32 indexed requestId,
        uint256 requesterRequestCount,
        uint256 chainId,
        address requester,
        bytes32 templateId,
        address sponsor,
        address sponsorWallet,
        address fulfillAddress,
        bytes4 fulfillFunctionId,
        bytes parameters
    );

    event MadeFullRequest(
        address indexed airnode,
        bytes32 indexed requestId,
        uint256 requesterRequestCount,
        uint256 chainId,
        address requester,
        bytes32 endpointId,
        address sponsor,
        address sponsorWallet,
        address fulfillAddress,
        bytes4 fulfillFunctionId,
        bytes parameters
    );

    event FulfilledRequest(
        address indexed airnode,
        bytes32 indexed requestId,
        bytes data
    );

    event FailedRequest(
        address indexed airnode,
        bytes32 indexed requestId,
        string errorMessage
    );

    function setSponsorshipStatus(address requester, bool sponsorshipStatus)
        external;

    function makeTemplateRequest(
        bytes32 templateId,
        address sponsor,
        address sponsorWallet,
        address fulfillAddress,
        bytes4 fulfillFunctionId,
        bytes calldata parameters
    ) external returns (bytes32 requestId);

    function makeFullRequest(
        address airnode,
        bytes32 endpointId,
        address sponsor,
        address sponsorWallet,
        address fulfillAddress,
        bytes4 fulfillFunctionId,
        bytes calldata parameters
    ) external returns (bytes32 requestId);

    function fulfill(
        bytes32 requestId,
        address airnode,
        address fulfillAddress,
        bytes4 fulfillFunctionId,
        bytes calldata data,
        bytes calldata signature
    ) external returns (bool callSuccess, bytes memory callData);

    function fail(
        bytes32 requestId,
        address airnode,
        address fulfillAddress,
        bytes4 fulfillFunctionId,
        string calldata errorMessage
    ) external;

    function sponsorToRequesterToSponsorshipStatus(
        address sponsor,
        address requester
    ) external view returns (bool sponsorshipStatus);

    function requesterToRequestCountPlusOne(address requester)
        external
        view
        returns (uint256 requestCountPlusOne);

    function requestIsAwaitingFulfillment(bytes32 requestId)
        external
        view
        returns (bool isAwaitingFulfillment);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IAuthorizationUtilsV0 {
    function checkAuthorizationStatus(
        address[] calldata authorizers,
        address airnode,
        bytes32 requestId,
        bytes32 endpointId,
        address sponsor,
        address requester
    ) external view returns (bool status);

    function checkAuthorizationStatuses(
        address[] calldata authorizers,
        address airnode,
        bytes32[] calldata requestIds,
        bytes32[] calldata endpointIds,
        address[] calldata sponsors,
        address[] calldata requesters
    ) external view returns (bool[] memory statuses);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ITemplateUtilsV0 {
    event CreatedTemplate(
        bytes32 indexed templateId,
        address airnode,
        bytes32 endpointId,
        bytes parameters
    );

    function createTemplate(
        address airnode,
        bytes32 endpointId,
        bytes calldata parameters
    ) external returns (bytes32 templateId);

    function getTemplates(bytes32[] calldata templateIds)
        external
        view
        returns (
            address[] memory airnodes,
            bytes32[] memory endpointIds,
            bytes[] memory parameters
        );

    function templates(bytes32 templateId)
        external
        view
        returns (
            address airnode,
            bytes32 endpointId,
            bytes memory parameters
        );
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IWithdrawalUtilsV0 {
    event RequestedWithdrawal(
        address indexed airnode,
        address indexed sponsor,
        bytes32 indexed withdrawalRequestId,
        address sponsorWallet
    );

    event FulfilledWithdrawal(
        address indexed airnode,
        address indexed sponsor,
        bytes32 indexed withdrawalRequestId,
        address sponsorWallet,
        uint256 amount
    );

    function requestWithdrawal(address airnode, address sponsorWallet) external;

    function fulfillWithdrawal(
        bytes32 withdrawalRequestId,
        address airnode,
        address sponsor
    ) external payable;

    function sponsorToWithdrawalRequestCount(address sponsor)
        external
        view
        returns (uint256 withdrawalRequestCount);
}

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

import "../interfaces/IAirnodeRrpV0.sol";

/// @title The contract to be inherited to make Airnode RRP requests
contract RrpRequesterV0 {
    IAirnodeRrpV0 public immutable airnodeRrp;

    /// @dev Reverts if the caller is not the Airnode RRP contract.
    /// Use it as a modifier for fulfill and error callback methods, but also
    /// check `requestId`.
    modifier onlyAirnodeRrp() {
        require(msg.sender == address(airnodeRrp), "Caller not Airnode RRP");
        _;
    }

    /// @dev Airnode RRP address is set at deployment and is immutable.
    /// RrpRequester is made its own sponsor by default. RrpRequester can also
    /// be sponsored by others and use these sponsorships while making
    /// requests, i.e., using this default sponsorship is optional.
    /// @param _airnodeRrp Airnode RRP contract address
    constructor(address _airnodeRrp) {
        airnodeRrp = IAirnodeRrpV0(_airnodeRrp);
        IAirnodeRrpV0(_airnodeRrp).setSponsorshipStatus(address(this), true);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts 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;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 175
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_airnodeRrpAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NotFullfillmentAddress","type":"error"},{"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"}],"name":"RequestedUint256","type":"event"},{"inputs":[],"name":"airnode","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"airnodeRrp","outputs":[{"internalType":"contract IAirnodeRrpV0","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endpointIdUint256","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"makeRequestUint256","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fulfillmentAddress","type":"address"},{"internalType":"uint256","name":"enable","type":"uint256"}],"name":"setFulfillmentAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_airnode","type":"address"},{"internalType":"bytes32","name":"_endpointIdUint256","type":"bytes32"},{"internalType":"address","name":"_sponsorWallet","type":"address"}],"name":"setRequestParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sponsorWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

0x60a060405234801561001057600080fd5b5060405161074f38038061074f83398101604081905261002f91610107565b6001600160a01b0381166080819052604051632b77c09f60e21b81523060048201526001602482015282919063addf027c90604401600060405180830381600087803b15801561007e57600080fd5b505af1158015610092573d6000803e3d6000fd5b50505050506100ad6100a86100b360201b60201c565b6100b7565b50610137565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561011957600080fd5b81516001600160a01b038116811461013057600080fd5b9392505050565b6080516105f661015960003960008181610113015261029e01526105f66000f3fe6080604052600436106100955760003560e01c80638da5cb5b116100595780638da5cb5b1461016d578063a36ff4d81461018b578063bf90fb4e146101ab578063f2fde38b146101cb578063fe63a27d146101eb57600080fd5b806307b9fc57146100a157806364c3381c146100ca578063715018a6146100ea57806371bab666146101015780637bdf25251461014d57600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100b760025481565b6040519081526020015b60405180910390f35b3480156100d657600080fd5b506100b76100e53660046104de565b61020b565b3480156100f657600080fd5b506100ff610342565b005b34801561010d57600080fd5b506101357f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b34801561015957600080fd5b506100ff610168366004610526565b610356565b34801561017957600080fd5b506000546001600160a01b0316610135565b34801561019757600080fd5b50600154610135906001600160a01b031681565b3480156101b757600080fd5b50600354610135906001600160a01b031681565b3480156101d757600080fd5b506100ff6101e6366004610562565b610392565b3480156101f757600080fd5b506100ff61020636600461057d565b610410565b33600090815260046020526040812054810361023a57604051637d03778960e01b815260040160405180910390fd5b600154600254600354604051636e6be03f60e01b81526001600160a01b0393841660048201526024810192909252306044830152821660648201523360848201526001600160e01b0319841660a482015260e060c4820152600060e48201819052917f00000000000000000000000000000000000000000000000000000000000000001690636e6be03f90610104016020604051808303816000875af11580156102e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030c91906105a7565b60405190915081907fcba2da2f3c0c732a104019a3104936397dde7343964c1518ceb760052e4537b190600090a290505b919050565b61034a610434565b610354600061048e565b565b61035e610434565b600180546001600160a01b039485166001600160a01b03199182161790915560029290925560038054919093169116179055565b61039a610434565b6001600160a01b0381166104045760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61040d8161048e565b50565b610418610434565b6001600160a01b03909116600090815260046020526040902055565b6000546001600160a01b031633146103545760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103fb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156104f057600080fd5b81356001600160e01b03198116811461050857600080fd5b9392505050565b80356001600160a01b038116811461033d57600080fd5b60008060006060848603121561053b57600080fd5b6105448461050f565b9250602084013591506105596040850161050f565b90509250925092565b60006020828403121561057457600080fd5b6105088261050f565b6000806040838503121561059057600080fd5b6105998361050f565b946020939093013593505050565b6000602082840312156105b957600080fd5b505191905056fea264697066735822122021857901861931e41541e1e5c6584f46c7bff7ef88a551e6592b067f91677ae364736f6c63430008130033000000000000000000000000a0ad79d995ddeeb18a14eaef56a549a04e3aa1bd

Deployed Bytecode

0x6080604052600436106100955760003560e01c80638da5cb5b116100595780638da5cb5b1461016d578063a36ff4d81461018b578063bf90fb4e146101ab578063f2fde38b146101cb578063fe63a27d146101eb57600080fd5b806307b9fc57146100a157806364c3381c146100ca578063715018a6146100ea57806371bab666146101015780637bdf25251461014d57600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100b760025481565b6040519081526020015b60405180910390f35b3480156100d657600080fd5b506100b76100e53660046104de565b61020b565b3480156100f657600080fd5b506100ff610342565b005b34801561010d57600080fd5b506101357f000000000000000000000000a0ad79d995ddeeb18a14eaef56a549a04e3aa1bd81565b6040516001600160a01b0390911681526020016100c1565b34801561015957600080fd5b506100ff610168366004610526565b610356565b34801561017957600080fd5b506000546001600160a01b0316610135565b34801561019757600080fd5b50600154610135906001600160a01b031681565b3480156101b757600080fd5b50600354610135906001600160a01b031681565b3480156101d757600080fd5b506100ff6101e6366004610562565b610392565b3480156101f757600080fd5b506100ff61020636600461057d565b610410565b33600090815260046020526040812054810361023a57604051637d03778960e01b815260040160405180910390fd5b600154600254600354604051636e6be03f60e01b81526001600160a01b0393841660048201526024810192909252306044830152821660648201523360848201526001600160e01b0319841660a482015260e060c4820152600060e48201819052917f000000000000000000000000a0ad79d995ddeeb18a14eaef56a549a04e3aa1bd1690636e6be03f90610104016020604051808303816000875af11580156102e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030c91906105a7565b60405190915081907fcba2da2f3c0c732a104019a3104936397dde7343964c1518ceb760052e4537b190600090a290505b919050565b61034a610434565b610354600061048e565b565b61035e610434565b600180546001600160a01b039485166001600160a01b03199182161790915560029290925560038054919093169116179055565b61039a610434565b6001600160a01b0381166104045760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61040d8161048e565b50565b610418610434565b6001600160a01b03909116600090815260046020526040902055565b6000546001600160a01b031633146103545760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103fb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156104f057600080fd5b81356001600160e01b03198116811461050857600080fd5b9392505050565b80356001600160a01b038116811461033d57600080fd5b60008060006060848603121561053b57600080fd5b6105448461050f565b9250602084013591506105596040850161050f565b90509250925092565b60006020828403121561057457600080fd5b6105088261050f565b6000806040838503121561059057600080fd5b6105998361050f565b946020939093013593505050565b6000602082840312156105b957600080fd5b505191905056fea264697066735822122021857901861931e41541e1e5c6584f46c7bff7ef88a551e6592b067f91677ae364736f6c63430008130033

Block Transaction Gas Used Reward
view all blocks collator

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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.