commit
d2b3c67f18
@ -0,0 +1,587 @@ |
||||
{ |
||||
"abi": [ |
||||
{ |
||||
"inputs": [], |
||||
"name": "increment", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "number", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "newNumber", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "setNumber", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
} |
||||
], |
||||
"bytecode": { |
||||
"object": "0x608060405234801561001057600080fd5b50610125806100206000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80633fb5c1cb1460415780638381f58a146052578063d09de08a14606c575b600080fd5b6050604c3660046095565b6072565b005b605a60005481565b60405190815260200160405180910390f35b60506081565b607b81607b60c3565b60005550565b600080549080608e8360d9565b9190505550565b60006020828403121560a657600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111560d35760d360ad565b92915050565b60006001820160e85760e860ad565b506001019056fea2646970667358221220981d705d73c405a1cadf6bcd0ff9f1d0fcbbc1599040e504e71517ff0d8aa53264736f6c63430008100033", |
||||
"sourceMap": "65:198:7:-:0;;;;;;;;;;;;;;;;;;;", |
||||
"linkReferences": {} |
||||
}, |
||||
"deployedBytecode": { |
||||
"object": "0x6080604052348015600f57600080fd5b5060043610603c5760003560e01c80633fb5c1cb1460415780638381f58a146052578063d09de08a14606c575b600080fd5b6050604c3660046095565b6072565b005b605a60005481565b60405190815260200160405180910390f35b60506081565b607b81607b60c3565b60005550565b600080549080608e8360d9565b9190505550565b60006020828403121560a657600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111560d35760d360ad565b92915050565b60006001820160e85760e860ad565b506001019056fea2646970667358221220981d705d73c405a1cadf6bcd0ff9f1d0fcbbc1599040e504e71517ff0d8aa53264736f6c63430008100033", |
||||
"sourceMap": "65:198:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;116:86;;;;;;:::i;:::-;;:::i;:::-;;88:21;;;;;;;;;345:25:9;;;333:2;318:18;88:21:7;;;;;;;208:53;;;:::i;116:86::-;180:15;:9;192:3;180:15;:::i;:::-;171:6;:24;-1:-1:-1;116:86:7:o;208:53::-;246:6;:8;;;:6;:8;;;:::i;:::-;;;;;;208:53::o;14:180:9:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:9;;14:180;-1:-1:-1;14:180:9:o;381:127::-;442:10;437:3;433:20;430:1;423:31;473:4;470:1;463:15;497:4;494:1;487:15;513:125;578:9;;;599:10;;;596:36;;;612:18;;:::i;:::-;513:125;;;;:::o;643:135::-;682:3;703:17;;;700:43;;723:18;;:::i;:::-;-1:-1:-1;770:1:9;759:13;;643:135::o", |
||||
"linkReferences": {} |
||||
}, |
||||
"methodIdentifiers": { |
||||
"increment()": "d09de08a", |
||||
"number()": "8381f58a", |
||||
"setNumber(uint256)": "3fb5c1cb" |
||||
}, |
||||
"ast": { |
||||
"absolutePath": "src/Counter.sol", |
||||
"id": 21628, |
||||
"exportedSymbols": { |
||||
"Counter": [ |
||||
21605 |
||||
], |
||||
"CounterYann": [ |
||||
21627 |
||||
] |
||||
}, |
||||
"nodeType": "SourceUnit", |
||||
"src": "39:427:7", |
||||
"nodes": [ |
||||
{ |
||||
"id": 21583, |
||||
"nodeType": "PragmaDirective", |
||||
"src": "39:24:7", |
||||
"literals": [ |
||||
"solidity", |
||||
"^", |
||||
"0.8", |
||||
".13" |
||||
] |
||||
}, |
||||
{ |
||||
"id": 21605, |
||||
"nodeType": "ContractDefinition", |
||||
"src": "65:198:7", |
||||
"nodes": [ |
||||
{ |
||||
"id": 21585, |
||||
"nodeType": "VariableDeclaration", |
||||
"src": "88:21:7", |
||||
"constant": false, |
||||
"functionSelector": "8381f58a", |
||||
"mutability": "mutable", |
||||
"name": "number", |
||||
"nameLocation": "103:6:7", |
||||
"scope": 21605, |
||||
"stateVariable": true, |
||||
"storageLocation": "default", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"typeName": { |
||||
"id": 21584, |
||||
"name": "uint256", |
||||
"nodeType": "ElementaryTypeName", |
||||
"src": "88:7:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"visibility": "public" |
||||
}, |
||||
{ |
||||
"id": 21597, |
||||
"nodeType": "FunctionDefinition", |
||||
"src": "116:86:7", |
||||
"body": { |
||||
"id": 21596, |
||||
"nodeType": "Block", |
||||
"src": "161:41:7", |
||||
"statements": [ |
||||
{ |
||||
"expression": { |
||||
"id": 21594, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"leftHandSide": { |
||||
"id": 21590, |
||||
"name": "number", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 21585, |
||||
"src": "171:6:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"nodeType": "Assignment", |
||||
"operator": "=", |
||||
"rightHandSide": { |
||||
"commonType": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"id": 21593, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"leftExpression": { |
||||
"id": 21591, |
||||
"name": "newNumber", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 21587, |
||||
"src": "180:9:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"nodeType": "BinaryOperation", |
||||
"operator": "+", |
||||
"rightExpression": { |
||||
"hexValue": "313233", |
||||
"id": 21592, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": true, |
||||
"kind": "number", |
||||
"lValueRequested": false, |
||||
"nodeType": "Literal", |
||||
"src": "192:3:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_rational_123_by_1", |
||||
"typeString": "int_const 123" |
||||
}, |
||||
"value": "123" |
||||
}, |
||||
"src": "180:15:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"src": "171:24:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"id": 21595, |
||||
"nodeType": "ExpressionStatement", |
||||
"src": "171:24:7" |
||||
} |
||||
] |
||||
}, |
||||
"functionSelector": "3fb5c1cb", |
||||
"implemented": true, |
||||
"kind": "function", |
||||
"modifiers": [], |
||||
"name": "setNumber", |
||||
"nameLocation": "125:9:7", |
||||
"parameters": { |
||||
"id": 21588, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [ |
||||
{ |
||||
"constant": false, |
||||
"id": 21587, |
||||
"mutability": "mutable", |
||||
"name": "newNumber", |
||||
"nameLocation": "143:9:7", |
||||
"nodeType": "VariableDeclaration", |
||||
"scope": 21597, |
||||
"src": "135:17:7", |
||||
"stateVariable": false, |
||||
"storageLocation": "default", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"typeName": { |
||||
"id": 21586, |
||||
"name": "uint256", |
||||
"nodeType": "ElementaryTypeName", |
||||
"src": "135:7:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"visibility": "internal" |
||||
} |
||||
], |
||||
"src": "134:19:7" |
||||
}, |
||||
"returnParameters": { |
||||
"id": 21589, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "161:0:7" |
||||
}, |
||||
"scope": 21605, |
||||
"stateMutability": "nonpayable", |
||||
"virtual": false, |
||||
"visibility": "public" |
||||
}, |
||||
{ |
||||
"id": 21604, |
||||
"nodeType": "FunctionDefinition", |
||||
"src": "208:53:7", |
||||
"body": { |
||||
"id": 21603, |
||||
"nodeType": "Block", |
||||
"src": "236:25:7", |
||||
"statements": [ |
||||
{ |
||||
"expression": { |
||||
"id": 21601, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"nodeType": "UnaryOperation", |
||||
"operator": "++", |
||||
"prefix": false, |
||||
"src": "246:8:7", |
||||
"subExpression": { |
||||
"id": 21600, |
||||
"name": "number", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 21585, |
||||
"src": "246:6:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"id": 21602, |
||||
"nodeType": "ExpressionStatement", |
||||
"src": "246:8:7" |
||||
} |
||||
] |
||||
}, |
||||
"functionSelector": "d09de08a", |
||||
"implemented": true, |
||||
"kind": "function", |
||||
"modifiers": [], |
||||
"name": "increment", |
||||
"nameLocation": "217:9:7", |
||||
"parameters": { |
||||
"id": 21598, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "226:2:7" |
||||
}, |
||||
"returnParameters": { |
||||
"id": 21599, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "236:0:7" |
||||
}, |
||||
"scope": 21605, |
||||
"stateMutability": "nonpayable", |
||||
"virtual": false, |
||||
"visibility": "public" |
||||
} |
||||
], |
||||
"abstract": false, |
||||
"baseContracts": [], |
||||
"canonicalName": "Counter", |
||||
"contractDependencies": [], |
||||
"contractKind": "contract", |
||||
"fullyImplemented": true, |
||||
"linearizedBaseContracts": [ |
||||
21605 |
||||
], |
||||
"name": "Counter", |
||||
"nameLocation": "74:7:7", |
||||
"scope": 21628, |
||||
"usedErrors": [] |
||||
}, |
||||
{ |
||||
"id": 21627, |
||||
"nodeType": "ContractDefinition", |
||||
"src": "265:200:7", |
||||
"nodes": [ |
||||
{ |
||||
"id": 21607, |
||||
"nodeType": "VariableDeclaration", |
||||
"src": "292:21:7", |
||||
"constant": false, |
||||
"functionSelector": "8381f58a", |
||||
"mutability": "mutable", |
||||
"name": "number", |
||||
"nameLocation": "307:6:7", |
||||
"scope": 21627, |
||||
"stateVariable": true, |
||||
"storageLocation": "default", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"typeName": { |
||||
"id": 21606, |
||||
"name": "uint256", |
||||
"nodeType": "ElementaryTypeName", |
||||
"src": "292:7:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"visibility": "public" |
||||
}, |
||||
{ |
||||
"id": 21619, |
||||
"nodeType": "FunctionDefinition", |
||||
"src": "320:84:7", |
||||
"body": { |
||||
"id": 21618, |
||||
"nodeType": "Block", |
||||
"src": "365:39:7", |
||||
"statements": [ |
||||
{ |
||||
"expression": { |
||||
"id": 21616, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"leftHandSide": { |
||||
"id": 21612, |
||||
"name": "number", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 21607, |
||||
"src": "375:6:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"nodeType": "Assignment", |
||||
"operator": "=", |
||||
"rightHandSide": { |
||||
"commonType": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"id": 21615, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"leftExpression": { |
||||
"id": 21613, |
||||
"name": "newNumber", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 21609, |
||||
"src": "384:9:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"nodeType": "BinaryOperation", |
||||
"operator": "+", |
||||
"rightExpression": { |
||||
"hexValue": "39", |
||||
"id": 21614, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": true, |
||||
"kind": "number", |
||||
"lValueRequested": false, |
||||
"nodeType": "Literal", |
||||
"src": "396:1:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_rational_9_by_1", |
||||
"typeString": "int_const 9" |
||||
}, |
||||
"value": "9" |
||||
}, |
||||
"src": "384:13:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"src": "375:22:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"id": 21617, |
||||
"nodeType": "ExpressionStatement", |
||||
"src": "375:22:7" |
||||
} |
||||
] |
||||
}, |
||||
"functionSelector": "3fb5c1cb", |
||||
"implemented": true, |
||||
"kind": "function", |
||||
"modifiers": [], |
||||
"name": "setNumber", |
||||
"nameLocation": "329:9:7", |
||||
"parameters": { |
||||
"id": 21610, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [ |
||||
{ |
||||
"constant": false, |
||||
"id": 21609, |
||||
"mutability": "mutable", |
||||
"name": "newNumber", |
||||
"nameLocation": "347:9:7", |
||||
"nodeType": "VariableDeclaration", |
||||
"scope": 21619, |
||||
"src": "339:17:7", |
||||
"stateVariable": false, |
||||
"storageLocation": "default", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"typeName": { |
||||
"id": 21608, |
||||
"name": "uint256", |
||||
"nodeType": "ElementaryTypeName", |
||||
"src": "339:7:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"visibility": "internal" |
||||
} |
||||
], |
||||
"src": "338:19:7" |
||||
}, |
||||
"returnParameters": { |
||||
"id": 21611, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "365:0:7" |
||||
}, |
||||
"scope": 21627, |
||||
"stateMutability": "nonpayable", |
||||
"virtual": false, |
||||
"visibility": "public" |
||||
}, |
||||
{ |
||||
"id": 21626, |
||||
"nodeType": "FunctionDefinition", |
||||
"src": "410:53:7", |
||||
"body": { |
||||
"id": 21625, |
||||
"nodeType": "Block", |
||||
"src": "438:25:7", |
||||
"statements": [ |
||||
{ |
||||
"expression": { |
||||
"id": 21623, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"nodeType": "UnaryOperation", |
||||
"operator": "++", |
||||
"prefix": false, |
||||
"src": "448:8:7", |
||||
"subExpression": { |
||||
"id": 21622, |
||||
"name": "number", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 21607, |
||||
"src": "448:6:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"id": 21624, |
||||
"nodeType": "ExpressionStatement", |
||||
"src": "448:8:7" |
||||
} |
||||
] |
||||
}, |
||||
"functionSelector": "d09de08a", |
||||
"implemented": true, |
||||
"kind": "function", |
||||
"modifiers": [], |
||||
"name": "increment", |
||||
"nameLocation": "419:9:7", |
||||
"parameters": { |
||||
"id": 21620, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "428:2:7" |
||||
}, |
||||
"returnParameters": { |
||||
"id": 21621, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "438:0:7" |
||||
}, |
||||
"scope": 21627, |
||||
"stateMutability": "nonpayable", |
||||
"virtual": false, |
||||
"visibility": "public" |
||||
} |
||||
], |
||||
"abstract": false, |
||||
"baseContracts": [], |
||||
"canonicalName": "CounterYann", |
||||
"contractDependencies": [], |
||||
"contractKind": "contract", |
||||
"fullyImplemented": true, |
||||
"linearizedBaseContracts": [ |
||||
21627 |
||||
], |
||||
"name": "CounterYann", |
||||
"nameLocation": "274:11:7", |
||||
"scope": 21628, |
||||
"usedErrors": [] |
||||
} |
||||
], |
||||
"license": "UNLICENSED" |
||||
}, |
||||
"id": 7 |
||||
} |
@ -1 +0,0 @@ |
||||
// @ts-ignore
|
@ -0,0 +1,878 @@ |
||||
{ |
||||
"contractName": "Migrations", |
||||
"abi": [ |
||||
{ |
||||
"constant": true, |
||||
"inputs": [], |
||||
"name": "last_completed_migration", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"payable": false, |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"constant": true, |
||||
"inputs": [], |
||||
"name": "owner", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "address", |
||||
"name": "", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"payable": false, |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"constant": false, |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "completed", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "setCompleted", |
||||
"outputs": [], |
||||
"payable": false, |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
} |
||||
], |
||||
"metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"last_completed_migration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"completed\",\"type\":\"uint256\"}],\"name\":\"setCompleted\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/yann/truffletemp/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/yann/truffletemp/contracts/Migrations.sol\":{\"keccak256\":\"0x7797e159bfd6b953422b4bd6d5de5946971d8b5ed74c4b1f6517d61fe236b851\",\"urls\":[\"bzz-raw://56bdf6130f3ced3e78baa0f3e7f34cb4c5131d90721326056bbf0dd202d8539d\",\"dweb:/ipfs/QmZqRKebKwn6YXejnnPribsyiXLmrAx32JpatFhvS76NKp\"]}},\"version\":1}", |
||||
"bytecode": "0x6080604052336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555034801561005057600080fd5b5061021e806100606000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063445df0ac146100465780638da5cb5b14610064578063fdacd576146100ae575b600080fd5b61004e6100dc565b6040518082815260200191505060405180910390f35b61006c6100e2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100da600480360360208110156100c457600080fd5b8101908080359060200190929190505050610107565b005b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806101b76033913960400191505060405180910390fd5b806001819055505056fe546869732066756e6374696f6e206973207265737472696374656420746f2074686520636f6e74726163742773206f776e6572a265627a7a723158202d8ffeacea919d054933bfa385b1dba75680df6aee19f861fea56d15484b874764736f6c63430005100032", |
||||
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063445df0ac146100465780638da5cb5b14610064578063fdacd576146100ae575b600080fd5b61004e6100dc565b6040518082815260200191505060405180910390f35b61006c6100e2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100da600480360360208110156100c457600080fd5b8101908080359060200190929190505050610107565b005b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806101b76033913960400191505060405180910390fd5b806001819055505056fe546869732066756e6374696f6e206973207265737472696374656420746f2074686520636f6e74726163742773206f776e6572a265627a7a723158202d8ffeacea919d054933bfa385b1dba75680df6aee19f861fea56d15484b874764736f6c63430005100032", |
||||
"sourceMap": "66:352:0:-;;;113:10;90:33;;;;;;;;;;;;;;;;;;;;66:352;8:9:-1;5:2;;;30:1;27;20:12;5:2;66:352:0;;;;;;;", |
||||
"deployedSourceMap": "66:352:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;66:352:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;127:36;;;:::i;:::-;;;;;;;;;;;;;;;;;;;90:33;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;313:103;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;313:103:0;;;;;;;;;;;;;;;;;:::i;:::-;;127:36;;;;:::o;90:33::-;;;;;;;;;;;;;:::o;313:103::-;225:5;;;;;;;;;;;211:19;;:10;:19;;;196:101;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;402:9;375:24;:36;;;;313:103;:::o", |
||||
"source": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.8.0;\n\ncontract Migrations {\n address public owner = msg.sender;\n uint public last_completed_migration;\n\n modifier restricted() {\n require(\n msg.sender == owner,\n \"This function is restricted to the contract's owner\"\n );\n _;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n}\n", |
||||
"sourcePath": "/home/yann/truffletemp/contracts/Migrations.sol", |
||||
"ast": { |
||||
"absolutePath": "/home/yann/truffletemp/contracts/Migrations.sol", |
||||
"exportedSymbols": { |
||||
"Migrations": [ |
||||
32 |
||||
] |
||||
}, |
||||
"id": 33, |
||||
"nodeType": "SourceUnit", |
||||
"nodes": [ |
||||
{ |
||||
"id": 1, |
||||
"literals": [ |
||||
"solidity", |
||||
">=", |
||||
"0.4", |
||||
".22", |
||||
"<", |
||||
"0.8", |
||||
".0" |
||||
], |
||||
"nodeType": "PragmaDirective", |
||||
"src": "32:32:0" |
||||
}, |
||||
{ |
||||
"baseContracts": [], |
||||
"contractDependencies": [], |
||||
"contractKind": "contract", |
||||
"documentation": null, |
||||
"fullyImplemented": true, |
||||
"id": 32, |
||||
"linearizedBaseContracts": [ |
||||
32 |
||||
], |
||||
"name": "Migrations", |
||||
"nodeType": "ContractDefinition", |
||||
"nodes": [ |
||||
{ |
||||
"constant": false, |
||||
"id": 5, |
||||
"name": "owner", |
||||
"nodeType": "VariableDeclaration", |
||||
"scope": 32, |
||||
"src": "90:33:0", |
||||
"stateVariable": true, |
||||
"storageLocation": "default", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_address", |
||||
"typeString": "address" |
||||
}, |
||||
"typeName": { |
||||
"id": 2, |
||||
"name": "address", |
||||
"nodeType": "ElementaryTypeName", |
||||
"src": "90:7:0", |
||||
"stateMutability": "nonpayable", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_address", |
||||
"typeString": "address" |
||||
} |
||||
}, |
||||
"value": { |
||||
"argumentTypes": null, |
||||
"expression": { |
||||
"argumentTypes": null, |
||||
"id": 3, |
||||
"name": "msg", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 47, |
||||
"src": "113:3:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_magic_message", |
||||
"typeString": "msg" |
||||
} |
||||
}, |
||||
"id": 4, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"memberName": "sender", |
||||
"nodeType": "MemberAccess", |
||||
"referencedDeclaration": null, |
||||
"src": "113:10:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_address_payable", |
||||
"typeString": "address payable" |
||||
} |
||||
}, |
||||
"visibility": "public" |
||||
}, |
||||
{ |
||||
"constant": false, |
||||
"id": 7, |
||||
"name": "last_completed_migration", |
||||
"nodeType": "VariableDeclaration", |
||||
"scope": 32, |
||||
"src": "127:36:0", |
||||
"stateVariable": true, |
||||
"storageLocation": "default", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"typeName": { |
||||
"id": 6, |
||||
"name": "uint", |
||||
"nodeType": "ElementaryTypeName", |
||||
"src": "127:4:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"value": null, |
||||
"visibility": "public" |
||||
}, |
||||
{ |
||||
"body": { |
||||
"id": 18, |
||||
"nodeType": "Block", |
||||
"src": "190:119:0", |
||||
"statements": [ |
||||
{ |
||||
"expression": { |
||||
"argumentTypes": null, |
||||
"arguments": [ |
||||
{ |
||||
"argumentTypes": null, |
||||
"commonType": { |
||||
"typeIdentifier": "t_address", |
||||
"typeString": "address" |
||||
}, |
||||
"id": 13, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"leftExpression": { |
||||
"argumentTypes": null, |
||||
"expression": { |
||||
"argumentTypes": null, |
||||
"id": 10, |
||||
"name": "msg", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 47, |
||||
"src": "211:3:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_magic_message", |
||||
"typeString": "msg" |
||||
} |
||||
}, |
||||
"id": 11, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"memberName": "sender", |
||||
"nodeType": "MemberAccess", |
||||
"referencedDeclaration": null, |
||||
"src": "211:10:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_address_payable", |
||||
"typeString": "address payable" |
||||
} |
||||
}, |
||||
"nodeType": "BinaryOperation", |
||||
"operator": "==", |
||||
"rightExpression": { |
||||
"argumentTypes": null, |
||||
"id": 12, |
||||
"name": "owner", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 5, |
||||
"src": "225:5:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_address", |
||||
"typeString": "address" |
||||
} |
||||
}, |
||||
"src": "211:19:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_bool", |
||||
"typeString": "bool" |
||||
} |
||||
}, |
||||
{ |
||||
"argumentTypes": null, |
||||
"hexValue": "546869732066756e6374696f6e206973207265737472696374656420746f2074686520636f6e74726163742773206f776e6572", |
||||
"id": 14, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": true, |
||||
"kind": "string", |
||||
"lValueRequested": false, |
||||
"nodeType": "Literal", |
||||
"src": "238:53:0", |
||||
"subdenomination": null, |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_stringliteral_f60fe2d9d123295bf92ecf95167f1fa709e374da35e4c083bd39dc2d82acd8b1", |
||||
"typeString": "literal_string \"This function is restricted to the contract's owner\"" |
||||
}, |
||||
"value": "This function is restricted to the contract's owner" |
||||
} |
||||
], |
||||
"expression": { |
||||
"argumentTypes": [ |
||||
{ |
||||
"typeIdentifier": "t_bool", |
||||
"typeString": "bool" |
||||
}, |
||||
{ |
||||
"typeIdentifier": "t_stringliteral_f60fe2d9d123295bf92ecf95167f1fa709e374da35e4c083bd39dc2d82acd8b1", |
||||
"typeString": "literal_string \"This function is restricted to the contract's owner\"" |
||||
} |
||||
], |
||||
"id": 9, |
||||
"name": "require", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [ |
||||
50, |
||||
51 |
||||
], |
||||
"referencedDeclaration": 51, |
||||
"src": "196:7:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", |
||||
"typeString": "function (bool,string memory) pure" |
||||
} |
||||
}, |
||||
"id": 15, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"kind": "functionCall", |
||||
"lValueRequested": false, |
||||
"names": [], |
||||
"nodeType": "FunctionCall", |
||||
"src": "196:101:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_tuple$__$", |
||||
"typeString": "tuple()" |
||||
} |
||||
}, |
||||
"id": 16, |
||||
"nodeType": "ExpressionStatement", |
||||
"src": "196:101:0" |
||||
}, |
||||
{ |
||||
"id": 17, |
||||
"nodeType": "PlaceholderStatement", |
||||
"src": "303:1:0" |
||||
} |
||||
] |
||||
}, |
||||
"documentation": null, |
||||
"id": 19, |
||||
"name": "restricted", |
||||
"nodeType": "ModifierDefinition", |
||||
"parameters": { |
||||
"id": 8, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "187:2:0" |
||||
}, |
||||
"src": "168:141:0", |
||||
"visibility": "internal" |
||||
}, |
||||
{ |
||||
"body": { |
||||
"id": 30, |
||||
"nodeType": "Block", |
||||
"src": "369:47:0", |
||||
"statements": [ |
||||
{ |
||||
"expression": { |
||||
"argumentTypes": null, |
||||
"id": 28, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"leftHandSide": { |
||||
"argumentTypes": null, |
||||
"id": 26, |
||||
"name": "last_completed_migration", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 7, |
||||
"src": "375:24:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"nodeType": "Assignment", |
||||
"operator": "=", |
||||
"rightHandSide": { |
||||
"argumentTypes": null, |
||||
"id": 27, |
||||
"name": "completed", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 21, |
||||
"src": "402:9:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"src": "375:36:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"id": 29, |
||||
"nodeType": "ExpressionStatement", |
||||
"src": "375:36:0" |
||||
} |
||||
] |
||||
}, |
||||
"documentation": null, |
||||
"id": 31, |
||||
"implemented": true, |
||||
"kind": "function", |
||||
"modifiers": [ |
||||
{ |
||||
"arguments": null, |
||||
"id": 24, |
||||
"modifierName": { |
||||
"argumentTypes": null, |
||||
"id": 23, |
||||
"name": "restricted", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 19, |
||||
"src": "358:10:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_modifier$__$", |
||||
"typeString": "modifier ()" |
||||
} |
||||
}, |
||||
"nodeType": "ModifierInvocation", |
||||
"src": "358:10:0" |
||||
} |
||||
], |
||||
"name": "setCompleted", |
||||
"nodeType": "FunctionDefinition", |
||||
"parameters": { |
||||
"id": 22, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [ |
||||
{ |
||||
"constant": false, |
||||
"id": 21, |
||||
"name": "completed", |
||||
"nodeType": "VariableDeclaration", |
||||
"scope": 31, |
||||
"src": "335:14:0", |
||||
"stateVariable": false, |
||||
"storageLocation": "default", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"typeName": { |
||||
"id": 20, |
||||
"name": "uint", |
||||
"nodeType": "ElementaryTypeName", |
||||
"src": "335:4:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"value": null, |
||||
"visibility": "internal" |
||||
} |
||||
], |
||||
"src": "334:16:0" |
||||
}, |
||||
"returnParameters": { |
||||
"id": 25, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "369:0:0" |
||||
}, |
||||
"scope": 32, |
||||
"src": "313:103:0", |
||||
"stateMutability": "nonpayable", |
||||
"superFunction": null, |
||||
"visibility": "public" |
||||
} |
||||
], |
||||
"scope": 33, |
||||
"src": "66:352:0" |
||||
} |
||||
], |
||||
"src": "32:387:0" |
||||
}, |
||||
"legacyAST": { |
||||
"absolutePath": "/home/yann/truffletemp/contracts/Migrations.sol", |
||||
"exportedSymbols": { |
||||
"Migrations": [ |
||||
32 |
||||
] |
||||
}, |
||||
"id": 33, |
||||
"nodeType": "SourceUnit", |
||||
"nodes": [ |
||||
{ |
||||
"id": 1, |
||||
"literals": [ |
||||
"solidity", |
||||
">=", |
||||
"0.4", |
||||
".22", |
||||
"<", |
||||
"0.8", |
||||
".0" |
||||
], |
||||
"nodeType": "PragmaDirective", |
||||
"src": "32:32:0" |
||||
}, |
||||
{ |
||||
"baseContracts": [], |
||||
"contractDependencies": [], |
||||
"contractKind": "contract", |
||||
"documentation": null, |
||||
"fullyImplemented": true, |
||||
"id": 32, |
||||
"linearizedBaseContracts": [ |
||||
32 |
||||
], |
||||
"name": "Migrations", |
||||
"nodeType": "ContractDefinition", |
||||
"nodes": [ |
||||
{ |
||||
"constant": false, |
||||
"id": 5, |
||||
"name": "owner", |
||||
"nodeType": "VariableDeclaration", |
||||
"scope": 32, |
||||
"src": "90:33:0", |
||||
"stateVariable": true, |
||||
"storageLocation": "default", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_address", |
||||
"typeString": "address" |
||||
}, |
||||
"typeName": { |
||||
"id": 2, |
||||
"name": "address", |
||||
"nodeType": "ElementaryTypeName", |
||||
"src": "90:7:0", |
||||
"stateMutability": "nonpayable", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_address", |
||||
"typeString": "address" |
||||
} |
||||
}, |
||||
"value": { |
||||
"argumentTypes": null, |
||||
"expression": { |
||||
"argumentTypes": null, |
||||
"id": 3, |
||||
"name": "msg", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 47, |
||||
"src": "113:3:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_magic_message", |
||||
"typeString": "msg" |
||||
} |
||||
}, |
||||
"id": 4, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"memberName": "sender", |
||||
"nodeType": "MemberAccess", |
||||
"referencedDeclaration": null, |
||||
"src": "113:10:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_address_payable", |
||||
"typeString": "address payable" |
||||
} |
||||
}, |
||||
"visibility": "public" |
||||
}, |
||||
{ |
||||
"constant": false, |
||||
"id": 7, |
||||
"name": "last_completed_migration", |
||||
"nodeType": "VariableDeclaration", |
||||
"scope": 32, |
||||
"src": "127:36:0", |
||||
"stateVariable": true, |
||||
"storageLocation": "default", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"typeName": { |
||||
"id": 6, |
||||
"name": "uint", |
||||
"nodeType": "ElementaryTypeName", |
||||
"src": "127:4:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"value": null, |
||||
"visibility": "public" |
||||
}, |
||||
{ |
||||
"body": { |
||||
"id": 18, |
||||
"nodeType": "Block", |
||||
"src": "190:119:0", |
||||
"statements": [ |
||||
{ |
||||
"expression": { |
||||
"argumentTypes": null, |
||||
"arguments": [ |
||||
{ |
||||
"argumentTypes": null, |
||||
"commonType": { |
||||
"typeIdentifier": "t_address", |
||||
"typeString": "address" |
||||
}, |
||||
"id": 13, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"leftExpression": { |
||||
"argumentTypes": null, |
||||
"expression": { |
||||
"argumentTypes": null, |
||||
"id": 10, |
||||
"name": "msg", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 47, |
||||
"src": "211:3:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_magic_message", |
||||
"typeString": "msg" |
||||
} |
||||
}, |
||||
"id": 11, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"memberName": "sender", |
||||
"nodeType": "MemberAccess", |
||||
"referencedDeclaration": null, |
||||
"src": "211:10:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_address_payable", |
||||
"typeString": "address payable" |
||||
} |
||||
}, |
||||
"nodeType": "BinaryOperation", |
||||
"operator": "==", |
||||
"rightExpression": { |
||||
"argumentTypes": null, |
||||
"id": 12, |
||||
"name": "owner", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 5, |
||||
"src": "225:5:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_address", |
||||
"typeString": "address" |
||||
} |
||||
}, |
||||
"src": "211:19:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_bool", |
||||
"typeString": "bool" |
||||
} |
||||
}, |
||||
{ |
||||
"argumentTypes": null, |
||||
"hexValue": "546869732066756e6374696f6e206973207265737472696374656420746f2074686520636f6e74726163742773206f776e6572", |
||||
"id": 14, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": true, |
||||
"kind": "string", |
||||
"lValueRequested": false, |
||||
"nodeType": "Literal", |
||||
"src": "238:53:0", |
||||
"subdenomination": null, |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_stringliteral_f60fe2d9d123295bf92ecf95167f1fa709e374da35e4c083bd39dc2d82acd8b1", |
||||
"typeString": "literal_string \"This function is restricted to the contract's owner\"" |
||||
}, |
||||
"value": "This function is restricted to the contract's owner" |
||||
} |
||||
], |
||||
"expression": { |
||||
"argumentTypes": [ |
||||
{ |
||||
"typeIdentifier": "t_bool", |
||||
"typeString": "bool" |
||||
}, |
||||
{ |
||||
"typeIdentifier": "t_stringliteral_f60fe2d9d123295bf92ecf95167f1fa709e374da35e4c083bd39dc2d82acd8b1", |
||||
"typeString": "literal_string \"This function is restricted to the contract's owner\"" |
||||
} |
||||
], |
||||
"id": 9, |
||||
"name": "require", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [ |
||||
50, |
||||
51 |
||||
], |
||||
"referencedDeclaration": 51, |
||||
"src": "196:7:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", |
||||
"typeString": "function (bool,string memory) pure" |
||||
} |
||||
}, |
||||
"id": 15, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"kind": "functionCall", |
||||
"lValueRequested": false, |
||||
"names": [], |
||||
"nodeType": "FunctionCall", |
||||
"src": "196:101:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_tuple$__$", |
||||
"typeString": "tuple()" |
||||
} |
||||
}, |
||||
"id": 16, |
||||
"nodeType": "ExpressionStatement", |
||||
"src": "196:101:0" |
||||
}, |
||||
{ |
||||
"id": 17, |
||||
"nodeType": "PlaceholderStatement", |
||||
"src": "303:1:0" |
||||
} |
||||
] |
||||
}, |
||||
"documentation": null, |
||||
"id": 19, |
||||
"name": "restricted", |
||||
"nodeType": "ModifierDefinition", |
||||
"parameters": { |
||||
"id": 8, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "187:2:0" |
||||
}, |
||||
"src": "168:141:0", |
||||
"visibility": "internal" |
||||
}, |
||||
{ |
||||
"body": { |
||||
"id": 30, |
||||
"nodeType": "Block", |
||||
"src": "369:47:0", |
||||
"statements": [ |
||||
{ |
||||
"expression": { |
||||
"argumentTypes": null, |
||||
"id": 28, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"leftHandSide": { |
||||
"argumentTypes": null, |
||||
"id": 26, |
||||
"name": "last_completed_migration", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 7, |
||||
"src": "375:24:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"nodeType": "Assignment", |
||||
"operator": "=", |
||||
"rightHandSide": { |
||||
"argumentTypes": null, |
||||
"id": 27, |
||||
"name": "completed", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 21, |
||||
"src": "402:9:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"src": "375:36:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"id": 29, |
||||
"nodeType": "ExpressionStatement", |
||||
"src": "375:36:0" |
||||
} |
||||
] |
||||
}, |
||||
"documentation": null, |
||||
"id": 31, |
||||
"implemented": true, |
||||
"kind": "function", |
||||
"modifiers": [ |
||||
{ |
||||
"arguments": null, |
||||
"id": 24, |
||||
"modifierName": { |
||||
"argumentTypes": null, |
||||
"id": 23, |
||||
"name": "restricted", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 19, |
||||
"src": "358:10:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_modifier$__$", |
||||
"typeString": "modifier ()" |
||||
} |
||||
}, |
||||
"nodeType": "ModifierInvocation", |
||||
"src": "358:10:0" |
||||
} |
||||
], |
||||
"name": "setCompleted", |
||||
"nodeType": "FunctionDefinition", |
||||
"parameters": { |
||||
"id": 22, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [ |
||||
{ |
||||
"constant": false, |
||||
"id": 21, |
||||
"name": "completed", |
||||
"nodeType": "VariableDeclaration", |
||||
"scope": 31, |
||||
"src": "335:14:0", |
||||
"stateVariable": false, |
||||
"storageLocation": "default", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"typeName": { |
||||
"id": 20, |
||||
"name": "uint", |
||||
"nodeType": "ElementaryTypeName", |
||||
"src": "335:4:0", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"value": null, |
||||
"visibility": "internal" |
||||
} |
||||
], |
||||
"src": "334:16:0" |
||||
}, |
||||
"returnParameters": { |
||||
"id": 25, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "369:0:0" |
||||
}, |
||||
"scope": 32, |
||||
"src": "313:103:0", |
||||
"stateMutability": "nonpayable", |
||||
"superFunction": null, |
||||
"visibility": "public" |
||||
} |
||||
], |
||||
"scope": 33, |
||||
"src": "66:352:0" |
||||
} |
||||
], |
||||
"src": "32:387:0" |
||||
}, |
||||
"compiler": { |
||||
"name": "solc", |
||||
"version": "0.5.16+commit.9c3226ce.Emscripten.clang" |
||||
}, |
||||
"networks": {}, |
||||
"schemaVersion": "3.3.2", |
||||
"updatedAt": "2022-09-14T10:36:42.523Z", |
||||
"devdoc": { |
||||
"methods": {} |
||||
}, |
||||
"userdoc": { |
||||
"methods": {} |
||||
} |
||||
} |
@ -0,0 +1 @@ |
||||
|
@ -0,0 +1,6 @@ |
||||
[profile.default] |
||||
src = 'src' |
||||
out = 'out' |
||||
libs = ['lib'] |
||||
|
||||
# See more config options https://github.com/foundry-rs/foundry/tree/master/config |
@ -0,0 +1,266 @@ |
||||
{ |
||||
"abi": [ |
||||
{ |
||||
"inputs": [], |
||||
"name": "IS_SCRIPT", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bool", |
||||
"name": "", |
||||
"type": "bool" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "run", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "setUp", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "vm", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "contract Vm", |
||||
"name": "", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
} |
||||
], |
||||
"bytecode": { |
||||
"object": "0x60806040526000805460ff1916600117905534801561001d57600080fd5b5061014c8061002d6000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630a9254e4146100515780633a76846314610053578063c04062261461008b578063f8ccbf4714610093575b600080fd5b005b61006e737109709ecfa91a80626ff3989d68f67f5b1dd12d81565b6040516001600160a01b0390911681526020015b60405180910390f35b6100516100b0565b6000546100a09060ff1681565b6040519015158152602001610082565b604080516302bf260160e61b81529051737109709ecfa91a80626ff3989d68f67f5b1dd12d9163afc9804091600480830192600092919082900301818387803b1580156100fc57600080fd5b505af1158015610110573d6000803e3d6000fd5b5050505056fea26469706673582212203a39488c6d5e73072e1dd0c6593caff56e39d0849abc1557f1c6e25cf7dedc2e64736f6c63430008100033", |
||||
"sourceMap": "97:126:6:-:0;;;165:28:1;;;-1:-1:-1;;165:28:1;189:4;165:28;;;97:126:6;;;;;;;;;;;;;;;;", |
||||
"linkReferences": {} |
||||
}, |
||||
"deployedBytecode": { |
||||
"object": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630a9254e4146100515780633a76846314610053578063c04062261461008b578063f8ccbf4714610093575b600080fd5b005b61006e737109709ecfa91a80626ff3989d68f67f5b1dd12d81565b6040516001600160a01b0390911681526020015b60405180910390f35b6100516100b0565b6000546100a09060ff1681565b6040519015158152602001610082565b604080516302bf260160e61b81529051737109709ecfa91a80626ff3989d68f67f5b1dd12d9163afc9804091600480830192600092919082900301818387803b1580156100fc57600080fd5b505af1158015610110573d6000803e3d6000fd5b5050505056fea26469706673582212203a39488c6d5e73072e1dd0c6593caff56e39d0849abc1557f1c6e25cf7dedc2e64736f6c63430008100033", |
||||
"sourceMap": "97:126:6:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;136:26;;316:38:1;;245:64;316:38;;;;;-1:-1:-1;;;;;189:32:9;;;171:51;;159:2;144:18;316:38:1;;;;;;;;168:53:6;;;:::i;165:28:1:-;;;;;;;;;;;;398:14:9;;391:22;373:41;;361:2;346:18;165:28:1;233:187:9;168:53:6;200:14;;;-1:-1:-1;;;200:14:6;;;;245:64:1;;200:12:6;;:14;;;;;269:37:1;;200:14:6;;;;;;;269:37:1;245:64;200:14:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;168:53::o", |
||||
"linkReferences": {} |
||||
}, |
||||
"methodIdentifiers": { |
||||
"IS_SCRIPT()": "f8ccbf47", |
||||
"run()": "c0406226", |
||||
"setUp()": "0a9254e4", |
||||
"vm()": "3a768463" |
||||
}, |
||||
"ast": { |
||||
"absolutePath": "script/Counter.s.sol", |
||||
"id": 21582, |
||||
"exportedSymbols": { |
||||
"CounterScript": [ |
||||
21581 |
||||
], |
||||
"Script": [ |
||||
2022 |
||||
], |
||||
"Vm": [ |
||||
5434 |
||||
], |
||||
"console": [ |
||||
13498 |
||||
], |
||||
"console2": [ |
||||
21562 |
||||
] |
||||
}, |
||||
"nodeType": "SourceUnit", |
||||
"src": "39:185:6", |
||||
"nodes": [ |
||||
{ |
||||
"id": 21564, |
||||
"nodeType": "PragmaDirective", |
||||
"src": "39:24:6", |
||||
"literals": [ |
||||
"solidity", |
||||
"^", |
||||
"0.8", |
||||
".13" |
||||
] |
||||
}, |
||||
{ |
||||
"id": 21565, |
||||
"nodeType": "ImportDirective", |
||||
"src": "65:30:6", |
||||
"absolutePath": "lib/forge-std/src/Script.sol", |
||||
"file": "forge-std/Script.sol", |
||||
"nameLocation": "-1:-1:-1", |
||||
"scope": 21582, |
||||
"sourceUnit": 2023, |
||||
"symbolAliases": [], |
||||
"unitAlias": "" |
||||
}, |
||||
{ |
||||
"id": 21581, |
||||
"nodeType": "ContractDefinition", |
||||
"src": "97:126:6", |
||||
"nodes": [ |
||||
{ |
||||
"id": 21571, |
||||
"nodeType": "FunctionDefinition", |
||||
"src": "136:26:6", |
||||
"body": { |
||||
"id": 21570, |
||||
"nodeType": "Block", |
||||
"src": "160:2:6", |
||||
"statements": [] |
||||
}, |
||||
"functionSelector": "0a9254e4", |
||||
"implemented": true, |
||||
"kind": "function", |
||||
"modifiers": [], |
||||
"name": "setUp", |
||||
"nameLocation": "145:5:6", |
||||
"parameters": { |
||||
"id": 21568, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "150:2:6" |
||||
}, |
||||
"returnParameters": { |
||||
"id": 21569, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "160:0:6" |
||||
}, |
||||
"scope": 21581, |
||||
"stateMutability": "nonpayable", |
||||
"virtual": false, |
||||
"visibility": "public" |
||||
}, |
||||
{ |
||||
"id": 21580, |
||||
"nodeType": "FunctionDefinition", |
||||
"src": "168:53:6", |
||||
"body": { |
||||
"id": 21579, |
||||
"nodeType": "Block", |
||||
"src": "190:31:6", |
||||
"statements": [ |
||||
{ |
||||
"expression": { |
||||
"arguments": [], |
||||
"expression": { |
||||
"argumentTypes": [], |
||||
"expression": { |
||||
"id": 21574, |
||||
"name": "vm", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 1817, |
||||
"src": "200:2:6", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_contract$_Vm_$5434", |
||||
"typeString": "contract Vm" |
||||
} |
||||
}, |
||||
"id": 21576, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"memberLocation": "203:9:6", |
||||
"memberName": "broadcast", |
||||
"nodeType": "MemberAccess", |
||||
"referencedDeclaration": 5173, |
||||
"src": "200:12:6", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_function_external_nonpayable$__$returns$__$", |
||||
"typeString": "function () external" |
||||
} |
||||
}, |
||||
"id": 21577, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"kind": "functionCall", |
||||
"lValueRequested": false, |
||||
"nameLocations": [], |
||||
"names": [], |
||||
"nodeType": "FunctionCall", |
||||
"src": "200:14:6", |
||||
"tryCall": false, |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_tuple$__$", |
||||
"typeString": "tuple()" |
||||
} |
||||
}, |
||||
"id": 21578, |
||||
"nodeType": "ExpressionStatement", |
||||
"src": "200:14:6" |
||||
} |
||||
] |
||||
}, |
||||
"functionSelector": "c0406226", |
||||
"implemented": true, |
||||
"kind": "function", |
||||
"modifiers": [], |
||||
"name": "run", |
||||
"nameLocation": "177:3:6", |
||||
"parameters": { |
||||
"id": 21572, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "180:2:6" |
||||
}, |
||||
"returnParameters": { |
||||
"id": 21573, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "190:0:6" |
||||
}, |
||||
"scope": 21581, |
||||
"stateMutability": "nonpayable", |
||||
"virtual": false, |
||||
"visibility": "public" |
||||
} |
||||
], |
||||
"abstract": false, |
||||
"baseContracts": [ |
||||
{ |
||||
"baseName": { |
||||
"id": 21566, |
||||
"name": "Script", |
||||
"nameLocations": [ |
||||
"123:6:6" |
||||
], |
||||
"nodeType": "IdentifierPath", |
||||
"referencedDeclaration": 2022, |
||||
"src": "123:6:6" |
||||
}, |
||||
"id": 21567, |
||||
"nodeType": "InheritanceSpecifier", |
||||
"src": "123:6:6" |
||||
} |
||||
], |
||||
"canonicalName": "CounterScript", |
||||
"contractDependencies": [], |
||||
"contractKind": "contract", |
||||
"fullyImplemented": true, |
||||
"linearizedBaseContracts": [ |
||||
21581, |
||||
2022 |
||||
], |
||||
"name": "CounterScript", |
||||
"nameLocation": "106:13:6", |
||||
"scope": 21582, |
||||
"usedErrors": [] |
||||
} |
||||
], |
||||
"license": "UNLICENSED" |
||||
}, |
||||
"id": 6 |
||||
} |
@ -0,0 +1,121 @@ |
||||
{ |
||||
"compiler": { |
||||
"version": "0.8.16+commit.07a7930e" |
||||
}, |
||||
"language": "Solidity", |
||||
"output": { |
||||
"abi": [ |
||||
{ |
||||
"inputs": [], |
||||
"name": "IS_SCRIPT", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bool", |
||||
"name": "", |
||||
"type": "bool" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "run", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "setUp", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "vm", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "contract Vm", |
||||
"name": "", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
} |
||||
], |
||||
"devdoc": { |
||||
"kind": "dev", |
||||
"methods": {}, |
||||
"version": 1 |
||||
}, |
||||
"userdoc": { |
||||
"kind": "user", |
||||
"methods": {}, |
||||
"version": 1 |
||||
} |
||||
}, |
||||
"settings": { |
||||
"compilationTarget": { |
||||
"script/Counter.s.sol": "CounterScript" |
||||
}, |
||||
"evmVersion": "london", |
||||
"libraries": {}, |
||||
"metadata": { |
||||
"bytecodeHash": "ipfs" |
||||
}, |
||||
"optimizer": { |
||||
"enabled": true, |
||||
"runs": 200 |
||||
}, |
||||
"remappings": [ |
||||
":ds-test/=lib/forge-std/lib/ds-test/src/", |
||||
":forge-std/=lib/forge-std/src/" |
||||
] |
||||
}, |
||||
"sources": { |
||||
"lib/forge-std/src/Script.sol": { |
||||
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a", |
||||
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Vm.sol": { |
||||
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f", |
||||
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/console.sol": { |
||||
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70", |
||||
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/console2.sol": { |
||||
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f", |
||||
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW" |
||||
] |
||||
}, |
||||
"script/Counter.s.sol": { |
||||
"keccak256": "0x01edaa1835b1a5bd3f4f66f73451488b8441d30642d3bf1f5fa2c5bf7c005bee", |
||||
"license": "UNLICENSED", |
||||
"urls": [ |
||||
"bzz-raw://3c6a0f19216ceeebf4ec16f8f2662a3bebbe18d4037d1399adf2e3e4ccbb57a2", |
||||
"dweb:/ipfs/Qmc8NknjPkSgbXLg6zZQ8uKT6kAWBvBXz5JrDvZfa88UNT" |
||||
] |
||||
} |
||||
}, |
||||
"version": 1 |
||||
} |
@ -0,0 +1,587 @@ |
||||
{ |
||||
"abi": [ |
||||
{ |
||||
"inputs": [], |
||||
"name": "increment", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "number", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "newNumber", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "setNumber", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
} |
||||
], |
||||
"bytecode": { |
||||
"object": "0x608060405234801561001057600080fd5b50610125806100206000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80633fb5c1cb1460415780638381f58a146052578063d09de08a14606c575b600080fd5b6050604c3660046095565b6072565b005b605a60005481565b60405190815260200160405180910390f35b60506081565b607b81607b60c3565b60005550565b600080549080608e8360d9565b9190505550565b60006020828403121560a657600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111560d35760d360ad565b92915050565b60006001820160e85760e860ad565b506001019056fea2646970667358221220981d705d73c405a1cadf6bcd0ff9f1d0fcbbc1599040e504e71517ff0d8aa53264736f6c63430008100033", |
||||
"sourceMap": "65:198:7:-:0;;;;;;;;;;;;;;;;;;;", |
||||
"linkReferences": {} |
||||
}, |
||||
"deployedBytecode": { |
||||
"object": "0x6080604052348015600f57600080fd5b5060043610603c5760003560e01c80633fb5c1cb1460415780638381f58a146052578063d09de08a14606c575b600080fd5b6050604c3660046095565b6072565b005b605a60005481565b60405190815260200160405180910390f35b60506081565b607b81607b60c3565b60005550565b600080549080608e8360d9565b9190505550565b60006020828403121560a657600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111560d35760d360ad565b92915050565b60006001820160e85760e860ad565b506001019056fea2646970667358221220981d705d73c405a1cadf6bcd0ff9f1d0fcbbc1599040e504e71517ff0d8aa53264736f6c63430008100033", |
||||
"sourceMap": "65:198:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;116:86;;;;;;:::i;:::-;;:::i;:::-;;88:21;;;;;;;;;345:25:9;;;333:2;318:18;88:21:7;;;;;;;208:53;;;:::i;116:86::-;180:15;:9;192:3;180:15;:::i;:::-;171:6;:24;-1:-1:-1;116:86:7:o;208:53::-;246:6;:8;;;:6;:8;;;:::i;:::-;;;;;;208:53::o;14:180:9:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:9;;14:180;-1:-1:-1;14:180:9:o;381:127::-;442:10;437:3;433:20;430:1;423:31;473:4;470:1;463:15;497:4;494:1;487:15;513:125;578:9;;;599:10;;;596:36;;;612:18;;:::i;:::-;513:125;;;;:::o;643:135::-;682:3;703:17;;;700:43;;723:18;;:::i;:::-;-1:-1:-1;770:1:9;759:13;;643:135::o", |
||||
"linkReferences": {} |
||||
}, |
||||
"methodIdentifiers": { |
||||
"increment()": "d09de08a", |
||||
"number()": "8381f58a", |
||||
"setNumber(uint256)": "3fb5c1cb" |
||||
}, |
||||
"ast": { |
||||
"absolutePath": "src/Counter.sol", |
||||
"id": 21628, |
||||
"exportedSymbols": { |
||||
"Counter": [ |
||||
21605 |
||||
], |
||||
"CounterYann": [ |
||||
21627 |
||||
] |
||||
}, |
||||
"nodeType": "SourceUnit", |
||||
"src": "39:427:7", |
||||
"nodes": [ |
||||
{ |
||||
"id": 21583, |
||||
"nodeType": "PragmaDirective", |
||||
"src": "39:24:7", |
||||
"literals": [ |
||||
"solidity", |
||||
"^", |
||||
"0.8", |
||||
".13" |
||||
] |
||||
}, |
||||
{ |
||||
"id": 21605, |
||||
"nodeType": "ContractDefinition", |
||||
"src": "65:198:7", |
||||
"nodes": [ |
||||
{ |
||||
"id": 21585, |
||||
"nodeType": "VariableDeclaration", |
||||
"src": "88:21:7", |
||||
"constant": false, |
||||
"functionSelector": "8381f58a", |
||||
"mutability": "mutable", |
||||
"name": "number", |
||||
"nameLocation": "103:6:7", |
||||
"scope": 21605, |
||||
"stateVariable": true, |
||||
"storageLocation": "default", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"typeName": { |
||||
"id": 21584, |
||||
"name": "uint256", |
||||
"nodeType": "ElementaryTypeName", |
||||
"src": "88:7:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"visibility": "public" |
||||
}, |
||||
{ |
||||
"id": 21597, |
||||
"nodeType": "FunctionDefinition", |
||||
"src": "116:86:7", |
||||
"body": { |
||||
"id": 21596, |
||||
"nodeType": "Block", |
||||
"src": "161:41:7", |
||||
"statements": [ |
||||
{ |
||||
"expression": { |
||||
"id": 21594, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"leftHandSide": { |
||||
"id": 21590, |
||||
"name": "number", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 21585, |
||||
"src": "171:6:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"nodeType": "Assignment", |
||||
"operator": "=", |
||||
"rightHandSide": { |
||||
"commonType": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"id": 21593, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"leftExpression": { |
||||
"id": 21591, |
||||
"name": "newNumber", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 21587, |
||||
"src": "180:9:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"nodeType": "BinaryOperation", |
||||
"operator": "+", |
||||
"rightExpression": { |
||||
"hexValue": "313233", |
||||
"id": 21592, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": true, |
||||
"kind": "number", |
||||
"lValueRequested": false, |
||||
"nodeType": "Literal", |
||||
"src": "192:3:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_rational_123_by_1", |
||||
"typeString": "int_const 123" |
||||
}, |
||||
"value": "123" |
||||
}, |
||||
"src": "180:15:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"src": "171:24:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"id": 21595, |
||||
"nodeType": "ExpressionStatement", |
||||
"src": "171:24:7" |
||||
} |
||||
] |
||||
}, |
||||
"functionSelector": "3fb5c1cb", |
||||
"implemented": true, |
||||
"kind": "function", |
||||
"modifiers": [], |
||||
"name": "setNumber", |
||||
"nameLocation": "125:9:7", |
||||
"parameters": { |
||||
"id": 21588, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [ |
||||
{ |
||||
"constant": false, |
||||
"id": 21587, |
||||
"mutability": "mutable", |
||||
"name": "newNumber", |
||||
"nameLocation": "143:9:7", |
||||
"nodeType": "VariableDeclaration", |
||||
"scope": 21597, |
||||
"src": "135:17:7", |
||||
"stateVariable": false, |
||||
"storageLocation": "default", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"typeName": { |
||||
"id": 21586, |
||||
"name": "uint256", |
||||
"nodeType": "ElementaryTypeName", |
||||
"src": "135:7:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"visibility": "internal" |
||||
} |
||||
], |
||||
"src": "134:19:7" |
||||
}, |
||||
"returnParameters": { |
||||
"id": 21589, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "161:0:7" |
||||
}, |
||||
"scope": 21605, |
||||
"stateMutability": "nonpayable", |
||||
"virtual": false, |
||||
"visibility": "public" |
||||
}, |
||||
{ |
||||
"id": 21604, |
||||
"nodeType": "FunctionDefinition", |
||||
"src": "208:53:7", |
||||
"body": { |
||||
"id": 21603, |
||||
"nodeType": "Block", |
||||
"src": "236:25:7", |
||||
"statements": [ |
||||
{ |
||||
"expression": { |
||||
"id": 21601, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"nodeType": "UnaryOperation", |
||||
"operator": "++", |
||||
"prefix": false, |
||||
"src": "246:8:7", |
||||
"subExpression": { |
||||
"id": 21600, |
||||
"name": "number", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 21585, |
||||
"src": "246:6:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"id": 21602, |
||||
"nodeType": "ExpressionStatement", |
||||
"src": "246:8:7" |
||||
} |
||||
] |
||||
}, |
||||
"functionSelector": "d09de08a", |
||||
"implemented": true, |
||||
"kind": "function", |
||||
"modifiers": [], |
||||
"name": "increment", |
||||
"nameLocation": "217:9:7", |
||||
"parameters": { |
||||
"id": 21598, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "226:2:7" |
||||
}, |
||||
"returnParameters": { |
||||
"id": 21599, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "236:0:7" |
||||
}, |
||||
"scope": 21605, |
||||
"stateMutability": "nonpayable", |
||||
"virtual": false, |
||||
"visibility": "public" |
||||
} |
||||
], |
||||
"abstract": false, |
||||
"baseContracts": [], |
||||
"canonicalName": "Counter", |
||||
"contractDependencies": [], |
||||
"contractKind": "contract", |
||||
"fullyImplemented": true, |
||||
"linearizedBaseContracts": [ |
||||
21605 |
||||
], |
||||
"name": "Counter", |
||||
"nameLocation": "74:7:7", |
||||
"scope": 21628, |
||||
"usedErrors": [] |
||||
}, |
||||
{ |
||||
"id": 21627, |
||||
"nodeType": "ContractDefinition", |
||||
"src": "265:200:7", |
||||
"nodes": [ |
||||
{ |
||||
"id": 21607, |
||||
"nodeType": "VariableDeclaration", |
||||
"src": "292:21:7", |
||||
"constant": false, |
||||
"functionSelector": "8381f58a", |
||||
"mutability": "mutable", |
||||
"name": "number", |
||||
"nameLocation": "307:6:7", |
||||
"scope": 21627, |
||||
"stateVariable": true, |
||||
"storageLocation": "default", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"typeName": { |
||||
"id": 21606, |
||||
"name": "uint256", |
||||
"nodeType": "ElementaryTypeName", |
||||
"src": "292:7:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"visibility": "public" |
||||
}, |
||||
{ |
||||
"id": 21619, |
||||
"nodeType": "FunctionDefinition", |
||||
"src": "320:84:7", |
||||
"body": { |
||||
"id": 21618, |
||||
"nodeType": "Block", |
||||
"src": "365:39:7", |
||||
"statements": [ |
||||
{ |
||||
"expression": { |
||||
"id": 21616, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"leftHandSide": { |
||||
"id": 21612, |
||||
"name": "number", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 21607, |
||||
"src": "375:6:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"nodeType": "Assignment", |
||||
"operator": "=", |
||||
"rightHandSide": { |
||||
"commonType": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"id": 21615, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"leftExpression": { |
||||
"id": 21613, |
||||
"name": "newNumber", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 21609, |
||||
"src": "384:9:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"nodeType": "BinaryOperation", |
||||
"operator": "+", |
||||
"rightExpression": { |
||||
"hexValue": "39", |
||||
"id": 21614, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": true, |
||||
"kind": "number", |
||||
"lValueRequested": false, |
||||
"nodeType": "Literal", |
||||
"src": "396:1:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_rational_9_by_1", |
||||
"typeString": "int_const 9" |
||||
}, |
||||
"value": "9" |
||||
}, |
||||
"src": "384:13:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"src": "375:22:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"id": 21617, |
||||
"nodeType": "ExpressionStatement", |
||||
"src": "375:22:7" |
||||
} |
||||
] |
||||
}, |
||||
"functionSelector": "3fb5c1cb", |
||||
"implemented": true, |
||||
"kind": "function", |
||||
"modifiers": [], |
||||
"name": "setNumber", |
||||
"nameLocation": "329:9:7", |
||||
"parameters": { |
||||
"id": 21610, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [ |
||||
{ |
||||
"constant": false, |
||||
"id": 21609, |
||||
"mutability": "mutable", |
||||
"name": "newNumber", |
||||
"nameLocation": "347:9:7", |
||||
"nodeType": "VariableDeclaration", |
||||
"scope": 21619, |
||||
"src": "339:17:7", |
||||
"stateVariable": false, |
||||
"storageLocation": "default", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
}, |
||||
"typeName": { |
||||
"id": 21608, |
||||
"name": "uint256", |
||||
"nodeType": "ElementaryTypeName", |
||||
"src": "339:7:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"visibility": "internal" |
||||
} |
||||
], |
||||
"src": "338:19:7" |
||||
}, |
||||
"returnParameters": { |
||||
"id": 21611, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "365:0:7" |
||||
}, |
||||
"scope": 21627, |
||||
"stateMutability": "nonpayable", |
||||
"virtual": false, |
||||
"visibility": "public" |
||||
}, |
||||
{ |
||||
"id": 21626, |
||||
"nodeType": "FunctionDefinition", |
||||
"src": "410:53:7", |
||||
"body": { |
||||
"id": 21625, |
||||
"nodeType": "Block", |
||||
"src": "438:25:7", |
||||
"statements": [ |
||||
{ |
||||
"expression": { |
||||
"id": 21623, |
||||
"isConstant": false, |
||||
"isLValue": false, |
||||
"isPure": false, |
||||
"lValueRequested": false, |
||||
"nodeType": "UnaryOperation", |
||||
"operator": "++", |
||||
"prefix": false, |
||||
"src": "448:8:7", |
||||
"subExpression": { |
||||
"id": 21622, |
||||
"name": "number", |
||||
"nodeType": "Identifier", |
||||
"overloadedDeclarations": [], |
||||
"referencedDeclaration": 21607, |
||||
"src": "448:6:7", |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"typeDescriptions": { |
||||
"typeIdentifier": "t_uint256", |
||||
"typeString": "uint256" |
||||
} |
||||
}, |
||||
"id": 21624, |
||||
"nodeType": "ExpressionStatement", |
||||
"src": "448:8:7" |
||||
} |
||||
] |
||||
}, |
||||
"functionSelector": "d09de08a", |
||||
"implemented": true, |
||||
"kind": "function", |
||||
"modifiers": [], |
||||
"name": "increment", |
||||
"nameLocation": "419:9:7", |
||||
"parameters": { |
||||
"id": 21620, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "428:2:7" |
||||
}, |
||||
"returnParameters": { |
||||
"id": 21621, |
||||
"nodeType": "ParameterList", |
||||
"parameters": [], |
||||
"src": "438:0:7" |
||||
}, |
||||
"scope": 21627, |
||||
"stateMutability": "nonpayable", |
||||
"virtual": false, |
||||
"visibility": "public" |
||||
} |
||||
], |
||||
"abstract": false, |
||||
"baseContracts": [], |
||||
"canonicalName": "CounterYann", |
||||
"contractDependencies": [], |
||||
"contractKind": "contract", |
||||
"fullyImplemented": true, |
||||
"linearizedBaseContracts": [ |
||||
21627 |
||||
], |
||||
"name": "CounterYann", |
||||
"nameLocation": "274:11:7", |
||||
"scope": 21628, |
||||
"usedErrors": [] |
||||
} |
||||
], |
||||
"license": "UNLICENSED" |
||||
}, |
||||
"id": 7 |
||||
} |
@ -0,0 +1,82 @@ |
||||
{ |
||||
"compiler": { |
||||
"version": "0.8.16+commit.07a7930e" |
||||
}, |
||||
"language": "Solidity", |
||||
"output": { |
||||
"abi": [ |
||||
{ |
||||
"inputs": [], |
||||
"name": "increment", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "number", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "newNumber", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "setNumber", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
} |
||||
], |
||||
"devdoc": { |
||||
"kind": "dev", |
||||
"methods": {}, |
||||
"version": 1 |
||||
}, |
||||
"userdoc": { |
||||
"kind": "user", |
||||
"methods": {}, |
||||
"version": 1 |
||||
} |
||||
}, |
||||
"settings": { |
||||
"compilationTarget": { |
||||
"src/Counter.sol": "Counter" |
||||
}, |
||||
"evmVersion": "london", |
||||
"libraries": {}, |
||||
"metadata": { |
||||
"bytecodeHash": "ipfs" |
||||
}, |
||||
"optimizer": { |
||||
"enabled": true, |
||||
"runs": 200 |
||||
}, |
||||
"remappings": [ |
||||
":ds-test/=lib/forge-std/lib/ds-test/src/", |
||||
":forge-std/=lib/forge-std/src/" |
||||
] |
||||
}, |
||||
"sources": { |
||||
"src/Counter.sol": { |
||||
"keccak256": "0x74eb20a9c3120b64f0e66b02cf476d5d1ff5e07149a4c52b8e774a6800a40b83", |
||||
"license": "UNLICENSED", |
||||
"urls": [ |
||||
"bzz-raw://be4d1233bdd7aaf1846eb4c3b94c58914fa4a4b7a2fa4a5734d9d09c562975dc", |
||||
"dweb:/ipfs/QmNVGX1nn75pwmWKQjPdV8cy5u5PHuWGbL6TsztchKqmAZ" |
||||
] |
||||
} |
||||
}, |
||||
"version": 1 |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,561 @@ |
||||
{ |
||||
"compiler": { |
||||
"version": "0.8.16+commit.07a7930e" |
||||
}, |
||||
"language": "Solidity", |
||||
"output": { |
||||
"abi": [ |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "", |
||||
"type": "string" |
||||
} |
||||
], |
||||
"name": "log", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "address", |
||||
"name": "", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "log_address", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256[]", |
||||
"name": "val", |
||||
"type": "uint256[]" |
||||
} |
||||
], |
||||
"name": "log_array", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "int256[]", |
||||
"name": "val", |
||||
"type": "int256[]" |
||||
} |
||||
], |
||||
"name": "log_array", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "address[]", |
||||
"name": "val", |
||||
"type": "address[]" |
||||
} |
||||
], |
||||
"name": "log_array", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"name": "log_bytes", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes32", |
||||
"name": "", |
||||
"type": "bytes32" |
||||
} |
||||
], |
||||
"name": "log_bytes32", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "int256", |
||||
"name": "", |
||||
"type": "int256" |
||||
} |
||||
], |
||||
"name": "log_int", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "address", |
||||
"name": "val", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "log_named_address", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256[]", |
||||
"name": "val", |
||||
"type": "uint256[]" |
||||
} |
||||
], |
||||
"name": "log_named_array", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "int256[]", |
||||
"name": "val", |
||||
"type": "int256[]" |
||||
} |
||||
], |
||||
"name": "log_named_array", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "address[]", |
||||
"name": "val", |
||||
"type": "address[]" |
||||
} |
||||
], |
||||
"name": "log_named_array", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes", |
||||
"name": "val", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"name": "log_named_bytes", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes32", |
||||
"name": "val", |
||||
"type": "bytes32" |
||||
} |
||||
], |
||||
"name": "log_named_bytes32", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "int256", |
||||
"name": "val", |
||||
"type": "int256" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "decimals", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "log_named_decimal_int", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "val", |
||||
"type": "uint256" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "decimals", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "log_named_decimal_uint", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "int256", |
||||
"name": "val", |
||||
"type": "int256" |
||||
} |
||||
], |
||||
"name": "log_named_int", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "val", |
||||
"type": "string" |
||||
} |
||||
], |
||||
"name": "log_named_string", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "val", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "log_named_uint", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "", |
||||
"type": "string" |
||||
} |
||||
], |
||||
"name": "log_string", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "log_uint", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"name": "logs", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "IS_SCRIPT", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bool", |
||||
"name": "", |
||||
"type": "bool" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "IS_TEST", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bool", |
||||
"name": "", |
||||
"type": "bool" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "counter", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "contract Counter", |
||||
"name": "", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "failed", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bool", |
||||
"name": "", |
||||
"type": "bool" |
||||
} |
||||
], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "setUp", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "testIncrement", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "x", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "testSetNumber", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "vm", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "contract Vm", |
||||
"name": "", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
} |
||||
], |
||||
"devdoc": { |
||||
"kind": "dev", |
||||
"methods": {}, |
||||
"version": 1 |
||||
}, |
||||
"userdoc": { |
||||
"kind": "user", |
||||
"methods": {}, |
||||
"version": 1 |
||||
} |
||||
}, |
||||
"settings": { |
||||
"compilationTarget": { |
||||
"test/Counter.t.sol": "CounterTest" |
||||
}, |
||||
"evmVersion": "london", |
||||
"libraries": {}, |
||||
"metadata": { |
||||
"bytecodeHash": "ipfs" |
||||
}, |
||||
"optimizer": { |
||||
"enabled": true, |
||||
"runs": 200 |
||||
}, |
||||
"remappings": [ |
||||
":ds-test/=lib/forge-std/lib/ds-test/src/", |
||||
":forge-std/=lib/forge-std/src/" |
||||
] |
||||
}, |
||||
"sources": { |
||||
"lib/forge-std/lib/ds-test/src/test.sol": { |
||||
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54", |
||||
"license": "GPL-3.0-or-later", |
||||
"urls": [ |
||||
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5", |
||||
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Script.sol": { |
||||
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a", |
||||
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Test.sol": { |
||||
"keccak256": "0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55", |
||||
"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Vm.sol": { |
||||
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f", |
||||
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/console.sol": { |
||||
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70", |
||||
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/console2.sol": { |
||||
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f", |
||||
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW" |
||||
] |
||||
}, |
||||
"src/Counter.sol": { |
||||
"keccak256": "0x74eb20a9c3120b64f0e66b02cf476d5d1ff5e07149a4c52b8e774a6800a40b83", |
||||
"license": "UNLICENSED", |
||||
"urls": [ |
||||
"bzz-raw://be4d1233bdd7aaf1846eb4c3b94c58914fa4a4b7a2fa4a5734d9d09c562975dc", |
||||
"dweb:/ipfs/QmNVGX1nn75pwmWKQjPdV8cy5u5PHuWGbL6TsztchKqmAZ" |
||||
] |
||||
}, |
||||
"test/Counter.t.sol": { |
||||
"keccak256": "0x76bdc40734abcf9acbe5d56422e22662bc218e7d410264f3de6a823036be6a6d", |
||||
"license": "UNLICENSED", |
||||
"urls": [ |
||||
"bzz-raw://27118e74e69a15c903cb826430175f337a9ab5cd1bb55a767ae9439e860052bd", |
||||
"dweb:/ipfs/QmfNHmcHCDN2eDQpbaDTSRyU4uhcZjpLEdvrudZRLY5knF" |
||||
] |
||||
} |
||||
}, |
||||
"version": 1 |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,99 @@ |
||||
{ |
||||
"compiler": { |
||||
"version": "0.8.16+commit.07a7930e" |
||||
}, |
||||
"language": "Solidity", |
||||
"output": { |
||||
"abi": [ |
||||
{ |
||||
"inputs": [], |
||||
"name": "IS_SCRIPT", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bool", |
||||
"name": "", |
||||
"type": "bool" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "vm", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "contract Vm", |
||||
"name": "", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
} |
||||
], |
||||
"devdoc": { |
||||
"kind": "dev", |
||||
"methods": {}, |
||||
"version": 1 |
||||
}, |
||||
"userdoc": { |
||||
"kind": "user", |
||||
"methods": {}, |
||||
"version": 1 |
||||
} |
||||
}, |
||||
"settings": { |
||||
"compilationTarget": { |
||||
"lib/forge-std/src/Script.sol": "Script" |
||||
}, |
||||
"evmVersion": "london", |
||||
"libraries": {}, |
||||
"metadata": { |
||||
"bytecodeHash": "ipfs" |
||||
}, |
||||
"optimizer": { |
||||
"enabled": true, |
||||
"runs": 200 |
||||
}, |
||||
"remappings": [ |
||||
":ds-test/=lib/forge-std/lib/ds-test/src/", |
||||
":forge-std/=lib/forge-std/src/" |
||||
] |
||||
}, |
||||
"sources": { |
||||
"lib/forge-std/src/Script.sol": { |
||||
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a", |
||||
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Vm.sol": { |
||||
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f", |
||||
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/console.sol": { |
||||
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70", |
||||
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/console2.sol": { |
||||
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f", |
||||
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW" |
||||
] |
||||
} |
||||
}, |
||||
"version": 1 |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,505 @@ |
||||
{ |
||||
"compiler": { |
||||
"version": "0.8.16+commit.07a7930e" |
||||
}, |
||||
"language": "Solidity", |
||||
"output": { |
||||
"abi": [ |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "", |
||||
"type": "string" |
||||
} |
||||
], |
||||
"name": "log", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "address", |
||||
"name": "", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "log_address", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256[]", |
||||
"name": "val", |
||||
"type": "uint256[]" |
||||
} |
||||
], |
||||
"name": "log_array", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "int256[]", |
||||
"name": "val", |
||||
"type": "int256[]" |
||||
} |
||||
], |
||||
"name": "log_array", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "address[]", |
||||
"name": "val", |
||||
"type": "address[]" |
||||
} |
||||
], |
||||
"name": "log_array", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"name": "log_bytes", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes32", |
||||
"name": "", |
||||
"type": "bytes32" |
||||
} |
||||
], |
||||
"name": "log_bytes32", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "int256", |
||||
"name": "", |
||||
"type": "int256" |
||||
} |
||||
], |
||||
"name": "log_int", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "address", |
||||
"name": "val", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "log_named_address", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256[]", |
||||
"name": "val", |
||||
"type": "uint256[]" |
||||
} |
||||
], |
||||
"name": "log_named_array", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "int256[]", |
||||
"name": "val", |
||||
"type": "int256[]" |
||||
} |
||||
], |
||||
"name": "log_named_array", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "address[]", |
||||
"name": "val", |
||||
"type": "address[]" |
||||
} |
||||
], |
||||
"name": "log_named_array", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes", |
||||
"name": "val", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"name": "log_named_bytes", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes32", |
||||
"name": "val", |
||||
"type": "bytes32" |
||||
} |
||||
], |
||||
"name": "log_named_bytes32", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "int256", |
||||
"name": "val", |
||||
"type": "int256" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "decimals", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "log_named_decimal_int", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "val", |
||||
"type": "uint256" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "decimals", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "log_named_decimal_uint", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "int256", |
||||
"name": "val", |
||||
"type": "int256" |
||||
} |
||||
], |
||||
"name": "log_named_int", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "val", |
||||
"type": "string" |
||||
} |
||||
], |
||||
"name": "log_named_string", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "val", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "log_named_uint", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "", |
||||
"type": "string" |
||||
} |
||||
], |
||||
"name": "log_string", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "log_uint", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"name": "logs", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "IS_SCRIPT", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bool", |
||||
"name": "", |
||||
"type": "bool" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "IS_TEST", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bool", |
||||
"name": "", |
||||
"type": "bool" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "failed", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bool", |
||||
"name": "", |
||||
"type": "bool" |
||||
} |
||||
], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "vm", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "contract Vm", |
||||
"name": "", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
} |
||||
], |
||||
"devdoc": { |
||||
"kind": "dev", |
||||
"methods": {}, |
||||
"version": 1 |
||||
}, |
||||
"userdoc": { |
||||
"kind": "user", |
||||
"methods": {}, |
||||
"version": 1 |
||||
} |
||||
}, |
||||
"settings": { |
||||
"compilationTarget": { |
||||
"lib/forge-std/src/Test.sol": "Test" |
||||
}, |
||||
"evmVersion": "london", |
||||
"libraries": {}, |
||||
"metadata": { |
||||
"bytecodeHash": "ipfs" |
||||
}, |
||||
"optimizer": { |
||||
"enabled": true, |
||||
"runs": 200 |
||||
}, |
||||
"remappings": [ |
||||
":ds-test/=lib/forge-std/lib/ds-test/src/", |
||||
":forge-std/=lib/forge-std/src/" |
||||
] |
||||
}, |
||||
"sources": { |
||||
"lib/forge-std/lib/ds-test/src/test.sol": { |
||||
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54", |
||||
"license": "GPL-3.0-or-later", |
||||
"urls": [ |
||||
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5", |
||||
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Script.sol": { |
||||
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a", |
||||
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Test.sol": { |
||||
"keccak256": "0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55", |
||||
"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Vm.sol": { |
||||
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f", |
||||
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/console.sol": { |
||||
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70", |
||||
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/console2.sol": { |
||||
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f", |
||||
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW" |
||||
] |
||||
} |
||||
}, |
||||
"version": 1 |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,219 @@ |
||||
{ |
||||
"compiler": { |
||||
"version": "0.8.16+commit.07a7930e" |
||||
}, |
||||
"language": "Solidity", |
||||
"output": { |
||||
"abi": [ |
||||
{ |
||||
"inputs": [], |
||||
"name": "arithmeticError", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "assertionError", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "divisionError", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "encodeStorageError", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "enumConversionError", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "indexOOBError", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "lowLevelError", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "memOverflowError", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "popError", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "zeroVarError", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
} |
||||
], |
||||
"devdoc": { |
||||
"kind": "dev", |
||||
"methods": {}, |
||||
"version": 1 |
||||
}, |
||||
"userdoc": { |
||||
"kind": "user", |
||||
"methods": {}, |
||||
"version": 1 |
||||
} |
||||
}, |
||||
"settings": { |
||||
"compilationTarget": { |
||||
"lib/forge-std/src/Test.sol": "stdError" |
||||
}, |
||||
"evmVersion": "london", |
||||
"libraries": {}, |
||||
"metadata": { |
||||
"bytecodeHash": "ipfs" |
||||
}, |
||||
"optimizer": { |
||||
"enabled": true, |
||||
"runs": 200 |
||||
}, |
||||
"remappings": [ |
||||
":ds-test/=lib/forge-std/lib/ds-test/src/", |
||||
":forge-std/=lib/forge-std/src/" |
||||
] |
||||
}, |
||||
"sources": { |
||||
"lib/forge-std/lib/ds-test/src/test.sol": { |
||||
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54", |
||||
"license": "GPL-3.0-or-later", |
||||
"urls": [ |
||||
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5", |
||||
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Script.sol": { |
||||
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a", |
||||
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Test.sol": { |
||||
"keccak256": "0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55", |
||||
"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Vm.sol": { |
||||
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f", |
||||
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/console.sol": { |
||||
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70", |
||||
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/console2.sol": { |
||||
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f", |
||||
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW" |
||||
] |
||||
} |
||||
}, |
||||
"version": 1 |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,88 @@ |
||||
{ |
||||
"compiler": { |
||||
"version": "0.8.16+commit.07a7930e" |
||||
}, |
||||
"language": "Solidity", |
||||
"output": { |
||||
"abi": [], |
||||
"devdoc": { |
||||
"kind": "dev", |
||||
"methods": {}, |
||||
"version": 1 |
||||
}, |
||||
"userdoc": { |
||||
"kind": "user", |
||||
"methods": {}, |
||||
"version": 1 |
||||
} |
||||
}, |
||||
"settings": { |
||||
"compilationTarget": { |
||||
"lib/forge-std/src/Test.sol": "stdMath" |
||||
}, |
||||
"evmVersion": "london", |
||||
"libraries": {}, |
||||
"metadata": { |
||||
"bytecodeHash": "ipfs" |
||||
}, |
||||
"optimizer": { |
||||
"enabled": true, |
||||
"runs": 200 |
||||
}, |
||||
"remappings": [ |
||||
":ds-test/=lib/forge-std/lib/ds-test/src/", |
||||
":forge-std/=lib/forge-std/src/" |
||||
] |
||||
}, |
||||
"sources": { |
||||
"lib/forge-std/lib/ds-test/src/test.sol": { |
||||
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54", |
||||
"license": "GPL-3.0-or-later", |
||||
"urls": [ |
||||
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5", |
||||
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Script.sol": { |
||||
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a", |
||||
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Test.sol": { |
||||
"keccak256": "0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55", |
||||
"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Vm.sol": { |
||||
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f", |
||||
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/console.sol": { |
||||
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70", |
||||
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/console2.sol": { |
||||
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f", |
||||
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW" |
||||
] |
||||
} |
||||
}, |
||||
"version": 1 |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,163 @@ |
||||
{ |
||||
"compiler": { |
||||
"version": "0.8.16+commit.07a7930e" |
||||
}, |
||||
"language": "Solidity", |
||||
"output": { |
||||
"abi": [ |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "address", |
||||
"name": "who", |
||||
"type": "address" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes4", |
||||
"name": "fsig", |
||||
"type": "bytes4" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes32", |
||||
"name": "keysHash", |
||||
"type": "bytes32" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "slot", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "SlotFound", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "address", |
||||
"name": "who", |
||||
"type": "address" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "slot", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "WARNING_UninitedSlot", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "bytes", |
||||
"name": "b", |
||||
"type": "bytes" |
||||
}, |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "offset", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "bytesToBytes32", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bytes32", |
||||
"name": "", |
||||
"type": "bytes32" |
||||
} |
||||
], |
||||
"stateMutability": "pure", |
||||
"type": "function" |
||||
} |
||||
], |
||||
"devdoc": { |
||||
"kind": "dev", |
||||
"methods": {}, |
||||
"version": 1 |
||||
}, |
||||
"userdoc": { |
||||
"kind": "user", |
||||
"methods": {}, |
||||
"version": 1 |
||||
} |
||||
}, |
||||
"settings": { |
||||
"compilationTarget": { |
||||
"lib/forge-std/src/Test.sol": "stdStorage" |
||||
}, |
||||
"evmVersion": "london", |
||||
"libraries": {}, |
||||
"metadata": { |
||||
"bytecodeHash": "ipfs" |
||||
}, |
||||
"optimizer": { |
||||
"enabled": true, |
||||
"runs": 200 |
||||
}, |
||||
"remappings": [ |
||||
":ds-test/=lib/forge-std/lib/ds-test/src/", |
||||
":forge-std/=lib/forge-std/src/" |
||||
] |
||||
}, |
||||
"sources": { |
||||
"lib/forge-std/lib/ds-test/src/test.sol": { |
||||
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54", |
||||
"license": "GPL-3.0-or-later", |
||||
"urls": [ |
||||
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5", |
||||
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Script.sol": { |
||||
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a", |
||||
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Test.sol": { |
||||
"keccak256": "0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55", |
||||
"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/Vm.sol": { |
||||
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f", |
||||
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/console.sol": { |
||||
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70", |
||||
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec" |
||||
] |
||||
}, |
||||
"lib/forge-std/src/console2.sol": { |
||||
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f", |
||||
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW" |
||||
] |
||||
} |
||||
}, |
||||
"version": 1 |
||||
} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,48 @@ |
||||
{ |
||||
"compiler": { |
||||
"version": "0.8.16+commit.07a7930e" |
||||
}, |
||||
"language": "Solidity", |
||||
"output": { |
||||
"abi": [], |
||||
"devdoc": { |
||||
"kind": "dev", |
||||
"methods": {}, |
||||
"version": 1 |
||||
}, |
||||
"userdoc": { |
||||
"kind": "user", |
||||
"methods": {}, |
||||
"version": 1 |
||||
} |
||||
}, |
||||
"settings": { |
||||
"compilationTarget": { |
||||
"lib/forge-std/src/console.sol": "console" |
||||
}, |
||||
"evmVersion": "london", |
||||
"libraries": {}, |
||||
"metadata": { |
||||
"bytecodeHash": "ipfs" |
||||
}, |
||||
"optimizer": { |
||||
"enabled": true, |
||||
"runs": 200 |
||||
}, |
||||
"remappings": [ |
||||
":ds-test/=lib/forge-std/lib/ds-test/src/", |
||||
":forge-std/=lib/forge-std/src/" |
||||
] |
||||
}, |
||||
"sources": { |
||||
"lib/forge-std/src/console.sol": { |
||||
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70", |
||||
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec" |
||||
] |
||||
} |
||||
}, |
||||
"version": 1 |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,48 @@ |
||||
{ |
||||
"compiler": { |
||||
"version": "0.8.16+commit.07a7930e" |
||||
}, |
||||
"language": "Solidity", |
||||
"output": { |
||||
"abi": [], |
||||
"devdoc": { |
||||
"kind": "dev", |
||||
"methods": {}, |
||||
"version": 1 |
||||
}, |
||||
"userdoc": { |
||||
"kind": "user", |
||||
"methods": {}, |
||||
"version": 1 |
||||
} |
||||
}, |
||||
"settings": { |
||||
"compilationTarget": { |
||||
"lib/forge-std/src/console2.sol": "console2" |
||||
}, |
||||
"evmVersion": "london", |
||||
"libraries": {}, |
||||
"metadata": { |
||||
"bytecodeHash": "ipfs" |
||||
}, |
||||
"optimizer": { |
||||
"enabled": true, |
||||
"runs": 200 |
||||
}, |
||||
"remappings": [ |
||||
":ds-test/=lib/forge-std/lib/ds-test/src/", |
||||
":forge-std/=lib/forge-std/src/" |
||||
] |
||||
}, |
||||
"sources": { |
||||
"lib/forge-std/src/console2.sol": { |
||||
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671", |
||||
"license": "MIT", |
||||
"urls": [ |
||||
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f", |
||||
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW" |
||||
] |
||||
} |
||||
}, |
||||
"version": 1 |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,343 @@ |
||||
{ |
||||
"compiler": { |
||||
"version": "0.8.16+commit.07a7930e" |
||||
}, |
||||
"language": "Solidity", |
||||
"output": { |
||||
"abi": [ |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "", |
||||
"type": "string" |
||||
} |
||||
], |
||||
"name": "log", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "address", |
||||
"name": "", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "log_address", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"name": "log_bytes", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes32", |
||||
"name": "", |
||||
"type": "bytes32" |
||||
} |
||||
], |
||||
"name": "log_bytes32", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "int256", |
||||
"name": "", |
||||
"type": "int256" |
||||
} |
||||
], |
||||
"name": "log_int", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "address", |
||||
"name": "val", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "log_named_address", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes", |
||||
"name": "val", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"name": "log_named_bytes", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes32", |
||||
"name": "val", |
||||
"type": "bytes32" |
||||
} |
||||
], |
||||
"name": "log_named_bytes32", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "int256", |
||||
"name": "val", |
||||
"type": "int256" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "decimals", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "log_named_decimal_int", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "val", |
||||
"type": "uint256" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "decimals", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "log_named_decimal_uint", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "int256", |
||||
"name": "val", |
||||
"type": "int256" |
||||
} |
||||
], |
||||
"name": "log_named_int", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "val", |
||||
"type": "string" |
||||
} |
||||
], |
||||
"name": "log_named_string", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "key", |
||||
"type": "string" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "val", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "log_named_uint", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "string", |
||||
"name": "", |
||||
"type": "string" |
||||
} |
||||
], |
||||
"name": "log_string", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "log_uint", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes", |
||||
"name": "", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"name": "logs", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "IS_TEST", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bool", |
||||
"name": "", |
||||
"type": "bool" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "failed", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bool", |
||||
"name": "", |
||||
"type": "bool" |
||||
} |
||||
], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
} |
||||
], |
||||
"devdoc": { |
||||
"kind": "dev", |
||||
"methods": {}, |
||||
"version": 1 |
||||
}, |
||||
"userdoc": { |
||||
"kind": "user", |
||||
"methods": {}, |
||||
"version": 1 |
||||
} |
||||
}, |
||||
"settings": { |
||||
"compilationTarget": { |
||||
"lib/forge-std/lib/ds-test/src/test.sol": "DSTest" |
||||
}, |
||||
"evmVersion": "london", |
||||
"libraries": {}, |
||||
"metadata": { |
||||
"bytecodeHash": "ipfs" |
||||
}, |
||||
"optimizer": { |
||||
"enabled": true, |
||||
"runs": 200 |
||||
}, |
||||
"remappings": [ |
||||
":ds-test/=lib/forge-std/lib/ds-test/src/", |
||||
":forge-std/=lib/forge-std/src/" |
||||
] |
||||
}, |
||||
"sources": { |
||||
"lib/forge-std/lib/ds-test/src/test.sol": { |
||||
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54", |
||||
"license": "GPL-3.0-or-later", |
||||
"urls": [ |
||||
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5", |
||||
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr" |
||||
] |
||||
} |
||||
}, |
||||
"version": 1 |
||||
} |
@ -0,0 +1 @@ |
||||
// simulate a hardhat project
|
@ -0,0 +1,18 @@ |
||||
import { WebsocketPlugin } from '@remixproject/engine-web' |
||||
import * as packageJson from '../../../../../package.json' |
||||
|
||||
const profile = { |
||||
name: 'foundry', |
||||
displayName: 'Foundry', |
||||
url: 'ws://127.0.0.1:65525', |
||||
methods: [], |
||||
description: 'Using Remixd daemon, allow to access foundry API', |
||||
kind: 'other', |
||||
version: packageJson.version |
||||
} |
||||
|
||||
export class FoundryHandle extends WebsocketPlugin { |
||||
constructor () { |
||||
super(profile) |
||||
} |
||||
} |
@ -0,0 +1,82 @@ |
||||
'use strict' |
||||
import { Plugin } from '@remixproject/engine' |
||||
import prettier from 'prettier/standalone' |
||||
import { Options } from 'prettier'; |
||||
import sol from './code-format/index' |
||||
import * as ts from 'prettier/parser-typescript' |
||||
import * as babel from 'prettier/parser-babel' |
||||
import * as espree from 'prettier/parser-espree' |
||||
import path from 'path' |
||||
|
||||
const profile = { |
||||
name: 'codeFormatter', |
||||
desciption: 'prettier plugin for Remix', |
||||
methods: ['format'], |
||||
events: [''], |
||||
version: '0.0.1' |
||||
} |
||||
|
||||
export class CodeFormat extends Plugin { |
||||
|
||||
constructor() { |
||||
super(profile) |
||||
} |
||||
|
||||
async format(file: string) { |
||||
|
||||
try { |
||||
const content = await this.call('fileManager', 'readFile', file) |
||||
if (!content) return |
||||
let parserName = '' |
||||
let options: Options = { |
||||
} |
||||
switch (path.extname(file)) { |
||||
case '.sol': |
||||
parserName = 'solidity-parse' |
||||
break |
||||
case '.ts': |
||||
parserName = 'typescript' |
||||
options = { |
||||
...options, |
||||
trailingComma: 'all', |
||||
semi: false, |
||||
singleQuote: true, |
||||
quoteProps: 'as-needed', |
||||
bracketSpacing: true, |
||||
arrowParens: 'always', |
||||
} |
||||
break |
||||
case '.js': |
||||
parserName = "espree" |
||||
options = { |
||||
...options, |
||||
semi: false, |
||||
singleQuote: true, |
||||
} |
||||
break |
||||
case '.json': |
||||
parserName = 'json' |
||||
break |
||||
} |
||||
const result = prettier.format(content, { |
||||
plugins: [sol as any, ts, babel, espree], |
||||
parser: parserName, |
||||
...options |
||||
}) |
||||
await this.call('fileManager', 'writeFile', file, result) |
||||
} catch (e) { |
||||
// do nothing
|
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
function getRange(index, node) { |
||||
if (node.range) { |
||||
return node.range[index]; |
||||
} |
||||
if (node.expression && node.expression.range) { |
||||
return node.expression.range[index]; |
||||
} |
||||
return null; |
||||
} |
@ -0,0 +1,61 @@ |
||||
import { handleComments, printComment } from 'prettier-plugin-solidity/src/comments'; |
||||
import massageAstNode from 'prettier-plugin-solidity/src/clean.js'; |
||||
import options from 'prettier-plugin-solidity/src/options.js'; |
||||
import print from 'prettier-plugin-solidity/src/printer.js'; |
||||
import loc from 'prettier-plugin-solidity/src/loc.js'; |
||||
import { parse } from './parser' |
||||
|
||||
// https://prettier.io/docs/en/plugins.html#languages
|
||||
// https://github.com/ikatyang/linguist-languages/blob/master/data/Solidity.json
|
||||
const languages = [ |
||||
{ |
||||
linguistLanguageId: 237469032, |
||||
name: 'Solidity', |
||||
type: 'programming', |
||||
color: '#AA6746', |
||||
aceMode: 'text', |
||||
tmScope: 'source.solidity', |
||||
extensions: ['.sol'], |
||||
parsers: ['solidity-parse'], |
||||
vscodeLanguageIds: ['solidity'] |
||||
} |
||||
]; |
||||
|
||||
// https://prettier.io/docs/en/plugins.html#parsers
|
||||
const parser = { astFormat: 'solidity-ast', parse, ...loc }; |
||||
const parsers = { |
||||
'solidity-parse': parser |
||||
}; |
||||
|
||||
const canAttachComment = (node) => |
||||
node.type && node.type !== 'BlockComment' && node.type !== 'LineComment'; |
||||
|
||||
// https://prettier.io/docs/en/plugins.html#printers
|
||||
const printers = { |
||||
'solidity-ast': { |
||||
canAttachComment, |
||||
handleComments: { |
||||
ownLine: handleComments.handleOwnLineComment, |
||||
endOfLine: handleComments.handleEndOfLineComment, |
||||
remaining: handleComments.handleRemainingComment |
||||
}, |
||||
isBlockComment: handleComments.isBlockComment, |
||||
massageAstNode, |
||||
print, |
||||
printComment |
||||
} |
||||
}; |
||||
|
||||
// https://prettier.io/docs/en/plugins.html#defaultoptions
|
||||
const defaultOptions = { |
||||
bracketSpacing: false, |
||||
tabWidth: 4 |
||||
}; |
||||
|
||||
export default { |
||||
languages, |
||||
parsers, |
||||
printers, |
||||
options, |
||||
defaultOptions |
||||
}; |
@ -0,0 +1,197 @@ |
||||
// https://prettier.io/docs/en/plugins.html#parsers
|
||||
import extractComments from 'solidity-comments-extractor'; |
||||
// use the parser already included in the app
|
||||
const parser = (window as any).SolidityParser |
||||
import semver from 'semver'; |
||||
|
||||
const tryHug = (node, operators) => { |
||||
if (node.type === 'BinaryOperation' && operators.includes(node.operator)) |
||||
return { |
||||
type: 'TupleExpression', |
||||
components: [node], |
||||
isArray: false |
||||
}; |
||||
return node; |
||||
}; |
||||
|
||||
export function parse(text, _parsers, options) { |
||||
const compiler = semver.coerce(options.compiler); |
||||
const parsed = parser.parse(text, { loc: true, range: true }); |
||||
parsed.comments = extractComments(text) |
||||
|
||||
parser.visit(parsed, { |
||||
PragmaDirective(ctx) { |
||||
// if the pragma is not for solidity we leave.
|
||||
if (ctx.name !== 'solidity') return; |
||||
// if the compiler option has not been provided we leave.
|
||||
if (!compiler) return; |
||||
// we make a check against each pragma directive in the document.
|
||||
if (!semver.satisfies(compiler, ctx.value)) { |
||||
// @TODO: investigate the best way to warn that would apply to
|
||||
// different editors.
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn( |
||||
`[prettier-solidity] The compiler option is set to '${options.compiler}', which does not satisfy 'pragma solidity ${ctx.value}'.` |
||||
); |
||||
} |
||||
}, |
||||
ModifierDefinition(ctx) { |
||||
if (!ctx.parameters) { |
||||
ctx.parameters = []; |
||||
} |
||||
}, |
||||
FunctionDefinition(ctx) { |
||||
if (!ctx.isConstructor) { |
||||
ctx.modifiers.forEach((modifier) => { |
||||
if (modifier.arguments && modifier.arguments.length === 0) { |
||||
// eslint-disable-next-line no-param-reassign
|
||||
modifier.arguments = null; |
||||
} |
||||
}); |
||||
} |
||||
}, |
||||
ForStatement(ctx) { |
||||
if (ctx.initExpression) { |
||||
ctx.initExpression.omitSemicolon = true; |
||||
} |
||||
ctx.loopExpression.omitSemicolon = true; |
||||
}, |
||||
HexLiteral(ctx) { |
||||
ctx.value = options.singleQuote |
||||
? `hex'${ctx.value.slice(4, -1)}'` |
||||
: `hex"${ctx.value.slice(4, -1)}"`; |
||||
}, |
||||
ElementaryTypeName(ctx) { |
||||
// if the compiler is below 0.8.0 we will recognize the type 'byte' as an
|
||||
// alias of 'bytes1'. Otherwise we will ignore this and enforce always
|
||||
// 'bytes1'.
|
||||
const pre080 = compiler && semver.satisfies(compiler, '<0.8.0'); |
||||
if (!pre080 && ctx.name === 'byte') ctx.name = 'bytes1'; |
||||
|
||||
if (options.explicitTypes === 'always') { |
||||
if (ctx.name === 'uint') ctx.name = 'uint256'; |
||||
if (ctx.name === 'int') ctx.name = 'int256'; |
||||
if (pre080 && ctx.name === 'byte') ctx.name = 'bytes1'; |
||||
} else if (options.explicitTypes === 'never') { |
||||
if (ctx.name === 'uint256') ctx.name = 'uint'; |
||||
if (ctx.name === 'int256') ctx.name = 'int'; |
||||
if (pre080 && ctx.name === 'bytes1') ctx.name = 'byte'; |
||||
} |
||||
}, |
||||
BinaryOperation(ctx) { |
||||
switch (ctx.operator) { |
||||
case '+': |
||||
case '-': |
||||
ctx.left = tryHug(ctx.left, ['%']); |
||||
ctx.right = tryHug(ctx.right, ['%']); |
||||
break; |
||||
case '*': |
||||
ctx.left = tryHug(ctx.left, ['/', '%']); |
||||
break; |
||||
case '/': |
||||
ctx.left = tryHug(ctx.left, ['*', '%']); |
||||
break; |
||||
case '%': |
||||
ctx.left = tryHug(ctx.left, ['*', '/', '%']); |
||||
break; |
||||
case '**': |
||||
// If the compiler has not been given as an option using we leave a**b**c.
|
||||
if (!compiler) break; |
||||
|
||||
if (semver.satisfies(compiler, '<0.8.0')) { |
||||
// If the compiler is less than 0.8.0 then a**b**c is formatted as
|
||||
// (a**b)**c.
|
||||
ctx.left = tryHug(ctx.left, ['**']); |
||||
break; |
||||
} |
||||
if ( |
||||
ctx.left.type === 'BinaryOperation' && |
||||
ctx.left.operator === '**' |
||||
) { |
||||
// the parser still organizes the a**b**c as (a**b)**c so we need
|
||||
// to restructure it.
|
||||
ctx.right = { |
||||
type: 'TupleExpression', |
||||
components: [ |
||||
{ |
||||
type: 'BinaryOperation', |
||||
operator: '**', |
||||
left: ctx.left.right, |
||||
right: ctx.right |
||||
} |
||||
], |
||||
isArray: false |
||||
}; |
||||
ctx.left = ctx.left.left; |
||||
} |
||||
break; |
||||
case '<<': |
||||
case '>>': |
||||
ctx.left = tryHug(ctx.left, ['+', '-', '*', '/', '**', '<<', '>>']); |
||||
ctx.right = tryHug(ctx.right, ['+', '-', '*', '/', '**']); |
||||
break; |
||||
case '&': |
||||
ctx.left = tryHug(ctx.left, ['+', '-', '*', '/', '**', '<<', '>>']); |
||||
ctx.right = tryHug(ctx.right, ['+', '-', '*', '/', '**', '<<', '>>']); |
||||
break; |
||||
case '|': |
||||
ctx.left = tryHug(ctx.left, [ |
||||
'+', |
||||
'-', |
||||
'*', |
||||
'/', |
||||
'**', |
||||
'<<', |
||||
'>>', |
||||
'&', |
||||
'^' |
||||
]); |
||||
ctx.right = tryHug(ctx.right, [ |
||||
'+', |
||||
'-', |
||||
'*', |
||||
'/', |
||||
'**', |
||||
'<<', |
||||
'>>', |
||||
'&', |
||||
'^' |
||||
]); |
||||
break; |
||||
case '^': |
||||
ctx.left = tryHug(ctx.left, [ |
||||
'+', |
||||
'-', |
||||
'*', |
||||
'/', |
||||
'**', |
||||
'<<', |
||||
'>>', |
||||
'&' |
||||
]); |
||||
ctx.right = tryHug(ctx.right, [ |
||||
'+', |
||||
'-', |
||||
'*', |
||||
'/', |
||||
'**', |
||||
'<<', |
||||
'>>', |
||||
'&' |
||||
]); |
||||
break; |
||||
case '||': |
||||
ctx.left = tryHug(ctx.left, ['&&']); |
||||
ctx.right = tryHug(ctx.right, ['&&']); |
||||
break; |
||||
case '&&': |
||||
default: |
||||
break; |
||||
} |
||||
} |
||||
}); |
||||
|
||||
return parsed; |
||||
} |
||||
|
||||
|
@ -0,0 +1,82 @@ |
||||
'use strict' |
||||
import { CodeParser } from "../code-parser"; |
||||
|
||||
export type CodeParserImportsData= { |
||||
files?: string[], |
||||
modules?: string[], |
||||
packages?: string[], |
||||
} |
||||
|
||||
export default class CodeParserImports { |
||||
plugin: CodeParser |
||||
|
||||
data: CodeParserImportsData = {} |
||||
constructor(plugin: CodeParser) { |
||||
this.plugin = plugin |
||||
this.init() |
||||
} |
||||
|
||||
async getImports(){ |
||||
return this.data |
||||
} |
||||
|
||||
async init() { |
||||
// @ts-ignore
|
||||
const txt = await import('raw-loader!libs/remix-ui/editor/src/lib/providers/completion/contracts/contracts.txt') |
||||
this.data.modules = txt.default.split('\n') |
||||
.filter(x => x !== '') |
||||
.map(x => x.replace('./node_modules/', '')) |
||||
.filter(x => { |
||||
if(x.includes('@openzeppelin')) { |
||||
return !x.includes('mock') |
||||
}else{ |
||||
return true |
||||
}
|
||||
}) |
||||
|
||||
// get unique first words of the values in the array
|
||||
this.data.packages = [...new Set(this.data.modules.map(x => x.split('/')[0]))] |
||||
} |
||||
|
||||
setFileTree = async () => { |
||||
this.data.files = await this.getDirectory('/') |
||||
this.data.files = this.data.files.filter(x => x.endsWith('.sol') && !x.startsWith('.deps') && !x.startsWith('.git')) |
||||
} |
||||
|
||||
getDirectory = async (dir: string) => { |
||||
let result = [] |
||||
const files = await this.plugin.call('fileManager', 'readdir', dir) |
||||
const fileArray = this.normalize(files) |
||||
for (const fi of fileArray) { |
||||
if (fi) { |
||||
const type = fi.data.isDirectory |
||||
if (type === true) { |
||||
result = [...result, ...(await this.getDirectory(`${fi.filename}`))] |
||||
} else { |
||||
result = [...result, fi.filename] |
||||
} |
||||
} |
||||
} |
||||
return result |
||||
} |
||||
|
||||
normalize = filesList => { |
||||
const folders = [] |
||||
const files = [] |
||||
Object.keys(filesList || {}).forEach(key => { |
||||
if (filesList[key].isDirectory) { |
||||
folders.push({ |
||||
filename: key, |
||||
data: filesList[key] |
||||
}) |
||||
} else { |
||||
files.push({ |
||||
filename: key, |
||||
data: filesList[key] |
||||
}) |
||||
} |
||||
}) |
||||
return [...folders, ...files] |
||||
} |
||||
|
||||
} |
@ -0,0 +1,198 @@ |
||||
./node_modules/@openzeppelin/contracts/access/AccessControl.sol |
||||
./node_modules/@openzeppelin/contracts/access/AccessControlCrossChain.sol |
||||
./node_modules/@openzeppelin/contracts/access/AccessControlEnumerable.sol |
||||
./node_modules/@openzeppelin/contracts/access/IAccessControl.sol |
||||
./node_modules/@openzeppelin/contracts/access/IAccessControlEnumerable.sol |
||||
./node_modules/@openzeppelin/contracts/access/Ownable.sol |
||||
./node_modules/@openzeppelin/contracts/crosschain/amb/CrossChainEnabledAMB.sol |
||||
./node_modules/@openzeppelin/contracts/crosschain/amb/LibAMB.sol |
||||
./node_modules/@openzeppelin/contracts/crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol |
||||
./node_modules/@openzeppelin/contracts/crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol |
||||
./node_modules/@openzeppelin/contracts/crosschain/arbitrum/LibArbitrumL1.sol |
||||
./node_modules/@openzeppelin/contracts/crosschain/arbitrum/LibArbitrumL2.sol |
||||
./node_modules/@openzeppelin/contracts/crosschain/CrossChainEnabled.sol |
||||
./node_modules/@openzeppelin/contracts/crosschain/errors.sol |
||||
./node_modules/@openzeppelin/contracts/crosschain/optimism/CrossChainEnabledOptimism.sol |
||||
./node_modules/@openzeppelin/contracts/crosschain/optimism/LibOptimism.sol |
||||
./node_modules/@openzeppelin/contracts/crosschain/polygon/CrossChainEnabledPolygonChild.sol |
||||
./node_modules/@openzeppelin/contracts/finance/PaymentSplitter.sol |
||||
./node_modules/@openzeppelin/contracts/finance/VestingWallet.sol |
||||
./node_modules/@openzeppelin/contracts/governance/compatibility/GovernorCompatibilityBravo.sol |
||||
./node_modules/@openzeppelin/contracts/governance/compatibility/IGovernorCompatibilityBravo.sol |
||||
./node_modules/@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol |
||||
./node_modules/@openzeppelin/contracts/governance/extensions/GovernorPreventLateQuorum.sol |
||||
./node_modules/@openzeppelin/contracts/governance/extensions/GovernorProposalThreshold.sol |
||||
./node_modules/@openzeppelin/contracts/governance/extensions/GovernorSettings.sol |
||||
./node_modules/@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol |
||||
./node_modules/@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol |
||||
./node_modules/@openzeppelin/contracts/governance/extensions/GovernorVotes.sol |
||||
./node_modules/@openzeppelin/contracts/governance/extensions/GovernorVotesComp.sol |
||||
./node_modules/@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol |
||||
./node_modules/@openzeppelin/contracts/governance/extensions/IGovernorTimelock.sol |
||||
./node_modules/@openzeppelin/contracts/governance/Governor.sol |
||||
./node_modules/@openzeppelin/contracts/governance/IGovernor.sol |
||||
./node_modules/@openzeppelin/contracts/governance/TimelockController.sol |
||||
./node_modules/@openzeppelin/contracts/governance/utils/IVotes.sol |
||||
./node_modules/@openzeppelin/contracts/governance/utils/Votes.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/draft-IERC2612.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC1155.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC1155MetadataURI.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC1155Receiver.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC1271.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC1363.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC1363Receiver.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC1363Spender.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC165.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC1820Implementer.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC1820Registry.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC20.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC20Metadata.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC2981.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC3156.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC3156FlashBorrower.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC3156FlashLender.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC4626.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC721.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC721Enumerable.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC721Metadata.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC721Receiver.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC777.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC777Recipient.sol |
||||
./node_modules/@openzeppelin/contracts/interfaces/IERC777Sender.sol |
||||
./node_modules/@openzeppelin/contracts/metatx/ERC2771Context.sol |
||||
./node_modules/@openzeppelin/contracts/metatx/MinimalForwarder.sol |
||||
./node_modules/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol |
||||
./node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol |
||||
./node_modules/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol |
||||
./node_modules/@openzeppelin/contracts/proxy/Clones.sol |
||||
./node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol |
||||
./node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol |
||||
./node_modules/@openzeppelin/contracts/proxy/Proxy.sol |
||||
./node_modules/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol |
||||
./node_modules/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol |
||||
./node_modules/@openzeppelin/contracts/proxy/utils/Initializable.sol |
||||
./node_modules/@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol |
||||
./node_modules/@openzeppelin/contracts/security/Pausable.sol |
||||
./node_modules/@openzeppelin/contracts/security/PullPayment.sol |
||||
./node_modules/@openzeppelin/contracts/security/ReentrancyGuard.sol |
||||
./node_modules/@openzeppelin/contracts/token/common/ERC2981.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC1155/ERC1155.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC1155/IERC1155.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/extensions/ERC20Capped.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/extensions/ERC20Snapshot.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/extensions/ERC20VotesComp.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/extensions/ERC20Wrapper.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC20/utils/TokenTimelock.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC721/ERC721.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC721/extensions/draft-ERC721Votes.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC721/IERC721.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC777/ERC777.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC777/IERC777.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC777/IERC777Sender.sol |
||||
./node_modules/@openzeppelin/contracts/token/ERC777/presets/ERC777PresetFixedSupply.sol |
||||
./node_modules/@openzeppelin/contracts/utils/Address.sol |
||||
./node_modules/@openzeppelin/contracts/utils/Arrays.sol |
||||
./node_modules/@openzeppelin/contracts/utils/Base64.sol |
||||
./node_modules/@openzeppelin/contracts/utils/Checkpoints.sol |
||||
./node_modules/@openzeppelin/contracts/utils/Context.sol |
||||
./node_modules/@openzeppelin/contracts/utils/Counters.sol |
||||
./node_modules/@openzeppelin/contracts/utils/Create2.sol |
||||
./node_modules/@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol |
||||
./node_modules/@openzeppelin/contracts/utils/cryptography/ECDSA.sol |
||||
./node_modules/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol |
||||
./node_modules/@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol |
||||
./node_modules/@openzeppelin/contracts/utils/escrow/ConditionalEscrow.sol |
||||
./node_modules/@openzeppelin/contracts/utils/escrow/Escrow.sol |
||||
./node_modules/@openzeppelin/contracts/utils/escrow/RefundEscrow.sol |
||||
./node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol |
||||
./node_modules/@openzeppelin/contracts/utils/introspection/ERC165Checker.sol |
||||
./node_modules/@openzeppelin/contracts/utils/introspection/ERC165Storage.sol |
||||
./node_modules/@openzeppelin/contracts/utils/introspection/ERC1820Implementer.sol |
||||
./node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol |
||||
./node_modules/@openzeppelin/contracts/utils/introspection/IERC1820Implementer.sol |
||||
./node_modules/@openzeppelin/contracts/utils/introspection/IERC1820Registry.sol |
||||
./node_modules/@openzeppelin/contracts/utils/math/Math.sol |
||||
./node_modules/@openzeppelin/contracts/utils/math/SafeCast.sol |
||||
./node_modules/@openzeppelin/contracts/utils/math/SafeMath.sol |
||||
./node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol |
||||
./node_modules/@openzeppelin/contracts/utils/math/SignedSafeMath.sol |
||||
./node_modules/@openzeppelin/contracts/utils/Multicall.sol |
||||
./node_modules/@openzeppelin/contracts/utils/StorageSlot.sol |
||||
./node_modules/@openzeppelin/contracts/utils/Strings.sol |
||||
./node_modules/@openzeppelin/contracts/utils/structs/BitMaps.sol |
||||
./node_modules/@openzeppelin/contracts/utils/structs/DoubleEndedQueue.sol |
||||
./node_modules/@openzeppelin/contracts/utils/structs/EnumerableMap.sol |
||||
./node_modules/@openzeppelin/contracts/utils/structs/EnumerableSet.sol |
||||
./node_modules/@openzeppelin/contracts/utils/Timers.sol |
||||
./node_modules/@openzeppelin/contracts/vendor/amb/IAMB.sol |
||||
./node_modules/@openzeppelin/contracts/vendor/arbitrum/IArbSys.sol |
||||
./node_modules/@openzeppelin/contracts/vendor/arbitrum/IBridge.sol |
||||
./node_modules/@openzeppelin/contracts/vendor/arbitrum/IInbox.sol |
||||
./node_modules/@openzeppelin/contracts/vendor/arbitrum/IMessageProvider.sol |
||||
./node_modules/@openzeppelin/contracts/vendor/arbitrum/IOutbox.sol |
||||
./node_modules/@openzeppelin/contracts/vendor/compound/ICompoundTimelock.sol |
||||
./node_modules/@openzeppelin/contracts/vendor/optimism/ICrossDomainMessenger.sol |
||||
./node_modules/@openzeppelin/contracts/vendor/polygon/IFxMessageProcessor.sol |
||||
./node_modules/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3FlashCallback.sol |
||||
./node_modules/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback.sol |
||||
./node_modules/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol |
||||
./node_modules/@uniswap/v3-core/contracts/interfaces/IERC20Minimal.sol |
||||
./node_modules/@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol |
||||
./node_modules/@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol |
||||
./node_modules/@uniswap/v3-core/contracts/interfaces/IUniswapV3PoolDeployer.sol |
||||
./node_modules/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions.sol |
||||
./node_modules/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol |
||||
./node_modules/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents.sol |
||||
./node_modules/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables.sol |
||||
./node_modules/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.sol |
||||
./node_modules/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/BitMath.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/FixedPoint128.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/FixedPoint96.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/FullMath.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/LiquidityMath.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/LowGasSafeMath.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/Oracle.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/Position.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/SafeCast.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/SqrtPriceMath.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/SwapMath.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/Tick.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/TickBitmap.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/TickMath.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/TransferHelper.sol |
||||
./node_modules/@uniswap/v3-core/contracts/libraries/UnsafeMath.sol |
@ -1 +1,3 @@ |
||||
export { SearchTab } from './lib/components/Search'; |
||||
export { SearchTab } from './lib/components/Search'; |
||||
export * from './lib/components/results/SearchHelper'; |
||||
export * from './lib/types'; |
@ -0,0 +1,138 @@ |
||||
import * as WS from 'ws' // eslint-disable-line
|
||||
import { PluginClient } from '@remixproject/plugin' |
||||
import * as chokidar from 'chokidar' |
||||
import * as utils from '../utils' |
||||
import * as fs from 'fs-extra' |
||||
import { basename, join } from 'path' |
||||
const { spawn } = require('child_process') // eslint-disable-line
|
||||
|
||||
export class FoundryClient extends PluginClient { |
||||
methods: Array<string> |
||||
websocket: WS |
||||
currentSharedFolder: string |
||||
watcher: chokidar.FSWatcher |
||||
warnlog: boolean |
||||
|
||||
constructor (private readOnly = false) { |
||||
super() |
||||
this.methods = ['compile'] |
||||
} |
||||
|
||||
setWebSocket (websocket: WS): void { |
||||
this.websocket = websocket |
||||
this.websocket.addEventListener('close', () => { |
||||
this.warnlog = false |
||||
if (this.watcher) this.watcher.close() |
||||
}) |
||||
} |
||||
|
||||
sharedFolder (currentSharedFolder: string): void { |
||||
this.currentSharedFolder = currentSharedFolder |
||||
this.listenOnFoundryCompilation() |
||||
} |
||||
|
||||
compile (configPath: string) { |
||||
return new Promise((resolve, reject) => { |
||||
if (this.readOnly) { |
||||
const errMsg = '[Hardhat Compilation]: Cannot compile in read-only mode' |
||||
return reject(new Error(errMsg)) |
||||
} |
||||
const cmd = `forge build` |
||||
const options = { cwd: this.currentSharedFolder, shell: true } |
||||
const child = spawn(cmd, options) |
||||
let result = '' |
||||
let error = '' |
||||
child.stdout.on('data', (data) => { |
||||
const msg = `[Foundry Compilation]: ${data.toString()}` |
||||
console.log('\x1b[32m%s\x1b[0m', msg) |
||||
result += msg + '\n' |
||||
}) |
||||
child.stderr.on('data', (err) => { |
||||
error += `[Foundry Compilation]: ${err.toString()} \n` |
||||
}) |
||||
child.on('close', () => { |
||||
if (error && result) resolve(error + result) |
||||
else if (error) reject(error) |
||||
else resolve(result) |
||||
}) |
||||
}) |
||||
} |
||||
|
||||
listenOnFoundryCompilation () { |
||||
try { |
||||
const buildPath = utils.absolutePath('out', this.currentSharedFolder) |
||||
this.watcher = chokidar.watch(buildPath, { depth: 3, ignorePermissionErrors: true, ignoreInitial: true }) |
||||
const compilationResult = { |
||||
input: {}, |
||||
output: { |
||||
contracts: {}, |
||||
sources: {} |
||||
}, |
||||
solcVersion: null |
||||
} |
||||
const processArtifact = async () => { |
||||
const folderFiles = await fs.readdir(buildPath) |
||||
// name of folders are file names
|
||||
for (const file of folderFiles) { |
||||
await this.readContract(join(buildPath, file), compilationResult) |
||||
} |
||||
if (!this.warnlog) { |
||||
// @ts-ignore
|
||||
this.call('terminal', 'log', 'receiving compilation result from foundry') |
||||
this.warnlog = true |
||||
} |
||||
this.emit('compilationFinished', '', { sources: compilationResult.input } , 'soljson', compilationResult.output, compilationResult.solcVersion)
|
||||
} |
||||
this.watcher.on('change', async (f: string) => processArtifact()) |
||||
this.watcher.on('add', async (f: string) => processArtifact()) |
||||
} catch (e) { |
||||
console.log(e) |
||||
}
|
||||
} |
||||
|
||||
async readContract (contractFolder, compilationResultPart) { |
||||
const files = await fs.readdir(contractFolder) |
||||
|
||||
for (const file of files) { |
||||
const content = await fs.readFile(join(contractFolder, file), { encoding: 'utf-8' }) |
||||
await this.feedContractArtifactFile(file, content, compilationResultPart) |
||||
} |
||||
} |
||||
|
||||
async feedContractArtifactFile (path, content, compilationResultPart) { |
||||
const contentJSON = JSON.parse(content) |
||||
if (path.endsWith('.metadata.json')) { |
||||
// extract source and version
|
||||
compilationResultPart.solcVersion = contentJSON.compiler.version |
||||
for (const path in contentJSON.sources) { |
||||
const absPath = utils.absolutePath(path, this.currentSharedFolder) |
||||
try { |
||||
const content = await fs.readFile(absPath, { encoding: 'utf-8' }) |
||||
compilationResultPart.input[path] = { content } |
||||
} catch (e) { |
||||
compilationResultPart.input[path] = { content: '' } |
||||
}
|
||||
} |
||||
} else { |
||||
const contractName = basename(path).replace('.json', '') |
||||
// extract data
|
||||
if (!compilationResultPart.output['sources'][contentJSON.ast.absolutePath]) compilationResultPart.output['sources'][contentJSON.ast.absolutePath] = {} |
||||
compilationResultPart.output['sources'][contentJSON.ast.absolutePath] = { |
||||
ast: contentJSON['ast'], |
||||
id: contentJSON['id'] |
||||
} |
||||
if (!compilationResultPart.output['contracts'][contentJSON.ast.absolutePath]) compilationResultPart.output['contracts'][contentJSON.ast.absolutePath] = {} |
||||
// delete contentJSON['ast']
|
||||
contentJSON.bytecode.object = contentJSON.bytecode.object.replace('0x', '') |
||||
contentJSON.deployedBytecode.object = contentJSON.deployedBytecode.object.replace('0x', '') |
||||
compilationResultPart.output['contracts'][contentJSON.ast.absolutePath][contractName] = { |
||||
abi: contentJSON.abi, |
||||
evm: { |
||||
bytecode: contentJSON.bytecode, |
||||
deployedBytecode: contentJSON.deployedBytecode, |
||||
methodIdentifiers: contentJSON.methodIdentifiers |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue