diff --git a/.gitmodules b/.gitmodules index bfb3dc4..72e1a2a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "lib/openzeppelin-contracts"] path = lib/openzeppelin-contracts url = https://github.com/Openzeppelin/openzeppelin-contracts +[submodule "lib/p256-verifier"] + path = lib/p256-verifier + url = https://github.com/daimo-eth/p256-verifier diff --git a/broadcast/Deploy.s.sol/8453/deployDaimoOpInflator-latest.json b/broadcast/Deploy.s.sol/8453/deployDaimoOpInflator-latest.json new file mode 100644 index 0000000..5cfa92a --- /dev/null +++ b/broadcast/Deploy.s.sol/8453/deployDaimoOpInflator-latest.json @@ -0,0 +1,157 @@ +{ + "transactions": [ + { + "hash": "0x631533b1ce8efcaf7bbfac86703148eaf6966a4ff736807442efeb13cb6fd8c9", + "transactionType": "CREATE2", + "contractName": "DaimoOpInflator", + "contractAddress": "0x8ABD51A785160481DB9E638eE71A3F4Ec4B996D8", + "function": null, + "arguments": [ + "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7" + ], + "transaction": { + "type": "0x02", + "from": "0x2a6d311394184eeb6df8fbbf58626b085374ffe7", + "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", + "gas": "0x19acd7", + "value": "0x0", + "data": "0x00000000000000000000000000000000000000000000000000000000000000006080604052600380546001600160a01b0319908116734430a644b215a187a3daa5b114fa3f3d9debc17d1790915560048054909116735ff137d4b0fdcd49dca30c7cf57e578a026d27891790553480156200005957600080fd5b506040516200157b3803806200157b8339810160408190526200007c9162000203565b6200008733620000b5565b600180546001600160a01b0319166001600160a01b038416179055620000ad8162000105565b50506200023b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6200010f62000188565b6001600160a01b0381166200017a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6200018581620000b5565b50565b6000546001600160a01b03163314620001e45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000171565b565b80516001600160a01b0381168114620001fe57600080fd5b919050565b600080604083850312156200021757600080fd5b6200022283620001e6565b91506200023260208401620001e6565b90509250929050565b611330806200024b6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063715018a611610066578063715018a6146101145780638da5cb5b1461011c578063b0d691fe1461012d578063f2fde38b14610140578063f5aa34201461015357600080fd5b806303a353bd1461009857806316e4cbf9146100c1578063253ff613146100ec5780632a97fa77146100ff575b600080fd5b6100ab6100a6366004610cf1565b610166565b6040516100b89190610db3565b60405180910390f35b6002546100d4906001600160a01b031681565b6040516001600160a01b0390911681526020016100b8565b6003546100d4906001600160a01b031681565b61011261010d366004610ea9565b6106c4565b005b6101126106ee565b6000546001600160a01b03166100d4565b6004546100d4906001600160a01b031681565b61011261014e366004610ea9565b610702565b6001546100d4906001600160a01b031681565b6101cc60405180610160016040528060006001600160a01b03168152602001600081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001606081525090565b6000806101d9858561077b565b909650945091506101ea858561077b565b600354604051635fa71e9560e11b8152600481018790529298509096509192506001600160a01b039091169063bf4e3d2a90602401602060405180830381865afa15801561023c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102609190610ecd565b6001600160a01b03168352604061027b601060008789610eea565b61028491610f14565b608090811c90911b60208086019190915260408051918201815260008252850152620493e090840152620aae6060a08401526102c4601460108688610eea565b6102cd91610f4d565b60e01c60c08401526102e3601a60148688610eea565b6102ec91610f7b565b60d01c60e08401526103026020601a8688610eea565b61030b91610f7b565b60d01c610100840152600354604051635fa71e9560e11b8152600481018390526000916001600160a01b03169063bf4e3d2a90602401602060405180830381865afa15801561035e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103829190610ecd565b9050600061039460266020888a610eea565b61039d91610f7b565b600180546040519293506103d9926020929183916001600160a01b03909116906000906060906044908a90849060d08c901c9082908901610fa9565b60408051601f1981840301815291905260608601526103fb866026818a610eea565b9650965060008787600081811061041457610414611080565b919091013560f81c9150506001811461046a5760405162461bcd60e51b81526020600482015260136024820152722ab739bab83837b93a32b2103b32b939b4b7b760691b60448201526064015b60405180910390fd5b600061047a600760018a8c610eea565b61048391610f7b565b905060008989600781811061049a5761049a611080565b9050013560f81c60f81b60f81c90506104e26040518060c001604052806060815260200160608152602001600081526020016000815260200160008152602001600081525090565b60405161050290600090602001908152600560f81b602082015260250190565b60408051601f1981840301815291815290825260016060830152601790820152610530602860088c8e610eea565b61053991611096565b608082015261054c604860288c8e610eea565b61055591611096565b60a08201526002546001600160a01b03166105738b6048818f610eea565b604051602001610585939291906110b4565b60408051601f198184030181529190526101208a015260006105a68a6107f9565b8051602091820120600454604080519384018390526001600160a01b0390911690830152466060830152915060009060800160408051601f198184030181529082905280516020918201206001600160f81b031960f88a901b16918301919091526001600160d01b03198716602183015260278201819052915060009061063e906047016040516020818303038152906040526108dc565b90508060405160200161065191906110e0565b60405160208183030381529060405284602001819052508686868660405160200161067c919061113e565b60408051601f198184030181529082905261069c949392916020016111ac565b60408051601f198184030181529190526101408d015250505050505050505050505b92915050565b6106cc610af4565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6106f6610af4565b6107006000610b4e565b565b61070a610af4565b6001600160a01b03811661076f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610461565b61077881610b4e565b50565b6000366000808585600081811061079457610794611080565b919091013560f81c915060009050866001876107b08583611213565b60ff16926107c093929190610eea565b6107c991611096565b905086866107d8846001611213565b60ff169080926107ea93929190610eea565b91989097509095509350505050565b8051602080830151604080850151805190840120606086810151805190860120608088015160a089015160c08a015160e08b01516101008c01516101208d01518051908c01209851969b9a9798959794969395929491939092916108bc918c918c918c918c918c918c918c918c918c918c91016001600160a01b039a909a168a5260208a019890985260408901969096526060880194909452608087019290925260a086015260c085015260e08401526101008301526101208201526101400190565b6040516020818303038152906040529a5050505050505050505050919050565b606060006108e983610b9e565b905060008190506000600282511180156109345750816002835161090d919061122c565b8151811061091d5761091d611080565b6020910101516001600160f81b031916603d60f81b145b156109415750600261098c565b600182511180156109835750816001835161095c919061122c565b8151811061096c5761096c611080565b6020910101516001600160f81b031916603d60f81b145b1561098c575060015b600081835161099b919061122c565b905060008167ffffffffffffffff8111156109b8576109b861123f565b6040519080825280601f01601f1916602001820160405280156109e2576020820181803683370190505b50905060005b82811015610ae957848181518110610a0257610a02611080565b01602001516001600160f81b031916602b60f81b03610a4e57602d60f81b828281518110610a3257610a32611080565b60200101906001600160f81b031916908160001a905350610ad7565b848181518110610a6057610a60611080565b01602001516001600160f81b031916602f60f81b03610a9057605f60f81b828281518110610a3257610a32611080565b848181518110610aa257610aa2611080565b602001015160f81c60f81b828281518110610abf57610abf611080565b60200101906001600160f81b031916908160001a9053505b80610ae181611255565b9150506109e8565b509695505050505050565b6000546001600160a01b031633146107005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610461565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60608151600003610bbd57505060408051602081019091526000815290565b60006040518060600160405280604081526020016112bb6040913990506000600384516002610bec919061126e565b610bf69190611281565b610c019060046112a3565b67ffffffffffffffff811115610c1957610c1961123f565b6040519080825280601f01601f191660200182016040528015610c43576020820181803683370190505b509050600182016020820185865187015b80821015610caf576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250610c54565b5050600386510660018114610ccb5760028114610cde57610ce6565b603d6001830353603d6002830353610ce6565b603d60018303535b509195945050505050565b60008060208385031215610d0457600080fd5b823567ffffffffffffffff80821115610d1c57600080fd5b818501915085601f830112610d3057600080fd5b813581811115610d3f57600080fd5b866020828501011115610d5157600080fd5b60209290920196919550909350505050565b60005b83811015610d7e578181015183820152602001610d66565b50506000910152565b60008151808452610d9f816020860160208601610d63565b601f01601f19169290920160200192915050565b60208152610dcd6020820183516001600160a01b03169052565b6020820151604082015260006040830151610160806060850152610df5610180850183610d87565b91506060850151601f1980868503016080870152610e138483610d87565b9350608087015160a087015260a087015160c087015260c087015160e087015260e08701519150610100828188015280880151925050610120828188015280880151925050610140818786030181880152610e6e8584610d87565b908801518782039092018488015293509050610e8a8382610d87565b9695505050505050565b6001600160a01b038116811461077857600080fd5b600060208284031215610ebb57600080fd5b8135610ec681610e94565b9392505050565b600060208284031215610edf57600080fd5b8151610ec681610e94565b60008085851115610efa57600080fd5b83861115610f0757600080fd5b5050820193919092039150565b6fffffffffffffffffffffffffffffffff198135818116916010851015610f455780818660100360031b1b83161692505b505092915050565b6001600160e01b03198135818116916004851015610f455760049490940360031b84901b1690921692915050565b6001600160d01b03198135818116916006851015610f455760069490940360031b84901b1690921692915050565b631a7e6adf60e11b81528b60048201528a6024820152896044820152600060648201526bffffffffffffffffffffffff198960601b1660708201528760848201528660a48201528560c4820152600061101c61101260e4840163a9059cbb60e01b815260040190565b60008152600c0190565b611037818860601b6bffffffffffffffffffffffff19169052565b65ffffffffffff198616601482015261105f602e82018660d01b6001600160d01b0319169052565b63ffffffff19841660348201526050019d9c50505050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b803560208310156106be57600019602084900360031b1b1692915050565b6bffffffffffffffffffffffff198460601b168152818360148301376000910160140190815292915050565b7f7b2274797065223a22776562617574686e2e676574222c226368616c6c656e6781526332911d1160e11b602082015260008251611125816024850160208701610d63565b61227d60f01b6024939091019283015250602601919050565b602081526000825160c0602084015261115a60e0840182610d87565b90506020840151601f198483030160408501526111778282610d87565b9150506040840151606084015260608401516080840152608084015160a084015260a084015160c08401528091505092915050565b6001600160f81b031960f886811b821683526001600160d01b03198616600184015284901b16600782015281516000906111ed816008850160208701610d63565b9190910160080195945050505050565b634e487b7160e01b600052601160045260246000fd5b60ff81811683821601908111156106be576106be6111fd565b818103818111156106be576106be6111fd565b634e487b7160e01b600052604160045260246000fd5b600060018201611267576112676111fd565b5060010190565b808201808211156106be576106be6111fd565b60008261129e57634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176106be576106be6111fd56fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220de2763d9279935df6f10ccc71e184ffdfd1e572911a685ae2f346ada5e1bb40d64736f6c63430008150033000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda029130000000000000000000000002a6d311394184eeb6df8fbbf58626b085374ffe7", + "nonce": "0x757", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xc4080ec4bc9667f0d02dcb22d1dcfb3c412840c8a66d67d2ed057ff951454046", + "transactionType": "CALL", + "contractName": "DaimoOpInflator", + "contractAddress": "0x8ABD51A785160481DB9E638eE71A3F4Ec4B996D8", + "function": "setPaymaster(address)", + "arguments": [ + "0xac5917075b3ED3a6a4516398800f3f64FCf4631E" + ], + "transaction": { + "type": "0x02", + "from": "0x2a6d311394184eeb6df8fbbf58626b085374ffe7", + "to": "0x8abd51a785160481db9e638ee71a3f4ec4b996d8", + "gas": "0xf8e2", + "value": "0x0", + "data": "0x2a97fa77000000000000000000000000ac5917075b3ed3a6a4516398800f3f64fcf4631e", + "nonce": "0x758", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xf28e67a3d77e36763889d300254fa0a9b5c73c2abe89c43a3289546898a4c082", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x2c57b3B624d4FB12e65AF70105d4c905B31EAA8b", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x2a6d311394184eeb6df8fbbf58626b085374ffe7", + "to": "0x2c57b3b624d4fb12e65af70105d4c905b31eaa8b", + "gas": "0x17e51", + "value": "0x0", + "data": "0x0636ef6100000000000000000000000000000000000000000000000000000000000000020000000000000000000000008abd51a785160481db9e638ee71a3f4ec4b996d8", + "nonce": "0x759", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0x631533b1ce8efcaf7bbfac86703148eaf6966a4ff736807442efeb13cb6fd8c9", + "transactionIndex": "0x1", + "blockHash": "0x1038841ad5882d81495d8cc1a16e64ad6f5374f1615f8aab92a078555de88f5d", + "blockNumber": "0x81643a", + "from": "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7", + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "cumulativeGasUsed": "0x134de0", + "gasUsed": "0x12969f", + "contractAddress": "0x8ABD51A785160481DB9E638eE71A3F4Ec4B996D8", + "logs": [ + { + "address": "0x8ABD51A785160481DB9E638eE71A3F4Ec4B996D8", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000004e59b44847b379578588920ca78fbf26c0b4956c" + ], + "data": "0x", + "blockHash": "0x1038841ad5882d81495d8cc1a16e64ad6f5374f1615f8aab92a078555de88f5d", + "blockNumber": "0x81643a", + "transactionHash": "0x631533b1ce8efcaf7bbfac86703148eaf6966a4ff736807442efeb13cb6fd8c9", + "transactionIndex": "0x1", + "logIndex": "0x0", + "removed": false + }, + { + "address": "0x8ABD51A785160481DB9E638eE71A3F4Ec4B996D8", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000004e59b44847b379578588920ca78fbf26c0b4956c", + "0x0000000000000000000000002a6d311394184eeb6df8fbbf58626b085374ffe7" + ], + "data": "0x", + "blockHash": "0x1038841ad5882d81495d8cc1a16e64ad6f5374f1615f8aab92a078555de88f5d", + "blockNumber": "0x81643a", + "transactionHash": "0x631533b1ce8efcaf7bbfac86703148eaf6966a4ff736807442efeb13cb6fd8c9", + "transactionIndex": "0x1", + "logIndex": "0x1", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000400000001000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000020000000001000000000000000010000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000080000000000000200000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e33" + }, + { + "transactionHash": "0xc4080ec4bc9667f0d02dcb22d1dcfb3c412840c8a66d67d2ed057ff951454046", + "transactionIndex": "0x2", + "blockHash": "0x1038841ad5882d81495d8cc1a16e64ad6f5374f1615f8aab92a078555de88f5d", + "blockNumber": "0x81643a", + "from": "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7", + "to": "0x8ABD51A785160481DB9E638eE71A3F4Ec4B996D8", + "cumulativeGasUsed": "0x140210", + "gasUsed": "0xb430", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e33" + }, + { + "transactionHash": "0xf28e67a3d77e36763889d300254fa0a9b5c73c2abe89c43a3289546898a4c082", + "transactionIndex": "0x3", + "blockHash": "0x1038841ad5882d81495d8cc1a16e64ad6f5374f1615f8aab92a078555de88f5d", + "blockNumber": "0x81643a", + "from": "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7", + "to": "0x2c57b3B624d4FB12e65AF70105d4c905B31EAA8b", + "cumulativeGasUsed": "0x15077a", + "gasUsed": "0x1056a", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e33" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1703748972, + "chain": 8453, + "multi": false, + "commit": "dd015c0" +} \ No newline at end of file diff --git a/broadcast/Deploy.s.sol/8453/deployPerOpInflator-latest.json b/broadcast/Deploy.s.sol/8453/deployPerOpInflator-latest.json new file mode 100644 index 0000000..2faf1f0 --- /dev/null +++ b/broadcast/Deploy.s.sol/8453/deployPerOpInflator-latest.json @@ -0,0 +1,120 @@ +{ + "transactions": [ + { + "hash": "0x7d0b8d983eba848e2b3a22e846773750e733f59ebdeeae087c73b12b53e4bed5", + "transactionType": "CREATE2", + "contractName": "PerOpInflator", + "contractAddress": "0x24aA17a5A5D14Bd3f5144a4a963ee8CDfAe6B511", + "function": null, + "arguments": [ + "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7" + ], + "transaction": { + "type": "0x02", + "from": "0x2a6d311394184eeb6df8fbbf58626b085374ffe7", + "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", + "gas": "0x1303cd", + "value": "0x0", + "data": "0x0000000000000000000000000000000000000000000000000000000000000000608060405234801561001057600080fd5b5060405162000f8938038062000f8983398101604081905261003191610173565b61003a33610049565b61004381610099565b506101a3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6100a1610117565b6001600160a01b03811661010b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61011481610049565b50565b6000546001600160a01b031633146101715760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610102565b565b60006020828403121561018557600080fd5b81516001600160a01b038116811461019c57600080fd5b9392505050565b610dd680620001b36000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806345c706581161006657806345c7065814610115578063715018a61461013e5780638da5cb5b14610146578063e5f7e72f14610157578063f2fde38b1461019257600080fd5b806303a353bd146100985780630636ef61146100c25780631c31f710146100d757806338af3eed146100ea575b600080fd5b6100ab6100a63660046107cb565b6101a5565b6040516100b992919061088d565b60405180910390f35b6100d56100d03660046109e5565b610495565b005b6100d56100e5366004610a1c565b61066a565b6001546100fd906001600160a01b031681565b6040516001600160a01b0390911681526020016100b9565b6100fd610123366004610a40565b6002602052600090815260409020546001600160a01b031681565b6100d5610694565b6000546001600160a01b03166100fd565b61017d610165366004610a1c565b60036020526000908152604090205463ffffffff1681565b60405163ffffffff90911681526020016100b9565b6100d56101a0366004610a1c565b6106a8565b60606000806101b76001828688610a5b565b6101c091610a85565b60f81c905060008167ffffffffffffffff8111156101e0576101e0610ab5565b60405190808252806020026020018201604052801561027757816020015b61026460405180610160016040528060006001600160a01b03168152602001600081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001606081525090565b8152602001906001900390816101fe5790505b509050600160005b8381101561042b576000888389610297826004610ae1565b926102a493929190610a5b565b6102ad91610afa565b60e01c9050600089896102c1866004610ae1565b906102cd876006610ae1565b926102da93929190610a5b565b6102e391610b28565b60f01c90506102f3600685610ae1565b63ffffffff83166000908152600260205260409020549094506001600160a01b0316806103595760405162461bcd60e51b815260206004820152600f60248201526e109859081a5b999b185d1bdc881251608a1b60448201526064015b60405180910390fd5b6001600160a01b0381166303a353bd8c878d61037961ffff881683610ae1565b9261038693929190610a5b565b6040518363ffffffff1660e01b81526004016103a3929190610b56565b600060405180830381865afa1580156103c0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103e89190810190610c42565b8685815181106103fa576103fa610d71565b602090810291909101015261041361ffff831686610ae1565b9450505050808061042390610d87565b91505061027f565b5080861461047b5760405162461bcd60e51b815260206004820152601760248201527f57726f6e6720636f6d70726573736564206c656e6774680000000000000000006044820152606401610350565b506001549093506001600160a01b03169150509250929050565b8163ffffffff166000036104eb5760405162461bcd60e51b815260206004820152601760248201527f496e666c61746f722049442063616e6e6f7420626520300000000000000000006044820152606401610350565b6001600160a01b0381166105415760405162461bcd60e51b815260206004820152601c60248201527f496e666c61746f7220616464726573732063616e6e6f742062652030000000006044820152606401610350565b63ffffffff82166000908152600260205260409020546001600160a01b0316156105ad5760405162461bcd60e51b815260206004820152601b60248201527f496e666c61746f7220616c7265616479207265676973746572656400000000006044820152606401610350565b6001600160a01b03811660009081526003602052604090205463ffffffff16156106195760405162461bcd60e51b815260206004820152601b60248201527f496e666c61746f7220616c7265616479207265676973746572656400000000006044820152606401610350565b63ffffffff909116600081815260026020908152604080832080546001600160a01b039096166001600160a01b0319909616861790559382526003905291909120805463ffffffff19169091179055565b610672610721565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61069c610721565b6106a6600061077b565b565b6106b0610721565b6001600160a01b0381166107155760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610350565b61071e8161077b565b50565b6000546001600160a01b031633146106a65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610350565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080602083850312156107de57600080fd5b823567ffffffffffffffff808211156107f657600080fd5b818501915085601f83011261080a57600080fd5b81358181111561081957600080fd5b86602082850101111561082b57600080fd5b60209290920196919550909350505050565b60005b83811015610858578181015183820152602001610840565b50506000910152565b6000815180845261087981602086016020860161083d565b601f01601f19169290920160200192915050565b60006040808301818452808651808352606092508286019150828160051b8701016020808a0160005b8481101561099157898403605f19018652815180516001600160a01b03168552610160848201518587015289820151818b8801526108f682880182610861565b915050888201518682038a88015261090e8282610861565b6080848101519089015260a0808501519089015260c0808501519089015260e08085015190890152610100808501519089015261012080850151898303828b0152919350915061095e8382610861565b92505050610140808301519250868203818801525061097d8183610861565b9785019795505050908201906001016108b6565b50508196506109aa8189018a6001600160a01b03169052565b5050505050509392505050565b803563ffffffff811681146109cb57600080fd5b919050565b6001600160a01b038116811461071e57600080fd5b600080604083850312156109f857600080fd5b610a01836109b7565b91506020830135610a11816109d0565b809150509250929050565b600060208284031215610a2e57600080fd5b8135610a39816109d0565b9392505050565b600060208284031215610a5257600080fd5b610a39826109b7565b60008085851115610a6b57600080fd5b83861115610a7857600080fd5b5050820193919092039150565b6001600160f81b03198135818116916001851015610aad5780818660010360031b1b83161692505b505092915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610af457610af4610acb565b92915050565b6001600160e01b03198135818116916004851015610aad5760049490940360031b84901b1690921692915050565b6001600160f01b03198135818116916002851015610aad5760029490940360031b84901b1690921692915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b604051610160810167ffffffffffffffff81118282101715610ba957610ba9610ab5565b60405290565b80516109cb816109d0565b600082601f830112610bcb57600080fd5b815167ffffffffffffffff80821115610be657610be6610ab5565b604051601f8301601f19908116603f01168101908282118183101715610c0e57610c0e610ab5565b81604052838152866020858801011115610c2757600080fd5b610c3884602083016020890161083d565b9695505050505050565b600060208284031215610c5457600080fd5b815167ffffffffffffffff80821115610c6c57600080fd5b908301906101608286031215610c8157600080fd5b610c89610b85565b610c9283610baf565b815260208301516020820152604083015182811115610cb057600080fd5b610cbc87828601610bba565b604083015250606083015182811115610cd457600080fd5b610ce087828601610bba565b6060830152506080830151608082015260a083015160a082015260c083015160c082015260e083015160e08201526101008084015181830152506101208084015183811115610d2e57600080fd5b610d3a88828701610bba565b8284015250506101408084015183811115610d5457600080fd5b610d6088828701610bba565b918301919091525095945050505050565b634e487b7160e01b600052603260045260246000fd5b600060018201610d9957610d99610acb565b506001019056fea2646970667358221220d3d0ac0b332cc9eda0f463ceeb3551dd051f6c8a18560ff7acde6f1d56269e3364736f6c634300081500330000000000000000000000002a6d311394184eeb6df8fbbf58626b085374ffe7", + "nonce": "0x75b", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xa8efc39f3b8eb08b506ba403229588f645fbccb9f6775444671f072a8319c4d6", + "transactionType": "CALL", + "contractName": "PerOpInflator", + "contractAddress": "0x24aA17a5A5D14Bd3f5144a4a963ee8CDfAe6B511", + "function": "setBeneficiary(address)", + "arguments": [ + "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7" + ], + "transaction": { + "type": "0x02", + "from": "0x2a6d311394184eeb6df8fbbf58626b085374ffe7", + "to": "0x24aa17a5a5d14bd3f5144a4a963ee8cdfae6b511", + "gas": "0x10765", + "value": "0x0", + "data": "0x1c31f7100000000000000000000000002a6d311394184eeb6df8fbbf58626b085374ffe7", + "nonce": "0x75c", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0x7d0b8d983eba848e2b3a22e846773750e733f59ebdeeae087c73b12b53e4bed5", + "transactionIndex": "0x1", + "blockHash": "0xfaf87d09295b86be7b8a0b1c4f01fda21b0cda1133d8c0455a73c660419b7aae", + "blockNumber": "0x816974", + "from": "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7", + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "cumulativeGasUsed": "0xdb79f", + "gasUsed": "0xd006a", + "contractAddress": "0x24aA17a5A5D14Bd3f5144a4a963ee8CDfAe6B511", + "logs": [ + { + "address": "0x24aA17a5A5D14Bd3f5144a4a963ee8CDfAe6B511", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000004e59b44847b379578588920ca78fbf26c0b4956c" + ], + "data": "0x", + "blockHash": "0xfaf87d09295b86be7b8a0b1c4f01fda21b0cda1133d8c0455a73c660419b7aae", + "blockNumber": "0x816974", + "transactionHash": "0x7d0b8d983eba848e2b3a22e846773750e733f59ebdeeae087c73b12b53e4bed5", + "transactionIndex": "0x1", + "logIndex": "0x0", + "removed": false + }, + { + "address": "0x24aA17a5A5D14Bd3f5144a4a963ee8CDfAe6B511", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000004e59b44847b379578588920ca78fbf26c0b4956c", + "0x0000000000000000000000002a6d311394184eeb6df8fbbf58626b085374ffe7" + ], + "data": "0x", + "blockHash": "0xfaf87d09295b86be7b8a0b1c4f01fda21b0cda1133d8c0455a73c660419b7aae", + "blockNumber": "0x816974", + "transactionHash": "0x7d0b8d983eba848e2b3a22e846773750e733f59ebdeeae087c73b12b53e4bed5", + "transactionIndex": "0x1", + "logIndex": "0x1", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000080000000000000000020000000001000000000000000010000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000020000000000000000000000000000000000080000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e3c" + }, + { + "transactionHash": "0xa8efc39f3b8eb08b506ba403229588f645fbccb9f6775444671f072a8319c4d6", + "transactionIndex": "0x2", + "blockHash": "0xfaf87d09295b86be7b8a0b1c4f01fda21b0cda1133d8c0455a73c660419b7aae", + "blockNumber": "0x816974", + "from": "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7", + "to": "0x24aA17a5A5D14Bd3f5144a4a963ee8CDfAe6B511", + "cumulativeGasUsed": "0xe6bb9", + "gasUsed": "0xb41a", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e3c" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1703751647, + "chain": 8453, + "multi": false, + "commit": "dd015c0" +} \ No newline at end of file diff --git a/broadcast/Deploy.s.sol/84531/deployDaimoOpInflator-latest.json b/broadcast/Deploy.s.sol/84531/deployDaimoOpInflator-latest.json new file mode 100644 index 0000000..64cef70 --- /dev/null +++ b/broadcast/Deploy.s.sol/84531/deployDaimoOpInflator-latest.json @@ -0,0 +1,160 @@ +{ + "transactions": [ + { + "hash": "0x34363a5d9a9e59d3fc7f654d836cae1e64d43bff98e42d0f2f61ad321786520f", + "transactionType": "CREATE2", + "contractName": "DaimoOpInflator", + "contractAddress": "0xb742F6BC849020F1a7180fDFe02662F8Bce9d9C4", + "function": null, + "arguments": [ + "0x1B85deDe8178E18CdE599B4C9d913534553C3dBf", + "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7" + ], + "transaction": { + "type": "0x02", + "from": "0x2a6d311394184eeb6df8fbbf58626b085374ffe7", + "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", + "gas": "0x19acd7", + "value": "0x0", + "data": "0x00000000000000000000000000000000000000000000000000000000000000006080604052600380546001600160a01b0319908116734430a644b215a187a3daa5b114fa3f3d9debc17d1790915560048054909116735ff137d4b0fdcd49dca30c7cf57e578a026d27891790553480156200005957600080fd5b506040516200157b3803806200157b8339810160408190526200007c9162000203565b6200008733620000b5565b600180546001600160a01b0319166001600160a01b038416179055620000ad8162000105565b50506200023b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6200010f62000188565b6001600160a01b0381166200017a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6200018581620000b5565b50565b6000546001600160a01b03163314620001e45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000171565b565b80516001600160a01b0381168114620001fe57600080fd5b919050565b600080604083850312156200021757600080fd5b6200022283620001e6565b91506200023260208401620001e6565b90509250929050565b611330806200024b6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063715018a611610066578063715018a6146101145780638da5cb5b1461011c578063b0d691fe1461012d578063f2fde38b14610140578063f5aa34201461015357600080fd5b806303a353bd1461009857806316e4cbf9146100c1578063253ff613146100ec5780632a97fa77146100ff575b600080fd5b6100ab6100a6366004610cf1565b610166565b6040516100b89190610db3565b60405180910390f35b6002546100d4906001600160a01b031681565b6040516001600160a01b0390911681526020016100b8565b6003546100d4906001600160a01b031681565b61011261010d366004610ea9565b6106c4565b005b6101126106ee565b6000546001600160a01b03166100d4565b6004546100d4906001600160a01b031681565b61011261014e366004610ea9565b610702565b6001546100d4906001600160a01b031681565b6101cc60405180610160016040528060006001600160a01b03168152602001600081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001606081525090565b6000806101d9858561077b565b909650945091506101ea858561077b565b600354604051635fa71e9560e11b8152600481018790529298509096509192506001600160a01b039091169063bf4e3d2a90602401602060405180830381865afa15801561023c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102609190610ecd565b6001600160a01b03168352604061027b601060008789610eea565b61028491610f14565b608090811c90911b60208086019190915260408051918201815260008252850152620493e090840152620aae6060a08401526102c4601460108688610eea565b6102cd91610f4d565b60e01c60c08401526102e3601a60148688610eea565b6102ec91610f7b565b60d01c60e08401526103026020601a8688610eea565b61030b91610f7b565b60d01c610100840152600354604051635fa71e9560e11b8152600481018390526000916001600160a01b03169063bf4e3d2a90602401602060405180830381865afa15801561035e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103829190610ecd565b9050600061039460266020888a610eea565b61039d91610f7b565b600180546040519293506103d9926020929183916001600160a01b03909116906000906060906044908a90849060d08c901c9082908901610fa9565b60408051601f1981840301815291905260608601526103fb866026818a610eea565b9650965060008787600081811061041457610414611080565b919091013560f81c9150506001811461046a5760405162461bcd60e51b81526020600482015260136024820152722ab739bab83837b93a32b2103b32b939b4b7b760691b60448201526064015b60405180910390fd5b600061047a600760018a8c610eea565b61048391610f7b565b905060008989600781811061049a5761049a611080565b9050013560f81c60f81b60f81c90506104e26040518060c001604052806060815260200160608152602001600081526020016000815260200160008152602001600081525090565b60405161050290600090602001908152600560f81b602082015260250190565b60408051601f1981840301815291815290825260016060830152601790820152610530602860088c8e610eea565b61053991611096565b608082015261054c604860288c8e610eea565b61055591611096565b60a08201526002546001600160a01b03166105738b6048818f610eea565b604051602001610585939291906110b4565b60408051601f198184030181529190526101208a015260006105a68a6107f9565b8051602091820120600454604080519384018390526001600160a01b0390911690830152466060830152915060009060800160408051601f198184030181529082905280516020918201206001600160f81b031960f88a901b16918301919091526001600160d01b03198716602183015260278201819052915060009061063e906047016040516020818303038152906040526108dc565b90508060405160200161065191906110e0565b60405160208183030381529060405284602001819052508686868660405160200161067c919061113e565b60408051601f198184030181529082905261069c949392916020016111ac565b60408051601f198184030181529190526101408d015250505050505050505050505b92915050565b6106cc610af4565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6106f6610af4565b6107006000610b4e565b565b61070a610af4565b6001600160a01b03811661076f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610461565b61077881610b4e565b50565b6000366000808585600081811061079457610794611080565b919091013560f81c915060009050866001876107b08583611213565b60ff16926107c093929190610eea565b6107c991611096565b905086866107d8846001611213565b60ff169080926107ea93929190610eea565b91989097509095509350505050565b8051602080830151604080850151805190840120606086810151805190860120608088015160a089015160c08a015160e08b01516101008c01516101208d01518051908c01209851969b9a9798959794969395929491939092916108bc918c918c918c918c918c918c918c918c918c918c91016001600160a01b039a909a168a5260208a019890985260408901969096526060880194909452608087019290925260a086015260c085015260e08401526101008301526101208201526101400190565b6040516020818303038152906040529a5050505050505050505050919050565b606060006108e983610b9e565b905060008190506000600282511180156109345750816002835161090d919061122c565b8151811061091d5761091d611080565b6020910101516001600160f81b031916603d60f81b145b156109415750600261098c565b600182511180156109835750816001835161095c919061122c565b8151811061096c5761096c611080565b6020910101516001600160f81b031916603d60f81b145b1561098c575060015b600081835161099b919061122c565b905060008167ffffffffffffffff8111156109b8576109b861123f565b6040519080825280601f01601f1916602001820160405280156109e2576020820181803683370190505b50905060005b82811015610ae957848181518110610a0257610a02611080565b01602001516001600160f81b031916602b60f81b03610a4e57602d60f81b828281518110610a3257610a32611080565b60200101906001600160f81b031916908160001a905350610ad7565b848181518110610a6057610a60611080565b01602001516001600160f81b031916602f60f81b03610a9057605f60f81b828281518110610a3257610a32611080565b848181518110610aa257610aa2611080565b602001015160f81c60f81b828281518110610abf57610abf611080565b60200101906001600160f81b031916908160001a9053505b80610ae181611255565b9150506109e8565b509695505050505050565b6000546001600160a01b031633146107005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610461565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60608151600003610bbd57505060408051602081019091526000815290565b60006040518060600160405280604081526020016112bb6040913990506000600384516002610bec919061126e565b610bf69190611281565b610c019060046112a3565b67ffffffffffffffff811115610c1957610c1961123f565b6040519080825280601f01601f191660200182016040528015610c43576020820181803683370190505b509050600182016020820185865187015b80821015610caf576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250610c54565b5050600386510660018114610ccb5760028114610cde57610ce6565b603d6001830353603d6002830353610ce6565b603d60018303535b509195945050505050565b60008060208385031215610d0457600080fd5b823567ffffffffffffffff80821115610d1c57600080fd5b818501915085601f830112610d3057600080fd5b813581811115610d3f57600080fd5b866020828501011115610d5157600080fd5b60209290920196919550909350505050565b60005b83811015610d7e578181015183820152602001610d66565b50506000910152565b60008151808452610d9f816020860160208601610d63565b601f01601f19169290920160200192915050565b60208152610dcd6020820183516001600160a01b03169052565b6020820151604082015260006040830151610160806060850152610df5610180850183610d87565b91506060850151601f1980868503016080870152610e138483610d87565b9350608087015160a087015260a087015160c087015260c087015160e087015260e08701519150610100828188015280880151925050610120828188015280880151925050610140818786030181880152610e6e8584610d87565b908801518782039092018488015293509050610e8a8382610d87565b9695505050505050565b6001600160a01b038116811461077857600080fd5b600060208284031215610ebb57600080fd5b8135610ec681610e94565b9392505050565b600060208284031215610edf57600080fd5b8151610ec681610e94565b60008085851115610efa57600080fd5b83861115610f0757600080fd5b5050820193919092039150565b6fffffffffffffffffffffffffffffffff198135818116916010851015610f455780818660100360031b1b83161692505b505092915050565b6001600160e01b03198135818116916004851015610f455760049490940360031b84901b1690921692915050565b6001600160d01b03198135818116916006851015610f455760069490940360031b84901b1690921692915050565b631a7e6adf60e11b81528b60048201528a6024820152896044820152600060648201526bffffffffffffffffffffffff198960601b1660708201528760848201528660a48201528560c4820152600061101c61101260e4840163a9059cbb60e01b815260040190565b60008152600c0190565b611037818860601b6bffffffffffffffffffffffff19169052565b65ffffffffffff198616601482015261105f602e82018660d01b6001600160d01b0319169052565b63ffffffff19841660348201526050019d9c50505050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b803560208310156106be57600019602084900360031b1b1692915050565b6bffffffffffffffffffffffff198460601b168152818360148301376000910160140190815292915050565b7f7b2274797065223a22776562617574686e2e676574222c226368616c6c656e6781526332911d1160e11b602082015260008251611125816024850160208701610d63565b61227d60f01b6024939091019283015250602601919050565b602081526000825160c0602084015261115a60e0840182610d87565b90506020840151601f198483030160408501526111778282610d87565b9150506040840151606084015260608401516080840152608084015160a084015260a084015160c08401528091505092915050565b6001600160f81b031960f886811b821683526001600160d01b03198616600184015284901b16600782015281516000906111ed816008850160208701610d63565b9190910160080195945050505050565b634e487b7160e01b600052601160045260246000fd5b60ff81811683821601908111156106be576106be6111fd565b818103818111156106be576106be6111fd565b634e487b7160e01b600052604160045260246000fd5b600060018201611267576112676111fd565b5060010190565b808201808211156106be576106be6111fd565b60008261129e57634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176106be576106be6111fd56fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220de2763d9279935df6f10ccc71e184ffdfd1e572911a685ae2f346ada5e1bb40d64736f6c634300081500330000000000000000000000001b85dede8178e18cde599b4c9d913534553c3dbf0000000000000000000000002a6d311394184eeb6df8fbbf58626b085374ffe7", + "nonce": "0x6b0", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x058b536d087d52c31617ce68378be562a58fdf9d85cb920709109e98270d2d01", + "transactionType": "CALL", + "contractName": "DaimoOpInflator", + "contractAddress": "0xb742F6BC849020F1a7180fDFe02662F8Bce9d9C4", + "function": "setPaymaster(address)", + "arguments": [ + "0x13f490FafBb206440F25760A10C21A6220017fFa" + ], + "transaction": { + "type": "0x02", + "from": "0x2a6d311394184eeb6df8fbbf58626b085374ffe7", + "to": "0xb742f6bc849020f1a7180fdfe02662f8bce9d9c4", + "gas": "0xf8e2", + "value": "0x0", + "data": "0x2a97fa7700000000000000000000000013f490fafbb206440f25760a10c21a6220017ffa", + "nonce": "0x6b1", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xdc2141662869b0a546fb6d202b3c287d9e627db23331f95fd41957724558011e", + "transactionType": "CALL", + "contractName": "PerOpInflator", + "contractAddress": "0x2c57b3B624d4FB12e65AF70105d4c905B31EAA8b", + "function": "registerOpInflator(uint32,address)", + "arguments": [ + "2", + "0xb742F6BC849020F1a7180fDFe02662F8Bce9d9C4" + ], + "transaction": { + "type": "0x02", + "from": "0x2a6d311394184eeb6df8fbbf58626b085374ffe7", + "to": "0x2c57b3b624d4fb12e65af70105d4c905b31eaa8b", + "gas": "0x17e51", + "value": "0x0", + "data": "0x0636ef610000000000000000000000000000000000000000000000000000000000000002000000000000000000000000b742f6bc849020f1a7180fdfe02662f8bce9d9c4", + "nonce": "0x6b2", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0x34363a5d9a9e59d3fc7f654d836cae1e64d43bff98e42d0f2f61ad321786520f", + "transactionIndex": "0x1", + "blockHash": "0xc0355299f0144dd89ee04338108d0638af76da36c924b1c973b0d7956b5ef715", + "blockNumber": "0xd9dc34", + "from": "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7", + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "cumulativeGasUsed": "0x1391cc", + "gasUsed": "0x1297fb", + "contractAddress": "0xb742F6BC849020F1a7180fDFe02662F8Bce9d9C4", + "logs": [ + { + "address": "0xb742F6BC849020F1a7180fDFe02662F8Bce9d9C4", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000004e59b44847b379578588920ca78fbf26c0b4956c" + ], + "data": "0x", + "blockHash": "0xc0355299f0144dd89ee04338108d0638af76da36c924b1c973b0d7956b5ef715", + "blockNumber": "0xd9dc34", + "transactionHash": "0x34363a5d9a9e59d3fc7f654d836cae1e64d43bff98e42d0f2f61ad321786520f", + "transactionIndex": "0x1", + "logIndex": "0x0", + "removed": false + }, + { + "address": "0xb742F6BC849020F1a7180fDFe02662F8Bce9d9C4", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000004e59b44847b379578588920ca78fbf26c0b4956c", + "0x0000000000000000000000002a6d311394184eeb6df8fbbf58626b085374ffe7" + ], + "data": "0x", + "blockHash": "0xc0355299f0144dd89ee04338108d0638af76da36c924b1c973b0d7956b5ef715", + "blockNumber": "0xd9dc34", + "transactionHash": "0x34363a5d9a9e59d3fc7f654d836cae1e64d43bff98e42d0f2f61ad321786520f", + "transactionIndex": "0x1", + "logIndex": "0x1", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00004000400000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000001000000000000000000020000000001000000000000000010000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000080000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d060c8" + }, + { + "transactionHash": "0x058b536d087d52c31617ce68378be562a58fdf9d85cb920709109e98270d2d01", + "transactionIndex": "0x2", + "blockHash": "0xc0355299f0144dd89ee04338108d0638af76da36c924b1c973b0d7956b5ef715", + "blockNumber": "0xd9dc34", + "from": "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7", + "to": "0xb742F6BC849020F1a7180fDFe02662F8Bce9d9C4", + "cumulativeGasUsed": "0x1445fc", + "gasUsed": "0xb430", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d060c8" + }, + { + "transactionHash": "0xdc2141662869b0a546fb6d202b3c287d9e627db23331f95fd41957724558011e", + "transactionIndex": "0x3", + "blockHash": "0xc0355299f0144dd89ee04338108d0638af76da36c924b1c973b0d7956b5ef715", + "blockNumber": "0xd9dc34", + "from": "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7", + "to": "0x2c57b3B624d4FB12e65AF70105d4c905B31EAA8b", + "cumulativeGasUsed": "0x154b66", + "gasUsed": "0x1056a", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d060c8" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1703749006, + "chain": 84531, + "multi": false, + "commit": "dd015c0" +} \ No newline at end of file diff --git a/broadcast/Deploy.s.sol/84531/deployPerOpInflator-latest.json b/broadcast/Deploy.s.sol/84531/deployPerOpInflator-latest.json new file mode 100644 index 0000000..e4ddf95 --- /dev/null +++ b/broadcast/Deploy.s.sol/84531/deployPerOpInflator-latest.json @@ -0,0 +1,120 @@ +{ + "transactions": [ + { + "hash": "0x816459d1e51f8a547350f4bff5037e2eb3c6c58f42323dfe0c79418afa2f6e91", + "transactionType": "CREATE2", + "contractName": "PerOpInflator", + "contractAddress": "0x24aA17a5A5D14Bd3f5144a4a963ee8CDfAe6B511", + "function": null, + "arguments": [ + "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7" + ], + "transaction": { + "type": "0x02", + "from": "0x2a6d311394184eeb6df8fbbf58626b085374ffe7", + "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", + "gas": "0x1303cd", + "value": "0x0", + "data": "0x0000000000000000000000000000000000000000000000000000000000000000608060405234801561001057600080fd5b5060405162000f8938038062000f8983398101604081905261003191610173565b61003a33610049565b61004381610099565b506101a3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6100a1610117565b6001600160a01b03811661010b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61011481610049565b50565b6000546001600160a01b031633146101715760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610102565b565b60006020828403121561018557600080fd5b81516001600160a01b038116811461019c57600080fd5b9392505050565b610dd680620001b36000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806345c706581161006657806345c7065814610115578063715018a61461013e5780638da5cb5b14610146578063e5f7e72f14610157578063f2fde38b1461019257600080fd5b806303a353bd146100985780630636ef61146100c25780631c31f710146100d757806338af3eed146100ea575b600080fd5b6100ab6100a63660046107cb565b6101a5565b6040516100b992919061088d565b60405180910390f35b6100d56100d03660046109e5565b610495565b005b6100d56100e5366004610a1c565b61066a565b6001546100fd906001600160a01b031681565b6040516001600160a01b0390911681526020016100b9565b6100fd610123366004610a40565b6002602052600090815260409020546001600160a01b031681565b6100d5610694565b6000546001600160a01b03166100fd565b61017d610165366004610a1c565b60036020526000908152604090205463ffffffff1681565b60405163ffffffff90911681526020016100b9565b6100d56101a0366004610a1c565b6106a8565b60606000806101b76001828688610a5b565b6101c091610a85565b60f81c905060008167ffffffffffffffff8111156101e0576101e0610ab5565b60405190808252806020026020018201604052801561027757816020015b61026460405180610160016040528060006001600160a01b03168152602001600081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001606081525090565b8152602001906001900390816101fe5790505b509050600160005b8381101561042b576000888389610297826004610ae1565b926102a493929190610a5b565b6102ad91610afa565b60e01c9050600089896102c1866004610ae1565b906102cd876006610ae1565b926102da93929190610a5b565b6102e391610b28565b60f01c90506102f3600685610ae1565b63ffffffff83166000908152600260205260409020549094506001600160a01b0316806103595760405162461bcd60e51b815260206004820152600f60248201526e109859081a5b999b185d1bdc881251608a1b60448201526064015b60405180910390fd5b6001600160a01b0381166303a353bd8c878d61037961ffff881683610ae1565b9261038693929190610a5b565b6040518363ffffffff1660e01b81526004016103a3929190610b56565b600060405180830381865afa1580156103c0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103e89190810190610c42565b8685815181106103fa576103fa610d71565b602090810291909101015261041361ffff831686610ae1565b9450505050808061042390610d87565b91505061027f565b5080861461047b5760405162461bcd60e51b815260206004820152601760248201527f57726f6e6720636f6d70726573736564206c656e6774680000000000000000006044820152606401610350565b506001549093506001600160a01b03169150509250929050565b8163ffffffff166000036104eb5760405162461bcd60e51b815260206004820152601760248201527f496e666c61746f722049442063616e6e6f7420626520300000000000000000006044820152606401610350565b6001600160a01b0381166105415760405162461bcd60e51b815260206004820152601c60248201527f496e666c61746f7220616464726573732063616e6e6f742062652030000000006044820152606401610350565b63ffffffff82166000908152600260205260409020546001600160a01b0316156105ad5760405162461bcd60e51b815260206004820152601b60248201527f496e666c61746f7220616c7265616479207265676973746572656400000000006044820152606401610350565b6001600160a01b03811660009081526003602052604090205463ffffffff16156106195760405162461bcd60e51b815260206004820152601b60248201527f496e666c61746f7220616c7265616479207265676973746572656400000000006044820152606401610350565b63ffffffff909116600081815260026020908152604080832080546001600160a01b039096166001600160a01b0319909616861790559382526003905291909120805463ffffffff19169091179055565b610672610721565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61069c610721565b6106a6600061077b565b565b6106b0610721565b6001600160a01b0381166107155760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610350565b61071e8161077b565b50565b6000546001600160a01b031633146106a65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610350565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080602083850312156107de57600080fd5b823567ffffffffffffffff808211156107f657600080fd5b818501915085601f83011261080a57600080fd5b81358181111561081957600080fd5b86602082850101111561082b57600080fd5b60209290920196919550909350505050565b60005b83811015610858578181015183820152602001610840565b50506000910152565b6000815180845261087981602086016020860161083d565b601f01601f19169290920160200192915050565b60006040808301818452808651808352606092508286019150828160051b8701016020808a0160005b8481101561099157898403605f19018652815180516001600160a01b03168552610160848201518587015289820151818b8801526108f682880182610861565b915050888201518682038a88015261090e8282610861565b6080848101519089015260a0808501519089015260c0808501519089015260e08085015190890152610100808501519089015261012080850151898303828b0152919350915061095e8382610861565b92505050610140808301519250868203818801525061097d8183610861565b9785019795505050908201906001016108b6565b50508196506109aa8189018a6001600160a01b03169052565b5050505050509392505050565b803563ffffffff811681146109cb57600080fd5b919050565b6001600160a01b038116811461071e57600080fd5b600080604083850312156109f857600080fd5b610a01836109b7565b91506020830135610a11816109d0565b809150509250929050565b600060208284031215610a2e57600080fd5b8135610a39816109d0565b9392505050565b600060208284031215610a5257600080fd5b610a39826109b7565b60008085851115610a6b57600080fd5b83861115610a7857600080fd5b5050820193919092039150565b6001600160f81b03198135818116916001851015610aad5780818660010360031b1b83161692505b505092915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610af457610af4610acb565b92915050565b6001600160e01b03198135818116916004851015610aad5760049490940360031b84901b1690921692915050565b6001600160f01b03198135818116916002851015610aad5760029490940360031b84901b1690921692915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b604051610160810167ffffffffffffffff81118282101715610ba957610ba9610ab5565b60405290565b80516109cb816109d0565b600082601f830112610bcb57600080fd5b815167ffffffffffffffff80821115610be657610be6610ab5565b604051601f8301601f19908116603f01168101908282118183101715610c0e57610c0e610ab5565b81604052838152866020858801011115610c2757600080fd5b610c3884602083016020890161083d565b9695505050505050565b600060208284031215610c5457600080fd5b815167ffffffffffffffff80821115610c6c57600080fd5b908301906101608286031215610c8157600080fd5b610c89610b85565b610c9283610baf565b815260208301516020820152604083015182811115610cb057600080fd5b610cbc87828601610bba565b604083015250606083015182811115610cd457600080fd5b610ce087828601610bba565b6060830152506080830151608082015260a083015160a082015260c083015160c082015260e083015160e08201526101008084015181830152506101208084015183811115610d2e57600080fd5b610d3a88828701610bba565b8284015250506101408084015183811115610d5457600080fd5b610d6088828701610bba565b918301919091525095945050505050565b634e487b7160e01b600052603260045260246000fd5b600060018201610d9957610d99610acb565b506001019056fea2646970667358221220d3d0ac0b332cc9eda0f463ceeb3551dd051f6c8a18560ff7acde6f1d56269e3364736f6c634300081500330000000000000000000000002a6d311394184eeb6df8fbbf58626b085374ffe7", + "nonce": "0x6b5", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x648899c6d0c2912b0808034e8aaa8736bc7f85d9417f68972fdd500ebefc6750", + "transactionType": "CALL", + "contractName": "PerOpInflator", + "contractAddress": "0x24aA17a5A5D14Bd3f5144a4a963ee8CDfAe6B511", + "function": "setBeneficiary(address)", + "arguments": [ + "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7" + ], + "transaction": { + "type": "0x02", + "from": "0x2a6d311394184eeb6df8fbbf58626b085374ffe7", + "to": "0x24aa17a5a5d14bd3f5144a4a963ee8cdfae6b511", + "gas": "0x10765", + "value": "0x0", + "data": "0x1c31f7100000000000000000000000002a6d311394184eeb6df8fbbf58626b085374ffe7", + "nonce": "0x6b6", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0x816459d1e51f8a547350f4bff5037e2eb3c6c58f42323dfe0c79418afa2f6e91", + "transactionIndex": "0x1", + "blockHash": "0x0d8c0a9eb9d3001c4a978134b34ccece9fb82db84aeddfaf10fe3d14e07c39ba", + "blockNumber": "0xd9e0d5", + "from": "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7", + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "cumulativeGasUsed": "0xdb86b", + "gasUsed": "0xd0166", + "contractAddress": "0x24aA17a5A5D14Bd3f5144a4a963ee8CDfAe6B511", + "logs": [ + { + "address": "0x24aA17a5A5D14Bd3f5144a4a963ee8CDfAe6B511", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000004e59b44847b379578588920ca78fbf26c0b4956c" + ], + "data": "0x", + "blockHash": "0x0d8c0a9eb9d3001c4a978134b34ccece9fb82db84aeddfaf10fe3d14e07c39ba", + "blockNumber": "0xd9e0d5", + "transactionHash": "0x816459d1e51f8a547350f4bff5037e2eb3c6c58f42323dfe0c79418afa2f6e91", + "transactionIndex": "0x1", + "logIndex": "0x0", + "removed": false + }, + { + "address": "0x24aA17a5A5D14Bd3f5144a4a963ee8CDfAe6B511", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000004e59b44847b379578588920ca78fbf26c0b4956c", + "0x0000000000000000000000002a6d311394184eeb6df8fbbf58626b085374ffe7" + ], + "data": "0x", + "blockHash": "0x0d8c0a9eb9d3001c4a978134b34ccece9fb82db84aeddfaf10fe3d14e07c39ba", + "blockNumber": "0xd9e0d5", + "transactionHash": "0x816459d1e51f8a547350f4bff5037e2eb3c6c58f42323dfe0c79418afa2f6e91", + "transactionIndex": "0x1", + "logIndex": "0x1", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000080000000000000000020000000001000000000000000010000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000020000000000000000000000000000000000080000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05f2e" + }, + { + "transactionHash": "0x648899c6d0c2912b0808034e8aaa8736bc7f85d9417f68972fdd500ebefc6750", + "transactionIndex": "0x2", + "blockHash": "0x0d8c0a9eb9d3001c4a978134b34ccece9fb82db84aeddfaf10fe3d14e07c39ba", + "blockNumber": "0xd9e0d5", + "from": "0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7", + "to": "0x24aA17a5A5D14Bd3f5144a4a963ee8CDfAe6B511", + "cumulativeGasUsed": "0xe6c85", + "gasUsed": "0xb41a", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05f2e" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1703751375, + "chain": 84531, + "multi": false, + "commit": "dd015c0" +} \ No newline at end of file diff --git a/lib/p256-verifier b/lib/p256-verifier new file mode 160000 index 0000000..29475ae --- /dev/null +++ b/lib/p256-verifier @@ -0,0 +1 @@ +Subproject commit 29475ae300ec95d98d5c7cc34c094846f0aa2dcd diff --git a/package.json b/package.json index e4968a0..53b79b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@daimo/bulk", - "version": "0.1.4", + "version": "0.2.4", "description": "Make compressed 4337 bundles swole again. Save calldata, save cost, ship cheap 4337 on L2.", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/remappings.txt b/remappings.txt index 8dba735..b8512d0 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,4 +1,5 @@ +forge-std/=lib/forge-std/src/ account-abstraction/=lib/account-abstraction/contracts/ +openzeppelin-contracts/=lib/openzeppelin-contracts/ @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ -openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/ -forge-std/=lib/forge-std/src/ \ No newline at end of file +p256-verifier/=lib/p256-verifier/src/ \ No newline at end of file diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index 6255074..322ccfc 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -3,7 +3,8 @@ pragma solidity ^0.8.13; import {Script, console2} from "forge-std/Script.sol"; import "../src/BundleBulker.sol"; -import "../src/DaimoTransferInflator.sol"; +import "../src/PerOpInflator.sol"; +import "../src/DaimoOpInflator.sol"; contract DeployScript is Script { function setUp() public {} @@ -13,24 +14,34 @@ contract DeployScript is Script { new BundleBulker{salt:0}(); } - function deployDaimoTransferInflator() public { - address tokenAddress; + function deployPerOpInflator() public { + vm.startBroadcast(); + + // Deploy PerOpInflator address payable beneficiary = payable(0x2A6d311394184EeB6Df8FBBF58626B085374Ffe7); + PerOpInflator pi = new PerOpInflator{salt:0}(msg.sender); + pi.setBeneficiary(beneficiary); + vm.stopBroadcast(); + } + + function deployDaimoOpInflator() public { + vm.startBroadcast(); + // Deploy DaimoOpInflator + address tokenAddress; address paymaster; if (block.chainid == 8453) { tokenAddress = 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913; // Base USDC - paymaster = 0xedb395b8BD78788A57e3C8eD9b748f9CC29C2864; // Daimo Sub Paymaster (uses Metapaymaster) + paymaster = 0xac5917075b3ED3a6a4516398800f3f64FCf4631E; // DaimoPaymasterV2 } else if (block.chainid == 84531){ tokenAddress = 0x1B85deDe8178E18CdE599B4C9d913534553C3dBf; // Base Goerli testUSDC - paymaster = 0x6f0F82fAFac7B5D8C269B02d408F094bAC6CF877; // DaimoPaymaster + paymaster = 0x13f490FafBb206440F25760A10C21A6220017fFa; // Pimlico ERC20 paymaster } else { revert("Unsupported chain"); } - vm.startBroadcast(); - DaimoTransferInflator i = new DaimoTransferInflator{salt:0}(tokenAddress, msg.sender); - i.setBeneficiary(beneficiary); + DaimoOpInflator i = new DaimoOpInflator{salt:0}(tokenAddress, msg.sender); i.setPaymaster(paymaster); + vm.stopBroadcast(); } } diff --git a/script/deploy.sh b/script/deploy.sh index cededf5..222222f 100755 --- a/script/deploy.sh +++ b/script/deploy.sh @@ -3,4 +3,7 @@ forge script script/Deploy.s.sol --sig "deploy()" --fork-url $RPC_URL --private-key $PRIVATE_KEY --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY # Deploy example inflator -forge script script/Deploy.s.sol --sig "deployDaimoTransferInflator()" --fork-url $RPC_URL --private-key $PRIVATE_KEY --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY +# forge script script/Deploy.s.sol --sig "deployDaimoTransferInflator()" --fork-url $RPC_URL --private-key $PRIVATE_KEY --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY + +# Deploy example inflator +forge script script/Deploy.s.sol --sig "deployPerOpInflator()" --fork-url $RPC_URL --private-key $PRIVATE_KEY --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY diff --git a/src/BundleBulker.sol b/src/BundleBulker.sol index 1ab48cb..18939a7 100644 --- a/src/BundleBulker.sol +++ b/src/BundleBulker.sol @@ -11,13 +11,13 @@ import "./IInflator.sol"; contract BundleBulker { address public constant ENTRY_POINT = 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789; - mapping(uint32 => address) public idToInflator; - mapping(address => uint32) public inflatorToID; + mapping(uint32 => IInflator) public idToInflator; + mapping(IInflator => uint32) public inflatorToID; - function registerInflator(uint32 inflatorId, address inflator) public { + function registerInflator(uint32 inflatorId, IInflator inflator) public { require(inflatorId != 0, "Inflator ID cannot be 0"); - require(inflator != address(0), "Inflator address cannot be 0"); - require(idToInflator[inflatorId] == address(0), "Inflator already registered"); + require(address(inflator) != address(0), "Inflator address cannot be 0"); + require(address(idToInflator[inflatorId]) == address(0), "Inflator already registered"); require(inflatorToID[inflator] == 0, "Inflator already registered"); idToInflator[inflatorId] = inflator; @@ -26,9 +26,9 @@ contract BundleBulker { function inflate(bytes calldata compressed) public view returns (UserOperation[] memory ops, address payable beneficiary) { uint32 inflatorID = uint32(bytes4(compressed[0:4])); - address inflator = idToInflator[inflatorID]; - require(inflator != address(0), "Inflator not registered"); - return IInflator(inflator).inflate(compressed[4:]); + IInflator inflator = idToInflator[inflatorID]; + require(address(inflator) != address(0), "Inflator not registered"); + return inflator.inflate(compressed[4:]); } function submit(bytes calldata compressed) public { diff --git a/src/DaimoOpInflator.sol b/src/DaimoOpInflator.sol new file mode 100644 index 0000000..1081286 --- /dev/null +++ b/src/DaimoOpInflator.sol @@ -0,0 +1,162 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity >=0.8; + +import "./IOpInflator.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; +import "account-abstraction/interfaces/IEntryPoint.sol"; +import "p256-verifier/utils/Base64URL.sol"; + +interface INameReg { + function resolveAddr(bytes32 name) external view returns (address); +} + +/// Inflates an op containing a Daimo ERC20 transfer. +/// Compression reduces userop data by 80%+ from ~800 bytes to ~125 bytes. +/// Singleton bundle tx goes from ~1600 bytes to ~340 bytes. +contract DaimoOpInflator is IOpInflator, Ownable { + address public coinAddr; + address public paymaster; + INameReg public nameReg = INameReg(0x4430A644B215a187a3daa5b114fA3f3d9DeBc17D); + address public entryPoint = 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789; + + constructor(address _coinAddr, address _owner) { + coinAddr = _coinAddr; + transferOwnership(_owner); + } + + function setPaymaster(address _paymaster) public onlyOwner { + paymaster = _paymaster; + } + + function readString(bytes calldata compressed) internal pure returns (bytes32, bytes calldata) { + uint8 len = uint8(compressed[0]); + bytes32 str = bytes32(compressed[1:1+len]); + compressed = compressed[1+len:]; + return (str, compressed); + } + + function inflate( + bytes calldata compressed + ) external view override returns (UserOperation memory op) { + // Parse userop metadata + bytes32 fromName; + bytes32 toName; + + (fromName, compressed) = readString(compressed); + (toName, compressed) = readString(compressed); + + op.sender = nameReg.resolveAddr(fromName); + op.nonce = uint256(uint128(bytes16(compressed[0:16]))) << 64; + op.initCode = ""; + op.callGasLimit = uint256(300000); + op.verificationGasLimit = uint256(700000); + op.preVerificationGas = uint256(uint32(bytes4(compressed[16:20]))); + op.maxFeePerGas = uint256(uint48(bytes6(compressed[20:26]))); + op.maxPriorityFeePerGas = uint256(uint48(bytes6(compressed[26:32]))); + + // Add calldata + address recipientAddr = nameReg.resolveAddr(toName); + bytes6 amount = bytes6(compressed[32:38]); + op.callData = abi.encodePacked( + hex"34fcd5be", // executeBatch + uint256(32), // offset calls + uint256(1), // len(calls) + uint256(32), // offset calls[0] + hex"000000000000000000000000", // offset to token + coinAddr, // eg Base USDC + uint256(0), // value + uint256(0x60), // offset calls[0].data + uint256(0x44), // len(calls[0].data) + hex"a9059cbb", // transfer(address,uint256) + hex"000000000000000000000000", // offset to address + recipientAddr, + bytes26(0), // offset to amount + uint48(amount), + bytes28(0) // padding + ); + + // Decompress WebAuthn signature + compressed = compressed[38:]; + uint8 version = uint8(compressed[0]); + require(version == 1, "Unsupported version"); + bytes6 validUntil = bytes6(compressed[1:7]); + uint8 keySlot = uint8(compressed[7]); + + Signature memory sig; + sig.authenticatorData = abi.encodePacked(bytes32(0), hex"0500000000"); + sig.responseTypeLocation = 1; + sig.challengeLocation = 23; + sig.r = uint256(bytes32(compressed[8:40])); + sig.s = uint256(bytes32(compressed[40:72])); + + + // Finally, add the paymaster + ticket signature for sponsored gas + op.paymasterAndData = abi.encodePacked( + paymaster, + compressed[72:] // paymaster data, if required + ); + + // Template WebAuthn signature + // Challenge is always 52 bytes: 39 bytes (1 byte version + 6 byte validUntil + 32 byte opHash) * 8/6 for Base64 + bytes32 opDataHash = keccak256(packOpData(op)); + bytes32 userOpHash = keccak256(abi.encode(opDataHash, entryPoint, block.chainid)); + + string memory challenge = Base64URL.encode(abi.encodePacked(version, validUntil, userOpHash)); + sig.clientDataJSON = string( + abi.encodePacked( + '{"type":"webauthn.get","challenge":"', + challenge, + '"}' + ) + ); + op.signature = abi.encodePacked( + version, + validUntil, + keySlot, + abi.encode(sig) + ); + + return op; + } + + // Copied from UserOperation.sol + // The version there only operates on UserOperation calldata + function packOpData(UserOperation memory userOp) internal pure returns (bytes memory ret) { + address sender = userOp.sender; + // require(sender == address(0x8bFfa71A959AF0b15C6eaa10d244d80BF23cb6A2)); + uint256 nonce = userOp.nonce; + // require(nonce == 1964309238010514598139960553805611309456889087397726257152); + bytes32 hashInitCode = keccak256(userOp.initCode); + // require(hashInitCode == keccak256(hex"")); + bytes32 hashCallData = keccak256(userOp.callData); + uint256 callGasLimit = userOp.callGasLimit; + // require(callGasLimit == 300000); + uint256 verificationGasLimit = userOp.verificationGasLimit; + // require(verificationGasLimit == 700000); + uint256 preVerificationGas = userOp.preVerificationGas; + // require(preVerificationGas == 8078499); + uint256 maxFeePerGas = userOp.maxFeePerGas; + // require(maxFeePerGas == 1000050); + uint256 maxPriorityFeePerGas = userOp.maxPriorityFeePerGas; + // require(maxPriorityFeePerGas == 1000000); + bytes32 hashPaymasterAndData = keccak256(userOp.paymasterAndData); + // require(hashPaymasterAndData == keccak256(hex"99d720cd5a04c16dc5377638e3f6d609c895714f")); + + return abi.encode( + sender, nonce, + hashInitCode, hashCallData, + callGasLimit, verificationGasLimit, preVerificationGas, + maxFeePerGas, maxPriorityFeePerGas, + hashPaymasterAndData + ); + } +} + +struct Signature { + bytes authenticatorData; + string clientDataJSON; + uint256 challengeLocation; + uint256 responseTypeLocation; + uint256 r; + uint256 s; +} diff --git a/src/DaimoTransferInflator.sol b/src/DaimoTransferInflator.sol index dbfc517..05f4541 100644 --- a/src/DaimoTransferInflator.sol +++ b/src/DaimoTransferInflator.sol @@ -2,7 +2,7 @@ pragma solidity >=0.8; import "./IInflator.sol"; -import "openzeppelin-contracts/access/Ownable.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; import "account-abstraction/interfaces/IEntryPoint.sol"; /// Inflates a bundle containing a single Daimo USDC transfer. diff --git a/src/IOpInflator.sol b/src/IOpInflator.sol new file mode 100644 index 0000000..41f174b --- /dev/null +++ b/src/IOpInflator.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity >=0.8; + +import "account-abstraction/interfaces/IEntryPoint.sol"; + +interface IOpInflator { + function inflate(bytes calldata compressed) external view returns (UserOperation memory op); +} \ No newline at end of file diff --git a/src/PerOpInflator.sol b/src/PerOpInflator.sol new file mode 100644 index 0000000..a142ac9 --- /dev/null +++ b/src/PerOpInflator.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity >=0.8; + +import "./IInflator.sol"; +import "./IOpInflator.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; +import "account-abstraction/interfaces/IEntryPoint.sol"; + +/// Inflates a bundle containing n ops, each with their own inflator specified. +contract PerOpInflator is IInflator, Ownable { + address payable public beneficiary; + + mapping(uint32 => IOpInflator) public idToInflator; + mapping(IOpInflator => uint32) public inflatorToID; + + function registerOpInflator(uint32 inflatorId, IOpInflator inflator) public { + require(inflatorId != 0, "Inflator ID cannot be 0"); + require(address(inflator) != address(0), "Inflator address cannot be 0"); + require(address(idToInflator[inflatorId]) == address(0), "Inflator already registered"); + require(inflatorToID[inflator] == 0, "Inflator already registered"); + + idToInflator[inflatorId] = inflator; + inflatorToID[inflator] = inflatorId; + } + + constructor(address _owner) { + transferOwnership(_owner); + } + + function setBeneficiary(address payable _beneficiary) public onlyOwner { + beneficiary = _beneficiary; + } + + function inflate( + bytes calldata compressed + ) external view override returns (UserOperation[] memory, address payable) { + uint256 numOps = uint256(uint8(bytes1(compressed[0:1]))); + UserOperation[] memory ops = new UserOperation[](numOps); + uint256 offset = 1; + for (uint256 i = 0; i < numOps; i++) { + uint32 inflatorID = uint32(bytes4(compressed[offset:offset+4])); + uint16 opSize = uint16(bytes2(compressed[offset+4:offset+6])); + offset += 6; + + IOpInflator inflator = idToInflator[inflatorID]; + require(address(inflator) != address(0), "Bad inflator ID"); + ops[i] = inflator.inflate(compressed[offset:offset+opSize]); + offset += opSize; + } + require(offset == compressed.length, "Wrong compressed length"); + + return (ops, beneficiary); + } +} diff --git a/test/BundleBulker.t.sol b/test/BundleBulker.t.sol index 0af073a..351d708 100644 --- a/test/BundleBulker.t.sol +++ b/test/BundleBulker.t.sol @@ -16,30 +16,30 @@ contract BundleBulkerTest is Test { } function test_AddInflator() public { - address tango = address(0x123); - address foxtrot = address(0x234); + IInflator tango = IInflator(address(0x123)); + IInflator foxtrot = IInflator(address(0x234)); b.registerInflator(1, tango); - assertEq(b.idToInflator(1), tango); + assertEq(address(b.idToInflator(1)), address(tango)); assertEq(b.inflatorToID(tango), 1); vm.expectRevert("Inflator ID cannot be 0"); b.registerInflator(0, tango); vm.expectRevert("Inflator address cannot be 0"); - b.registerInflator(2, address(0)); + b.registerInflator(2, IInflator(address(0))); vm.expectRevert("Inflator already registered"); b.registerInflator(1, foxtrot); vm.expectRevert("Inflator already registered"); b.registerInflator(2, tango); b.registerInflator(2, foxtrot); - assertEq(b.idToInflator(2), foxtrot); + assertEq(address(b.idToInflator(2)), address(foxtrot)); assertEq(b.inflatorToID(foxtrot), 2); } function test_Inflate() public { DummyInflator d = new DummyInflator(); - b.registerInflator(77, address(d)); + b.registerInflator(77, d); bytes memory compressed = abi.encodePacked(uint32(77), address(0x999)); (UserOperation[] memory ops, address payable beneficiary) = b.inflate( diff --git a/test/DaimoOpInflator.t.sol b/test/DaimoOpInflator.t.sol new file mode 100644 index 0000000..81b4601 --- /dev/null +++ b/test/DaimoOpInflator.t.sol @@ -0,0 +1,122 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import {Test, console2} from "forge-std/Test.sol"; +import {UserOperation} from "account-abstraction/interfaces/IEntryPoint.sol"; + +import {IInflator} from "../src/IInflator.sol"; +import {DaimoOpInflator} from "../src/DaimoOpInflator.sol"; + + +contract DummyNameReg { + function resolveAddr(bytes32 name) external view returns (address) { + if (name== bytes32(bytes("bob"))) { + return address(0x8bFfa71A959AF0b15C6eaa10d244d80BF23cb6A2); + } else if (name == bytes32(bytes("blob"))) { + return address(0xA1B349c566C44769888948aDC061ABCdB54497F7); + } else { + return address(0); + } + } +} + +contract DaimoOpInflatorTest is Test { + function setUp() public { + DummyNameReg nameReg = new DummyNameReg(); + vm.etch(address(0x4430A644B215a187a3daa5b114fA3f3d9DeBc17D), address(nameReg).code); + vm.chainId(8453); + } + + function test_DaimoOpInflator() public { + address payable alice = payable(address(0x123)); + DaimoOpInflator d = new DaimoOpInflator( + address(0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913), + alice + ); + vm.startPrank(alice); + d.setPaymaster(address(0x99D720cd5A04c16Dc5377638e3f6D609c895714F)); + vm.stopPrank(); + + bytes memory compressed = abi.encodePacked( + hex"03626F62", // sender + hex"04626C6F62", // to + hex"501c58693b65f1374631a2fca7bb7dc6", // nonce + hex"007b44a3", // preVerificationGas + hex"0000000f4272", // maxFeePerGas + hex"0000000f4240", // maxPriorityFeePerGas + hex"0000000f4240", // amount + hex"0100006553c75f00", // sig version, validUntil, keySlot + hex"ce1a2a89ec9d3cecd1e9fd65808d85702d7f8681d42ce8f0982363a362b87bd5", // sig r + hex"498c72f497f9d27ae895c6d2c10a73e85b73d258371d2322c80ca5bfad242f5f" // sig s + ); + + // Length paymaster ticket sig: 119 bytes + assertEq(compressed.length, 119); + + UserOperation memory op = d.inflate(compressed); + + assertEq( + op.sender, + address(0x8bFfa71A959AF0b15C6eaa10d244d80BF23cb6A2) + ); + assertEq(op.nonce, 0x501c58693b65f1374631a2fca7bb7dc60000000000000000); + assertEq(op.initCode, ""); + assertEq(op.callData, + hex"34fcd5be" // executeBatch + hex"0000000000000000000000000000000000000000000000000000000000000020" + hex"0000000000000000000000000000000000000000000000000000000000000001" + hex"0000000000000000000000000000000000000000000000000000000000000020" + hex"000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913" + hex"0000000000000000000000000000000000000000000000000000000000000000" + hex"0000000000000000000000000000000000000000000000000000000000000060" + hex"0000000000000000000000000000000000000000000000000000000000000044" + hex"a9059cbb" // transfer + hex"000000000000000000000000a1b349c566c44769888948adc061abcdb54497f7" + hex"00000000000000000000000000000000000000000000000000000000000f4240" + hex"00000000000000000000000000000000000000000000000000000000" + ); + assertEq(op.callGasLimit, 300000); + assertEq(op.verificationGasLimit, 700000); + assertEq(op.preVerificationGas, 8078499); + assertEq(op.maxFeePerGas, 1000050); + assertEq(op.maxPriorityFeePerGas, 1000000); + assertEq( + op.paymasterAndData, + hex"99d720cd5a04c16dc5377638e3f6d609c895714f" + ); + assertEq( + op.signature, + abi.encodePacked( + hex"01" + hex"00006553c75f" + hex"00" + hex"0000000000000000000000000000000000000000000000000000000000000020" + hex"00000000000000000000000000000000000000000000000000000000000000c0" + hex"0000000000000000000000000000000000000000000000000000000000000120" + hex"0000000000000000000000000000000000000000000000000000000000000017" + hex"0000000000000000000000000000000000000000000000000000000000000001" + hex"ce1a2a89ec9d3cecd1e9fd65808d85702d7f8681d42ce8f0982363a362b87bd5" + hex"498c72f497f9d27ae895c6d2c10a73e85b73d258371d2322c80ca5bfad242f5f" + hex"0000000000000000000000000000000000000000000000000000000000000025" + hex"0000000000000000000000000000000000000000000000000000000000000000" + hex"0500000000000000000000000000000000000000000000000000000000000000" + hex"000000000000000000000000000000000000000000000000000000000000005a", + '{"type":"webauthn.get","challenge":"AQAAZVPHX0VzpTcrm5fZhFP_VciTT3XMWHH2bNzjd54e1wN5M2io"}', + hex"000000000000" + ) + ); + } +} + +contract DummyInflator is IInflator { + function inflate(bytes calldata compressed) + external + override + pure + returns (UserOperation[] memory ops, address payable beneficiary) + { + assert(compressed.length == 20); + ops = new UserOperation[](0); + beneficiary = payable(address(bytes20(compressed[0:20]))); + } +} \ No newline at end of file diff --git a/test/PerOpInflator.t.sol b/test/PerOpInflator.t.sol new file mode 100644 index 0000000..9681d3d --- /dev/null +++ b/test/PerOpInflator.t.sol @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import {Test, console2} from "forge-std/Test.sol"; +import {UserOperation} from "account-abstraction/interfaces/IEntryPoint.sol"; + +import {PerOpInflator} from "../src/PerOpInflator.sol"; +import {IInflator} from "../src/IInflator.sol"; +import {IOpInflator} from "../src/IOpInflator.sol"; + + +contract DummyOpInflator is IOpInflator { + function inflate( + bytes calldata compressed + ) external pure override returns (UserOperation memory) { + require(compressed.length == 4, "Wrong compressed length"); + require(uint32(bytes4(compressed[0:4])) == 0x12345678, "Wrong compressed data"); + UserOperation memory op; + return op; + } +} + +contract PerOpInflatorTest is Test { + function setUp() public { + } + + function test_PerOpInflator() public { + address payable alice = payable(address(0x123)); + PerOpInflator poi = new PerOpInflator(address(this)); + poi.setBeneficiary(alice); + DummyOpInflator doi = new DummyOpInflator(); + poi.registerOpInflator(256, doi); + + + bytes memory compressed = abi.encodePacked( + hex"01", // 1 op + hex"00000100", // inflator 100 + hex"0004", // op size + hex"12345678" // op + ); + + (UserOperation[] memory ops, address beneficiary) = poi.inflate(compressed); + + assertEq(ops.length, 1); + assertEq(beneficiary, alice); + } +} \ No newline at end of file diff --git a/ts/generated.ts b/ts/generated.ts index f114864..30666ac 100644 --- a/ts/generated.ts +++ b/ts/generated.ts @@ -15,7 +15,9 @@ export const bundleBulkerABI = [ type: 'function', inputs: [{ name: '', internalType: 'uint32', type: 'uint32' }], name: 'idToInflator', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + outputs: [ + { name: '', internalType: 'contract IInflator', type: 'address' }, + ], }, { stateMutability: 'view', @@ -59,7 +61,7 @@ export const bundleBulkerABI = [ { stateMutability: 'view', type: 'function', - inputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [{ name: '', internalType: 'contract IInflator', type: 'address' }], name: 'inflatorToID', outputs: [{ name: '', internalType: 'uint32', type: 'uint32' }], }, @@ -68,7 +70,7 @@ export const bundleBulkerABI = [ type: 'function', inputs: [ { name: 'inflatorId', internalType: 'uint32', type: 'uint32' }, - { name: 'inflator', internalType: 'address', type: 'address' }, + { name: 'inflator', internalType: 'contract IInflator', type: 'address' }, ], name: 'registerInflator', outputs: [], @@ -90,6 +92,134 @@ export const bundleBulkerConfig = { abi: bundleBulkerABI, } as const +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// DaimoOpInflator +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const daimoOpInflatorABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_coinAddr', internalType: 'address', type: 'address' }, + { name: '_owner', internalType: 'address', type: 'address' }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'coinAddr', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'entryPoint', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'compressed', internalType: 'bytes', type: 'bytes' }], + name: 'inflate', + outputs: [ + { + name: 'op', + internalType: 'struct UserOperation', + type: 'tuple', + components: [ + { name: 'sender', internalType: 'address', type: 'address' }, + { name: 'nonce', internalType: 'uint256', type: 'uint256' }, + { name: 'initCode', internalType: 'bytes', type: 'bytes' }, + { name: 'callData', internalType: 'bytes', type: 'bytes' }, + { name: 'callGasLimit', internalType: 'uint256', type: 'uint256' }, + { + name: 'verificationGasLimit', + internalType: 'uint256', + type: 'uint256', + }, + { + name: 'preVerificationGas', + internalType: 'uint256', + type: 'uint256', + }, + { name: 'maxFeePerGas', internalType: 'uint256', type: 'uint256' }, + { + name: 'maxPriorityFeePerGas', + internalType: 'uint256', + type: 'uint256', + }, + { name: 'paymasterAndData', internalType: 'bytes', type: 'bytes' }, + { name: 'signature', internalType: 'bytes', type: 'bytes' }, + ], + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'nameReg', + outputs: [{ name: '', internalType: 'contract INameReg', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'paymaster', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'renounceOwnership', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_paymaster', internalType: 'address', type: 'address' }], + name: 'setPaymaster', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'transferOwnership', + outputs: [], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'previousOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'newOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, + ], + name: 'OwnershipTransferred', + }, +] as const + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // DaimoTransferInflator ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -224,3 +354,168 @@ export const daimoTransferInflatorABI = [ name: 'OwnershipTransferred', }, ] as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// INameReg +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const iNameRegABI = [ + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'name', internalType: 'bytes32', type: 'bytes32' }], + name: 'resolveAddr', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, +] as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// PerOpInflator +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const perOpInflatorABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'beneficiary', + outputs: [{ name: '', internalType: 'address payable', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'uint32', type: 'uint32' }], + name: 'idToInflator', + outputs: [ + { name: '', internalType: 'contract IOpInflator', type: 'address' }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'compressed', internalType: 'bytes', type: 'bytes' }], + name: 'inflate', + outputs: [ + { + name: '', + internalType: 'struct UserOperation[]', + type: 'tuple[]', + components: [ + { name: 'sender', internalType: 'address', type: 'address' }, + { name: 'nonce', internalType: 'uint256', type: 'uint256' }, + { name: 'initCode', internalType: 'bytes', type: 'bytes' }, + { name: 'callData', internalType: 'bytes', type: 'bytes' }, + { name: 'callGasLimit', internalType: 'uint256', type: 'uint256' }, + { + name: 'verificationGasLimit', + internalType: 'uint256', + type: 'uint256', + }, + { + name: 'preVerificationGas', + internalType: 'uint256', + type: 'uint256', + }, + { name: 'maxFeePerGas', internalType: 'uint256', type: 'uint256' }, + { + name: 'maxPriorityFeePerGas', + internalType: 'uint256', + type: 'uint256', + }, + { name: 'paymasterAndData', internalType: 'bytes', type: 'bytes' }, + { name: 'signature', internalType: 'bytes', type: 'bytes' }, + ], + }, + { name: '', internalType: 'address payable', type: 'address' }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '', internalType: 'contract IOpInflator', type: 'address' }, + ], + name: 'inflatorToID', + outputs: [{ name: '', internalType: 'uint32', type: 'uint32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: 'inflatorId', internalType: 'uint32', type: 'uint32' }, + { + name: 'inflator', + internalType: 'contract IOpInflator', + type: 'address', + }, + ], + name: 'registerOpInflator', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'renounceOwnership', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { + name: '_beneficiary', + internalType: 'address payable', + type: 'address', + }, + ], + name: 'setBeneficiary', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'transferOwnership', + outputs: [], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'previousOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'newOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, + ], + name: 'OwnershipTransferred', + }, +] as const + +export const perOpInflatorAddress = + '0x24aA17a5A5D14Bd3f5144a4a963ee8CDfAe6B511' as const + +export const perOpInflatorConfig = { + address: perOpInflatorAddress, + abi: perOpInflatorABI, +} as const diff --git a/wagmi.config.ts b/wagmi.config.ts index d896267..84392ee 100644 --- a/wagmi.config.ts +++ b/wagmi.config.ts @@ -1,14 +1,18 @@ import { defineConfig } from "@wagmi/cli"; import { foundry } from "@wagmi/cli/plugins"; -import latestRun from "./broadcast/Deploy.s.sol/84531/deploy-latest.json"; +import latestBundle from "./broadcast/Deploy.s.sol/84531/deploy-latest.json"; +import latestOp from "./broadcast/Deploy.s.sol/84531/deployPerOpInflator-latest.json"; /** * We get contract addresses from our latest Base mainnet deployments. * Because of CREATE2, all except EphemeralNotes are deterministic. */ const deployments = Object.fromEntries( - latestRun.transactions + [ + ...latestOp.transactions, + ...latestBundle.transactions, + ] .filter((t) => t.transactionType === "CREATE2") .map((r) => [r.contractName, r.contractAddress as `0x${string}`]) ); @@ -19,7 +23,7 @@ export default defineConfig({ foundry({ project: ".", deployments, - include: ["BundleBulker.sol/*", "Daimo*.sol/*"], + include: ["BundleBulker.sol/*", "PerOpInflator.sol/*", "Daimo*.sol/*"], }), ], });