@etherisc/gif-contracts
Version:
This repository holds the GIF core contracts and tools to develop, test and deploy GIF instances.
1,211 lines • 355 kB
JSON
{
"abi": [],
"allSourcePaths": {
"62": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.6.0/contracts/src/v0.8/vendor/BufferChainlink.sol"
},
"ast": {
"absolutePath": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.6.0/contracts/src/v0.8/vendor/BufferChainlink.sol",
"exportedSymbols": {
"BufferChainlink": [
28140
]
},
"id": 28141,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 27620,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "32:23:62"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 27621,
"nodeType": "StructuredDocumentation",
"src": "57:383:62",
"text": " @dev A library for working with mutable byte buffers in Solidity.\n Byte buffers are mutable and expandable, and provide a variety of primitives\n for writing to them. At any time you can fetch a bytes object containing the\n current contents of the buffer. The bytes object should not be stored between\n operations, as it may change due to resizing of the buffer."
},
"fullyImplemented": true,
"id": 28140,
"linearizedBaseContracts": [
28140
],
"name": "BufferChainlink",
"nameLocation": "449:15:62",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "BufferChainlink.buffer",
"id": 27626,
"members": [
{
"constant": false,
"id": 27623,
"mutability": "mutable",
"name": "buf",
"nameLocation": "743:3:62",
"nodeType": "VariableDeclaration",
"scope": 27626,
"src": "737:9:62",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 27622,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "737:5:62",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 27625,
"mutability": "mutable",
"name": "capacity",
"nameLocation": "760:8:62",
"nodeType": "VariableDeclaration",
"scope": 27626,
"src": "752:16:62",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 27624,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "752:7:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"name": "buffer",
"nameLocation": "724:6:62",
"nodeType": "StructDefinition",
"scope": 28140,
"src": "717:56:62",
"visibility": "public"
},
{
"body": {
"id": 27663,
"nodeType": "Block",
"src": "1090:310:62",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 27642,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 27640,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 27638,
"name": "capacity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27632,
"src": "1100:8:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"hexValue": "3332",
"id": 27639,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1111:2:62",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "1100:13:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"hexValue": "30",
"id": 27641,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1117:1:62",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1100:18:62",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 27653,
"nodeType": "IfStatement",
"src": "1096:71:62",
"trueBody": {
"id": 27652,
"nodeType": "Block",
"src": "1120:47:62",
"statements": [
{
"expression": {
"id": 27650,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 27643,
"name": "capacity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27632,
"src": "1128:8:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 27649,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3332",
"id": 27644,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1140:2:62",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 27647,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 27645,
"name": "capacity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27632,
"src": "1146:8:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"hexValue": "3332",
"id": 27646,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1157:2:62",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "1146:13:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 27648,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1145:15:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1140:20:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1128:32:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 27651,
"nodeType": "ExpressionStatement",
"src": "1128:32:62"
}
]
}
},
{
"expression": {
"id": 27658,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"id": 27654,
"name": "buf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27630,
"src": "1214:3:62",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_memory_ptr",
"typeString": "struct BufferChainlink.buffer memory"
}
},
"id": 27656,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "capacity",
"nodeType": "MemberAccess",
"referencedDeclaration": 27625,
"src": "1214:12:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 27657,
"name": "capacity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27632,
"src": "1229:8:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1214:23:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 27659,
"nodeType": "ExpressionStatement",
"src": "1214:23:62"
},
{
"AST": {
"nodeType": "YulBlock",
"src": "1252:128:62",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1260:22:62",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1277:4:62",
"type": "",
"value": "0x40"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "1271:5:62"
},
"nodeType": "YulFunctionCall",
"src": "1271:11:62"
},
"variables": [
{
"name": "ptr",
"nodeType": "YulTypedName",
"src": "1264:3:62",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "buf",
"nodeType": "YulIdentifier",
"src": "1296:3:62"
},
{
"name": "ptr",
"nodeType": "YulIdentifier",
"src": "1301:3:62"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1289:6:62"
},
"nodeType": "YulFunctionCall",
"src": "1289:16:62"
},
"nodeType": "YulExpressionStatement",
"src": "1289:16:62"
},
{
"expression": {
"arguments": [
{
"name": "ptr",
"nodeType": "YulIdentifier",
"src": "1319:3:62"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1324:1:62",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1312:6:62"
},
"nodeType": "YulFunctionCall",
"src": "1312:14:62"
},
"nodeType": "YulExpressionStatement",
"src": "1312:14:62"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1340:4:62",
"type": "",
"value": "0x40"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1350:2:62",
"type": "",
"value": "32"
},
{
"arguments": [
{
"name": "ptr",
"nodeType": "YulIdentifier",
"src": "1358:3:62"
},
{
"name": "capacity",
"nodeType": "YulIdentifier",
"src": "1363:8:62"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1354:3:62"
},
"nodeType": "YulFunctionCall",
"src": "1354:18:62"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1346:3:62"
},
"nodeType": "YulFunctionCall",
"src": "1346:27:62"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1333:6:62"
},
"nodeType": "YulFunctionCall",
"src": "1333:41:62"
},
"nodeType": "YulExpressionStatement",
"src": "1333:41:62"
}
]
},
"evmVersion": "istanbul",
"externalReferences": [
{
"declaration": 27630,
"isOffset": false,
"isSlot": false,
"src": "1296:3:62",
"valueSize": 1
},
{
"declaration": 27632,
"isOffset": false,
"isSlot": false,
"src": "1363:8:62",
"valueSize": 1
}
],
"id": 27660,
"nodeType": "InlineAssembly",
"src": "1243:137:62"
},
{
"expression": {
"id": 27661,
"name": "buf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27630,
"src": "1392:3:62",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_memory_ptr",
"typeString": "struct BufferChainlink.buffer memory"
}
},
"functionReturnParameters": 27637,
"id": 27662,
"nodeType": "Return",
"src": "1385:10:62"
}
]
},
"documentation": {
"id": 27627,
"nodeType": "StructuredDocumentation",
"src": "777:221:62",
"text": " @dev Initializes a buffer with an initial capacity.\n @param buf The buffer to initialize.\n @param capacity The number of bytes of space to allocate the buffer.\n @return The buffer, for chaining."
},
"id": 27664,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "init",
"nameLocation": "1010:4:62",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 27633,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 27630,
"mutability": "mutable",
"name": "buf",
"nameLocation": "1029:3:62",
"nodeType": "VariableDeclaration",
"scope": 27664,
"src": "1015:17:62",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_memory_ptr",
"typeString": "struct BufferChainlink.buffer"
},
"typeName": {
"id": 27629,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 27628,
"name": "buffer",
"nodeType": "IdentifierPath",
"referencedDeclaration": 27626,
"src": "1015:6:62"
},
"referencedDeclaration": 27626,
"src": "1015:6:62",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_storage_ptr",
"typeString": "struct BufferChainlink.buffer"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 27632,
"mutability": "mutable",
"name": "capacity",
"nameLocation": "1042:8:62",
"nodeType": "VariableDeclaration",
"scope": 27664,
"src": "1034:16:62",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 27631,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1034:7:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1014:37:62"
},
"returnParameters": {
"id": 27637,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 27636,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 27664,
"src": "1075:13:62",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_memory_ptr",
"typeString": "struct BufferChainlink.buffer"
},
"typeName": {
"id": 27635,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 27634,
"name": "buffer",
"nodeType": "IdentifierPath",
"referencedDeclaration": 27626,
"src": "1075:6:62"
},
"referencedDeclaration": 27626,
"src": "1075:6:62",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_storage_ptr",
"typeString": "struct BufferChainlink.buffer"
}
},
"visibility": "internal"
}
],
"src": "1074:15:62"
},
"scope": 28140,
"src": "1001:399:62",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 27692,
"nodeType": "Block",
"src": "1707:90:62",
"statements": [
{
"assignments": [
27675
],
"declarations": [
{
"constant": false,
"id": 27675,
"mutability": "mutable",
"name": "buf",
"nameLocation": "1727:3:62",
"nodeType": "VariableDeclaration",
"scope": 27692,
"src": "1713:17:62",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_memory_ptr",
"typeString": "struct BufferChainlink.buffer"
},
"typeName": {
"id": 27674,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 27673,
"name": "buffer",
"nodeType": "IdentifierPath",
"referencedDeclaration": 27626,
"src": "1713:6:62"
},
"referencedDeclaration": 27626,
"src": "1713:6:62",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_storage_ptr",
"typeString": "struct BufferChainlink.buffer"
}
},
"visibility": "internal"
}
],
"id": 27676,
"nodeType": "VariableDeclarationStatement",
"src": "1713:17:62"
},
{
"expression": {
"id": 27681,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"id": 27677,
"name": "buf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27675,
"src": "1736:3:62",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_memory_ptr",
"typeString": "struct BufferChainlink.buffer memory"
}
},
"id": 27679,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "buf",
"nodeType": "MemberAccess",
"referencedDeclaration": 27623,
"src": "1736:7:62",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 27680,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27667,
"src": "1746:1:62",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"src": "1736:11:62",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 27682,
"nodeType": "ExpressionStatement",
"src": "1736:11:62"
},
{
"expression": {
"id": 27688,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"id": 27683,
"name": "buf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27675,
"src": "1753:3:62",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_memory_ptr",
"typeString": "struct BufferChainlink.buffer memory"
}
},
"id": 27685,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "capacity",
"nodeType": "MemberAccess",
"referencedDeclaration": 27625,
"src": "1753:12:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 27686,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27667,
"src": "1768:1:62",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 27687,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"src": "1768:8:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1753:23:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 27689,
"nodeType": "ExpressionStatement",
"src": "1753:23:62"
},
{
"expression": {
"id": 27690,
"name": "buf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27675,
"src": "1789:3:62",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_memory_ptr",
"typeString": "struct BufferChainlink.buffer memory"
}
},
"functionReturnParameters": 27672,
"id": 27691,
"nodeType": "Return",
"src": "1782:10:62"
}
]
},
"documentation": {
"id": 27665,
"nodeType": "StructuredDocumentation",
"src": "1404:227:62",
"text": " @dev Initializes a new buffer from an existing bytes object.\n Changes to the buffer may mutate the original value.\n @param b The bytes object to initialize the buffer with.\n @return A new buffer."
},
"id": 27693,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "fromBytes",
"nameLocation": "1643:9:62",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 27668,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 27667,
"mutability": "mutable",
"name": "b",
"nameLocation": "1666:1:62",
"nodeType": "VariableDeclaration",
"scope": 27693,
"src": "1653:14:62",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 27666,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1653:5:62",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "1652:16:62"
},
"returnParameters": {
"id": 27672,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 27671,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 27693,
"src": "1692:13:62",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_memory_ptr",
"typeString": "struct BufferChainlink.buffer"
},
"typeName": {
"id": 27670,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 27669,
"name": "buffer",
"nodeType": "IdentifierPath",
"referencedDeclaration": 27626,
"src": "1692:6:62"
},
"referencedDeclaration": 27626,
"src": "1692:6:62",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_storage_ptr",
"typeString": "struct BufferChainlink.buffer"
}
},
"visibility": "internal"
}
],
"src": "1691:15:62"
},
"scope": 28140,
"src": "1634:163:62",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 27716,
"nodeType": "Block",
"src": "1867:90:62",
"statements": [
{
"assignments": [
27702
],
"declarations": [
{
"constant": false,
"id": 27702,
"mutability": "mutable",
"name": "oldbuf",
"nameLocation": "1886:6:62",
"nodeType": "VariableDeclaration",
"scope": 27716,
"src": "1873:19:62",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 27701,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1873:5:62",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 27705,
"initialValue": {
"expression": {
"id": 27703,
"name": "buf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27696,
"src": "1895:3:62",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_memory_ptr",
"typeString": "struct BufferChainlink.buffer memory"
}
},
"id": 27704,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "buf",
"nodeType": "MemberAccess",
"referencedDeclaration": 27623,
"src": "1895:7:62",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1873:29:62"
},
{
"expression": {
"arguments": [
{
"id": 27707,
"name": "buf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27696,
"src": "1913:3:62",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_memory_ptr",
"typeString": "struct BufferChainlink.buffer memory"
}
},
{
"id": 27708,
"name": "capacity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27698,
"src": "1918:8:62",
"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"
}
],
"id": 27706,
"name": "init",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27664,
"src": "1908:4:62",
"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": 27709,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1908:19:62",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_memory_ptr",
"typeString": "struct BufferChainlink.buffer memory"
}
},
"id": 27710,
"nodeType": "ExpressionStatement",
"src": "1908:19:62"
},
{
"expression": {
"arguments": [
{
"id": 27712,
"name": "buf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27696,
"src": "1940:3:62",
"typeDescriptions": {
"typeIdentifier": "t_struct$_buffer_$27626_memory_ptr",
"typeString": "struct BufferChainlink.buffer memory"
}
},
{
"id": 27713,
"name": "oldbuf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27702,
"src": "1945:6:62",
"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"
}
],
"id": 27711,
"name": "append",
"nodeType": "Identifier",
"overloadedDeclarations": [
27860,
27883
],
"referencedDeclaration": 27883,
"src": "1933:6:62",
"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": 27714,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1933:19:62",
"tryCall": false