mirror of
https://github.com/PatrickAlphaC/dungeons-and-dragons-nft.git
synced 2021-05-29 14:48:35 +03:00
12203 lines
492 KiB
JSON
12203 lines
492 KiB
JSON
{
|
|
"contractName": "ChainlinkClient",
|
|
"abi": [
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "bytes32",
|
|
"name": "id",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "ChainlinkCancelled",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "bytes32",
|
|
"name": "id",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "ChainlinkFulfilled",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "bytes32",
|
|
"name": "id",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "ChainlinkRequested",
|
|
"type": "event"
|
|
}
|
|
],
|
|
"metadata": "{\"compiler\":{\"version\":\"0.6.6+commit.6c089d02\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"ChainlinkCancelled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"ChainlinkFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"ChainlinkRequested\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{},\"title\":\"The ChainlinkClient contract\"},\"userdoc\":{\"methods\":{},\"notice\":\"Contract writers can inherit this contract in order to create requests for the Chainlink network\"}},\"settings\":{\"compilationTarget\":{\"@chainlink/contracts/src/v0.6/ChainlinkClient.sol\":\"ChainlinkClient\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@chainlink/contracts/src/v0.6/Chainlink.sol\":{\"keccak256\":\"0xdb0cd9acf471e9925b7be1fa4b0f17a373324318b2e14062b7749931cdde00fb\",\"urls\":[\"bzz-raw://ad2685687f532eba3298ede1b888b57d69f3995d6dd49bbe468d45cb1716cbc4\",\"dweb:/ipfs/QmVuNKTnxGuzfaVbx4jDjdVn45D4ogj9zvso1xXhUc2NKT\"]},\"@chainlink/contracts/src/v0.6/ChainlinkClient.sol\":{\"keccak256\":\"0xf9c4039a2e4ca49bbb9409baf6afcf99a572695d3e5f3c191b7fac6cfa7378e9\",\"urls\":[\"bzz-raw://792875fb40c3723baa0607337a6bd27b5c3bc55502bc8db9981ed71747e9ce52\",\"dweb:/ipfs/QmUWKB9zaaf1ywDd9vWe4JB9Pjtqt1cddjUoGwEiKfP2HP\"]},\"@chainlink/contracts/src/v0.6/interfaces/ChainlinkRequestInterface.sol\":{\"keccak256\":\"0x4b41b021bf58c429891ff291637de29be54741565105de82238dac9f6ecee374\",\"urls\":[\"bzz-raw://84681ff65b31b2e2c6977289661733c0f22409965b9057140f56f8a9ff185048\",\"dweb:/ipfs/QmS4TQJDSHQiKNwQ4LkSCVp7LjuRQwp6gem3271vtCwz9k\"]},\"@chainlink/contracts/src/v0.6/interfaces/ENSInterface.sol\":{\"keccak256\":\"0xf4998e886147b298eda28b4eacbdc90c58ba63ba475469651f2072e188dd5a64\",\"urls\":[\"bzz-raw://c1e2334294a816b7eda9de280e39b9463ebde2db8b242410eb991b2f623b47d4\",\"dweb:/ipfs/QmNY5bajahfFRmhBgcMVQ7712zHKxc6HkuN7LaiKtpjb7t\"]},\"@chainlink/contracts/src/v0.6/interfaces/LinkTokenInterface.sol\":{\"keccak256\":\"0xdbf46b45a4c9f38ba71a0391aed0e7b108854b619f292d907ae537228868bda6\",\"urls\":[\"bzz-raw://3ae40466809630c4731e2e3a697d6885727c577aaf260766c8a2f534ad3f6ee8\",\"dweb:/ipfs/QmTzpN5yP4Y5jvQ1ohfXFrce3sjzUiSChYJgZj9VvhVohG\"]},\"@chainlink/contracts/src/v0.6/interfaces/PointerInterface.sol\":{\"keccak256\":\"0x6458d82762d4f13c020a13efdbd9bf14500e147df707184a693aea91449c2f4f\",\"urls\":[\"bzz-raw://735950f3a544fc6ef2db92405597169bfb5fdb9df83623c0d99fd3d85de8690d\",\"dweb:/ipfs/QmZHxb5Qr7Kw9DHAg4VwEADue9ffNyyhbiyEZ15A5mANUN\"]},\"@chainlink/contracts/src/v0.6/vendor/Buffer.sol\":{\"keccak256\":\"0x44f15070c50a25a323775c989660d2c2af86530e994973584ddaadb51ab2fe6d\",\"urls\":[\"bzz-raw://6ff6ef1f796e1c1aa0479d6a186cc8d43bdf22b0dad391d4a897bea3a924e38e\",\"dweb:/ipfs/QmY8Zt8X4cqFSEX8GD6YQbThJe1Z3PDuNNKZzDWpCS69Go\"]},\"@chainlink/contracts/src/v0.6/vendor/CBOR.sol\":{\"keccak256\":\"0xabda6c3df28094ac0c2a892108f5655fe7520791bc1cd6e0bd4d11ed261a001d\",\"urls\":[\"bzz-raw://2659de9101e6ba2c1125741adad82c626f2d6681d14487d793c1ad0712e80e49\",\"dweb:/ipfs/QmaEJtv16Ln17Jbkc5kUf5vHrfBeGTmBAX1tVyDHZV2Zxw\"]},\"@chainlink/contracts/src/v0.6/vendor/ENSResolver.sol\":{\"keccak256\":\"0xdddea29d7407c1dbd1e130d885fc1a0934e98f0a7cc9f4d5bfd002bb2cfbcf82\",\"urls\":[\"bzz-raw://c4c764d69c47754d7b219fab558bf4be2a6444470ede7aa0ab1e446aea01dbda\",\"dweb:/ipfs/QmWp2CNUw9xt8ir2P3LhGHuydUsAXnyZ382U2BUjhoYPvy\"]},\"@chainlink/contracts/src/v0.6/vendor/SafeMath.sol\":{\"keccak256\":\"0x95dbe2dd5ab8682b99bc3d7d297b621d4237442da160f78d3323ee5c4a06ded3\",\"urls\":[\"bzz-raw://d753308ff4eb43fba6f9ede371a33f707c5818350770dcb078a7d78ac8251361\",\"dweb:/ipfs/Qme64eYKWoTQiP3WhqGHoMqrENNZ9L8SdBLQ2hx5SmzUda\"]}},\"version\":1}",
|
|
"bytecode": "0x60806040526001600455348015601457600080fd5b50603f8060226000396000f3fe6080604052600080fdfea2646970667358221220c75883269a2e2f1bb85dfc0682c6789236bc97a23793a3c43ab99cb8a0c2fde664736f6c63430006060033",
|
|
"deployedBytecode": "0x6080604052600080fdfea2646970667358221220c75883269a2e2f1bb85dfc0682c6789236bc97a23793a3c43ab99cb8a0c2fde664736f6c63430006060033",
|
|
"immutableReferences": {},
|
|
"sourceMap": "546:8723:3:-:0;;;1243:1;1212:32;;546:8723;5:9:-1;2:2;;;27:1;24;17:12;2:2;546:8723:3;;;;;;;",
|
|
"deployedSourceMap": "546:8723:3:-:0;;;12:1:-1;9;2:12",
|
|
"source": "pragma solidity ^0.6.0;\n\nimport \"./Chainlink.sol\";\nimport \"./interfaces/ENSInterface.sol\";\nimport \"./interfaces/LinkTokenInterface.sol\";\nimport \"./interfaces/ChainlinkRequestInterface.sol\";\nimport \"./interfaces/PointerInterface.sol\";\nimport { ENSResolver as ENSResolver_Chainlink } from \"./vendor/ENSResolver.sol\";\nimport { SafeMath as SafeMath_Chainlink } from \"./vendor/SafeMath.sol\";\n\n/**\n * @title The ChainlinkClient contract\n * @notice Contract writers can inherit this contract in order to create requests for the\n * Chainlink network\n */\ncontract ChainlinkClient {\n using Chainlink for Chainlink.Request;\n using SafeMath_Chainlink for uint256;\n\n uint256 constant internal LINK = 10**18;\n uint256 constant private AMOUNT_OVERRIDE = 0;\n address constant private SENDER_OVERRIDE = address(0);\n uint256 constant private ARGS_VERSION = 1;\n bytes32 constant private ENS_TOKEN_SUBNAME = keccak256(\"link\");\n bytes32 constant private ENS_ORACLE_SUBNAME = keccak256(\"oracle\");\n address constant private LINK_TOKEN_POINTER = 0xC89bD4E1632D3A43CB03AAAd5262cbe4038Bc571;\n\n ENSInterface private ens;\n bytes32 private ensNode;\n LinkTokenInterface private link;\n ChainlinkRequestInterface private oracle;\n uint256 private requestCount = 1;\n mapping(bytes32 => address) private pendingRequests;\n\n event ChainlinkRequested(bytes32 indexed id);\n event ChainlinkFulfilled(bytes32 indexed id);\n event ChainlinkCancelled(bytes32 indexed id);\n\n /**\n * @notice Creates a request that can hold additional parameters\n * @param _specId The Job Specification ID that the request will be created for\n * @param _callbackAddress The callback address that the response will be sent to\n * @param _callbackFunctionSignature The callback function signature to use for the callback address\n * @return A Chainlink Request struct in memory\n */\n function buildChainlinkRequest(\n bytes32 _specId,\n address _callbackAddress,\n bytes4 _callbackFunctionSignature\n ) internal pure returns (Chainlink.Request memory) {\n Chainlink.Request memory req;\n return req.initialize(_specId, _callbackAddress, _callbackFunctionSignature);\n }\n\n /**\n * @notice Creates a Chainlink request to the stored oracle address\n * @dev Calls `chainlinkRequestTo` with the stored oracle address\n * @param _req The initialized Chainlink Request\n * @param _payment The amount of LINK to send for the request\n * @return requestId The request ID\n */\n function sendChainlinkRequest(Chainlink.Request memory _req, uint256 _payment)\n internal\n returns (bytes32)\n {\n return sendChainlinkRequestTo(address(oracle), _req, _payment);\n }\n\n /**\n * @notice Creates a Chainlink request to the specified oracle address\n * @dev Generates and stores a request ID, increments the local nonce, and uses `transferAndCall` to\n * send LINK which creates a request on the target oracle contract.\n * Emits ChainlinkRequested event.\n * @param _oracle The address of the oracle for the request\n * @param _req The initialized Chainlink Request\n * @param _payment The amount of LINK to send for the request\n * @return requestId The request ID\n */\n function sendChainlinkRequestTo(address _oracle, Chainlink.Request memory _req, uint256 _payment)\n internal\n returns (bytes32 requestId)\n {\n requestId = keccak256(abi.encodePacked(this, requestCount));\n _req.nonce = requestCount;\n pendingRequests[requestId] = _oracle;\n emit ChainlinkRequested(requestId);\n require(link.transferAndCall(_oracle, _payment, encodeRequest(_req)), \"unable to transferAndCall to oracle\");\n requestCount += 1;\n\n return requestId;\n }\n\n /**\n * @notice Allows a request to be cancelled if it has not been fulfilled\n * @dev Requires keeping track of the expiration value emitted from the oracle contract.\n * Deletes the request from the `pendingRequests` mapping.\n * Emits ChainlinkCancelled event.\n * @param _requestId The request ID\n * @param _payment The amount of LINK sent for the request\n * @param _callbackFunc The callback function specified for the request\n * @param _expiration The time of the expiration for the request\n */\n function cancelChainlinkRequest(\n bytes32 _requestId,\n uint256 _payment,\n bytes4 _callbackFunc,\n uint256 _expiration\n )\n internal\n {\n ChainlinkRequestInterface requested = ChainlinkRequestInterface(pendingRequests[_requestId]);\n delete pendingRequests[_requestId];\n emit ChainlinkCancelled(_requestId);\n requested.cancelOracleRequest(_requestId, _payment, _callbackFunc, _expiration);\n }\n\n /**\n * @notice Sets the stored oracle address\n * @param _oracle The address of the oracle contract\n */\n function setChainlinkOracle(address _oracle) internal {\n oracle = ChainlinkRequestInterface(_oracle);\n }\n\n /**\n * @notice Sets the LINK token address\n * @param _link The address of the LINK token contract\n */\n function setChainlinkToken(address _link) internal {\n link = LinkTokenInterface(_link);\n }\n\n /**\n * @notice Sets the Chainlink token address for the public\n * network as given by the Pointer contract\n */\n function setPublicChainlinkToken() internal {\n setChainlinkToken(PointerInterface(LINK_TOKEN_POINTER).getAddress());\n }\n\n /**\n * @notice Retrieves the stored address of the LINK token\n * @return The address of the LINK token\n */\n function chainlinkTokenAddress()\n internal\n view\n returns (address)\n {\n return address(link);\n }\n\n /**\n * @notice Retrieves the stored address of the oracle contract\n * @return The address of the oracle contract\n */\n function chainlinkOracleAddress()\n internal\n view\n returns (address)\n {\n return address(oracle);\n }\n\n /**\n * @notice Allows for a request which was created on another contract to be fulfilled\n * on this contract\n * @param _oracle The address of the oracle contract that will fulfill the request\n * @param _requestId The request ID used for the response\n */\n function addChainlinkExternalRequest(address _oracle, bytes32 _requestId)\n internal\n notPendingRequest(_requestId)\n {\n pendingRequests[_requestId] = _oracle;\n }\n\n /**\n * @notice Sets the stored oracle and LINK token contracts with the addresses resolved by ENS\n * @dev Accounts for subnodes having different resolvers\n * @param _ens The address of the ENS contract\n * @param _node The ENS node hash\n */\n function useChainlinkWithENS(address _ens, bytes32 _node)\n internal\n {\n ens = ENSInterface(_ens);\n ensNode = _node;\n bytes32 linkSubnode = keccak256(abi.encodePacked(ensNode, ENS_TOKEN_SUBNAME));\n ENSResolver_Chainlink resolver = ENSResolver_Chainlink(ens.resolver(linkSubnode));\n setChainlinkToken(resolver.addr(linkSubnode));\n updateChainlinkOracleWithENS();\n }\n\n /**\n * @notice Sets the stored oracle contract with the address resolved by ENS\n * @dev This may be called on its own as long as `useChainlinkWithENS` has been called previously\n */\n function updateChainlinkOracleWithENS()\n internal\n {\n bytes32 oracleSubnode = keccak256(abi.encodePacked(ensNode, ENS_ORACLE_SUBNAME));\n ENSResolver_Chainlink resolver = ENSResolver_Chainlink(ens.resolver(oracleSubnode));\n setChainlinkOracle(resolver.addr(oracleSubnode));\n }\n\n /**\n * @notice Encodes the request to be sent to the oracle contract\n * @dev The Chainlink node expects values to be in order for the request to be picked up. Order of types\n * will be validated in the oracle contract.\n * @param _req The initialized Chainlink Request\n * @return The bytes payload for the `transferAndCall` method\n */\n function encodeRequest(Chainlink.Request memory _req)\n private\n view\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n oracle.oracleRequest.selector,\n SENDER_OVERRIDE, // Sender value - overridden by onTokenTransfer by the requesting contract's address\n AMOUNT_OVERRIDE, // Amount value - overridden by onTokenTransfer by the actual amount of LINK sent\n _req.id,\n _req.callbackAddress,\n _req.callbackFunctionId,\n _req.nonce,\n ARGS_VERSION,\n _req.buf.buf);\n }\n\n /**\n * @notice Ensures that the fulfillment is valid for this contract\n * @dev Use if the contract developer prefers methods instead of modifiers for validation\n * @param _requestId The request ID for fulfillment\n */\n function validateChainlinkCallback(bytes32 _requestId)\n internal\n recordChainlinkFulfillment(_requestId)\n // solhint-disable-next-line no-empty-blocks\n {}\n\n /**\n * @dev Reverts if the sender is not the oracle of the request.\n * Emits ChainlinkFulfilled event.\n * @param _requestId The request ID for fulfillment\n */\n modifier recordChainlinkFulfillment(bytes32 _requestId) {\n require(msg.sender == pendingRequests[_requestId],\n \"Source must be the oracle of the request\");\n delete pendingRequests[_requestId];\n emit ChainlinkFulfilled(_requestId);\n _;\n }\n\n /**\n * @dev Reverts if the request is already pending\n * @param _requestId The request ID for fulfillment\n */\n modifier notPendingRequest(bytes32 _requestId) {\n require(pendingRequests[_requestId] == address(0), \"Request is already pending\");\n _;\n }\n}\n",
|
|
"sourcePath": "@chainlink/contracts/src/v0.6/ChainlinkClient.sol",
|
|
"ast": {
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/ChainlinkClient.sol",
|
|
"exportedSymbols": {
|
|
"ChainlinkClient": [
|
|
955
|
|
]
|
|
},
|
|
"id": 956,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 495,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.6",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:23:3"
|
|
},
|
|
{
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/Chainlink.sol",
|
|
"file": "./Chainlink.sol",
|
|
"id": 496,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 956,
|
|
"sourceUnit": 494,
|
|
"src": "25:25:3",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/interfaces/ENSInterface.sol",
|
|
"file": "./interfaces/ENSInterface.sol",
|
|
"id": 497,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 956,
|
|
"sourceUnit": 1069,
|
|
"src": "51:39:3",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/interfaces/LinkTokenInterface.sol",
|
|
"file": "./interfaces/LinkTokenInterface.sol",
|
|
"id": 498,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 956,
|
|
"sourceUnit": 1164,
|
|
"src": "91:45:3",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/interfaces/ChainlinkRequestInterface.sol",
|
|
"file": "./interfaces/ChainlinkRequestInterface.sol",
|
|
"id": 499,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 956,
|
|
"sourceUnit": 989,
|
|
"src": "137:52:3",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/interfaces/PointerInterface.sol",
|
|
"file": "./interfaces/PointerInterface.sol",
|
|
"id": 500,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 956,
|
|
"sourceUnit": 1172,
|
|
"src": "190:43:3",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/vendor/ENSResolver.sol",
|
|
"file": "./vendor/ENSResolver.sol",
|
|
"id": 502,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 956,
|
|
"sourceUnit": 1984,
|
|
"src": "234:80:3",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 501,
|
|
"name": "ENSResolver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "243:11:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": "ENSResolver_Chainlink"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/vendor/SafeMath.sol",
|
|
"file": "./vendor/SafeMath.sol",
|
|
"id": 504,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 956,
|
|
"sourceUnit": 2123,
|
|
"src": "315:71:3",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 503,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "324:8:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": "SafeMath_Chainlink"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 505,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "388:157:3",
|
|
"text": "@title The ChainlinkClient contract\n@notice Contract writers can inherit this contract in order to create requests for the\nChainlink network"
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 955,
|
|
"linearizedBaseContracts": [
|
|
955
|
|
],
|
|
"name": "ChainlinkClient",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 508,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 506,
|
|
"name": "Chainlink",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 493,
|
|
"src": "581:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Chainlink_$493",
|
|
"typeString": "library Chainlink"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "575:38:3",
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 507,
|
|
"name": "Chainlink.Request",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 258,
|
|
"src": "595:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_storage_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 511,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 509,
|
|
"name": "SafeMath_Chainlink",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2122,
|
|
"src": "622:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$2122",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "616:37:3",
|
|
"typeName": {
|
|
"id": 510,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "645:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 516,
|
|
"mutability": "constant",
|
|
"name": "LINK",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "657:39:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 512,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "657:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_1000000000000000000_by_1",
|
|
"typeString": "int_const 1000000000000000000"
|
|
},
|
|
"id": 515,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3130",
|
|
"id": 513,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "690:2:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3138",
|
|
"id": 514,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "694:2:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_18_by_1",
|
|
"typeString": "int_const 18"
|
|
},
|
|
"value": "18"
|
|
},
|
|
"src": "690:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1000000000000000000_by_1",
|
|
"typeString": "int_const 1000000000000000000"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 519,
|
|
"mutability": "constant",
|
|
"name": "AMOUNT_OVERRIDE",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "700:44:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 517,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "700:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 518,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "743:1:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 525,
|
|
"mutability": "constant",
|
|
"name": "SENDER_OVERRIDE",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "748:53:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 520,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "748:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 523,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "799:1:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 522,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "791:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 521,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "791:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 524,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "791:10:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 528,
|
|
"mutability": "constant",
|
|
"name": "ARGS_VERSION",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "805:41:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 526,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "805:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "31",
|
|
"id": 527,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "845:1:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 533,
|
|
"mutability": "constant",
|
|
"name": "ENS_TOKEN_SUBNAME",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "850:62:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 529,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "850:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "6c696e6b",
|
|
"id": 531,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "905:6:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_90430203e2d9ce04f00738d355173358b054545ecb52218de9c6fb01cbd9aeaf",
|
|
"typeString": "literal_string \"link\""
|
|
},
|
|
"value": "link"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_stringliteral_90430203e2d9ce04f00738d355173358b054545ecb52218de9c6fb01cbd9aeaf",
|
|
"typeString": "literal_string \"link\""
|
|
}
|
|
],
|
|
"id": 530,
|
|
"name": "keccak256",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -8,
|
|
"src": "895:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
|
|
"typeString": "function (bytes memory) pure returns (bytes32)"
|
|
}
|
|
},
|
|
"id": 532,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "895:17:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 538,
|
|
"mutability": "constant",
|
|
"name": "ENS_ORACLE_SUBNAME",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "916:65:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 534,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "916:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "6f7261636c65",
|
|
"id": 536,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "972:8:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_89cbf5af14e0328a3cd3a734f92c3832d729d431da79b7873a62cbeebd37beb6",
|
|
"typeString": "literal_string \"oracle\""
|
|
},
|
|
"value": "oracle"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_stringliteral_89cbf5af14e0328a3cd3a734f92c3832d729d431da79b7873a62cbeebd37beb6",
|
|
"typeString": "literal_string \"oracle\""
|
|
}
|
|
],
|
|
"id": 535,
|
|
"name": "keccak256",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -8,
|
|
"src": "962:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
|
|
"typeString": "function (bytes memory) pure returns (bytes32)"
|
|
}
|
|
},
|
|
"id": 537,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "962:19:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 541,
|
|
"mutability": "constant",
|
|
"name": "LINK_TOKEN_POINTER",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "985:88:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 539,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "985:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "307843383962443445313633324433413433434230334141416435323632636265343033384263353731",
|
|
"id": 540,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1031:42:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"value": "0xC89bD4E1632D3A43CB03AAAd5262cbe4038Bc571"
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 543,
|
|
"mutability": "mutable",
|
|
"name": "ens",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "1078:24:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSInterface_$1068",
|
|
"typeString": "contract ENSInterface"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 542,
|
|
"name": "ENSInterface",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1068,
|
|
"src": "1078:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSInterface_$1068",
|
|
"typeString": "contract ENSInterface"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 545,
|
|
"mutability": "mutable",
|
|
"name": "ensNode",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "1106:23:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 544,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1106:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 547,
|
|
"mutability": "mutable",
|
|
"name": "link",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "1133:31:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 546,
|
|
"name": "LinkTokenInterface",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1163,
|
|
"src": "1133:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 549,
|
|
"mutability": "mutable",
|
|
"name": "oracle",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "1168:40:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 548,
|
|
"name": "ChainlinkRequestInterface",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 988,
|
|
"src": "1168:25:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 552,
|
|
"mutability": "mutable",
|
|
"name": "requestCount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "1212:32:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 550,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1212:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "31",
|
|
"id": 551,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1243:1:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 556,
|
|
"mutability": "mutable",
|
|
"name": "pendingRequests",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "1248:51:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
},
|
|
"typeName": {
|
|
"id": 555,
|
|
"keyType": {
|
|
"id": 553,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1256:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "1248:27:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
},
|
|
"valueType": {
|
|
"id": 554,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1267:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 560,
|
|
"name": "ChainlinkRequested",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 559,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 558,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "id",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 560,
|
|
"src": "1329:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 557,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1329:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1328:20:3"
|
|
},
|
|
"src": "1304:45:3"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 564,
|
|
"name": "ChainlinkFulfilled",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 563,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 562,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "id",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 564,
|
|
"src": "1377:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 561,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1377:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1376:20:3"
|
|
},
|
|
"src": "1352:45:3"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 568,
|
|
"name": "ChainlinkCancelled",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 567,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 566,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "id",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 568,
|
|
"src": "1425:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 565,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1425:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1424:20:3"
|
|
},
|
|
"src": "1400:45:3"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 592,
|
|
"nodeType": "Block",
|
|
"src": "2021:121:3",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
583
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 583,
|
|
"mutability": "mutable",
|
|
"name": "req",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 592,
|
|
"src": "2027:28:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 582,
|
|
"name": "Chainlink.Request",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 258,
|
|
"src": "2027:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_storage_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 584,
|
|
"initialValue": null,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2027:28:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 587,
|
|
"name": "_specId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 571,
|
|
"src": "2083:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 588,
|
|
"name": "_callbackAddress",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 573,
|
|
"src": "2092:16:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 589,
|
|
"name": "_callbackFunctionSignature",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 575,
|
|
"src": "2110:26:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 585,
|
|
"name": "req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 583,
|
|
"src": "2068:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"id": 586,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "initialize",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 301,
|
|
"src": "2068:14:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_struct$_Request_$258_memory_ptr_$_t_bytes32_$_t_address_$_t_bytes4_$returns$_t_struct$_Request_$258_memory_ptr_$bound_to$_t_struct$_Request_$258_memory_ptr_$",
|
|
"typeString": "function (struct Chainlink.Request memory,bytes32,address,bytes4) pure returns (struct Chainlink.Request memory)"
|
|
}
|
|
},
|
|
"id": 590,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2068:69:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 579,
|
|
"id": 591,
|
|
"nodeType": "Return",
|
|
"src": "2061:76:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 569,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1449:395:3",
|
|
"text": "@notice Creates a request that can hold additional parameters\n@param _specId The Job Specification ID that the request will be created for\n@param _callbackAddress The callback address that the response will be sent to\n@param _callbackFunctionSignature The callback function signature to use for the callback address\n@return A Chainlink Request struct in memory"
|
|
},
|
|
"id": 593,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "buildChainlinkRequest",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 576,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 571,
|
|
"mutability": "mutable",
|
|
"name": "_specId",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 593,
|
|
"src": "1883:15:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 570,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1883:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 573,
|
|
"mutability": "mutable",
|
|
"name": "_callbackAddress",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 593,
|
|
"src": "1904:24:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 572,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1904:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 575,
|
|
"mutability": "mutable",
|
|
"name": "_callbackFunctionSignature",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 593,
|
|
"src": "1934:33:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 574,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1934:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1877:94:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 579,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 578,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 593,
|
|
"src": "1995:24:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 577,
|
|
"name": "Chainlink.Request",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 258,
|
|
"src": "1995:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_storage_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1994:26:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "1847:295:3",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 612,
|
|
"nodeType": "Block",
|
|
"src": "2565:73:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 606,
|
|
"name": "oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 549,
|
|
"src": "2609:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
],
|
|
"id": 605,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2601:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 604,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2601:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 607,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2601:15:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 608,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 596,
|
|
"src": "2618:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 609,
|
|
"name": "_payment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 598,
|
|
"src": "2624:8:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 603,
|
|
"name": "sendChainlinkRequestTo",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 670,
|
|
"src": "2578:22:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_struct$_Request_$258_memory_ptr_$_t_uint256_$returns$_t_bytes32_$",
|
|
"typeString": "function (address,struct Chainlink.Request memory,uint256) returns (bytes32)"
|
|
}
|
|
},
|
|
"id": 610,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2578:55:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"functionReturnParameters": 602,
|
|
"id": 611,
|
|
"nodeType": "Return",
|
|
"src": "2571:62:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 594,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2146:300:3",
|
|
"text": "@notice Creates a Chainlink request to the stored oracle address\n@dev Calls `chainlinkRequestTo` with the stored oracle address\n@param _req The initialized Chainlink Request\n@param _payment The amount of LINK to send for the request\n@return requestId The request ID"
|
|
},
|
|
"id": 613,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "sendChainlinkRequest",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 599,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 596,
|
|
"mutability": "mutable",
|
|
"name": "_req",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 613,
|
|
"src": "2479:29:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 595,
|
|
"name": "Chainlink.Request",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 258,
|
|
"src": "2479:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_storage_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 598,
|
|
"mutability": "mutable",
|
|
"name": "_payment",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 613,
|
|
"src": "2510:16:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 597,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2510:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2478:49:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 602,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 601,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 613,
|
|
"src": "2554:7:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 600,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2554:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2553:9:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "2449:189:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 669,
|
|
"nodeType": "Block",
|
|
"src": "3297:343:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 633,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 625,
|
|
"name": "requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 623,
|
|
"src": "3303:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 629,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -28,
|
|
"src": "3342:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkClient_$955",
|
|
"typeString": "contract ChainlinkClient"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 630,
|
|
"name": "requestCount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 552,
|
|
"src": "3348:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ChainlinkClient_$955",
|
|
"typeString": "contract ChainlinkClient"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 627,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -1,
|
|
"src": "3325:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 628,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "encodePacked",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3325:16:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function () pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 631,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3325:36:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"id": 626,
|
|
"name": "keccak256",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -8,
|
|
"src": "3315:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
|
|
"typeString": "function (bytes memory) pure returns (bytes32)"
|
|
}
|
|
},
|
|
"id": 632,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3315:47:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"src": "3303:59:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"id": 634,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3303:59:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 639,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 635,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 618,
|
|
"src": "3368:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"id": 637,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberName": "nonce",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 255,
|
|
"src": "3368:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 638,
|
|
"name": "requestCount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 552,
|
|
"src": "3381:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3368:25:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 640,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3368:25:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 645,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 641,
|
|
"name": "pendingRequests",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 556,
|
|
"src": "3399:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
}
|
|
},
|
|
"id": 643,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 642,
|
|
"name": "requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 623,
|
|
"src": "3415:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3399:26:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 644,
|
|
"name": "_oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 616,
|
|
"src": "3428:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "3399:36:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 646,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3399:36:3"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 648,
|
|
"name": "requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 623,
|
|
"src": "3465:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"id": 647,
|
|
"name": "ChainlinkRequested",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 560,
|
|
"src": "3446:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$returns$__$",
|
|
"typeString": "function (bytes32)"
|
|
}
|
|
},
|
|
"id": 649,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3446:29:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 650,
|
|
"nodeType": "EmitStatement",
|
|
"src": "3441:34:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 654,
|
|
"name": "_oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 616,
|
|
"src": "3510:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 655,
|
|
"name": "_payment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 620,
|
|
"src": "3519:8:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 657,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 618,
|
|
"src": "3543:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
],
|
|
"id": 656,
|
|
"name": "encodeRequest",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 899,
|
|
"src": "3529:13:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_struct$_Request_$258_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (struct Chainlink.Request memory) view returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 658,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3529:19:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 652,
|
|
"name": "link",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 547,
|
|
"src": "3489:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
}
|
|
},
|
|
"id": 653,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "transferAndCall",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1151,
|
|
"src": "3489:20:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$",
|
|
"typeString": "function (address,uint256,bytes memory) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 659,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3489:60:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261636c65",
|
|
"id": 660,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3551:37:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_3b3efd608222b424e5ed8427d7f6a272069793e6a1f5930c93db5c7960c3ce96",
|
|
"typeString": "literal_string \"unable to transferAndCall to oracle\""
|
|
},
|
|
"value": "unable to transferAndCall to oracle"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_3b3efd608222b424e5ed8427d7f6a272069793e6a1f5930c93db5c7960c3ce96",
|
|
"typeString": "literal_string \"unable to transferAndCall to oracle\""
|
|
}
|
|
],
|
|
"id": 651,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "3481:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 661,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3481:108:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 662,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3481:108:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 665,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 663,
|
|
"name": "requestCount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 552,
|
|
"src": "3595:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"hexValue": "31",
|
|
"id": 664,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3611:1:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "3595:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 666,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3595:17:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 667,
|
|
"name": "requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 623,
|
|
"src": "3626:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"functionReturnParameters": 624,
|
|
"id": 668,
|
|
"nodeType": "Return",
|
|
"src": "3619:16:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 614,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2642:507:3",
|
|
"text": "@notice Creates a Chainlink request to the specified oracle address\n@dev Generates and stores a request ID, increments the local nonce, and uses `transferAndCall` to\nsend LINK which creates a request on the target oracle contract.\nEmits ChainlinkRequested event.\n@param _oracle The address of the oracle for the request\n@param _req The initialized Chainlink Request\n@param _payment The amount of LINK to send for the request\n@return requestId The request ID"
|
|
},
|
|
"id": 670,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "sendChainlinkRequestTo",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 621,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 616,
|
|
"mutability": "mutable",
|
|
"name": "_oracle",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 670,
|
|
"src": "3184:15:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 615,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3184:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 618,
|
|
"mutability": "mutable",
|
|
"name": "_req",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 670,
|
|
"src": "3201:29:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 617,
|
|
"name": "Chainlink.Request",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 258,
|
|
"src": "3201:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_storage_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 620,
|
|
"mutability": "mutable",
|
|
"name": "_payment",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 670,
|
|
"src": "3232:16:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 619,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3232:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3183:66:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 624,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 623,
|
|
"mutability": "mutable",
|
|
"name": "requestId",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 670,
|
|
"src": "3276:17:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 622,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3276:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3275:19:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "3152:488:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 708,
|
|
"nodeType": "Block",
|
|
"src": "4308:269:3",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
683
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 683,
|
|
"mutability": "mutable",
|
|
"name": "requested",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 708,
|
|
"src": "4314:35:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 682,
|
|
"name": "ChainlinkRequestInterface",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 988,
|
|
"src": "4314:25:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 689,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 685,
|
|
"name": "pendingRequests",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 556,
|
|
"src": "4378:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
}
|
|
},
|
|
"id": 687,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 686,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 673,
|
|
"src": "4394:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "4378:27:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 684,
|
|
"name": "ChainlinkRequestInterface",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 988,
|
|
"src": "4352:25:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_ChainlinkRequestInterface_$988_$",
|
|
"typeString": "type(contract ChainlinkRequestInterface)"
|
|
}
|
|
},
|
|
"id": 688,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4352:54:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "4314:92:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 693,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "delete",
|
|
"prefix": true,
|
|
"src": "4412:34:3",
|
|
"subExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 690,
|
|
"name": "pendingRequests",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 556,
|
|
"src": "4419:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
}
|
|
},
|
|
"id": 692,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 691,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 673,
|
|
"src": "4435:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "4419:27:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 694,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4412:34:3"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 696,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 673,
|
|
"src": "4476:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"id": 695,
|
|
"name": "ChainlinkCancelled",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 568,
|
|
"src": "4457:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$returns$__$",
|
|
"typeString": "function (bytes32)"
|
|
}
|
|
},
|
|
"id": 697,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4457:30:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 698,
|
|
"nodeType": "EmitStatement",
|
|
"src": "4452:35:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 702,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 673,
|
|
"src": "4523:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 703,
|
|
"name": "_payment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 675,
|
|
"src": "4535:8:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 704,
|
|
"name": "_callbackFunc",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 677,
|
|
"src": "4545:13:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 705,
|
|
"name": "_expiration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 679,
|
|
"src": "4560:11:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 699,
|
|
"name": "requested",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 683,
|
|
"src": "4493:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"id": 701,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "cancelOracleRequest",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 987,
|
|
"src": "4493:29:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$_t_bytes4_$_t_uint256_$returns$__$",
|
|
"typeString": "function (bytes32,uint256,bytes4,uint256) external"
|
|
}
|
|
},
|
|
"id": 706,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4493:79:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 707,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4493:79:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 671,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3644:513:3",
|
|
"text": "@notice Allows a request to be cancelled if it has not been fulfilled\n@dev Requires keeping track of the expiration value emitted from the oracle contract.\nDeletes the request from the `pendingRequests` mapping.\nEmits ChainlinkCancelled event.\n@param _requestId The request ID\n@param _payment The amount of LINK sent for the request\n@param _callbackFunc The callback function specified for the request\n@param _expiration The time of the expiration for the request"
|
|
},
|
|
"id": 709,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "cancelChainlinkRequest",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 680,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 673,
|
|
"mutability": "mutable",
|
|
"name": "_requestId",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 709,
|
|
"src": "4197:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 672,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4197:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 675,
|
|
"mutability": "mutable",
|
|
"name": "_payment",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 709,
|
|
"src": "4221:16:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 674,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4221:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 677,
|
|
"mutability": "mutable",
|
|
"name": "_callbackFunc",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 709,
|
|
"src": "4243:20:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 676,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4243:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 679,
|
|
"mutability": "mutable",
|
|
"name": "_expiration",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 709,
|
|
"src": "4269:19:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 678,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4269:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4191:101:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 681,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "4308:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "4160:417:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 721,
|
|
"nodeType": "Block",
|
|
"src": "4746:54:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 719,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 715,
|
|
"name": "oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 549,
|
|
"src": "4752:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 717,
|
|
"name": "_oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 712,
|
|
"src": "4787:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 716,
|
|
"name": "ChainlinkRequestInterface",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 988,
|
|
"src": "4761:25:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_ChainlinkRequestInterface_$988_$",
|
|
"typeString": "type(contract ChainlinkRequestInterface)"
|
|
}
|
|
},
|
|
"id": 718,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4761:34:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"src": "4752:43:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"id": 720,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4752:43:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 710,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "4581:108:3",
|
|
"text": "@notice Sets the stored oracle address\n@param _oracle The address of the oracle contract"
|
|
},
|
|
"id": 722,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "setChainlinkOracle",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 713,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 712,
|
|
"mutability": "mutable",
|
|
"name": "_oracle",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 722,
|
|
"src": "4720:15:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 711,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4720:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4719:17:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 714,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "4746:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "4692:108:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 734,
|
|
"nodeType": "Block",
|
|
"src": "4965:43:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 732,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 728,
|
|
"name": "link",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 547,
|
|
"src": "4971:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 730,
|
|
"name": "_link",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 725,
|
|
"src": "4997:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 729,
|
|
"name": "LinkTokenInterface",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1163,
|
|
"src": "4978:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_LinkTokenInterface_$1163_$",
|
|
"typeString": "type(contract LinkTokenInterface)"
|
|
}
|
|
},
|
|
"id": 731,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4978:25:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
}
|
|
},
|
|
"src": "4971:32:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
}
|
|
},
|
|
"id": 733,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4971:32:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 723,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "4804:107:3",
|
|
"text": "@notice Sets the LINK token address\n@param _link The address of the LINK token contract"
|
|
},
|
|
"id": 735,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "setChainlinkToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 726,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 725,
|
|
"mutability": "mutable",
|
|
"name": "_link",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 735,
|
|
"src": "4941:13:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 724,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4941:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4940:15:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 727,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "4965:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "4914:94:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 747,
|
|
"nodeType": "Block",
|
|
"src": "5175:79:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 741,
|
|
"name": "LINK_TOKEN_POINTER",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 541,
|
|
"src": "5216:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 740,
|
|
"name": "PointerInterface",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1171,
|
|
"src": "5199:16:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_PointerInterface_$1171_$",
|
|
"typeString": "type(contract PointerInterface)"
|
|
}
|
|
},
|
|
"id": 742,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5199:36:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_PointerInterface_$1171",
|
|
"typeString": "contract PointerInterface"
|
|
}
|
|
},
|
|
"id": 743,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "getAddress",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1170,
|
|
"src": "5199:47:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
|
|
"typeString": "function () view external returns (address)"
|
|
}
|
|
},
|
|
"id": 744,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5199:49:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 739,
|
|
"name": "setChainlinkToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 735,
|
|
"src": "5181:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 745,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5181:68:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 746,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5181:68:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 736,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5012:116:3",
|
|
"text": "@notice Sets the Chainlink token address for the public\nnetwork as given by the Pointer contract"
|
|
},
|
|
"id": 748,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "setPublicChainlinkToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 737,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "5163:2:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 738,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "5175:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "5131:123:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 759,
|
|
"nodeType": "Block",
|
|
"src": "5452:31:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 756,
|
|
"name": "link",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 547,
|
|
"src": "5473:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
}
|
|
],
|
|
"id": 755,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "5465:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 754,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5465:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 757,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5465:13:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"functionReturnParameters": 753,
|
|
"id": 758,
|
|
"nodeType": "Return",
|
|
"src": "5458:20:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 749,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5258:112:3",
|
|
"text": "@notice Retrieves the stored address of the LINK token\n@return The address of the LINK token"
|
|
},
|
|
"id": 760,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "chainlinkTokenAddress",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 750,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "5403:2:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 753,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 752,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 760,
|
|
"src": "5441:7:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 751,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5441:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5440:9:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "5373:110:3",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 771,
|
|
"nodeType": "Block",
|
|
"src": "5692:33:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 768,
|
|
"name": "oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 549,
|
|
"src": "5713:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
],
|
|
"id": 767,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "5705:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 766,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5705:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 769,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5705:15:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"functionReturnParameters": 765,
|
|
"id": 770,
|
|
"nodeType": "Return",
|
|
"src": "5698:22:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 761,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5487:122:3",
|
|
"text": "@notice Retrieves the stored address of the oracle contract\n@return The address of the oracle contract"
|
|
},
|
|
"id": 772,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "chainlinkOracleAddress",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 762,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "5643:2:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 765,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 764,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 772,
|
|
"src": "5681:7:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 763,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5681:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5680:9:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "5612:113:3",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 789,
|
|
"nodeType": "Block",
|
|
"src": "6119:48:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 787,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 783,
|
|
"name": "pendingRequests",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 556,
|
|
"src": "6125:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
}
|
|
},
|
|
"id": 785,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 784,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 777,
|
|
"src": "6141:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "6125:27:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 786,
|
|
"name": "_oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 775,
|
|
"src": "6155:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "6125:37:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 788,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6125:37:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 773,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5729:264:3",
|
|
"text": "@notice Allows for a request which was created on another contract to be fulfilled\non this contract\n@param _oracle The address of the oracle contract that will fulfill the request\n@param _requestId The request ID used for the response"
|
|
},
|
|
"id": 790,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 780,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 777,
|
|
"src": "6105:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"id": 781,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 779,
|
|
"name": "notPendingRequest",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 954,
|
|
"src": "6087:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_bytes32_$",
|
|
"typeString": "modifier (bytes32)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "6087:29:3"
|
|
}
|
|
],
|
|
"name": "addChainlinkExternalRequest",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 778,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 775,
|
|
"mutability": "mutable",
|
|
"name": "_oracle",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 790,
|
|
"src": "6033:15:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 774,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6033:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 777,
|
|
"mutability": "mutable",
|
|
"name": "_requestId",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 790,
|
|
"src": "6050:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 776,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6050:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6032:37:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 782,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "6119:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "5996:171:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 837,
|
|
"nodeType": "Block",
|
|
"src": "6496:313:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 802,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 798,
|
|
"name": "ens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 543,
|
|
"src": "6502:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSInterface_$1068",
|
|
"typeString": "contract ENSInterface"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 800,
|
|
"name": "_ens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 793,
|
|
"src": "6521:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 799,
|
|
"name": "ENSInterface",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1068,
|
|
"src": "6508:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_ENSInterface_$1068_$",
|
|
"typeString": "type(contract ENSInterface)"
|
|
}
|
|
},
|
|
"id": 801,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6508:18:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSInterface_$1068",
|
|
"typeString": "contract ENSInterface"
|
|
}
|
|
},
|
|
"src": "6502:24:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSInterface_$1068",
|
|
"typeString": "contract ENSInterface"
|
|
}
|
|
},
|
|
"id": 803,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6502:24:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 806,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 804,
|
|
"name": "ensNode",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "6532:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 805,
|
|
"name": "_node",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 795,
|
|
"src": "6542:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"src": "6532:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"id": 807,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6532:15:3"
|
|
},
|
|
{
|
|
"assignments": [
|
|
809
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 809,
|
|
"mutability": "mutable",
|
|
"name": "linkSubnode",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 837,
|
|
"src": "6553:19:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 808,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6553:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 817,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 813,
|
|
"name": "ensNode",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "6602:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 814,
|
|
"name": "ENS_TOKEN_SUBNAME",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 533,
|
|
"src": "6611:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 811,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -1,
|
|
"src": "6585:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 812,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "encodePacked",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "6585:16:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function () pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 815,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6585:44:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"id": 810,
|
|
"name": "keccak256",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -8,
|
|
"src": "6575:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
|
|
"typeString": "function (bytes memory) pure returns (bytes32)"
|
|
}
|
|
},
|
|
"id": 816,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6575:55:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "6553:77:3"
|
|
},
|
|
{
|
|
"assignments": [
|
|
819
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 819,
|
|
"mutability": "mutable",
|
|
"name": "resolver",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 837,
|
|
"src": "6636:30:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 818,
|
|
"name": "ENSResolver_Chainlink",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1983,
|
|
"src": "6636:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 826,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 823,
|
|
"name": "linkSubnode",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 809,
|
|
"src": "6704:11:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 821,
|
|
"name": "ens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 543,
|
|
"src": "6691:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSInterface_$1068",
|
|
"typeString": "contract ENSInterface"
|
|
}
|
|
},
|
|
"id": 822,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "resolver",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1060,
|
|
"src": "6691:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$",
|
|
"typeString": "function (bytes32) view external returns (address)"
|
|
}
|
|
},
|
|
"id": 824,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6691:25:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 820,
|
|
"name": "ENSResolver_Chainlink",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1983,
|
|
"src": "6669:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_ENSResolver_$1983_$",
|
|
"typeString": "type(contract ENSResolver)"
|
|
}
|
|
},
|
|
"id": 825,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6669:48:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "6636:81:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 830,
|
|
"name": "linkSubnode",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 809,
|
|
"src": "6755:11:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 828,
|
|
"name": "resolver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 819,
|
|
"src": "6741:8:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
}
|
|
},
|
|
"id": 829,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "addr",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1982,
|
|
"src": "6741:13:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$",
|
|
"typeString": "function (bytes32) view external returns (address)"
|
|
}
|
|
},
|
|
"id": 831,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6741:26:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 827,
|
|
"name": "setChainlinkToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 735,
|
|
"src": "6723:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 832,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6723:45:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 833,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6723:45:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 834,
|
|
"name": "updateChainlinkOracleWithENS",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 869,
|
|
"src": "6774:28:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
|
|
"typeString": "function ()"
|
|
}
|
|
},
|
|
"id": 835,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6774:30:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 836,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6774:30:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 791,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6171:249:3",
|
|
"text": "@notice Sets the stored oracle and LINK token contracts with the addresses resolved by ENS\n@dev Accounts for subnodes having different resolvers\n@param _ens The address of the ENS contract\n@param _node The ENS node hash"
|
|
},
|
|
"id": 838,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "useChainlinkWithENS",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 796,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 793,
|
|
"mutability": "mutable",
|
|
"name": "_ens",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 838,
|
|
"src": "6452:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 792,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6452:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 795,
|
|
"mutability": "mutable",
|
|
"name": "_node",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 838,
|
|
"src": "6466:13:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 794,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6466:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6451:29:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 797,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "6496:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "6423:386:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 868,
|
|
"nodeType": "Block",
|
|
"src": "7058:234:3",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
843
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 843,
|
|
"mutability": "mutable",
|
|
"name": "oracleSubnode",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 868,
|
|
"src": "7064:21:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 842,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7064:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 851,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 847,
|
|
"name": "ensNode",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "7115:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 848,
|
|
"name": "ENS_ORACLE_SUBNAME",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 538,
|
|
"src": "7124:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 845,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -1,
|
|
"src": "7098:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 846,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "encodePacked",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "7098:16:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function () pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 849,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7098:45:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"id": 844,
|
|
"name": "keccak256",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -8,
|
|
"src": "7088:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
|
|
"typeString": "function (bytes memory) pure returns (bytes32)"
|
|
}
|
|
},
|
|
"id": 850,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7088:56:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "7064:80:3"
|
|
},
|
|
{
|
|
"assignments": [
|
|
853
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 853,
|
|
"mutability": "mutable",
|
|
"name": "resolver",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 868,
|
|
"src": "7150:30:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 852,
|
|
"name": "ENSResolver_Chainlink",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1983,
|
|
"src": "7150:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 860,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 857,
|
|
"name": "oracleSubnode",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 843,
|
|
"src": "7218:13:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 855,
|
|
"name": "ens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 543,
|
|
"src": "7205:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSInterface_$1068",
|
|
"typeString": "contract ENSInterface"
|
|
}
|
|
},
|
|
"id": 856,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "resolver",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1060,
|
|
"src": "7205:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$",
|
|
"typeString": "function (bytes32) view external returns (address)"
|
|
}
|
|
},
|
|
"id": 858,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7205:27:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 854,
|
|
"name": "ENSResolver_Chainlink",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1983,
|
|
"src": "7183:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_ENSResolver_$1983_$",
|
|
"typeString": "type(contract ENSResolver)"
|
|
}
|
|
},
|
|
"id": 859,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7183:50:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "7150:83:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 864,
|
|
"name": "oracleSubnode",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 843,
|
|
"src": "7272:13:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 862,
|
|
"name": "resolver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 853,
|
|
"src": "7258:8:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
}
|
|
},
|
|
"id": 863,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "addr",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1982,
|
|
"src": "7258:13:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$",
|
|
"typeString": "function (bytes32) view external returns (address)"
|
|
}
|
|
},
|
|
"id": 865,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7258:28:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 861,
|
|
"name": "setChainlinkOracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 722,
|
|
"src": "7239:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 866,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7239:48:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 867,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7239:48:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 839,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6813:187:3",
|
|
"text": "@notice Sets the stored oracle contract with the address resolved by ENS\n@dev This may be called on its own as long as `useChainlinkWithENS` has been called previously"
|
|
},
|
|
"id": 869,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "updateChainlinkOracleWithENS",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 840,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "7040:2:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 841,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "7058:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "7003:289:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 898,
|
|
"nodeType": "Block",
|
|
"src": "7748:423:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 879,
|
|
"name": "oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 549,
|
|
"src": "7791:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"id": 880,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "oracleRequest",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 976,
|
|
"src": "7791:20:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes32_$_t_address_$_t_bytes4_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$",
|
|
"typeString": "function (address,uint256,bytes32,address,bytes4,uint256,uint256,bytes memory) external"
|
|
}
|
|
},
|
|
"id": 881,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "selector",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "7791:29:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 882,
|
|
"name": "SENDER_OVERRIDE",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 525,
|
|
"src": "7828:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 883,
|
|
"name": "AMOUNT_OVERRIDE",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 519,
|
|
"src": "7936:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 884,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 872,
|
|
"src": "8041:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"id": 885,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "id",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 249,
|
|
"src": "8041:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 886,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 872,
|
|
"src": "8056:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"id": 887,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "callbackAddress",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 251,
|
|
"src": "8056:20:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 888,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 872,
|
|
"src": "8084:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"id": 889,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "callbackFunctionId",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 253,
|
|
"src": "8084:23:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 890,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 872,
|
|
"src": "8115:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"id": 891,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "nonce",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 255,
|
|
"src": "8115:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 892,
|
|
"name": "ARGS_VERSION",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 528,
|
|
"src": "8133:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 893,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 872,
|
|
"src": "8153:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"id": 894,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "buf",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 257,
|
|
"src": "8153:8:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_buffer_$1179_memory_ptr",
|
|
"typeString": "struct Buffer.buffer memory"
|
|
}
|
|
},
|
|
"id": 895,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "buf",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1176,
|
|
"src": "8153:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 877,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -1,
|
|
"src": "7761:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 878,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "encodeWithSelector",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "7761:22:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes4) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 896,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7761:405:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 876,
|
|
"id": 897,
|
|
"nodeType": "Return",
|
|
"src": "7754:412:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 870,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "7296:345:3",
|
|
"text": "@notice Encodes the request to be sent to the oracle contract\n@dev The Chainlink node expects values to be in order for the request to be picked up. Order of types\nwill be validated in the oracle contract.\n@param _req The initialized Chainlink Request\n@return The bytes payload for the `transferAndCall` method"
|
|
},
|
|
"id": 899,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "encodeRequest",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 873,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 872,
|
|
"mutability": "mutable",
|
|
"name": "_req",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 899,
|
|
"src": "7667:29:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 871,
|
|
"name": "Chainlink.Request",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 258,
|
|
"src": "7667:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_storage_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7666:31:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 876,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 875,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 899,
|
|
"src": "7732:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 874,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7732:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7731:14:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "7644:527:3",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 908,
|
|
"nodeType": "Block",
|
|
"src": "8564:2:3",
|
|
"statements": []
|
|
},
|
|
"documentation": {
|
|
"id": 900,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "8175:224:3",
|
|
"text": "@notice Ensures that the fulfillment is valid for this contract\n@dev Use if the contract developer prefers methods instead of modifiers for validation\n@param _requestId The request ID for fulfillment"
|
|
},
|
|
"id": 909,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 905,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 902,
|
|
"src": "8501:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"id": 906,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 904,
|
|
"name": "recordChainlinkFulfillment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 935,
|
|
"src": "8474:26:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_bytes32_$",
|
|
"typeString": "modifier (bytes32)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "8474:38:3"
|
|
}
|
|
],
|
|
"name": "validateChainlinkCallback",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 903,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 902,
|
|
"mutability": "mutable",
|
|
"name": "_requestId",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 909,
|
|
"src": "8437:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 901,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8437:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "8436:20:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 907,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "8564:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "8402:164:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 934,
|
|
"nodeType": "Block",
|
|
"src": "8795:205:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 920,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 915,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "8809:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 916,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "8809:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 917,
|
|
"name": "pendingRequests",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 556,
|
|
"src": "8823:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
}
|
|
},
|
|
"id": 919,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 918,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 912,
|
|
"src": "8839:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8823:27:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "8809:41:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "536f75726365206d75737420626520746865206f7261636c65206f66207468652072657175657374",
|
|
"id": 921,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8864:42:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_d5cafe2745dab6273b51cca76f8727c7664db74ede49af049a5b5ca6a3b184e4",
|
|
"typeString": "literal_string \"Source must be the oracle of the request\""
|
|
},
|
|
"value": "Source must be the oracle of the request"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_d5cafe2745dab6273b51cca76f8727c7664db74ede49af049a5b5ca6a3b184e4",
|
|
"typeString": "literal_string \"Source must be the oracle of the request\""
|
|
}
|
|
],
|
|
"id": 914,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "8801:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 922,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8801:106:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 923,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8801:106:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 927,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "delete",
|
|
"prefix": true,
|
|
"src": "8913:34:3",
|
|
"subExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 924,
|
|
"name": "pendingRequests",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 556,
|
|
"src": "8920:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
}
|
|
},
|
|
"id": 926,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 925,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 912,
|
|
"src": "8936:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8920:27:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 928,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8913:34:3"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 930,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 912,
|
|
"src": "8977:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"id": 929,
|
|
"name": "ChainlinkFulfilled",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 564,
|
|
"src": "8958:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$returns$__$",
|
|
"typeString": "function (bytes32)"
|
|
}
|
|
},
|
|
"id": 931,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8958:30:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 932,
|
|
"nodeType": "EmitStatement",
|
|
"src": "8953:35:3"
|
|
},
|
|
{
|
|
"id": 933,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "8994:1:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 910,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "8570:166:3",
|
|
"text": "@dev Reverts if the sender is not the oracle of the request.\nEmits ChainlinkFulfilled event.\n@param _requestId The request ID for fulfillment"
|
|
},
|
|
"id": 935,
|
|
"name": "recordChainlinkFulfillment",
|
|
"nodeType": "ModifierDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 913,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 912,
|
|
"mutability": "mutable",
|
|
"name": "_requestId",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 935,
|
|
"src": "8775:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 911,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8775:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "8774:20:3"
|
|
},
|
|
"src": "8739:261:3",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 953,
|
|
"nodeType": "Block",
|
|
"src": "9169:98:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 948,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 941,
|
|
"name": "pendingRequests",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 556,
|
|
"src": "9183:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
}
|
|
},
|
|
"id": 943,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 942,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 938,
|
|
"src": "9199:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "9183:27:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 946,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9222:1:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 945,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "9214:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 944,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9214:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 947,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "9214:10:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "9183:41:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "5265717565737420697320616c72656164792070656e64696e67",
|
|
"id": 949,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9226:28:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_efa688de2ca2442cd2f76ca864c7a15bdcb24ac77ed3de01d4cf9f6afd58c7aa",
|
|
"typeString": "literal_string \"Request is already pending\""
|
|
},
|
|
"value": "Request is already pending"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_efa688de2ca2442cd2f76ca864c7a15bdcb24ac77ed3de01d4cf9f6afd58c7aa",
|
|
"typeString": "literal_string \"Request is already pending\""
|
|
}
|
|
],
|
|
"id": 940,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "9175:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 950,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "9175:80:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 951,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9175:80:3"
|
|
},
|
|
{
|
|
"id": 952,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "9261:1:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 936,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "9004:115:3",
|
|
"text": "@dev Reverts if the request is already pending\n@param _requestId The request ID for fulfillment"
|
|
},
|
|
"id": 954,
|
|
"name": "notPendingRequest",
|
|
"nodeType": "ModifierDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 939,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 938,
|
|
"mutability": "mutable",
|
|
"name": "_requestId",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 954,
|
|
"src": "9149:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 937,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9149:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "9148:20:3"
|
|
},
|
|
"src": "9122:145:3",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 956,
|
|
"src": "546:8723:3"
|
|
}
|
|
],
|
|
"src": "0:9270:3"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/ChainlinkClient.sol",
|
|
"exportedSymbols": {
|
|
"ChainlinkClient": [
|
|
955
|
|
]
|
|
},
|
|
"id": 956,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 495,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.6",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:23:3"
|
|
},
|
|
{
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/Chainlink.sol",
|
|
"file": "./Chainlink.sol",
|
|
"id": 496,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 956,
|
|
"sourceUnit": 494,
|
|
"src": "25:25:3",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/interfaces/ENSInterface.sol",
|
|
"file": "./interfaces/ENSInterface.sol",
|
|
"id": 497,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 956,
|
|
"sourceUnit": 1069,
|
|
"src": "51:39:3",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/interfaces/LinkTokenInterface.sol",
|
|
"file": "./interfaces/LinkTokenInterface.sol",
|
|
"id": 498,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 956,
|
|
"sourceUnit": 1164,
|
|
"src": "91:45:3",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/interfaces/ChainlinkRequestInterface.sol",
|
|
"file": "./interfaces/ChainlinkRequestInterface.sol",
|
|
"id": 499,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 956,
|
|
"sourceUnit": 989,
|
|
"src": "137:52:3",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/interfaces/PointerInterface.sol",
|
|
"file": "./interfaces/PointerInterface.sol",
|
|
"id": 500,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 956,
|
|
"sourceUnit": 1172,
|
|
"src": "190:43:3",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/vendor/ENSResolver.sol",
|
|
"file": "./vendor/ENSResolver.sol",
|
|
"id": 502,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 956,
|
|
"sourceUnit": 1984,
|
|
"src": "234:80:3",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 501,
|
|
"name": "ENSResolver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "243:11:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": "ENSResolver_Chainlink"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@chainlink/contracts/src/v0.6/vendor/SafeMath.sol",
|
|
"file": "./vendor/SafeMath.sol",
|
|
"id": 504,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 956,
|
|
"sourceUnit": 2123,
|
|
"src": "315:71:3",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 503,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "324:8:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": "SafeMath_Chainlink"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 505,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "388:157:3",
|
|
"text": "@title The ChainlinkClient contract\n@notice Contract writers can inherit this contract in order to create requests for the\nChainlink network"
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 955,
|
|
"linearizedBaseContracts": [
|
|
955
|
|
],
|
|
"name": "ChainlinkClient",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 508,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 506,
|
|
"name": "Chainlink",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 493,
|
|
"src": "581:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Chainlink_$493",
|
|
"typeString": "library Chainlink"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "575:38:3",
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 507,
|
|
"name": "Chainlink.Request",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 258,
|
|
"src": "595:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_storage_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 511,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 509,
|
|
"name": "SafeMath_Chainlink",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2122,
|
|
"src": "622:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$2122",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "616:37:3",
|
|
"typeName": {
|
|
"id": 510,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "645:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 516,
|
|
"mutability": "constant",
|
|
"name": "LINK",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "657:39:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 512,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "657:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_1000000000000000000_by_1",
|
|
"typeString": "int_const 1000000000000000000"
|
|
},
|
|
"id": 515,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3130",
|
|
"id": 513,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "690:2:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3138",
|
|
"id": 514,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "694:2:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_18_by_1",
|
|
"typeString": "int_const 18"
|
|
},
|
|
"value": "18"
|
|
},
|
|
"src": "690:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1000000000000000000_by_1",
|
|
"typeString": "int_const 1000000000000000000"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 519,
|
|
"mutability": "constant",
|
|
"name": "AMOUNT_OVERRIDE",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "700:44:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 517,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "700:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 518,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "743:1:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 525,
|
|
"mutability": "constant",
|
|
"name": "SENDER_OVERRIDE",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "748:53:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 520,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "748:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 523,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "799:1:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 522,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "791:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 521,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "791:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 524,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "791:10:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 528,
|
|
"mutability": "constant",
|
|
"name": "ARGS_VERSION",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "805:41:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 526,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "805:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "31",
|
|
"id": 527,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "845:1:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 533,
|
|
"mutability": "constant",
|
|
"name": "ENS_TOKEN_SUBNAME",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "850:62:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 529,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "850:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "6c696e6b",
|
|
"id": 531,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "905:6:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_90430203e2d9ce04f00738d355173358b054545ecb52218de9c6fb01cbd9aeaf",
|
|
"typeString": "literal_string \"link\""
|
|
},
|
|
"value": "link"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_stringliteral_90430203e2d9ce04f00738d355173358b054545ecb52218de9c6fb01cbd9aeaf",
|
|
"typeString": "literal_string \"link\""
|
|
}
|
|
],
|
|
"id": 530,
|
|
"name": "keccak256",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -8,
|
|
"src": "895:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
|
|
"typeString": "function (bytes memory) pure returns (bytes32)"
|
|
}
|
|
},
|
|
"id": 532,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "895:17:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 538,
|
|
"mutability": "constant",
|
|
"name": "ENS_ORACLE_SUBNAME",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "916:65:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 534,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "916:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "6f7261636c65",
|
|
"id": 536,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "972:8:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_89cbf5af14e0328a3cd3a734f92c3832d729d431da79b7873a62cbeebd37beb6",
|
|
"typeString": "literal_string \"oracle\""
|
|
},
|
|
"value": "oracle"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_stringliteral_89cbf5af14e0328a3cd3a734f92c3832d729d431da79b7873a62cbeebd37beb6",
|
|
"typeString": "literal_string \"oracle\""
|
|
}
|
|
],
|
|
"id": 535,
|
|
"name": "keccak256",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -8,
|
|
"src": "962:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
|
|
"typeString": "function (bytes memory) pure returns (bytes32)"
|
|
}
|
|
},
|
|
"id": 537,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "962:19:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 541,
|
|
"mutability": "constant",
|
|
"name": "LINK_TOKEN_POINTER",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "985:88:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 539,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "985:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "307843383962443445313633324433413433434230334141416435323632636265343033384263353731",
|
|
"id": 540,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1031:42:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"value": "0xC89bD4E1632D3A43CB03AAAd5262cbe4038Bc571"
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 543,
|
|
"mutability": "mutable",
|
|
"name": "ens",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "1078:24:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSInterface_$1068",
|
|
"typeString": "contract ENSInterface"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 542,
|
|
"name": "ENSInterface",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1068,
|
|
"src": "1078:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSInterface_$1068",
|
|
"typeString": "contract ENSInterface"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 545,
|
|
"mutability": "mutable",
|
|
"name": "ensNode",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "1106:23:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 544,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1106:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 547,
|
|
"mutability": "mutable",
|
|
"name": "link",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "1133:31:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 546,
|
|
"name": "LinkTokenInterface",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1163,
|
|
"src": "1133:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 549,
|
|
"mutability": "mutable",
|
|
"name": "oracle",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "1168:40:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 548,
|
|
"name": "ChainlinkRequestInterface",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 988,
|
|
"src": "1168:25:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 552,
|
|
"mutability": "mutable",
|
|
"name": "requestCount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "1212:32:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 550,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1212:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "31",
|
|
"id": 551,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1243:1:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 556,
|
|
"mutability": "mutable",
|
|
"name": "pendingRequests",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 955,
|
|
"src": "1248:51:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
},
|
|
"typeName": {
|
|
"id": 555,
|
|
"keyType": {
|
|
"id": 553,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1256:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "1248:27:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
},
|
|
"valueType": {
|
|
"id": 554,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1267:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 560,
|
|
"name": "ChainlinkRequested",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 559,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 558,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "id",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 560,
|
|
"src": "1329:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 557,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1329:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1328:20:3"
|
|
},
|
|
"src": "1304:45:3"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 564,
|
|
"name": "ChainlinkFulfilled",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 563,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 562,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "id",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 564,
|
|
"src": "1377:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 561,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1377:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1376:20:3"
|
|
},
|
|
"src": "1352:45:3"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 568,
|
|
"name": "ChainlinkCancelled",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 567,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 566,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "id",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 568,
|
|
"src": "1425:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 565,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1425:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1424:20:3"
|
|
},
|
|
"src": "1400:45:3"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 592,
|
|
"nodeType": "Block",
|
|
"src": "2021:121:3",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
583
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 583,
|
|
"mutability": "mutable",
|
|
"name": "req",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 592,
|
|
"src": "2027:28:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 582,
|
|
"name": "Chainlink.Request",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 258,
|
|
"src": "2027:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_storage_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 584,
|
|
"initialValue": null,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2027:28:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 587,
|
|
"name": "_specId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 571,
|
|
"src": "2083:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 588,
|
|
"name": "_callbackAddress",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 573,
|
|
"src": "2092:16:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 589,
|
|
"name": "_callbackFunctionSignature",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 575,
|
|
"src": "2110:26:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 585,
|
|
"name": "req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 583,
|
|
"src": "2068:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"id": 586,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "initialize",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 301,
|
|
"src": "2068:14:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_struct$_Request_$258_memory_ptr_$_t_bytes32_$_t_address_$_t_bytes4_$returns$_t_struct$_Request_$258_memory_ptr_$bound_to$_t_struct$_Request_$258_memory_ptr_$",
|
|
"typeString": "function (struct Chainlink.Request memory,bytes32,address,bytes4) pure returns (struct Chainlink.Request memory)"
|
|
}
|
|
},
|
|
"id": 590,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2068:69:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 579,
|
|
"id": 591,
|
|
"nodeType": "Return",
|
|
"src": "2061:76:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 569,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1449:395:3",
|
|
"text": "@notice Creates a request that can hold additional parameters\n@param _specId The Job Specification ID that the request will be created for\n@param _callbackAddress The callback address that the response will be sent to\n@param _callbackFunctionSignature The callback function signature to use for the callback address\n@return A Chainlink Request struct in memory"
|
|
},
|
|
"id": 593,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "buildChainlinkRequest",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 576,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 571,
|
|
"mutability": "mutable",
|
|
"name": "_specId",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 593,
|
|
"src": "1883:15:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 570,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1883:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 573,
|
|
"mutability": "mutable",
|
|
"name": "_callbackAddress",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 593,
|
|
"src": "1904:24:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 572,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1904:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 575,
|
|
"mutability": "mutable",
|
|
"name": "_callbackFunctionSignature",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 593,
|
|
"src": "1934:33:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 574,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1934:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1877:94:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 579,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 578,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 593,
|
|
"src": "1995:24:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 577,
|
|
"name": "Chainlink.Request",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 258,
|
|
"src": "1995:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_storage_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1994:26:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "1847:295:3",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 612,
|
|
"nodeType": "Block",
|
|
"src": "2565:73:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 606,
|
|
"name": "oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 549,
|
|
"src": "2609:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
],
|
|
"id": 605,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2601:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 604,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2601:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 607,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2601:15:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 608,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 596,
|
|
"src": "2618:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 609,
|
|
"name": "_payment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 598,
|
|
"src": "2624:8:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 603,
|
|
"name": "sendChainlinkRequestTo",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 670,
|
|
"src": "2578:22:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_struct$_Request_$258_memory_ptr_$_t_uint256_$returns$_t_bytes32_$",
|
|
"typeString": "function (address,struct Chainlink.Request memory,uint256) returns (bytes32)"
|
|
}
|
|
},
|
|
"id": 610,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2578:55:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"functionReturnParameters": 602,
|
|
"id": 611,
|
|
"nodeType": "Return",
|
|
"src": "2571:62:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 594,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2146:300:3",
|
|
"text": "@notice Creates a Chainlink request to the stored oracle address\n@dev Calls `chainlinkRequestTo` with the stored oracle address\n@param _req The initialized Chainlink Request\n@param _payment The amount of LINK to send for the request\n@return requestId The request ID"
|
|
},
|
|
"id": 613,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "sendChainlinkRequest",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 599,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 596,
|
|
"mutability": "mutable",
|
|
"name": "_req",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 613,
|
|
"src": "2479:29:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 595,
|
|
"name": "Chainlink.Request",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 258,
|
|
"src": "2479:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_storage_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 598,
|
|
"mutability": "mutable",
|
|
"name": "_payment",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 613,
|
|
"src": "2510:16:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 597,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2510:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2478:49:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 602,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 601,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 613,
|
|
"src": "2554:7:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 600,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2554:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2553:9:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "2449:189:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 669,
|
|
"nodeType": "Block",
|
|
"src": "3297:343:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 633,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 625,
|
|
"name": "requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 623,
|
|
"src": "3303:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 629,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -28,
|
|
"src": "3342:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkClient_$955",
|
|
"typeString": "contract ChainlinkClient"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 630,
|
|
"name": "requestCount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 552,
|
|
"src": "3348:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ChainlinkClient_$955",
|
|
"typeString": "contract ChainlinkClient"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 627,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -1,
|
|
"src": "3325:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 628,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "encodePacked",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3325:16:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function () pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 631,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3325:36:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"id": 626,
|
|
"name": "keccak256",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -8,
|
|
"src": "3315:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
|
|
"typeString": "function (bytes memory) pure returns (bytes32)"
|
|
}
|
|
},
|
|
"id": 632,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3315:47:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"src": "3303:59:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"id": 634,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3303:59:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 639,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 635,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 618,
|
|
"src": "3368:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"id": 637,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberName": "nonce",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 255,
|
|
"src": "3368:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 638,
|
|
"name": "requestCount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 552,
|
|
"src": "3381:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3368:25:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 640,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3368:25:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 645,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 641,
|
|
"name": "pendingRequests",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 556,
|
|
"src": "3399:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
}
|
|
},
|
|
"id": 643,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 642,
|
|
"name": "requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 623,
|
|
"src": "3415:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3399:26:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 644,
|
|
"name": "_oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 616,
|
|
"src": "3428:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "3399:36:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 646,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3399:36:3"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 648,
|
|
"name": "requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 623,
|
|
"src": "3465:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"id": 647,
|
|
"name": "ChainlinkRequested",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 560,
|
|
"src": "3446:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$returns$__$",
|
|
"typeString": "function (bytes32)"
|
|
}
|
|
},
|
|
"id": 649,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3446:29:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 650,
|
|
"nodeType": "EmitStatement",
|
|
"src": "3441:34:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 654,
|
|
"name": "_oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 616,
|
|
"src": "3510:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 655,
|
|
"name": "_payment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 620,
|
|
"src": "3519:8:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 657,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 618,
|
|
"src": "3543:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
],
|
|
"id": 656,
|
|
"name": "encodeRequest",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 899,
|
|
"src": "3529:13:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_struct$_Request_$258_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (struct Chainlink.Request memory) view returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 658,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3529:19:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 652,
|
|
"name": "link",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 547,
|
|
"src": "3489:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
}
|
|
},
|
|
"id": 653,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "transferAndCall",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1151,
|
|
"src": "3489:20:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$",
|
|
"typeString": "function (address,uint256,bytes memory) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 659,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3489:60:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261636c65",
|
|
"id": 660,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3551:37:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_3b3efd608222b424e5ed8427d7f6a272069793e6a1f5930c93db5c7960c3ce96",
|
|
"typeString": "literal_string \"unable to transferAndCall to oracle\""
|
|
},
|
|
"value": "unable to transferAndCall to oracle"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_3b3efd608222b424e5ed8427d7f6a272069793e6a1f5930c93db5c7960c3ce96",
|
|
"typeString": "literal_string \"unable to transferAndCall to oracle\""
|
|
}
|
|
],
|
|
"id": 651,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "3481:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 661,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3481:108:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 662,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3481:108:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 665,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 663,
|
|
"name": "requestCount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 552,
|
|
"src": "3595:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"hexValue": "31",
|
|
"id": 664,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3611:1:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "3595:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 666,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3595:17:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 667,
|
|
"name": "requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 623,
|
|
"src": "3626:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"functionReturnParameters": 624,
|
|
"id": 668,
|
|
"nodeType": "Return",
|
|
"src": "3619:16:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 614,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2642:507:3",
|
|
"text": "@notice Creates a Chainlink request to the specified oracle address\n@dev Generates and stores a request ID, increments the local nonce, and uses `transferAndCall` to\nsend LINK which creates a request on the target oracle contract.\nEmits ChainlinkRequested event.\n@param _oracle The address of the oracle for the request\n@param _req The initialized Chainlink Request\n@param _payment The amount of LINK to send for the request\n@return requestId The request ID"
|
|
},
|
|
"id": 670,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "sendChainlinkRequestTo",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 621,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 616,
|
|
"mutability": "mutable",
|
|
"name": "_oracle",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 670,
|
|
"src": "3184:15:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 615,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3184:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 618,
|
|
"mutability": "mutable",
|
|
"name": "_req",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 670,
|
|
"src": "3201:29:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 617,
|
|
"name": "Chainlink.Request",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 258,
|
|
"src": "3201:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_storage_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 620,
|
|
"mutability": "mutable",
|
|
"name": "_payment",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 670,
|
|
"src": "3232:16:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 619,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3232:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3183:66:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 624,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 623,
|
|
"mutability": "mutable",
|
|
"name": "requestId",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 670,
|
|
"src": "3276:17:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 622,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3276:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3275:19:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "3152:488:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 708,
|
|
"nodeType": "Block",
|
|
"src": "4308:269:3",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
683
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 683,
|
|
"mutability": "mutable",
|
|
"name": "requested",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 708,
|
|
"src": "4314:35:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 682,
|
|
"name": "ChainlinkRequestInterface",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 988,
|
|
"src": "4314:25:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 689,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 685,
|
|
"name": "pendingRequests",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 556,
|
|
"src": "4378:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
}
|
|
},
|
|
"id": 687,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 686,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 673,
|
|
"src": "4394:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "4378:27:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 684,
|
|
"name": "ChainlinkRequestInterface",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 988,
|
|
"src": "4352:25:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_ChainlinkRequestInterface_$988_$",
|
|
"typeString": "type(contract ChainlinkRequestInterface)"
|
|
}
|
|
},
|
|
"id": 688,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4352:54:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "4314:92:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 693,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "delete",
|
|
"prefix": true,
|
|
"src": "4412:34:3",
|
|
"subExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 690,
|
|
"name": "pendingRequests",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 556,
|
|
"src": "4419:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
}
|
|
},
|
|
"id": 692,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 691,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 673,
|
|
"src": "4435:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "4419:27:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 694,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4412:34:3"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 696,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 673,
|
|
"src": "4476:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"id": 695,
|
|
"name": "ChainlinkCancelled",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 568,
|
|
"src": "4457:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$returns$__$",
|
|
"typeString": "function (bytes32)"
|
|
}
|
|
},
|
|
"id": 697,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4457:30:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 698,
|
|
"nodeType": "EmitStatement",
|
|
"src": "4452:35:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 702,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 673,
|
|
"src": "4523:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 703,
|
|
"name": "_payment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 675,
|
|
"src": "4535:8:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 704,
|
|
"name": "_callbackFunc",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 677,
|
|
"src": "4545:13:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 705,
|
|
"name": "_expiration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 679,
|
|
"src": "4560:11:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 699,
|
|
"name": "requested",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 683,
|
|
"src": "4493:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"id": 701,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "cancelOracleRequest",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 987,
|
|
"src": "4493:29:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint256_$_t_bytes4_$_t_uint256_$returns$__$",
|
|
"typeString": "function (bytes32,uint256,bytes4,uint256) external"
|
|
}
|
|
},
|
|
"id": 706,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4493:79:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 707,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4493:79:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 671,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3644:513:3",
|
|
"text": "@notice Allows a request to be cancelled if it has not been fulfilled\n@dev Requires keeping track of the expiration value emitted from the oracle contract.\nDeletes the request from the `pendingRequests` mapping.\nEmits ChainlinkCancelled event.\n@param _requestId The request ID\n@param _payment The amount of LINK sent for the request\n@param _callbackFunc The callback function specified for the request\n@param _expiration The time of the expiration for the request"
|
|
},
|
|
"id": 709,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "cancelChainlinkRequest",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 680,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 673,
|
|
"mutability": "mutable",
|
|
"name": "_requestId",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 709,
|
|
"src": "4197:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 672,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4197:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 675,
|
|
"mutability": "mutable",
|
|
"name": "_payment",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 709,
|
|
"src": "4221:16:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 674,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4221:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 677,
|
|
"mutability": "mutable",
|
|
"name": "_callbackFunc",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 709,
|
|
"src": "4243:20:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 676,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4243:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 679,
|
|
"mutability": "mutable",
|
|
"name": "_expiration",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 709,
|
|
"src": "4269:19:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 678,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4269:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4191:101:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 681,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "4308:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "4160:417:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 721,
|
|
"nodeType": "Block",
|
|
"src": "4746:54:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 719,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 715,
|
|
"name": "oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 549,
|
|
"src": "4752:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 717,
|
|
"name": "_oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 712,
|
|
"src": "4787:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 716,
|
|
"name": "ChainlinkRequestInterface",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 988,
|
|
"src": "4761:25:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_ChainlinkRequestInterface_$988_$",
|
|
"typeString": "type(contract ChainlinkRequestInterface)"
|
|
}
|
|
},
|
|
"id": 718,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4761:34:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"src": "4752:43:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"id": 720,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4752:43:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 710,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "4581:108:3",
|
|
"text": "@notice Sets the stored oracle address\n@param _oracle The address of the oracle contract"
|
|
},
|
|
"id": 722,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "setChainlinkOracle",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 713,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 712,
|
|
"mutability": "mutable",
|
|
"name": "_oracle",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 722,
|
|
"src": "4720:15:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 711,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4720:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4719:17:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 714,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "4746:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "4692:108:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 734,
|
|
"nodeType": "Block",
|
|
"src": "4965:43:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 732,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 728,
|
|
"name": "link",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 547,
|
|
"src": "4971:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 730,
|
|
"name": "_link",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 725,
|
|
"src": "4997:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 729,
|
|
"name": "LinkTokenInterface",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1163,
|
|
"src": "4978:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_LinkTokenInterface_$1163_$",
|
|
"typeString": "type(contract LinkTokenInterface)"
|
|
}
|
|
},
|
|
"id": 731,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4978:25:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
}
|
|
},
|
|
"src": "4971:32:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
}
|
|
},
|
|
"id": 733,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4971:32:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 723,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "4804:107:3",
|
|
"text": "@notice Sets the LINK token address\n@param _link The address of the LINK token contract"
|
|
},
|
|
"id": 735,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "setChainlinkToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 726,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 725,
|
|
"mutability": "mutable",
|
|
"name": "_link",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 735,
|
|
"src": "4941:13:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 724,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4941:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4940:15:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 727,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "4965:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "4914:94:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 747,
|
|
"nodeType": "Block",
|
|
"src": "5175:79:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 741,
|
|
"name": "LINK_TOKEN_POINTER",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 541,
|
|
"src": "5216:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 740,
|
|
"name": "PointerInterface",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1171,
|
|
"src": "5199:16:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_PointerInterface_$1171_$",
|
|
"typeString": "type(contract PointerInterface)"
|
|
}
|
|
},
|
|
"id": 742,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5199:36:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_PointerInterface_$1171",
|
|
"typeString": "contract PointerInterface"
|
|
}
|
|
},
|
|
"id": 743,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "getAddress",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1170,
|
|
"src": "5199:47:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
|
|
"typeString": "function () view external returns (address)"
|
|
}
|
|
},
|
|
"id": 744,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5199:49:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 739,
|
|
"name": "setChainlinkToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 735,
|
|
"src": "5181:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 745,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5181:68:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 746,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5181:68:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 736,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5012:116:3",
|
|
"text": "@notice Sets the Chainlink token address for the public\nnetwork as given by the Pointer contract"
|
|
},
|
|
"id": 748,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "setPublicChainlinkToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 737,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "5163:2:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 738,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "5175:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "5131:123:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 759,
|
|
"nodeType": "Block",
|
|
"src": "5452:31:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 756,
|
|
"name": "link",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 547,
|
|
"src": "5473:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_LinkTokenInterface_$1163",
|
|
"typeString": "contract LinkTokenInterface"
|
|
}
|
|
],
|
|
"id": 755,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "5465:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 754,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5465:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 757,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5465:13:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"functionReturnParameters": 753,
|
|
"id": 758,
|
|
"nodeType": "Return",
|
|
"src": "5458:20:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 749,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5258:112:3",
|
|
"text": "@notice Retrieves the stored address of the LINK token\n@return The address of the LINK token"
|
|
},
|
|
"id": 760,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "chainlinkTokenAddress",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 750,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "5403:2:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 753,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 752,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 760,
|
|
"src": "5441:7:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 751,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5441:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5440:9:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "5373:110:3",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 771,
|
|
"nodeType": "Block",
|
|
"src": "5692:33:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 768,
|
|
"name": "oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 549,
|
|
"src": "5713:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
],
|
|
"id": 767,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "5705:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 766,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5705:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 769,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5705:15:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"functionReturnParameters": 765,
|
|
"id": 770,
|
|
"nodeType": "Return",
|
|
"src": "5698:22:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 761,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5487:122:3",
|
|
"text": "@notice Retrieves the stored address of the oracle contract\n@return The address of the oracle contract"
|
|
},
|
|
"id": 772,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "chainlinkOracleAddress",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 762,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "5643:2:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 765,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 764,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 772,
|
|
"src": "5681:7:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 763,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5681:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5680:9:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "5612:113:3",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 789,
|
|
"nodeType": "Block",
|
|
"src": "6119:48:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 787,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 783,
|
|
"name": "pendingRequests",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 556,
|
|
"src": "6125:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
}
|
|
},
|
|
"id": 785,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 784,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 777,
|
|
"src": "6141:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "6125:27:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 786,
|
|
"name": "_oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 775,
|
|
"src": "6155:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "6125:37:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 788,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6125:37:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 773,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5729:264:3",
|
|
"text": "@notice Allows for a request which was created on another contract to be fulfilled\non this contract\n@param _oracle The address of the oracle contract that will fulfill the request\n@param _requestId The request ID used for the response"
|
|
},
|
|
"id": 790,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 780,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 777,
|
|
"src": "6105:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"id": 781,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 779,
|
|
"name": "notPendingRequest",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 954,
|
|
"src": "6087:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_bytes32_$",
|
|
"typeString": "modifier (bytes32)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "6087:29:3"
|
|
}
|
|
],
|
|
"name": "addChainlinkExternalRequest",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 778,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 775,
|
|
"mutability": "mutable",
|
|
"name": "_oracle",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 790,
|
|
"src": "6033:15:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 774,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6033:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 777,
|
|
"mutability": "mutable",
|
|
"name": "_requestId",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 790,
|
|
"src": "6050:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 776,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6050:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6032:37:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 782,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "6119:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "5996:171:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 837,
|
|
"nodeType": "Block",
|
|
"src": "6496:313:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 802,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 798,
|
|
"name": "ens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 543,
|
|
"src": "6502:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSInterface_$1068",
|
|
"typeString": "contract ENSInterface"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 800,
|
|
"name": "_ens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 793,
|
|
"src": "6521:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 799,
|
|
"name": "ENSInterface",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1068,
|
|
"src": "6508:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_ENSInterface_$1068_$",
|
|
"typeString": "type(contract ENSInterface)"
|
|
}
|
|
},
|
|
"id": 801,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6508:18:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSInterface_$1068",
|
|
"typeString": "contract ENSInterface"
|
|
}
|
|
},
|
|
"src": "6502:24:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSInterface_$1068",
|
|
"typeString": "contract ENSInterface"
|
|
}
|
|
},
|
|
"id": 803,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6502:24:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 806,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 804,
|
|
"name": "ensNode",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "6532:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 805,
|
|
"name": "_node",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 795,
|
|
"src": "6542:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"src": "6532:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"id": 807,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6532:15:3"
|
|
},
|
|
{
|
|
"assignments": [
|
|
809
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 809,
|
|
"mutability": "mutable",
|
|
"name": "linkSubnode",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 837,
|
|
"src": "6553:19:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 808,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6553:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 817,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 813,
|
|
"name": "ensNode",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "6602:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 814,
|
|
"name": "ENS_TOKEN_SUBNAME",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 533,
|
|
"src": "6611:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 811,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -1,
|
|
"src": "6585:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 812,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "encodePacked",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "6585:16:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function () pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 815,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6585:44:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"id": 810,
|
|
"name": "keccak256",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -8,
|
|
"src": "6575:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
|
|
"typeString": "function (bytes memory) pure returns (bytes32)"
|
|
}
|
|
},
|
|
"id": 816,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6575:55:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "6553:77:3"
|
|
},
|
|
{
|
|
"assignments": [
|
|
819
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 819,
|
|
"mutability": "mutable",
|
|
"name": "resolver",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 837,
|
|
"src": "6636:30:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 818,
|
|
"name": "ENSResolver_Chainlink",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1983,
|
|
"src": "6636:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 826,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 823,
|
|
"name": "linkSubnode",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 809,
|
|
"src": "6704:11:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 821,
|
|
"name": "ens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 543,
|
|
"src": "6691:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSInterface_$1068",
|
|
"typeString": "contract ENSInterface"
|
|
}
|
|
},
|
|
"id": 822,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "resolver",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1060,
|
|
"src": "6691:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$",
|
|
"typeString": "function (bytes32) view external returns (address)"
|
|
}
|
|
},
|
|
"id": 824,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6691:25:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 820,
|
|
"name": "ENSResolver_Chainlink",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1983,
|
|
"src": "6669:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_ENSResolver_$1983_$",
|
|
"typeString": "type(contract ENSResolver)"
|
|
}
|
|
},
|
|
"id": 825,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6669:48:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "6636:81:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 830,
|
|
"name": "linkSubnode",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 809,
|
|
"src": "6755:11:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 828,
|
|
"name": "resolver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 819,
|
|
"src": "6741:8:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
}
|
|
},
|
|
"id": 829,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "addr",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1982,
|
|
"src": "6741:13:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$",
|
|
"typeString": "function (bytes32) view external returns (address)"
|
|
}
|
|
},
|
|
"id": 831,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6741:26:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 827,
|
|
"name": "setChainlinkToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 735,
|
|
"src": "6723:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 832,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6723:45:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 833,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6723:45:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 834,
|
|
"name": "updateChainlinkOracleWithENS",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 869,
|
|
"src": "6774:28:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
|
|
"typeString": "function ()"
|
|
}
|
|
},
|
|
"id": 835,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6774:30:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 836,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6774:30:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 791,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6171:249:3",
|
|
"text": "@notice Sets the stored oracle and LINK token contracts with the addresses resolved by ENS\n@dev Accounts for subnodes having different resolvers\n@param _ens The address of the ENS contract\n@param _node The ENS node hash"
|
|
},
|
|
"id": 838,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "useChainlinkWithENS",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 796,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 793,
|
|
"mutability": "mutable",
|
|
"name": "_ens",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 838,
|
|
"src": "6452:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 792,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6452:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 795,
|
|
"mutability": "mutable",
|
|
"name": "_node",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 838,
|
|
"src": "6466:13:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 794,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6466:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6451:29:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 797,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "6496:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "6423:386:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 868,
|
|
"nodeType": "Block",
|
|
"src": "7058:234:3",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
843
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 843,
|
|
"mutability": "mutable",
|
|
"name": "oracleSubnode",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 868,
|
|
"src": "7064:21:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 842,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7064:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 851,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 847,
|
|
"name": "ensNode",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "7115:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 848,
|
|
"name": "ENS_ORACLE_SUBNAME",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 538,
|
|
"src": "7124:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 845,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -1,
|
|
"src": "7098:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 846,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "encodePacked",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "7098:16:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function () pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 849,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7098:45:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"id": 844,
|
|
"name": "keccak256",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -8,
|
|
"src": "7088:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
|
|
"typeString": "function (bytes memory) pure returns (bytes32)"
|
|
}
|
|
},
|
|
"id": 850,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7088:56:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "7064:80:3"
|
|
},
|
|
{
|
|
"assignments": [
|
|
853
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 853,
|
|
"mutability": "mutable",
|
|
"name": "resolver",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 868,
|
|
"src": "7150:30:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 852,
|
|
"name": "ENSResolver_Chainlink",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1983,
|
|
"src": "7150:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 860,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 857,
|
|
"name": "oracleSubnode",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 843,
|
|
"src": "7218:13:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 855,
|
|
"name": "ens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 543,
|
|
"src": "7205:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSInterface_$1068",
|
|
"typeString": "contract ENSInterface"
|
|
}
|
|
},
|
|
"id": 856,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "resolver",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1060,
|
|
"src": "7205:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$",
|
|
"typeString": "function (bytes32) view external returns (address)"
|
|
}
|
|
},
|
|
"id": 858,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7205:27:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 854,
|
|
"name": "ENSResolver_Chainlink",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1983,
|
|
"src": "7183:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_ENSResolver_$1983_$",
|
|
"typeString": "type(contract ENSResolver)"
|
|
}
|
|
},
|
|
"id": 859,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7183:50:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "7150:83:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 864,
|
|
"name": "oracleSubnode",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 843,
|
|
"src": "7272:13:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 862,
|
|
"name": "resolver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 853,
|
|
"src": "7258:8:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ENSResolver_$1983",
|
|
"typeString": "contract ENSResolver"
|
|
}
|
|
},
|
|
"id": 863,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "addr",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1982,
|
|
"src": "7258:13:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$",
|
|
"typeString": "function (bytes32) view external returns (address)"
|
|
}
|
|
},
|
|
"id": 865,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7258:28:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 861,
|
|
"name": "setChainlinkOracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 722,
|
|
"src": "7239:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 866,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7239:48:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 867,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7239:48:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 839,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6813:187:3",
|
|
"text": "@notice Sets the stored oracle contract with the address resolved by ENS\n@dev This may be called on its own as long as `useChainlinkWithENS` has been called previously"
|
|
},
|
|
"id": 869,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "updateChainlinkOracleWithENS",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 840,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "7040:2:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 841,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "7058:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "7003:289:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 898,
|
|
"nodeType": "Block",
|
|
"src": "7748:423:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 879,
|
|
"name": "oracle",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 549,
|
|
"src": "7791:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ChainlinkRequestInterface_$988",
|
|
"typeString": "contract ChainlinkRequestInterface"
|
|
}
|
|
},
|
|
"id": 880,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "oracleRequest",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 976,
|
|
"src": "7791:20:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes32_$_t_address_$_t_bytes4_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$",
|
|
"typeString": "function (address,uint256,bytes32,address,bytes4,uint256,uint256,bytes memory) external"
|
|
}
|
|
},
|
|
"id": 881,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "selector",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "7791:29:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 882,
|
|
"name": "SENDER_OVERRIDE",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 525,
|
|
"src": "7828:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 883,
|
|
"name": "AMOUNT_OVERRIDE",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 519,
|
|
"src": "7936:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 884,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 872,
|
|
"src": "8041:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"id": 885,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "id",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 249,
|
|
"src": "8041:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 886,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 872,
|
|
"src": "8056:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"id": 887,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "callbackAddress",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 251,
|
|
"src": "8056:20:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 888,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 872,
|
|
"src": "8084:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"id": 889,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "callbackFunctionId",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 253,
|
|
"src": "8084:23:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 890,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 872,
|
|
"src": "8115:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"id": 891,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "nonce",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 255,
|
|
"src": "8115:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 892,
|
|
"name": "ARGS_VERSION",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 528,
|
|
"src": "8133:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 893,
|
|
"name": "_req",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 872,
|
|
"src": "8153:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request memory"
|
|
}
|
|
},
|
|
"id": 894,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "buf",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 257,
|
|
"src": "8153:8:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_buffer_$1179_memory_ptr",
|
|
"typeString": "struct Buffer.buffer memory"
|
|
}
|
|
},
|
|
"id": 895,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "buf",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1176,
|
|
"src": "8153:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 877,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -1,
|
|
"src": "7761:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 878,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "encodeWithSelector",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "7761:22:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes4) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 896,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7761:405:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 876,
|
|
"id": 897,
|
|
"nodeType": "Return",
|
|
"src": "7754:412:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 870,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "7296:345:3",
|
|
"text": "@notice Encodes the request to be sent to the oracle contract\n@dev The Chainlink node expects values to be in order for the request to be picked up. Order of types\nwill be validated in the oracle contract.\n@param _req The initialized Chainlink Request\n@return The bytes payload for the `transferAndCall` method"
|
|
},
|
|
"id": 899,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "encodeRequest",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 873,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 872,
|
|
"mutability": "mutable",
|
|
"name": "_req",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 899,
|
|
"src": "7667:29:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_memory_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 871,
|
|
"name": "Chainlink.Request",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 258,
|
|
"src": "7667:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Request_$258_storage_ptr",
|
|
"typeString": "struct Chainlink.Request"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7666:31:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 876,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 875,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 899,
|
|
"src": "7732:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 874,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7732:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7731:14:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "7644:527:3",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 908,
|
|
"nodeType": "Block",
|
|
"src": "8564:2:3",
|
|
"statements": []
|
|
},
|
|
"documentation": {
|
|
"id": 900,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "8175:224:3",
|
|
"text": "@notice Ensures that the fulfillment is valid for this contract\n@dev Use if the contract developer prefers methods instead of modifiers for validation\n@param _requestId The request ID for fulfillment"
|
|
},
|
|
"id": 909,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 905,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 902,
|
|
"src": "8501:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"id": 906,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 904,
|
|
"name": "recordChainlinkFulfillment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 935,
|
|
"src": "8474:26:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_bytes32_$",
|
|
"typeString": "modifier (bytes32)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "8474:38:3"
|
|
}
|
|
],
|
|
"name": "validateChainlinkCallback",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 903,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 902,
|
|
"mutability": "mutable",
|
|
"name": "_requestId",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 909,
|
|
"src": "8437:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 901,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8437:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "8436:20:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 907,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "8564:0:3"
|
|
},
|
|
"scope": 955,
|
|
"src": "8402:164:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 934,
|
|
"nodeType": "Block",
|
|
"src": "8795:205:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 920,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 915,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "8809:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 916,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "8809:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 917,
|
|
"name": "pendingRequests",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 556,
|
|
"src": "8823:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
}
|
|
},
|
|
"id": 919,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 918,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 912,
|
|
"src": "8839:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8823:27:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "8809:41:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "536f75726365206d75737420626520746865206f7261636c65206f66207468652072657175657374",
|
|
"id": 921,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8864:42:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_d5cafe2745dab6273b51cca76f8727c7664db74ede49af049a5b5ca6a3b184e4",
|
|
"typeString": "literal_string \"Source must be the oracle of the request\""
|
|
},
|
|
"value": "Source must be the oracle of the request"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_d5cafe2745dab6273b51cca76f8727c7664db74ede49af049a5b5ca6a3b184e4",
|
|
"typeString": "literal_string \"Source must be the oracle of the request\""
|
|
}
|
|
],
|
|
"id": 914,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "8801:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 922,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8801:106:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 923,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8801:106:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 927,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "delete",
|
|
"prefix": true,
|
|
"src": "8913:34:3",
|
|
"subExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 924,
|
|
"name": "pendingRequests",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 556,
|
|
"src": "8920:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
}
|
|
},
|
|
"id": 926,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 925,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 912,
|
|
"src": "8936:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8920:27:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 928,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8913:34:3"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 930,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 912,
|
|
"src": "8977:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
],
|
|
"id": 929,
|
|
"name": "ChainlinkFulfilled",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 564,
|
|
"src": "8958:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$returns$__$",
|
|
"typeString": "function (bytes32)"
|
|
}
|
|
},
|
|
"id": 931,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8958:30:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 932,
|
|
"nodeType": "EmitStatement",
|
|
"src": "8953:35:3"
|
|
},
|
|
{
|
|
"id": 933,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "8994:1:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 910,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "8570:166:3",
|
|
"text": "@dev Reverts if the sender is not the oracle of the request.\nEmits ChainlinkFulfilled event.\n@param _requestId The request ID for fulfillment"
|
|
},
|
|
"id": 935,
|
|
"name": "recordChainlinkFulfillment",
|
|
"nodeType": "ModifierDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 913,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 912,
|
|
"mutability": "mutable",
|
|
"name": "_requestId",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 935,
|
|
"src": "8775:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 911,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8775:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "8774:20:3"
|
|
},
|
|
"src": "8739:261:3",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 953,
|
|
"nodeType": "Block",
|
|
"src": "9169:98:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 948,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 941,
|
|
"name": "pendingRequests",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 556,
|
|
"src": "9183:15:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
|
|
"typeString": "mapping(bytes32 => address)"
|
|
}
|
|
},
|
|
"id": 943,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 942,
|
|
"name": "_requestId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 938,
|
|
"src": "9199:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "9183:27:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 946,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9222:1:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 945,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "9214:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 944,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9214:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 947,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "9214:10:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "9183:41:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "5265717565737420697320616c72656164792070656e64696e67",
|
|
"id": 949,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9226:28:3",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_efa688de2ca2442cd2f76ca864c7a15bdcb24ac77ed3de01d4cf9f6afd58c7aa",
|
|
"typeString": "literal_string \"Request is already pending\""
|
|
},
|
|
"value": "Request is already pending"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_efa688de2ca2442cd2f76ca864c7a15bdcb24ac77ed3de01d4cf9f6afd58c7aa",
|
|
"typeString": "literal_string \"Request is already pending\""
|
|
}
|
|
],
|
|
"id": 940,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "9175:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 950,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "9175:80:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 951,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9175:80:3"
|
|
},
|
|
{
|
|
"id": 952,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "9261:1:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 936,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "9004:115:3",
|
|
"text": "@dev Reverts if the request is already pending\n@param _requestId The request ID for fulfillment"
|
|
},
|
|
"id": 954,
|
|
"name": "notPendingRequest",
|
|
"nodeType": "ModifierDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 939,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 938,
|
|
"mutability": "mutable",
|
|
"name": "_requestId",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 954,
|
|
"src": "9149:18:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"typeName": {
|
|
"id": 937,
|
|
"name": "bytes32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9149:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "9148:20:3"
|
|
},
|
|
"src": "9122:145:3",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 956,
|
|
"src": "546:8723:3"
|
|
}
|
|
],
|
|
"src": "0:9270:3"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.6.6+commit.6c089d02.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.2.5",
|
|
"updatedAt": "2020-10-24T00:06:53.302Z",
|
|
"devdoc": {
|
|
"methods": {},
|
|
"title": "The ChainlinkClient contract"
|
|
},
|
|
"userdoc": {
|
|
"methods": {},
|
|
"notice": "Contract writers can inherit this contract in order to create requests for the Chainlink network"
|
|
}
|
|
} |