Overview
APE Balance
0 APE
APE Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x8A0FDadF...416BC27BD The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Oracle
Compiler Version
v0.6.6+commit.6c089d02
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.6.6; import "./LinkTokenReceiver.sol"; import "./interfaces/ChainlinkRequestInterface.sol"; import "./interfaces/OracleInterface.sol"; import "./interfaces/LinkTokenInterface.sol"; import "./interfaces/WithdrawalInterface.sol"; import "./vendor/Ownable.sol"; import "./vendor/SafeMathChainlink.sol"; /** * @title The Chainlink Oracle contract * @notice Node operators can deploy this contract to fulfill requests sent to them. * This contract is optimized for rollups (like Arbitrum and Optimism), it will be inefficient everywhere else */ contract Oracle is ChainlinkRequestInterface, OracleInterface, Ownable, LinkTokenReceiver, WithdrawalInterface { using SafeMathChainlink for uint256; uint256 constant public EXPIRY_TIME = 5 minutes; uint256 constant private MINIMUM_CONSUMER_GAS_LIMIT = 400000; uint32 internal constant MAX_INDEX_SIG = 268_435_455; // 0x0FFFFFFF // We initialize fields to 1 instead of 0 so that the first invocation // does not cost more gas. uint256 constant private ONE_FOR_CONSISTENT_GAS_COST = 1; LinkTokenInterface internal LinkToken; mapping(bytes32 => bytes32) private commitments; mapping(address => bool) private authorizedNodes; uint256 private withdrawableTokens = ONE_FOR_CONSISTENT_GAS_COST; // Struct packed into 2 slots // Cannot pack into 1 because we need payment to be > uint72 and expiration uint32 struct PackedOracleRequest { address callbackAddress; // slot1: 160 bytes4 callbackFunctionId; // slot1: 160 + 32 uint128 payment; // slot2: 128 uint128 expiration; // slot2: 128 + 128 } uint32 public orderIndex; // type(uint32).max 4,294,967,295 mapping(bytes32 => PackedOracleRequest) private s_packedRequests; mapping(uint32 => bytes32) private s_indexRequests; event OracleRequest( bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data ); event CancelOracleRequest( bytes32 indexed requestId ); /** * @notice Deploy with the address of the LINK token * @dev Sets the LinkToken address for the imported LinkTokenInterface * @param _link The address of the LINK token */ constructor(address _link) public Ownable() { LinkToken = LinkTokenInterface(_link); // external but already deployed and unalterable } /** * @notice Fallback function * @dev When calldata.length === 36 bytes, forwards message to fulfillOracleRequestShort */ fallback() external payable { if(msg.data.length == 36) { // 36 = sig + 1 word uint32 index = uint32(msg.sig); // if sig is gt 0x0FFFFFFF (the max request index we allow) then it's not one of our calls if (index > MAX_INDEX_SIG) return; // call fulfillOracleRequestShort bytes32 _data = abi.decode(msg.data[4:], (bytes32)); fulfillOracleRequestShort(s_indexRequests[index], _data); delete s_indexRequests[index]; } } /** * @notice Creates the Chainlink request * @dev Stores the hash of the params as the on-chain commitment for the request. * Emits OracleRequest event for the Chainlink node to detect. * @param _sender The sender of the request * @param _payment The amount of payment given (specified in wei) * @param _specId The Job Specification ID * @param _callbackAddress The callback address for the response * @param _callbackFunctionId The callback function ID for the response * @param _nonce The nonce sent by the requester * @param _dataVersion The specified data version * @param _data The CBOR payload of the request */ function oracleRequest( address _sender, uint256 _payment, bytes32 _specId, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _nonce, uint256 _dataVersion, bytes calldata _data ) external override onlyLINK() checkCallbackAddress(_callbackAddress) { bytes32 requestId = keccak256(abi.encodePacked(_sender, _nonce)); require(commitments[requestId] == 0, "Must use a unique ID"); // solhint-disable-next-line not-rely-on-time uint256 expiration = now.add(EXPIRY_TIME); commitments[requestId] = keccak256( abi.encodePacked( _payment, _callbackAddress, _callbackFunctionId, expiration ) ); s_packedRequests[requestId] = PackedOracleRequest( _callbackAddress, _callbackFunctionId, uint128(_payment), uint128(expiration) ); uint32 _index = orderIndex; s_indexRequests[_index] = requestId; // we know there are no valid signatures in this contract with a leading 0 so we // limit max index to 0x0FFFFFFF (MAX_INDEX_SIG) // if current index is MAX_INDEX_SIG then we reset index to zero if (_index == MAX_INDEX_SIG) { orderIndex = 0; } else { orderIndex = _index + 1; // can't overflow since we always stay below 0x0FFFFFFF + 1 } emit OracleRequest( _specId, _sender, requestId, _payment, _callbackAddress, // highjack `_callbackFunctionId` since our custom nodes read that param from storage and // we need somewhere to emit `_index` without modifying the event (it would break the node) bytes4(_index), expiration, _dataVersion, _data); } /** * @notice Called by the Chainlink node to fulfill requests * @dev Given params must hash back to the commitment stored from `oracleRequest`. * Will call the callback address' callback function without bubbling up error * checking in a `require` so that the node can get paid. * @param _requestId The fulfillment request ID that must match the requester's * @param _payment The payment amount that will be released for the oracle (specified in wei) * @param _callbackAddress The callback address to call for fulfillment * @param _callbackFunctionId The callback function ID to use for fulfillment * @param _expiration The expiration that the node should respond by before the requester can cancel * @param _data The data to return to the consuming contract * @return Status if the external call was successful */ function fulfillOracleRequest( bytes32 _requestId, uint256 _payment, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _expiration, bytes32 _data ) external onlyAuthorizedNode override isValidRequest(_requestId) returns (bool) { bytes32 paramsHash = keccak256( abi.encodePacked( _payment, _callbackAddress, _callbackFunctionId, _expiration ) ); require(commitments[_requestId] == paramsHash, "Params do not match request ID"); withdrawableTokens = withdrawableTokens.add(_payment); delete commitments[_requestId]; //require(gasleft() >= MINIMUM_CONSUMER_GAS_LIMIT, "Must provide consumer enough gas"); // All updates to the oracle's fulfillment should come before calling the // callback(addr+functionId) as it is untrusted. // See: https://solidity.readthedocs.io/en/develop/security-considerations.html#use-the-checks-effects-interactions-pattern (bool success, ) = _callbackAddress.call(abi.encodeWithSelector(_callbackFunctionId, _requestId, _data)); // solhint-disable-line avoid-low-level-calls return success; } /** * @notice Called by the Chainlink node to fulfill requests * @dev Matches functionality of fulfillOracleRequest with the exception of * loading _payment, _callbackAddress, _callbackFunctionId and _expiration from * storage. Ideal for L2's that charge for L1 calldata. * Given params must hash back to the commitment stored from `oracleRequest`. * Will call the callback address' callback function without bubbling up error * checking in a `require` so that the node can get paid. * @param _requestId The fulfillment request ID that must match the requester's * @param _data The data to return to the consuming contract * @return Status if the external call was successful */ function fulfillOracleRequestShort( bytes32 _requestId, bytes32 _data ) public onlyAuthorizedNode isValidRequest(_requestId) returns (bool) { PackedOracleRequest memory request = s_packedRequests[_requestId]; bytes32 paramsHash = keccak256( abi.encodePacked( uint(request.payment), request.callbackAddress, request.callbackFunctionId, uint(request.expiration) ) ); require(commitments[_requestId] == paramsHash, "Params do not match request ID"); withdrawableTokens = withdrawableTokens.add(uint(request.payment)); delete commitments[_requestId]; delete s_packedRequests[_requestId]; //require(gasleft() >= MINIMUM_CONSUMER_GAS_LIMIT, "Must provide consumer enough gas"); // All updates to the oracle's fulfillment should come before calling the // callback(addr+functionId) as it is untrusted. // See: https://solidity.readthedocs.io/en/develop/security-considerations.html#use-the-checks-effects-interactions-pattern (bool success, ) = request.callbackAddress.call(abi.encodeWithSelector(request.callbackFunctionId, _requestId, _data)); // solhint-disable-line avoid-low-level-calls return success; } /** * @notice Use this to check if a node is authorized for fulfilling requests * @param _node The address of the Chainlink node * @return The authorization status of the node */ function getAuthorizationStatus(address _node) external view override returns (bool) { return authorizedNodes[_node]; } /** * @notice Sets the fulfillment permission for a given node. Use `true` to allow, `false` to disallow. * @param _node The address of the Chainlink node * @param _allowed Bool value to determine if the node can fulfill requests */ function setFulfillmentPermission(address _node, bool _allowed) external override onlyOwner() { authorizedNodes[_node] = _allowed; } /** * @notice Allows the node operator to withdraw earned LINK to a given address * @dev The owner of the contract can be another wallet and does not have to be a Chainlink node * @param _recipient The address to send the LINK token to * @param _amount The amount to send (specified in wei) */ function withdraw(address _recipient, uint256 _amount) external override(OracleInterface, WithdrawalInterface) onlyOwner hasAvailableFunds(_amount) { withdrawableTokens = withdrawableTokens.sub(_amount); assert(LinkToken.transfer(_recipient, _amount)); } /** * @notice Displays the amount of LINK that is available for the node operator to withdraw * @dev We use `ONE_FOR_CONSISTENT_GAS_COST` in place of 0 in storage * @return The amount of withdrawable LINK on the contract */ function withdrawable() external view override(OracleInterface, WithdrawalInterface) onlyOwner() returns (uint256) { return withdrawableTokens.sub(ONE_FOR_CONSISTENT_GAS_COST); } /** * @notice Allows requesters to cancel requests sent to this oracle contract. Will transfer the LINK * sent for the request back to the requester's address. * @dev Given params must hash to a commitment stored on the contract in order for the request to be valid * Emits CancelOracleRequest event. * @param _requestId The request ID * @param _payment The amount of payment given (specified in wei) * @param _callbackFunc The requester's specified callback address * @param _expiration The time of the expiration for the request */ function cancelOracleRequest( bytes32 _requestId, uint256 _payment, bytes4 _callbackFunc, uint256 _expiration ) external override { bytes32 paramsHash = keccak256( abi.encodePacked( _payment, msg.sender, _callbackFunc, _expiration) ); require(paramsHash == commitments[_requestId], "Params do not match request ID"); // solhint-disable-next-line not-rely-on-time require(_expiration <= now, "Request is not expired"); delete commitments[_requestId]; delete s_packedRequests[_requestId]; emit CancelOracleRequest(_requestId); assert(LinkToken.transfer(msg.sender, _payment)); } /** * @notice Returns the address of the LINK token * @dev This is the public implementation for chainlinkTokenAddress, which is * an internal method of the ChainlinkClient contract */ function getChainlinkToken() public view override returns (address) { return address(LinkToken); } // MODIFIERS /** * @dev Reverts if amount requested is greater than withdrawable balance * @param _amount The given amount to compare to `withdrawableTokens` */ modifier hasAvailableFunds(uint256 _amount) { require(withdrawableTokens >= _amount.add(ONE_FOR_CONSISTENT_GAS_COST), "Amount requested is greater than withdrawable balance"); _; } /** * @dev Reverts if request ID does not exist * @param _requestId The given request ID to check in stored `commitments` */ modifier isValidRequest(bytes32 _requestId) { require(commitments[_requestId] != 0, "Must have a valid requestId"); _; } /** * @dev Reverts if `msg.sender` is not authorized to fulfill requests */ modifier onlyAuthorizedNode() { require(authorizedNodes[msg.sender] || msg.sender == owner(), "Not an authorized node to fulfill requests"); _; } /** * @dev Reverts if the callback address is the LINK token * @param _to The callback address */ modifier checkCallbackAddress(address _to) { require(_to != address(LinkToken), "Cannot callback to LINK"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; abstract contract LinkTokenReceiver { bytes4 constant private ORACLE_REQUEST_SELECTOR = 0x40429946; uint256 constant private SELECTOR_LENGTH = 4; uint256 constant private EXPECTED_REQUEST_WORDS = 2; uint256 constant private MINIMUM_REQUEST_LENGTH = SELECTOR_LENGTH + (32 * EXPECTED_REQUEST_WORDS); /** * @notice Called when LINK is sent to the contract via `transferAndCall` * @dev The data payload's first 2 words will be overwritten by the `_sender` and `_amount` * values to ensure correctness. Calls oracleRequest. * @param _sender Address of the sender * @param _amount Amount of LINK sent (specified in wei) * @param _data Payload of the transaction */ function onTokenTransfer( address _sender, uint256 _amount, bytes memory _data ) public onlyLINK validRequestLength(_data) permittedFunctionsForLINK(_data) { assembly { // solhint-disable-next-line avoid-low-level-calls mstore(add(_data, 36), _sender) // ensure correct sender is passed // solhint-disable-next-line avoid-low-level-calls mstore(add(_data, 68), _amount) // ensure correct amount is passed } // solhint-disable-next-line avoid-low-level-calls (bool success, ) = address(this).delegatecall(_data); // calls oracleRequest require(success, "Unable to create request"); } function getChainlinkToken() public view virtual returns (address); /** * @dev Reverts if not sent from the LINK token */ modifier onlyLINK() { require(msg.sender == getChainlinkToken(), "Must use LINK token"); _; } /** * @dev Reverts if the given data does not begin with the `oracleRequest` function selector * @param _data The data payload of the request */ modifier permittedFunctionsForLINK(bytes memory _data) { bytes4 funcSelector; assembly { // solhint-disable-next-line avoid-low-level-calls funcSelector := mload(add(_data, 32)) } require(funcSelector == ORACLE_REQUEST_SELECTOR, "Must use whitelisted functions"); _; } /** * @dev Reverts if the given payload is less than needed to create a request * @param _data The request payload */ modifier validRequestLength(bytes memory _data) { require(_data.length >= MINIMUM_REQUEST_LENGTH, "Invalid request length"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; interface ChainlinkRequestInterface { function oracleRequest( address sender, uint256 requestPrice, bytes32 serviceAgreementID, address callbackAddress, bytes4 callbackFunctionId, uint256 nonce, uint256 dataVersion, bytes calldata data ) external; function cancelOracleRequest( bytes32 requestId, uint256 payment, bytes4 callbackFunctionId, uint256 expiration ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; interface OracleInterface { function fulfillOracleRequest( bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration, bytes32 data ) external returns (bool); function getAuthorizationStatus(address node) external view returns (bool); function setFulfillmentPermission(address node, bool allowed) external; function withdraw(address recipient, uint256 amount) external; function withdrawable() external view returns (uint256); }
// 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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; interface WithdrawalInterface { /** * @notice transfer LINK held by the contract belonging to msg.sender to * another address * @param recipient is the address to send the LINK to * @param amount is the amount of LINK to send */ function withdraw(address recipient, uint256 amount) external; /** * @notice query the available amount of LINK to withdraw by msg.sender */ function withdrawable() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @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. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functions to restrict their use to * the owner. * * This contract has been modified to remove the revokeOwnership function */ contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return msg.sender == _owner; } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// 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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "none" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_link","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"CancelOracleRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"specId","type":"bytes32"},{"indexed":false,"internalType":"address","name":"requester","type":"address"},{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"payment","type":"uint256"},{"indexed":false,"internalType":"address","name":"callbackAddr","type":"address"},{"indexed":false,"internalType":"bytes4","name":"callbackFunctionId","type":"bytes4"},{"indexed":false,"internalType":"uint256","name":"cancelExpiration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dataVersion","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"OracleRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"EXPIRY_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_requestId","type":"bytes32"},{"internalType":"uint256","name":"_payment","type":"uint256"},{"internalType":"bytes4","name":"_callbackFunc","type":"bytes4"},{"internalType":"uint256","name":"_expiration","type":"uint256"}],"name":"cancelOracleRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_requestId","type":"bytes32"},{"internalType":"uint256","name":"_payment","type":"uint256"},{"internalType":"address","name":"_callbackAddress","type":"address"},{"internalType":"bytes4","name":"_callbackFunctionId","type":"bytes4"},{"internalType":"uint256","name":"_expiration","type":"uint256"},{"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"fulfillOracleRequest","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_requestId","type":"bytes32"},{"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"fulfillOracleRequestShort","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_node","type":"address"}],"name":"getAuthorizationStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainlinkToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"onTokenTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint256","name":"_payment","type":"uint256"},{"internalType":"bytes32","name":"_specId","type":"bytes32"},{"internalType":"address","name":"_callbackAddress","type":"address"},{"internalType":"bytes4","name":"_callbackFunctionId","type":"bytes4"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"uint256","name":"_dataVersion","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"oracleRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"orderIndex","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_node","type":"address"},{"internalType":"bool","name":"_allowed","type":"bool"}],"name":"setFulfillmentPermission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x6080604052600436106100e85760003560e01c80637fcd56db1161008a578063d3e9c31411610059578063d3e9c314146104a0578063d87aa334146104d3578063f2fde38b14610503578063f3fef3a314610536576100e8565b80637fcd56db146103735780638da5cb5b146103ae5780638f32d59b146103c3578063a4c0ed36146103d8576100e8565b80634ab0d190116100c65780634ab0d190146102825780634b602282146102f157806350188301146103185780636ee4d5531461032d576100e8565b8063165d35e11461016557806330471fee1461019657806340429946146101c4575b60243614156101635760003560e01c630fffffff8111156101095750610163565b600061011836600481846117e6565b602081101561012657600080fd5b5063ffffffff83166000908152600760205260409020549035915061014b908261056f565b505063ffffffff166000908152600760205260408120555b005b34801561017157600080fd5b5061017a6108a1565b604080516001600160a01b039092168252519081900360200190f35b3480156101a257600080fd5b506101ab6108b0565b6040805163ffffffff9092168252519081900360200190f35b3480156101d057600080fd5b5061016360048036036101008110156101e857600080fd5b6001600160a01b038235811692602081013592604082013592606083013516916001600160e01b03196080820135169160a08201359160c081013591810190610100810160e082013564010000000081111561024357600080fd5b82018360208201111561025557600080fd5b8035906020019184600183028401116401000000008311171561027757600080fd5b5090925090506108bc565b34801561028e57600080fd5b506102dd600480360360c08110156102a557600080fd5b508035906020810135906001600160a01b03604082013516906001600160e01b03196060820135169060808101359060a00135610d16565b604080519115158252519081900360200190f35b3480156102fd57600080fd5b50610306610fb0565b60408051918252519081900360200190f35b34801561032457600080fd5b50610306610fb6565b34801561033957600080fd5b506101636004803603608081101561035057600080fd5b508035906020810135906001600160e01b03196040820135169060600135611018565b34801561037f57600080fd5b506101636004803603604081101561039657600080fd5b506001600160a01b03813516906020013515156111f0565b3480156103ba57600080fd5b5061017a611262565b3480156103cf57600080fd5b506102dd611271565b3480156103e457600080fd5b50610163600480360360608110156103fb57600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561042b57600080fd5b82018360208201111561043d57600080fd5b8035906020019184600183028401116401000000008311171561045f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611282945050505050565b3480156104ac57600080fd5b506102dd600480360360208110156104c357600080fd5b50356001600160a01b03166114af565b3480156104df57600080fd5b506102dd600480360360408110156104f657600080fd5b508035906020013561056f565b34801561050f57600080fd5b506101636004803603602081101561052657600080fd5b50356001600160a01b03166114cd565b34801561054257600080fd5b506101636004803603604081101561055957600080fd5b506001600160a01b038135169060200135611520565b3360009081526003602052604081205460ff16806105a55750610590611262565b6001600160a01b0316336001600160a01b0316145b6105e05760405162461bcd60e51b815260040180806020018281038252602a81526020018061186a602a913960400191505060405180910390fd5b6000838152600260205260409020548390610642576040805162461bcd60e51b815260206004820152601b60248201527f4d757374206861766520612076616c6964207265717565737449640000000000604482015290519081900360640190fd5b61064a6117bf565b506000848152600660209081526040808320815160808101835281546001600160a01b0381168252600160a01b810460e01b6001600160e01b0319168286018190526001909301546001600160801b03808216848701819052600160801b9092041660608085018290528651808901939093529290921b6001600160601b031916818601526054810193909352605880840191909152835180840390910181526078909201835281519184019190912088855260029093529220548114610758576040805162461bcd60e51b815260206004820152601e60248201527f506172616d7320646f206e6f74206d6174636820726571756573742049440000604482015290519081900360640190fd5b6040820151600454610778916001600160801b031663ffffffff61166116565b60045560008681526002602090815260408083208390556006825280832080546001600160c01b03191681556001018390558451858301518251602481018c905260448082018c9052845180830390910181526064909101845293840180516001600160e01b03166001600160e01b0319909216919091178152915183516001600160a01b0392909216939290918291908083835b6020831061082c5780518252601f19909201916020918201910161080d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461088e576040519150601f19603f3d011682016040523d82523d6000602084013e610893565b606091505b509098975050505050505050565b6001546001600160a01b031690565b60055463ffffffff1681565b6108c46108a1565b6001600160a01b0316336001600160a01b03161461091f576040805162461bcd60e51b815260206004820152601360248201527226bab9ba103ab9b2902624a725903a37b5b2b760691b604482015290519081900360640190fd5b60015486906001600160a01b0380831691161415610984576040805162461bcd60e51b815260206004820152601760248201527f43616e6e6f742063616c6c6261636b20746f204c494e4b000000000000000000604482015290519081900360640190fd5b604080516001600160601b031960608d901b1660208083019190915260348083018990528351808403909101815260549092018352815191810191909120600081815260029092529190205415610a19576040805162461bcd60e51b8152602060048201526014602482015273135d5cdd081d5cd94818481d5b9a5c5d5948125160621b604482015290519081900360640190fd5b6000610a2d4261012c63ffffffff61166116565b90508a89898360405160200180858152602001846001600160a01b03166001600160a01b031660601b8152601401836001600160e01b0319166001600160e01b031916815260040182815260200194505050505060405160208183030381529060405280519060200120600260008481526020019081526020016000208190555060405180608001604052808a6001600160a01b03168152602001896001600160e01b03191681526020018c6001600160801b03168152602001826001600160801b03168152506006600084815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160000160146101000a81548163ffffffff021916908360e01c021790555060408201518160010160006101000a8154816001600160801b0302191690836001600160801b0316021790555060608201518160010160106101000a8154816001600160801b0302191690836001600160801b031602179055509050506000600560009054906101000a900463ffffffff16905082600760008363ffffffff1663ffffffff16815260200190815260200160002081905550630fffffff63ffffffff168163ffffffff161415610c1a576005805463ffffffff19169055610c33565b6005805463ffffffff19166001830163ffffffff161790555b8a7fd8d7ecc4800d25fa53ce0372f13a416d98907a7ef3d8d3bdd79cf4fe75529c658e858f8e8660e01b888e8e8e604051808a6001600160a01b03166001600160a01b03168152602001898152602001888152602001876001600160a01b03166001600160a01b03168152602001866001600160e01b0319166001600160e01b0319168152602001858152602001848152602001806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039c50909a5050505050505050505050a250505050505050505050505050565b3360009081526003602052604081205460ff1680610d4c5750610d37611262565b6001600160a01b0316336001600160a01b0316145b610d875760405162461bcd60e51b815260040180806020018281038252602a81526020018061186a602a913960400191505060405180910390fd5b6000878152600260205260409020548790610de9576040805162461bcd60e51b815260206004820152601b60248201527f4d757374206861766520612076616c6964207265717565737449640000000000604482015290519081900360640190fd5b6040805160208082018a90526001600160601b031960608a901b16828401526001600160e01b0319881660548301526058808301889052835180840390910181526078909201835281519181019190912060008b81526002909252919020548114610e9b576040805162461bcd60e51b815260206004820152601e60248201527f506172616d7320646f206e6f74206d6174636820726571756573742049440000604482015290519081900360640190fd5b600454610eae908963ffffffff61166116565b60045560008981526002602090815260408083208390558051602481018d90526044808201899052825180830390910181526064909101825291820180516001600160e01b03166001600160e01b03198b16178152905182516001600160a01b038c16939282918083835b60208310610f385780518252601f199092019160209182019101610f19565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610f9a576040519150601f19603f3d011682016040523d82523d6000602084013e610f9f565b606091505b50909b9a5050505050505050505050565b61012c81565b6000610fc0611271565b610fff576040805162461bcd60e51b81526020600482018190526024820152600080516020611894833981519152604482015290519081900360640190fd5b60045461101390600163ffffffff6116c216565b905090565b6040805160208082018690523360601b828401526001600160e01b03198516605483015260588083018590528351808403909101815260789092018352815191810191909120600087815260029092529190205481146110bf576040805162461bcd60e51b815260206004820152601e60248201527f506172616d7320646f206e6f74206d6174636820726571756573742049440000604482015290519081900360640190fd5b4282111561110d576040805162461bcd60e51b815260206004820152601660248201527514995c5d595cdd081a5cc81b9bdd08195e1c1a5c995960521b604482015290519081900360640190fd5b6000858152600260209081526040808320839055600690915280822080546001600160c01b03191681556001018290555186917fa7842b9ec549398102c0d91b1b9919b2f20558aefdadf57528a95c6cd3292e9391a26001546040805163a9059cbb60e01b81523360048201526024810187905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b1580156111b757600080fd5b505af11580156111cb573d6000803e3d6000fd5b505050506040513d60208110156111e157600080fd5b50516111e957fe5b5050505050565b6111f8611271565b611237576040805162461bcd60e51b81526020600482018190526024820152600080516020611894833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152600360205260409020805460ff1916911515919091179055565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b61128a6108a1565b6001600160a01b0316336001600160a01b0316146112e5576040805162461bcd60e51b815260206004820152601360248201527226bab9ba103ab9b2902624a725903a37b5b2b760691b604482015290519081900360640190fd5b8051819060441115611337576040805162461bcd60e51b8152602060048201526016602482015275092dcecc2d8d2c840e4cae2eacae6e840d8cadccee8d60531b604482015290519081900360640190fd5b602082015182906001600160e01b031981166320214ca360e11b146113a3576040805162461bcd60e51b815260206004820152601e60248201527f4d757374207573652077686974656c69737465642066756e6374696f6e730000604482015290519081900360640190fd5b8560248501528460448501526000306001600160a01b0316856040518082805190602001908083835b602083106113eb5780518252601f1990920191602091820191016113cc565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461144b576040519150601f19603f3d011682016040523d82523d6000602084013e611450565b606091505b50509050806114a6576040805162461bcd60e51b815260206004820152601860248201527f556e61626c6520746f2063726561746520726571756573740000000000000000604482015290519081900360640190fd5b50505050505050565b6001600160a01b031660009081526003602052604090205460ff1690565b6114d5611271565b611514576040805162461bcd60e51b81526020600482018190526024820152600080516020611894833981519152604482015290519081900360640190fd5b61151d8161171f565b50565b611528611271565b611567576040805162461bcd60e51b81526020600482018190526024820152600080516020611894833981519152604482015290519081900360640190fd5b8061157981600163ffffffff61166116565b60045410156115b95760405162461bcd60e51b81526004018080602001828103825260358152602001806118356035913960400191505060405180910390fd5b6004546115cc908363ffffffff6116c216565b60049081556001546040805163a9059cbb60e01b81526001600160a01b0387811694820194909452602481018690529051929091169163a9059cbb916044808201926020929091908290030181600087803b15801561162a57600080fd5b505af115801561163e573d6000803e3d6000fd5b505050506040513d602081101561165457600080fd5b505161165c57fe5b505050565b6000828201838110156116bb576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600082821115611719576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6001600160a01b0381166117645760405162461bcd60e51b815260040180806020018281038252602681526020018061180f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60408051608081018252600080825260208201819052918101829052606081019190915290565b600080858511156117f5578182fd5b83861115611801578182fd5b505082019391909203915056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416d6f756e74207265717565737465642069732067726561746572207468616e20776974686472617761626c652062616c616e63654e6f7420616e20617574686f72697a6564206e6f646520746f2066756c66696c6c2072657175657374734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a164736f6c6343000606000a
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.