descent-js
Version:
A Typescript library for interacting with the Descent Protocol
1,016 lines (1,015 loc) • 52.9 kB
JavaScript
// src/contracts/abis/MultiStaticcall.json
var abi = [
{
inputs: [
{
components: [
{
internalType: "address",
name: "target",
type: "address"
},
{
internalType: "bytes",
name: "callData",
type: "bytes"
}
],
internalType: "struct MultiStaticcall.Staticcall[]",
name: "staticcalls",
type: "tuple[]"
}
],
name: "multiStaticcall",
outputs: [
{
components: [
{
internalType: "bytes",
name: "returnDatum",
type: "bytes"
},
{
internalType: "bool",
name: "success",
type: "bool"
}
],
internalType: "struct MultiStaticcall.ReturnDatum[]",
name: "returnData",
type: "tuple[]"
}
],
stateMutability: "view",
type: "function"
}
];
var bytecode = {
object: "0x608060405234801561001057600080fd5b506104a7806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e719c88814610030575b600080fd5b61004361003e3660046101b3565b610059565b604051610050919061024c565b60405180910390f35b60608167ffffffffffffffff811115610074576100746102d8565b6040519080825280602002602001820160405280156100ba57816020015b6040805180820190915260608152600060208201528152602001906001900390816100925790505b50905060005b828110156101ac5760408051808201909152606081526000602082015260008585848181106100f1576100f16102ee565b90506020028101906101039190610304565b61010c9061037e565b905080600001516001600160a01b0316816020015160405161012e9190610438565b600060405180830381855afa9150503d8060008114610169576040519150601f19603f3d011682016040523d82523d6000602084013e61016e565b606091505b508352151560208301528351829085908590811061018e5761018e6102ee565b60200260200101819052505050806101a59061044a565b90506100c0565b5092915050565b600080602083850312156101c657600080fd5b823567ffffffffffffffff808211156101de57600080fd5b818501915085601f8301126101f257600080fd5b81358181111561020157600080fd5b8660208260051b850101111561021657600080fd5b60209290920196919550909350505050565b60005b8381101561024357818101518382015260200161022b565b50506000910152565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b838110156102ca57603f19898403018552815180518785528051808987015260606102a3828289018d8601610228565b928a01511515868b015296890196601f01601f191690940101925090860190600101610273565b509098975050505050505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008235603e1983360301811261031a57600080fd5b9190910192915050565b6040805190810167ffffffffffffffff81118282101715610347576103476102d8565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610376576103766102d8565b604052919050565b60006040823603121561039057600080fd5b610398610324565b82356001600160a01b03811681146103af57600080fd5b815260208381013567ffffffffffffffff808211156103cd57600080fd5b9085019036601f8301126103e057600080fd5b8135818111156103f2576103f26102d8565b610404601f8201601f1916850161034d565b9150808252368482850101111561041a57600080fd5b80848401858401376000908201840152918301919091525092915050565b6000825161031a818460208701610228565b60006001820161046a57634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220acd7d21b3cf7b720dd7521008e15170ad0bbb5e6f137ebce924a89b04a61c50a64736f6c63430008150033",
sourceMap: "58:727:44:-:0;;;;;;;;;;;;;;;;;;;",
linkReferences: {}
};
var deployedBytecode = {
object: "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e719c88814610030575b600080fd5b61004361003e3660046101b3565b610059565b604051610050919061024c565b60405180910390f35b60608167ffffffffffffffff811115610074576100746102d8565b6040519080825280602002602001820160405280156100ba57816020015b6040805180820190915260608152600060208201528152602001906001900390816100925790505b50905060005b828110156101ac5760408051808201909152606081526000602082015260008585848181106100f1576100f16102ee565b90506020028101906101039190610304565b61010c9061037e565b905080600001516001600160a01b0316816020015160405161012e9190610438565b600060405180830381855afa9150503d8060008114610169576040519150601f19603f3d011682016040523d82523d6000602084013e61016e565b606091505b508352151560208301528351829085908590811061018e5761018e6102ee565b60200260200101819052505050806101a59061044a565b90506100c0565b5092915050565b600080602083850312156101c657600080fd5b823567ffffffffffffffff808211156101de57600080fd5b818501915085601f8301126101f257600080fd5b81358181111561020157600080fd5b8660208260051b850101111561021657600080fd5b60209290920196919550909350505050565b60005b8381101561024357818101518382015260200161022b565b50506000910152565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b838110156102ca57603f19898403018552815180518785528051808987015260606102a3828289018d8601610228565b928a01511515868b015296890196601f01601f191690940101925090860190600101610273565b509098975050505050505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008235603e1983360301811261031a57600080fd5b9190910192915050565b6040805190810167ffffffffffffffff81118282101715610347576103476102d8565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610376576103766102d8565b604052919050565b60006040823603121561039057600080fd5b610398610324565b82356001600160a01b03811681146103af57600080fd5b815260208381013567ffffffffffffffff808211156103cd57600080fd5b9085019036601f8301126103e057600080fd5b8135818111156103f2576103f26102d8565b610404601f8201601f1916850161034d565b9150808252368482850101111561041a57600080fd5b80848401858401376000908201840152918301919091525092915050565b6000825161031a818460208701610228565b60006001820161046a57634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220acd7d21b3cf7b720dd7521008e15170ad0bbb5e6f137ebce924a89b04a61c50a64736f6c63430008150033",
sourceMap: "58:727:44:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;249:534;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;356:31;434:11;416:37;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;416:37:44;;;;;;;;;;;;;;;;403:50;;469:9;464:313;480:22;;;464:313;;;-1:-1:-1;;;;;;;;;;;;;;;;;567:28:44;598:11;;610:1;598:14;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;567:45;;;:::i;:::-;;;675:10;:17;;;-1:-1:-1;;;;;675:28:44;704:10;:19;;;675:49;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;626:98:44;;;;627:19;;;626:98;739:13;;627:11;;739:10;;750:1;;739:13;;;;;;:::i;:::-;;;;;;:27;;;;509:268;;504:3;;;;:::i;:::-;;;464:313;;;;249:534;;;;:::o;14:646:47:-;131:6;139;192:2;180:9;171:7;167:23;163:32;160:52;;;208:1;205;198:12;160:52;248:9;235:23;277:18;318:2;310:6;307:14;304:34;;;334:1;331;324:12;304:34;372:6;361:9;357:22;347:32;;417:7;410:4;406:2;402:13;398:27;388:55;;439:1;436;429:12;388:55;479:2;466:16;505:2;497:6;494:14;491:34;;;521:1;518;511:12;491:34;574:7;569:2;559:6;556:1;552:14;548:2;544:23;540:32;537:45;534:65;;;595:1;592;585:12;534:65;626:2;618:11;;;;;648:6;;-1:-1:-1;14:646:47;;-1:-1:-1;;;;14:646:47:o;665:250::-;750:1;760:113;774:6;771:1;768:13;760:113;;;850:11;;;844:18;831:11;;;824:39;796:2;789:10;760:113;;;-1:-1:-1;;907:1:47;889:16;;882:27;665:250::o;920:1274::-;1122:4;1151:2;1191;1180:9;1176:18;1221:2;1210:9;1203:21;1244:6;1279;1273:13;1310:6;1302;1295:22;1336:2;1326:12;;1369:2;1358:9;1354:18;1347:25;;1431:2;1421:6;1418:1;1414:14;1403:9;1399:30;1395:39;1469:2;1461:6;1457:15;1490:1;1500:665;1514:6;1511:1;1508:13;1500:665;;;1607:2;1603:7;1591:9;1583:6;1579:22;1575:36;1570:3;1563:49;1641:6;1635:13;1687:2;1681:9;1718:2;1710:6;1703:18;1756:12;1750:19;1806:8;1801:2;1793:6;1789:15;1782:33;1838:2;1853:84;1928:8;1923:2;1915:6;1911:15;1906:2;1892:12;1888:21;1853:84;:::i;:::-;1994:11;;;1988:18;1981:26;1974:34;1957:15;;;1950:59;2143:12;;;;2075:2;2052:17;-1:-1:-1;;2048:31:47;2036:44;;;2032:53;;-1:-1:-1;2108:15:47;;;;1536:1;1529:9;1500:665;;;-1:-1:-1;2182:6:47;;920:1274;-1:-1:-1;;;;;;;;920:1274:47:o;2199:127::-;2260:10;2255:3;2251:20;2248:1;2241:31;2291:4;2288:1;2281:15;2315:4;2312:1;2305:15;2331:127;2392:10;2387:3;2383:20;2380:1;2373:31;2423:4;2420:1;2413:15;2447:4;2444:1;2437:15;2463:328;2560:4;2618:11;2605:25;2712:2;2708:7;2697:8;2681:14;2677:29;2673:43;2653:18;2649:68;2639:96;;2731:1;2728;2721:12;2639:96;2752:33;;;;;2463:328;-1:-1:-1;;2463:328:47:o;2796:257::-;2868:4;2862:11;;;2900:17;;2947:18;2932:34;;2968:22;;;2929:62;2926:88;;;2994:18;;:::i;:::-;3030:4;3023:24;2796:257;:::o;3058:275::-;3129:2;3123:9;3194:2;3175:13;;-1:-1:-1;;3171:27:47;3159:40;;3229:18;3214:34;;3250:22;;;3211:62;3208:88;;;3276:18;;:::i;:::-;3312:2;3305:22;3058:275;;-1:-1:-1;3058:275:47:o;3338:1078::-;3448:9;3507:4;3499:5;3483:14;3479:26;3475:37;3472:57;;;3525:1;3522;3515:12;3472:57;3553:22;;:::i;:::-;3599:19;;-1:-1:-1;;;;;3649:33:47;;3637:46;;3627:74;;3697:1;3694;3687:12;3627:74;3710:24;;3753:2;3791:14;;;3778:28;3825:18;3855:14;;;3852:34;;;3882:1;3879;3872:12;3852:34;3905:18;;;;3961:14;3954:4;3946:13;;3942:34;3932:62;;3990:1;3987;3980:12;3932:62;4026:2;4013:16;4048:2;4044;4041:10;4038:36;;;4054:18;;:::i;:::-;4096:53;4139:2;4120:13;;-1:-1:-1;;4116:27:47;4112:36;;4096:53;:::i;:::-;4083:66;;4172:2;4165:5;4158:17;4212:14;4207:2;4202;4198;4194:11;4190:20;4187:40;4184:60;;;4240:1;4237;4230:12;4184:60;4295:2;4290;4286;4282:11;4277:2;4270:5;4266:14;4253:45;4339:1;4318:14;;;4314:23;;4307:34;4357:16;;;4350:31;;;;-1:-1:-1;4361:7:47;3338:1078;-1:-1:-1;;3338:1078:47:o;4421:287::-;4550:3;4588:6;4582:13;4604:66;4663:6;4658:3;4651:4;4643:6;4639:17;4604:66;:::i;4713:232::-;4752:3;4773:17;;;4770:140;;4832:10;4827:3;4823:20;4820:1;4813:31;4867:4;4864:1;4857:15;4895:4;4892:1;4885:15;4770:140;-1:-1:-1;4937:1:47;4926:13;;4713:232::o",
linkReferences: {}
};
var methodIdentifiers = {
"multiStaticcall((address,bytes)[])": "e719c888"
};
var rawMetadata = '{"compiler":{"version":"0.8.21+commit.d9974bed"},"language":"Solidity","output":{"abi":[{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct MultiStaticcall.Staticcall[]","name":"staticcalls","type":"tuple[]"}],"name":"multiStaticcall","outputs":[{"components":[{"internalType":"bytes","name":"returnDatum","type":"bytes"},{"internalType":"bool","name":"success","type":"bool"}],"internalType":"struct MultiStaticcall.ReturnDatum[]","name":"returnData","type":"tuple[]"}],"stateMutability":"view","type":"function"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"src/multiStaticcall.sol":"MultiStaticcall"},"evmVersion":"paris","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":200},"remappings":[":@openzeppelin/=lib/protocol-core/lib/openzeppelin-contracts/",":@openzeppelin/contracts/=lib/protocol-core/lib/openzeppelin-contracts/contracts/",":descent-collective/protocol-core/=lib/protocol-core/src/",":ds-test/=lib/forge-std/lib/ds-test/src/",":erc4626-tests/=lib/protocol-core/lib/openzeppelin-contracts/lib/erc4626-tests/",":forge-std/=lib/forge-std/src/",":openzeppelin-contracts/=lib/protocol-core/lib/openzeppelin-contracts/",":protocol-core/=lib/protocol-core/"]},"sources":{"src/multiStaticcall.sol":{"keccak256":"0xd8bfab36326122e209b9a96514a941eb5eb402d3e43c557d3fd6123848191064","license":"MIT","urls":["bzz-raw://3ec868ef53ed40b0dc2682ee70cdbdeb4f79142c200451ca21b09d4dafb4f74c","dweb:/ipfs/QmXDtKe1BCKrzRX4GD9o57jn7bG1NnmygN97ehEHNpdB8Y"]}},"version":1}';
var metadata = {
compiler: {
version: "0.8.21+commit.d9974bed"
},
language: "Solidity",
output: {
abi: [
{
inputs: [
{
internalType: "struct MultiStaticcall.Staticcall[]",
name: "staticcalls",
type: "tuple[]",
components: [
{
internalType: "address",
name: "target",
type: "address"
},
{
internalType: "bytes",
name: "callData",
type: "bytes"
}
]
}
],
stateMutability: "view",
type: "function",
name: "multiStaticcall",
outputs: [
{
internalType: "struct MultiStaticcall.ReturnDatum[]",
name: "returnData",
type: "tuple[]",
components: [
{
internalType: "bytes",
name: "returnDatum",
type: "bytes"
},
{
internalType: "bool",
name: "success",
type: "bool"
}
]
}
]
}
],
devdoc: {
kind: "dev",
methods: {},
version: 1
},
userdoc: {
kind: "user",
methods: {},
version: 1
}
},
settings: {
remappings: [
"@openzeppelin/=lib/protocol-core/lib/openzeppelin-contracts/",
"@openzeppelin/contracts/=lib/protocol-core/lib/openzeppelin-contracts/contracts/",
"descent-collective/protocol-core/=lib/protocol-core/src/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/protocol-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"openzeppelin-contracts/=lib/protocol-core/lib/openzeppelin-contracts/",
"protocol-core/=lib/protocol-core/"
],
optimizer: {
enabled: true,
runs: 200
},
metadata: {
bytecodeHash: "ipfs"
},
compilationTarget: {
"src/multiStaticcall.sol": "MultiStaticcall"
},
libraries: {}
},
sources: {
"src/multiStaticcall.sol": {
keccak256: "0xd8bfab36326122e209b9a96514a941eb5eb402d3e43c557d3fd6123848191064",
urls: [
"bzz-raw://3ec868ef53ed40b0dc2682ee70cdbdeb4f79142c200451ca21b09d4dafb4f74c",
"dweb:/ipfs/QmXDtKe1BCKrzRX4GD9o57jn7bG1NnmygN97ehEHNpdB8Y"
],
license: "MIT"
}
},
version: 1
};
var ast = {
absolutePath: "src/multiStaticcall.sol",
id: 46091,
exportedSymbols: {
MultiStaticcall: [46090]
},
nodeType: "SourceUnit",
src: "33:753:44",
nodes: [
{
id: 46014,
nodeType: "PragmaDirective",
src: "33:23:44",
nodes: [],
literals: ["solidity", "0.8", ".21"]
},
{
id: 46090,
nodeType: "ContractDefinition",
src: "58:727:44",
nodes: [
{
id: 46019,
nodeType: "StructDefinition",
src: "89:73:44",
nodes: [],
canonicalName: "MultiStaticcall.Staticcall",
members: [
{
constant: false,
id: 46016,
mutability: "mutable",
name: "target",
nameLocation: "125:6:44",
nodeType: "VariableDeclaration",
scope: 46019,
src: "117:14:44",
stateVariable: false,
storageLocation: "default",
typeDescriptions: {
typeIdentifier: "t_address",
typeString: "address"
},
typeName: {
id: 46015,
name: "address",
nodeType: "ElementaryTypeName",
src: "117:7:44",
stateMutability: "nonpayable",
typeDescriptions: {
typeIdentifier: "t_address",
typeString: "address"
}
},
visibility: "internal"
},
{
constant: false,
id: 46018,
mutability: "mutable",
name: "callData",
nameLocation: "147:8:44",
nodeType: "VariableDeclaration",
scope: 46019,
src: "141:14:44",
stateVariable: false,
storageLocation: "default",
typeDescriptions: {
typeIdentifier: "t_bytes_storage_ptr",
typeString: "bytes"
},
typeName: {
id: 46017,
name: "bytes",
nodeType: "ElementaryTypeName",
src: "141:5:44",
typeDescriptions: {
typeIdentifier: "t_bytes_storage_ptr",
typeString: "bytes"
}
},
visibility: "internal"
}
],
name: "Staticcall",
nameLocation: "96:10:44",
scope: 46090,
visibility: "public"
},
{
id: 46024,
nodeType: "StructDefinition",
src: "168:75:44",
nodes: [],
canonicalName: "MultiStaticcall.ReturnDatum",
members: [
{
constant: false,
id: 46021,
mutability: "mutable",
name: "returnDatum",
nameLocation: "203:11:44",
nodeType: "VariableDeclaration",
scope: 46024,
src: "197:17:44",
stateVariable: false,
storageLocation: "default",
typeDescriptions: {
typeIdentifier: "t_bytes_storage_ptr",
typeString: "bytes"
},
typeName: {
id: 46020,
name: "bytes",
nodeType: "ElementaryTypeName",
src: "197:5:44",
typeDescriptions: {
typeIdentifier: "t_bytes_storage_ptr",
typeString: "bytes"
}
},
visibility: "internal"
},
{
constant: false,
id: 46023,
mutability: "mutable",
name: "success",
nameLocation: "229:7:44",
nodeType: "VariableDeclaration",
scope: 46024,
src: "224:12:44",
stateVariable: false,
storageLocation: "default",
typeDescriptions: {
typeIdentifier: "t_bool",
typeString: "bool"
},
typeName: {
id: 46022,
name: "bool",
nodeType: "ElementaryTypeName",
src: "224:4:44",
typeDescriptions: {
typeIdentifier: "t_bool",
typeString: "bool"
}
},
visibility: "internal"
}
],
name: "ReturnDatum",
nameLocation: "175:11:44",
scope: 46090,
visibility: "public"
},
{
id: 46089,
nodeType: "FunctionDefinition",
src: "249:534:44",
nodes: [],
body: {
id: 46088,
nodeType: "Block",
src: "393:390:44",
nodes: [],
statements: [
{
expression: {
id: 46043,
isConstant: false,
isLValue: false,
isPure: false,
lValueRequested: false,
leftHandSide: {
id: 46035,
name: "returnData",
nodeType: "Identifier",
overloadedDeclarations: [],
referencedDeclaration: 46033,
src: "403:10:44",
typeDescriptions: {
typeIdentifier: "t_array$_t_struct$_ReturnDatum_$46024_memory_ptr_$dyn_memory_ptr",
typeString: "struct MultiStaticcall.ReturnDatum memory[] memory"
}
},
nodeType: "Assignment",
operator: "=",
rightHandSide: {
arguments: [
{
expression: {
id: 46040,
name: "staticcalls",
nodeType: "Identifier",
overloadedDeclarations: [],
referencedDeclaration: 46028,
src: "434:11:44",
typeDescriptions: {
typeIdentifier: "t_array$_t_struct$_Staticcall_$46019_calldata_ptr_$dyn_calldata_ptr",
typeString: "struct MultiStaticcall.Staticcall calldata[] calldata"
}
},
id: 46041,
isConstant: false,
isLValue: false,
isPure: false,
lValueRequested: false,
memberLocation: "446:6:44",
memberName: "length",
nodeType: "MemberAccess",
src: "434:18:44",
typeDescriptions: {
typeIdentifier: "t_uint256",
typeString: "uint256"
}
}
],
expression: {
argumentTypes: [
{
typeIdentifier: "t_uint256",
typeString: "uint256"
}
],
id: 46039,
isConstant: false,
isLValue: false,
isPure: true,
lValueRequested: false,
nodeType: "NewExpression",
src: "416:17:44",
typeDescriptions: {
typeIdentifier: "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_ReturnDatum_$46024_memory_ptr_$dyn_memory_ptr_$",
typeString: "function (uint256) pure returns (struct MultiStaticcall.ReturnDatum memory[] memory)"
},
typeName: {
baseType: {
id: 46037,
nodeType: "UserDefinedTypeName",
pathNode: {
id: 46036,
name: "ReturnDatum",
nameLocations: ["420:11:44"],
nodeType: "IdentifierPath",
referencedDeclaration: 46024,
src: "420:11:44"
},
referencedDeclaration: 46024,
src: "420:11:44",
typeDescriptions: {
typeIdentifier: "t_struct$_ReturnDatum_$46024_storage_ptr",
typeString: "struct MultiStaticcall.ReturnDatum"
}
},
id: 46038,
nodeType: "ArrayTypeName",
src: "420:13:44",
typeDescriptions: {
typeIdentifier: "t_array$_t_struct$_ReturnDatum_$46024_storage_$dyn_storage_ptr",
typeString: "struct MultiStaticcall.ReturnDatum[]"
}
}
},
id: 46042,
isConstant: false,
isLValue: false,
isPure: false,
kind: "functionCall",
lValueRequested: false,
nameLocations: [],
names: [],
nodeType: "FunctionCall",
src: "416:37:44",
tryCall: false,
typeDescriptions: {
typeIdentifier: "t_array$_t_struct$_ReturnDatum_$46024_memory_ptr_$dyn_memory_ptr",
typeString: "struct MultiStaticcall.ReturnDatum memory[] memory"
}
},
src: "403:50:44",
typeDescriptions: {
typeIdentifier: "t_array$_t_struct$_ReturnDatum_$46024_memory_ptr_$dyn_memory_ptr",
typeString: "struct MultiStaticcall.ReturnDatum memory[] memory"
}
},
id: 46044,
nodeType: "ExpressionStatement",
src: "403:50:44"
},
{
body: {
id: 46086,
nodeType: "Block",
src: "509:268:44",
statements: [
{
assignments: [46057],
declarations: [
{
constant: false,
id: 46057,
mutability: "mutable",
name: "returnDatum",
nameLocation: "542:11:44",
nodeType: "VariableDeclaration",
scope: 46086,
src: "523:30:44",
stateVariable: false,
storageLocation: "memory",
typeDescriptions: {
typeIdentifier: "t_struct$_ReturnDatum_$46024_memory_ptr",
typeString: "struct MultiStaticcall.ReturnDatum"
},
typeName: {
id: 46056,
nodeType: "UserDefinedTypeName",
pathNode: {
id: 46055,
name: "ReturnDatum",
nameLocations: ["523:11:44"],
nodeType: "IdentifierPath",
referencedDeclaration: 46024,
src: "523:11:44"
},
referencedDeclaration: 46024,
src: "523:11:44",
typeDescriptions: {
typeIdentifier: "t_struct$_ReturnDatum_$46024_storage_ptr",
typeString: "struct MultiStaticcall.ReturnDatum"
}
},
visibility: "internal"
}
],
id: 46058,
nodeType: "VariableDeclarationStatement",
src: "523:30:44"
},
{
assignments: [46061],
declarations: [
{
constant: false,
id: 46061,
mutability: "mutable",
name: "staticcall",
nameLocation: "585:10:44",
nodeType: "VariableDeclaration",
scope: 46086,
src: "567:28:44",
stateVariable: false,
storageLocation: "memory",
typeDescriptions: {
typeIdentifier: "t_struct$_Staticcall_$46019_memory_ptr",
typeString: "struct MultiStaticcall.Staticcall"
},
typeName: {
id: 46060,
nodeType: "UserDefinedTypeName",
pathNode: {
id: 46059,
name: "Staticcall",
nameLocations: ["567:10:44"],
nodeType: "IdentifierPath",
referencedDeclaration: 46019,
src: "567:10:44"
},
referencedDeclaration: 46019,
src: "567:10:44",
typeDescriptions: {
typeIdentifier: "t_struct$_Staticcall_$46019_storage_ptr",
typeString: "struct MultiStaticcall.Staticcall"
}
},
visibility: "internal"
}
],
id: 46065,
initialValue: {
baseExpression: {
id: 46062,
name: "staticcalls",
nodeType: "Identifier",
overloadedDeclarations: [],
referencedDeclaration: 46028,
src: "598:11:44",
typeDescriptions: {
typeIdentifier: "t_array$_t_struct$_Staticcall_$46019_calldata_ptr_$dyn_calldata_ptr",
typeString: "struct MultiStaticcall.Staticcall calldata[] calldata"
}
},
id: 46064,
indexExpression: {
id: 46063,
name: "i",
nodeType: "Identifier",
overloadedDeclarations: [],
referencedDeclaration: 46046,
src: "610:1:44",
typeDescriptions: {
typeIdentifier: "t_uint256",
typeString: "uint256"
}
},
isConstant: false,
isLValue: false,
isPure: false,
lValueRequested: false,
nodeType: "IndexAccess",
src: "598:14:44",
typeDescriptions: {
typeIdentifier: "t_struct$_Staticcall_$46019_calldata_ptr",
typeString: "struct MultiStaticcall.Staticcall calldata"
}
},
nodeType: "VariableDeclarationStatement",
src: "567:45:44"
},
{
expression: {
id: 46078,
isConstant: false,
isLValue: false,
isPure: false,
lValueRequested: false,
leftHandSide: {
components: [
{
expression: {
id: 46066,
name: "returnDatum",
nodeType: "Identifier",
overloadedDeclarations: [],
referencedDeclaration: 46057,
src: "627:11:44",
typeDescriptions: {
typeIdentifier: "t_struct$_ReturnDatum_$46024_memory_ptr",
typeString: "struct MultiStaticcall.ReturnDatum memory"
}
},
id: 46068,
isConstant: false,
isLValue: true,
isPure: false,
lValueRequested: true,
memberLocation: "639:7:44",
memberName: "success",
nodeType: "MemberAccess",
referencedDeclaration: 46023,
src: "627:19:44",
typeDescriptions: {
typeIdentifier: "t_bool",
typeString: "bool"
}
},
{
expression: {
id: 46069,
name: "returnDatum",
nodeType: "Identifier",
overloadedDeclarations: [],
referencedDeclaration: 46057,
src: "648:11:44",
typeDescriptions: {
typeIdentifier: "t_struct$_ReturnDatum_$46024_memory_ptr",
typeString: "struct MultiStaticcall.ReturnDatum memory"
}
},
id: 46070,
isConstant: false,
isLValue: true,
isPure: false,
lValueRequested: true,
memberLocation: "660:11:44",
memberName: "returnDatum",
nodeType: "MemberAccess",
referencedDeclaration: 46021,
src: "648:23:44",
typeDescriptions: {
typeIdentifier: "t_bytes_memory_ptr",
typeString: "bytes memory"
}
}
],
id: 46071,
isConstant: false,
isInlineArray: false,
isLValue: true,
isPure: false,
lValueRequested: true,
nodeType: "TupleExpression",
src: "626:46:44",
typeDescriptions: {
typeIdentifier: "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
typeString: "tuple(bool,bytes memory)"
}
},
nodeType: "Assignment",
operator: "=",
rightHandSide: {
arguments: [
{
expression: {
id: 46075,
name: "staticcall",
nodeType: "Identifier",
overloadedDeclarations: [],
referencedDeclaration: 46061,
src: "704:10:44",
typeDescriptions: {
typeIdentifier: "t_struct$_Staticcall_$46019_memory_ptr",
typeString: "struct MultiStaticcall.Staticcall memory"
}
},
id: 46076,
isConstant: false,
isLValue: true,
isPure: false,
lValueRequested: false,
memberLocation: "715:8:44",
memberName: "callData",
nodeType: "MemberAccess",
referencedDeclaration: 46018,
src: "704:19:44",
typeDescriptions: {
typeIdentifier: "t_bytes_memory_ptr",
typeString: "bytes memory"
}
}
],
expression: {
argumentTypes: [
{
typeIdentifier: "t_bytes_memory_ptr",
typeString: "bytes memory"
}
],
expression: {
expression: {
id: 46072,
name: "staticcall",
nodeType: "Identifier",
overloadedDeclarations: [],
referencedDeclaration: 46061,
src: "675:10:44",
typeDescriptions: {
typeIdentifier: "t_struct$_Staticcall_$46019_memory_ptr",
typeString: "struct MultiStaticcall.Staticcall memory"
}
},
id: 46073,
isConstant: false,
isLValue: true,
isPure: false,
lValueRequested: false,
memberLocation: "686:6:44",
memberName: "target",
nodeType: "MemberAccess",
referencedDeclaration: 46016,
src: "675:17:44",
typeDescriptions: {
typeIdentifier: "t_address",
typeString: "address"
}
},
id: 46074,
isConstant: false,
isLValue: false,
isPure: false,
lValueRequested: false,
memberLocation: "693:10:44",
memberName: "staticcall",
nodeType: "MemberAccess",
src: "675:28:44",
typeDescriptions: {
typeIdentifier: "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
typeString: "function (bytes memory) view returns (bool,bytes memory)"
}
},
id: 46077,
isConstant: false,
isLValue: false,
isPure: false,
kind: "functionCall",
lValueRequested: false,
nameLocations: [],
names: [],
nodeType: "FunctionCall",
src: "675:49:44",
tryCall: false,
typeDescriptions: {
typeIdentifier: "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
typeString: "tuple(bool,bytes memory)"
}
},
src: "626:98:44",
typeDescriptions: {
typeIdentifier: "t_tuple$__$",
typeString: "tuple()"
}
},
id: 46079,
nodeType: "ExpressionStatement",
src: "626:98:44"
},
{
expression: {
id: 46084,
isConstant: false,
isLValue: false,
isPure: false,
lValueRequested: false,
leftHandSide: {
baseExpression: {
id: 46080,
name: "returnData",
nodeType: "Identifier",
overloadedDeclarations: [],
referencedDeclaration: 46033,
src: "739:10:44",
typeDescriptions: {
typeIdentifier: "t_array$_t_struct$_ReturnDatum_$46024_memory_ptr_$dyn_memory_ptr",
typeString: "struct MultiStaticcall.ReturnDatum memory[] memory"
}
},
id: 46082,
indexExpression: {
id: 46081,
name: "i",
nodeType: "Identifier",
overloadedDeclarations: [],
referencedDeclaration: 46046,
src: "750:1:44",
typeDescriptions: {
typeIdentifier: "t_uint256",
typeString: "uint256"
}
},
isConstant: false,
isLValue: true,
isPure: false,
lValueRequested: true,
nodeType: "IndexAccess",
src: "739:13:44",
typeDescriptions: {
typeIdentifier: "t_struct$_ReturnDatum_$46024_memory_ptr",
typeString: "struct MultiStaticcall.ReturnDatum memory"
}
},
nodeType: "Assignment",
operator: "=",
rightHandSide: {
id: 46083,
name: "returnDatum",
nodeType: "Identifier",
overloadedDeclarations: [],
referencedDeclaration: 46057,
src: "755:11:44",
typeDescriptions: {
typeIdentifier: "t_struct$_ReturnDatum_$46024_memory_ptr",
typeString: "struct MultiStaticcall.ReturnDatum memory"
}
},
src: "739:27:44",
typeDescriptions: {
typeIdentifier: "t_struct$_ReturnDatum_$46024_memory_ptr",
typeString: "struct MultiStaticcall.ReturnDatum memory"
}
},
id: 46085,
nodeType: "ExpressionStatement",
src: "739:27:44"
}
]
},
condition: {
commonType: {
typeIdentifier: "t_uint256",
typeString: "uint256"
},
id: 46051,
isConstant: false,
isLValue: false,
isPure: false,
lValueRequested: false,
leftExpression: {
id: 46048,
name: "i",
nodeType: "Identifier",
overloadedDeclarations: [],
referencedDeclaration: 46046,
src: "480:1:44",
typeDescriptions: {
typeIdentifier: "t_uint256",
typeString: "uint256"
}
},
nodeType: "BinaryOperation",
operator: "<",
rightExpression: {
expression: {
id: 46049,
name: "staticcalls",
nodeType: "Identifier",
overloadedDeclarations: [],
referencedDeclaration: 46028,
src: "484:11:44",
typeDescriptions: {
typeIdentifier: "t_array$_t_struct$_Staticcall_$46019_calldata_ptr_$dyn_calldata_ptr",
typeString: "struct MultiStaticcall.Staticcall calldata[] calldata"
}
},
id: 46050,
isConstant: false,
isLValue: false,
isPure: false,
lValueRequested: false,
memberLocation: "496:6:44",
memberName: "length",
nodeType: "MemberAccess",
src: "484:18:44",
typeDescriptions: {
typeIdentifier: "t_uint256",
typeString: "uint256"
}
},
src: "480:22:44",
typeDescriptions: {
typeIdentifier: "t_bool",
typeString: "bool"
}
},
id: 46087,
initializationExpression: {
assignments: [46046],
declarations: [
{
constant: false,
id: 46046,
mutability: "mutable",
name: "i",
nameLocation: "477:1:44",
nodeType: "VariableDeclaration",
scope: 46087,
src: "469:9:44",
stateVariable: false,
storageLocation: "default",
typeDescriptions: {
typeIdentifier: "t_uint256",
typeString: "uint256"
},
typeName: {
id: 46045,
name: "uint256",
nodeType: "ElementaryTypeName",
src: "469:7:44",
typeDescriptions: {
typeIdentifier: "t_uint256",
typeString: "uint256"
}
},
visibility: "internal"
}
],
id: 46047,
nodeType: "VariableDeclarationStatement",
src: "469:9:44"
},
loopExpression: {
expression: {
id: 46053,
isConstant: false,
isLValue: false,
isPure: false,
lValueRequested: false,
nodeType: "UnaryOperation",
operator: "++",
prefix: true,
src: "504:3:44",
subExpression: {
id: 46052,
name: "i",
nodeType: "Identifier",
overloadedDeclarations: [],
referencedDeclaration: 46046,
src: "506:1:44",
typeDescriptions: {
typeIdentifier: "t_uint256",
typeString: "uint256"
}
},
typeDescriptions: {
typeIdentifier: "t_uint256",
typeString: "uint256"
}
},
id: 46054,
nodeType: "ExpressionStatement",
src: "504:3:44"
},
nodeType: "ForStatement",
src: "464:313:44"
}
]
},
functionSelector: "e719c888",
implemented: true,
kind: "function",
modifiers: [],
name: "multiStaticcall",
nameLocation: "258:15:44",
parameters: {
id: 46029,
nodeType: "ParameterList",
parameters: [
{
constant: false,
id: 46028,
mutability: "mutable",
name: "staticcalls",
nameLocation: "296:11:44",
nodeType: "VariableDeclaration",
scope: 46089,
src: "274:33:44",
stateVariable: false,
storageLocation: "calldata",
typeDescriptions: {
typeIdentifier: "t_array$_t_struct$_Staticcall_$46019_calldata_ptr_$dyn_calldata_ptr",
typeString: "struct MultiStaticcall.Staticcall[]"
},
typeName: {
baseType: {
id: 46026,
nodeType: "UserDefinedTypeName",
pathNode: {
id: 46025,
name: "Staticcall",
nameLocations: ["274:10:44"],
nodeType: "IdentifierPath",
referencedDeclaration: 46019,
src: "274:10:44"
},
referencedDeclaration: 46019,
src: "274:10:44",
typeDescriptions: {
typeIdentifier: "t_struct$_Staticcall_$46019_storage_ptr",
typeString: "struct MultiStaticcall.Staticcall"
}
},
id: 46027,
nodeType: "ArrayTypeName",
src: "274:12:44",
typeDescriptions: {
typeIdentifier: "t_array$_t_struct$_Staticcall_$46019_storage_$dyn_storage_ptr",
typeString: "struct MultiStaticcall.Staticcall[]"
}
},