UNPKG

@etherisc/gif-contracts

Version:

This repository holds the GIF core contracts and tools to develop, test and deploy GIF instances.

1,245 lines (1,244 loc) 128 kB
{ "abi": [], "allSourcePaths": { "54": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.6.0/contracts/src/v0.8/Chainlink.sol", "62": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.6.0/contracts/src/v0.8/vendor/BufferChainlink.sol", "63": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.6.0/contracts/src/v0.8/vendor/CBORChainlink.sol" }, "ast": { "absolutePath": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.6.0/contracts/src/v0.8/Chainlink.sol", "exportedSymbols": { "BufferChainlink": [ 28140 ], "CBORChainlink": [ 28587 ], "Chainlink": [ 25676 ] }, "id": 25677, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 25409, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "32:23:54" }, { "absolutePath": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.6.0/contracts/src/v0.8/vendor/CBORChainlink.sol", "file": "./vendor/CBORChainlink.sol", "id": 25411, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 25677, "sourceUnit": 28588, "src": "57:57:54", "symbolAliases": [ { "foreign": { "id": 25410, "name": "CBORChainlink", "nodeType": "Identifier", "overloadedDeclarations": [], "src": "65:13:54", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.6.0/contracts/src/v0.8/vendor/BufferChainlink.sol", "file": "./vendor/BufferChainlink.sol", "id": 25413, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 25677, "sourceUnit": 28141, "src": "115:61:54", "symbolAliases": [ { "foreign": { "id": 25412, "name": "BufferChainlink", "nodeType": "Identifier", "overloadedDeclarations": [], "src": "123:15:54", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": { "id": 25414, "nodeType": "StructuredDocumentation", "src": "178:114:54", "text": " @title Library for common Chainlink functions\n @dev Uses imported CBOR library for encoding to buffer" }, "fullyImplemented": true, "id": 25676, "linearizedBaseContracts": [ 25676 ], "name": "Chainlink", "nameLocation": "301:9:54", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "id": 25417, "mutability": "constant", "name": "defaultBufferSize", "nameLocation": "341:17:54", "nodeType": "VariableDeclaration", "scope": 25676, "src": "315:49:54", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 25415, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "315:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "hexValue": "323536", "id": 25416, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "361:3:54", "typeDescriptions": { "typeIdentifier": "t_rational_256_by_1", "typeString": "int_const 256" }, "value": "256" }, "visibility": "internal" }, { "id": 25421, "libraryName": { "id": 25418, "name": "CBORChainlink", "nodeType": "IdentifierPath", "referencedDeclaration": 28587, "src": "420:13:54" }, "nodeType": "UsingForDirective", "src": "414:47:54", "typeName": { "id": 25420, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 25419, "name": "BufferChainlink.buffer", "nodeType": "IdentifierPath", "referencedDeclaration": 27626, "src": "438:22:54" }, "referencedDeclaration": 27626, "src": "438:22:54", "typeDescriptions": { "typeIdentifier": "t_struct$_buffer_$27626_storage_ptr", "typeString": "struct BufferChainlink.buffer" } } }, { "canonicalName": "Chainlink.Request", "id": 25433, "members": [ { "constant": false, "id": 25423, "mutability": "mutable", "name": "id", "nameLocation": "494:2:54", "nodeType": "VariableDeclaration", "scope": 25433, "src": "486:10:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25422, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "486:7:54", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 25425, "mutability": "mutable", "name": "callbackAddress", "nameLocation": "510:15:54", "nodeType": "VariableDeclaration", "scope": 25433, "src": "502:23:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 25424, "name": "address", "nodeType": "ElementaryTypeName", "src": "502:7:54", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 25427, "mutability": "mutable", "name": "callbackFunctionId", "nameLocation": "538:18:54", "nodeType": "VariableDeclaration", "scope": 25433, "src": "531:25:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 25426, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "531:6:54", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "visibility": "internal" }, { "constant": false, "id": 25429, "mutability": "mutable", "name": "nonce", "nameLocation": "570:5:54", "nodeType": "VariableDeclaration", "scope": 25433, "src": "562:13:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 25428, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "562:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 25432, "mutability": "mutable", "name": "buf", "nameLocation": "604:3:54", "nodeType": "VariableDeclaration", "scope": 25433, "src": "581:26:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_struct$_buffer_$27626_storage_ptr", "typeString": "struct BufferChainlink.buffer" }, "typeName": { "id": 25431, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 25430, "name": "BufferChainlink.buffer", "nodeType": "IdentifierPath", "referencedDeclaration": 27626, "src": "581:22:54" }, "referencedDeclaration": 27626, "src": "581:22:54", "typeDescriptions": { "typeIdentifier": "t_struct$_buffer_$27626_storage_ptr", "typeString": "struct BufferChainlink.buffer" } }, "visibility": "internal" } ], "name": "Request", "nameLocation": "472:7:54", "nodeType": "StructDefinition", "scope": 25676, "src": "465:147:54", "visibility": "public" }, { "body": { "id": 25477, "nodeType": "Block", "src": "1155:183:54", "statements": [ { "expression": { "arguments": [ { "expression": { "id": 25452, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25437, "src": "1182:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Request_$25433_memory_ptr", "typeString": "struct Chainlink.Request memory" } }, "id": 25453, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "buf", "nodeType": "MemberAccess", "referencedDeclaration": 25432, "src": "1182:8:54", "typeDescriptions": { "typeIdentifier": "t_struct$_buffer_$27626_memory_ptr", "typeString": "struct BufferChainlink.buffer memory" } }, { "id": 25454, "name": "defaultBufferSize", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25417, "src": "1192:17:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_buffer_$27626_memory_ptr", "typeString": "struct BufferChainlink.buffer memory" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 25449, "name": "BufferChainlink", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 28140, "src": "1161:15:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_BufferChainlink_$28140_$", "typeString": "type(library BufferChainlink)" } }, "id": 25451, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "init", "nodeType": "MemberAccess", "referencedDeclaration": 27664, "src": "1161:20:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$27626_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$27626_memory_ptr_$", "typeString": "function (struct BufferChainlink.buffer memory,uint256) pure returns (struct BufferChainlink.buffer memory)" } }, "id": 25455, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1161:49:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_buffer_$27626_memory_ptr", "typeString": "struct BufferChainlink.buffer memory" } }, "id": 25456, "nodeType": "ExpressionStatement", "src": "1161:49:54" }, { "expression": { "id": 25461, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "id": 25457, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25437, "src": "1216:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Request_$25433_memory_ptr", "typeString": "struct Chainlink.Request memory" } }, "id": 25459, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "id", "nodeType": "MemberAccess", "referencedDeclaration": 25423, "src": "1216:7:54", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 25460, "name": "jobId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25439, "src": "1226:5:54", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "src": "1216:15:54", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "id": 25462, "nodeType": "ExpressionStatement", "src": "1216:15:54" }, { "expression": { "id": 25467, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "id": 25463, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25437, "src": "1237:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Request_$25433_memory_ptr", "typeString": "struct Chainlink.Request memory" } }, "id": 25465, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "callbackAddress", "nodeType": "MemberAccess", "referencedDeclaration": 25425, "src": "1237:20:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 25466, "name": "callbackAddr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25441, "src": "1260:12:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1237:35:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 25468, "nodeType": "ExpressionStatement", "src": "1237:35:54" }, { "expression": { "id": 25473, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "id": 25469, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25437, "src": "1278:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Request_$25433_memory_ptr", "typeString": "struct Chainlink.Request memory" } }, "id": 25471, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "callbackFunctionId", "nodeType": "MemberAccess", "referencedDeclaration": 25427, "src": "1278:23:54", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 25472, "name": "callbackFunc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25443, "src": "1304:12:54", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "src": "1278:38:54", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "id": 25474, "nodeType": "ExpressionStatement", "src": "1278:38:54" }, { "expression": { "id": 25475, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25437, "src": "1329:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Request_$25433_memory_ptr", "typeString": "struct Chainlink.Request memory" } }, "functionReturnParameters": 25448, "id": 25476, "nodeType": "Return", "src": "1322:11:54" } ] }, "documentation": { "id": 25434, "nodeType": "StructuredDocumentation", "src": "616:368:54", "text": " @notice Initializes a Chainlink request\n @dev Sets the ID, callback address, and callback function signature on the request\n @param self The uninitialized request\n @param jobId The Job Specification ID\n @param callbackAddr The callback address\n @param callbackFunc The callback function signature\n @return The initialized request" }, "id": 25478, "implemented": true, "kind": "function", "modifiers": [], "name": "initialize", "nameLocation": "996:10:54", "nodeType": "FunctionDefinition", "parameters": { "id": 25444, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25437, "mutability": "mutable", "name": "self", "nameLocation": "1027:4:54", "nodeType": "VariableDeclaration", "scope": 25478, "src": "1012:19:54", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_Request_$25433_memory_ptr", "typeString": "struct Chainlink.Request" }, "typeName": { "id": 25436, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 25435, "name": "Request", "nodeType": "IdentifierPath", "referencedDeclaration": 25433, "src": "1012:7:54" }, "referencedDeclaration": 25433, "src": "1012:7:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Request_$25433_storage_ptr", "typeString": "struct Chainlink.Request" } }, "visibility": "internal" }, { "constant": false, "id": 25439, "mutability": "mutable", "name": "jobId", "nameLocation": "1045:5:54", "nodeType": "VariableDeclaration", "scope": 25478, "src": "1037:13:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25438, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1037:7:54", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 25441, "mutability": "mutable", "name": "callbackAddr", "nameLocation": "1064:12:54", "nodeType": "VariableDeclaration", "scope": 25478, "src": "1056:20:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 25440, "name": "address", "nodeType": "ElementaryTypeName", "src": "1056:7:54", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 25443, "mutability": "mutable", "name": "callbackFunc", "nameLocation": "1089:12:54", "nodeType": "VariableDeclaration", "scope": 25478, "src": "1082:19:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 25442, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "1082:6:54", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "visibility": "internal" } ], "src": "1006:99:54" }, "returnParameters": { "id": 25448, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25447, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 25478, "src": "1129:24:54", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_Request_$25433_memory_ptr", "typeString": "struct Chainlink.Request" }, "typeName": { "id": 25446, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 25445, "name": "Chainlink.Request", "nodeType": "IdentifierPath", "referencedDeclaration": 25433, "src": "1129:17:54" }, "referencedDeclaration": 25433, "src": "1129:17:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Request_$25433_storage_ptr", "typeString": "struct Chainlink.Request" } }, "visibility": "internal" } ], "src": "1128:26:54" }, "scope": 25676, "src": "987:351:54", "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { "body": { "id": 25504, "nodeType": "Block", "src": "1648:98:54", "statements": [ { "expression": { "arguments": [ { "expression": { "id": 25490, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25482, "src": "1675:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Request_$25433_memory_ptr", "typeString": "struct Chainlink.Request memory" } }, "id": 25491, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "buf", "nodeType": "MemberAccess", "referencedDeclaration": 25432, "src": "1675:8:54", "typeDescriptions": { "typeIdentifier": "t_struct$_buffer_$27626_memory_ptr", "typeString": "struct BufferChainlink.buffer memory" } }, { "expression": { "id": 25492, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25484, "src": "1685:4:54", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 25493, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "src": "1685:11:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_buffer_$27626_memory_ptr", "typeString": "struct BufferChainlink.buffer memory" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 25487, "name": "BufferChainlink", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 28140, "src": "1654:15:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_BufferChainlink_$28140_$", "typeString": "type(library BufferChainlink)" } }, "id": 25489, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "init", "nodeType": "MemberAccess", "referencedDeclaration": 27664, "src": "1654:20:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$27626_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$27626_memory_ptr_$", "typeString": "function (struct BufferChainlink.buffer memory,uint256) pure returns (struct BufferChainlink.buffer memory)" } }, "id": 25494, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1654:43:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_buffer_$27626_memory_ptr", "typeString": "struct BufferChainlink.buffer memory" } }, "id": 25495, "nodeType": "ExpressionStatement", "src": "1654:43:54" }, { "expression": { "arguments": [ { "expression": { "id": 25499, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25482, "src": "1726:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Request_$25433_memory_ptr", "typeString": "struct Chainlink.Request memory" } }, "id": 25500, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "buf", "nodeType": "MemberAccess", "referencedDeclaration": 25432, "src": "1726:8:54", "typeDescriptions": { "typeIdentifier": "t_struct$_buffer_$27626_memory_ptr", "typeString": "struct BufferChainlink.buffer memory" } }, { "id": 25501, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25484, "src": "1736:4:54", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_buffer_$27626_memory_ptr", "typeString": "struct BufferChainlink.buffer memory" }, { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "expression": { "id": 25496, "name": "BufferChainlink", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 28140, "src": "1703:15:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_BufferChainlink_$28140_$", "typeString": "type(library BufferChainlink)" } }, "id": 25498, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "append", "nodeType": "MemberAccess", "referencedDeclaration": 27883, "src": "1703:22:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$27626_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_struct$_buffer_$27626_memory_ptr_$", "typeString": "function (struct BufferChainlink.buffer memory,bytes memory) pure returns (struct BufferChainlink.buffer memory)" } }, "id": 25502, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1703:38:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_buffer_$27626_memory_ptr", "typeString": "struct BufferChainlink.buffer memory" } }, "id": 25503, "nodeType": "ExpressionStatement", "src": "1703:38:54" } ] }, "documentation": { "id": 25479, "nodeType": "StructuredDocumentation", "src": "1342:230:54", "text": " @notice Sets the data for the buffer without encoding CBOR on-chain\n @dev CBOR can be closed with curly-brackets {} or they can be left off\n @param self The initialized request\n @param data The CBOR data" }, "id": 25505, "implemented": true, "kind": "function", "modifiers": [], "name": "setBuffer", "nameLocation": "1584:9:54", "nodeType": "FunctionDefinition", "parameters": { "id": 25485, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25482, "mutability": "mutable", "name": "self", "nameLocation": "1609:4:54", "nodeType": "VariableDeclaration", "scope": 25505, "src": "1594:19:54", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_Request_$25433_memory_ptr", "typeString": "struct Chainlink.Request" }, "typeName": { "id": 25481, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 25480, "name": "Request", "nodeType": "IdentifierPath", "referencedDeclaration": 25433, "src": "1594:7:54" }, "referencedDeclaration": 25433, "src": "1594:7:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Request_$25433_storage_ptr", "typeString": "struct Chainlink.Request" } }, "visibility": "internal" }, { "constant": false, "id": 25484, "mutability": "mutable", "name": "data", "nameLocation": "1628:4:54", "nodeType": "VariableDeclaration", "scope": 25505, "src": "1615:17:54", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 25483, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1615:5:54", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "1593:40:54" }, "returnParameters": { "id": 25486, "nodeType": "ParameterList", "parameters": [], "src": "1648:0:54" }, "scope": 25676, "src": "1575:171:54", "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { "body": { "id": 25532, "nodeType": "Block", "src": "2055:71:54", "statements": [ { "expression": { "arguments": [ { "id": 25521, "name": "key", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25511, "src": "2083:3:54", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "expression": { "expression": { "id": 25516, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25509, "src": "2061:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Request_$25433_memory_ptr", "typeString": "struct Chainlink.Request memory" } }, "id": 25519, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "buf", "nodeType": "MemberAccess", "referencedDeclaration": 25432, "src": "2061:8:54", "typeDescriptions": { "typeIdentifier": "t_struct$_buffer_$27626_memory_ptr", "typeString": "struct BufferChainlink.buffer memory" } }, "id": 25520, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "encodeString", "nodeType": "MemberAccess", "referencedDeclaration": 28550, "src": "2061:21:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$27626_memory_ptr_$_t_string_memory_ptr_$returns$__$bound_to$_t_struct$_buffer_$27626_memory_ptr_$", "typeString": "function (struct BufferChainlink.buffer memory,string memory) pure" } }, "id": 25522, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2061:26:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 25523, "nodeType": "ExpressionStatement", "src": "2061:26:54" }, { "expression": { "arguments": [ { "id": 25529, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25513, "src": "2115:5:54", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "expression": { "expression": { "id": 25524, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25509,