From 170240137cc9b39df4ab7bc7aef324ef36b76dec Mon Sep 17 00:00:00 2001 From: mouseless <97399882+mouseless-eth@users.noreply.github.com> Date: Sat, 12 Oct 2024 19:51:57 +0100 Subject: [PATCH] add e2e --- scripts/config.local.json | 1 + src/rpc/estimation/gasEstimationsV06.ts | 3 +- .../contracts/EntryPointSimulations06.ts | 2 +- test/e2e/alto-config.json | 1 + .../eth_estimateUserOperationGas.test.ts | 31 +++++++++++++++++++ 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/scripts/config.local.json b/scripts/config.local.json index b67780ea..16914544 100644 --- a/scripts/config.local.json +++ b/scripts/config.local.json @@ -12,6 +12,7 @@ "entrypoints": "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789,0x0000000071727De22E5E9d8BAf0edAc6f37da032", "entrypoint-simulation-contract": "0xBbe8A301FbDb2a4CD58c4A37c262ecef8f889c47", "enable-debug-endpoints": true, + "code-override-support": true, "expiration-check": false, "safe-mode": false, "api-version": "v1,v2", diff --git a/src/rpc/estimation/gasEstimationsV06.ts b/src/rpc/estimation/gasEstimationsV06.ts index 1b7828ee..2449c363 100644 --- a/src/rpc/estimation/gasEstimationsV06.ts +++ b/src/rpc/estimation/gasEstimationsV06.ts @@ -14,8 +14,7 @@ import { type PublicClient, decodeErrorResult, encodeFunctionData, - toHex, - slice + toHex } from "viem" import { z } from "zod" import type { SimulateHandleOpResult } from "./types" diff --git a/src/types/contracts/EntryPointSimulations06.ts b/src/types/contracts/EntryPointSimulations06.ts index fa403a1e..385c6004 100644 --- a/src/types/contracts/EntryPointSimulations06.ts +++ b/src/types/contracts/EntryPointSimulations06.ts @@ -25,4 +25,4 @@ export const EntryPointV06SimulationsAbi = [ // source: https://github.com/pimlicolabs/entrypoint-estimations/blob/6f6f343/src/v06/ModifiedEntryPoint.sol export const ENTRYPOINT_V06_SIMULATION_OVERRIDE = - "0x60806040526004361015610023575b361561001957600080fd5b61002161223b565b005b60003560e01c80630396cb60146101635780630bd28e3b1461015e5780631b2e01b8146101595780631d732756146101545780631fad948c1461014f578063205c28781461014a57806335567e1a146101455780634b1d7cf5146101405780635287ce121461013b57806370a08231146101365780638f41ec5a14610131578063957122ab1461012c5780639b249f6914610127578063a619353114610122578063b760faf91461011d578063bb9fe6bf14610118578063c23a5cea14610113578063d6383f941461010e578063ee219423146101095763fc7e286d0361000e5761150f565b611359565b611235565b61111e565b611014565b610ff4565b610fd4565b610eb5565b610d5e565b610d42565b610cf1565b610bc1565b6108f1565b610888565b610766565b61068d565b610500565b610354565b6102c7565b60203660031901126102ac5760043563ffffffff81168082036102ac573360009081526020819052604090207fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c01916102a7916101e990916101c581151561159b565b6101e26101d9600185015463ffffffff1690565b63ffffffff1690565b11156115e7565b5492610289610233610208346001600160701b03607889901c16611649565b9561021487151561165b565b6102276001600160701b0388111561169c565b6001600160701b031690565b61024d61023e610445565b6001600160701b039092168252565b600160208201526001600160701b038616604082015263ffffffff831660608201526000608082018190523381526020819052604090206116d9565b6040805194855263ffffffff90911660208501523393918291820190565b0390a2005b600080fd5b602435906001600160c01b03821682036102ac57565b346102ac5760203660031901126102ac576004356001600160c01b03811681036102ac573360009081526001602090815260408083206001600160c01b0390941683529290522061031881546117a9565b9055005b6001600160a01b038116036102ac57565b6024359061033a8261031c565b565b60c4359061033a8261031c565b359061033a8261031c565b346102ac5760403660031901126102ac5760206103ae6004356103768161031c565b61037e6102b1565b6001600160a01b0390911660009081526001845260408082206001600160c01b0390931682526020929092522090565b54604051908152f35b634e487b7160e01b600052604160045260246000fd5b60a081019081106001600160401b038211176103e857604052565b6103b7565b61010081019081106001600160401b038211176103e857604052565b606081019081106001600160401b038211176103e857604052565b90601f801991011681019081106001600160401b038211176103e857604052565b6040519061033a60a083610424565b6040519061033a60c083610424565b6040519061033a604083610424565b6040519061033a606083610424565b6001600160401b0381116103e857601f01601f191660200190565b9291926104a882610481565b916104b66040519384610424565b8294818452818301116102ac578281602093846000960137010152565b9181601f840112156102ac578235916001600160401b0383116102ac57602083818601950101116102ac57565b346102ac576101c03660031901126102ac576004356001600160401b0381116102ac57366023820112156102ac5761054290369060248160040135910161049c565b366023190161018081126102ac5761010060405191610560836103cd565b126102ac57604051610571816103ed565b61057961032d565b815260443560208201526064356040820152608435606082015260a43560808201526105a361033c565b60a082015260e43560c08201526101043560e082015281526101243560208201526101443560408201526101643560608201526101843560808201526101a435906001600160401b0382116102ac5761061f9261060761060f9336906004016104d3565b92909161185d565b6040519081529081906020820190565b0390f35b9060406003198301126102ac576004356001600160401b0381116102ac5760040160009280601f83011215610689578135936001600160401b03851161068657506020808301928560051b0101116102ac5791906024356106838161031c565b90565b80fd5b8380fd5b346102ac5761069b36610623565b6106a6929192612539565b6106af83611987565b60005b84811061072f57506000927fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f9728480a183915b8583106106ff576106f58585612cf2565b6100216001600255565b909193600190610725610713878987611a06565b61071d88866119ed565b519088612c2d565b01940191906106e4565b8061075d6107566107446001948698966119ed565b51610750848a88611a06565b84612739565b90836128cb565b019290926106b2565b346102ac5760403660031901126102ac576004356107838161031c565b60243533600052600060205260406000209182546001600160701b0381168311610843576000808481946107ee886107d46102276100219a6107cf610227899b6001600160701b031690565b611a29565b6001600160701b03166001600160701b0319825416179055565b604080516001600160a01b03831681526020810184905233917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb91a26001600160a01b03165af161083d611a36565b50611a66565b60405162461bcd60e51b815260206004820152601960248201527f576974686472617720616d6f756e7420746f6f206c61726765000000000000006044820152606490fd5b346102ac5760403660031901126102ac5760206004356108a78161031c565b6108af6102b1565b6001600160a01b0390911660009081526001835260408082206001600160c01b03841683526020529020546040805192901b67ffffffffffffffff1916178152f35b346102ac576108ff36610623565b90610908612539565b60009160005b828110610acc57506109208493611987565b7fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f972600080a16000805b848110610a4357505060009260009060005b818110610992576106f5868660007f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d8180a2612cf2565b6109e96109a082848a611aa7565b6109be6109b26109b260208401611afe565b6001600160a01b031690565b7f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d600080a280611ac9565b906000915b808310610a005750505060010161095b565b90919497610a3a610a34600192610a2e8c8b610a2782610a218e8b8d611a06565b926119ed565b5191612c2d565b90611649565b996117a9565b950191906109ee565b610a4e818688611aa7565b6020610a66610a5d8380611ac9565b92909301611afe565b6000926001600160a01b03909116905b828410610a895750505050600101610949565b90919294610ac281610abd85610ab6610aa46001968d6119ed565b51610ab08c8b8a611a06565b85612739565b908b612a38565b6117a9565b9501929190610a76565b610ad7818487611aa7565b93610ae28580611ac9565b9190610af36109b260208901611afe565b966001600160a01b038816610b0b6001821415611b08565b610b2c575b50506001929394955090610b2391611649565b9392910161090e565b806040610b3a920190611b54565b889291923b156102ac5760405163e3563a4f60e01b81529260009284928392610b6892899060048601611cb3565b03818a5afa9081610ba6575b50610b975763086a9f7560e41b6000526001600160a01b03861660045260246000fd5b9394508493610b236001610b10565b80610bb56000610bbb93610424565b80610d37565b38610b74565b346102ac5760203660031901126102ac57600435610bde8161031c565b60006080604051610bee816103cd565b828152826020820152826040820152826060820152015260018060a01b0316600052600060205261061f6040600020610c94610c85600160405193610c32856103cd565b6001600160701b038154818116875260ff8160701c161515602088015260781c1660408601520154610c77610c6a8263ffffffff1690565b63ffffffff166060860152565b60201c65ffffffffffff1690565b65ffffffffffff166080830152565b60405191829182919091608065ffffffffffff8160a08401956001600160701b0381511685526020810151151560208601526001600160701b03604082015116604086015263ffffffff6060820151166060860152015116910152565b346102ac5760203660031901126102ac57600435610d0e8161031c565b60018060a01b0316600052600060205260206001600160701b0360406000205416604051908152f35b60009103126102ac57565b346102ac5760003660031901126102ac57602060405160018152f35b346102ac5760603660031901126102ac576004356001600160401b0381116102ac57610d8e9036906004016104d3565b9050602435610d9c8161031c565b6044356001600160401b0381116102ac57610dbb9036906004016104d3565b919092159081610eab575b50610e66576014811015610df8575b60405162461bcd60e51b81526020600482015260006024820152604490fd5b0390fd5b610e08610e0e91610e1493611d43565b90611d51565b60601c90565b3b15610e21573880610dd5565b60405162461bcd60e51b815260206004820152601b60248201527f41413330207061796d6173746572206e6f74206465706c6f79656400000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601960248201527f41413230206163636f756e74206e6f74206465706c6f796564000000000000006044820152606490fd5b90503b1538610dc6565b346102ac5760203660031901126102ac576004356001600160401b0381116102ac576020610eea610f069236906004016104d3565b604051632b870d1b60e11b815293849283929060048401611da6565b038160007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af1908115610f9657600091610f67575b50633653dc0360e11b60009081526001600160a01b0391909116600452602490fd5b610f89915060203d602011610f8f575b610f818183610424565b810190611d91565b38610f45565b503d610f77565b611d37565b90816101609103126102ac5790565b60206003198201126102ac57600435906001600160401b0382116102ac5761068391600401610f9b565b346102ac576020610fec610fe736610faa565b611db7565b604051908152f35b60203660031901126102ac5761002160043561100f8161031c565b611eb4565b346102ac5760003660031901126102ac573360005260006020526040600020600181019081549063ffffffff8216156110ec576110a261107c61106e6101d96110af956101d9611069875460ff9060701c1690565b611f0a565b65ffffffffffff4216611f4a565b845469ffffffffffff000000001916602082901b69ffffffffffff000000001617909455565b805460ff60701b19169055565b60405165ffffffffffff909116815233907ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a9080602081016102a7565b60405162461bcd60e51b815260206004820152600a6024820152691b9bdd081cdd185ad95960b21b6044820152606490fd5b346102ac5760203660031901126102ac5761002160008080806004356111438161031c565b336000908152602081905260409020906111e061116e61022784546001600160701b039060781c1690565b9261117a841515611f68565b6111c6600182016111b365ffffffffffff61119f835465ffffffffffff9060201c1690565b166111ab811515611fab565b421015611ff7565b805469ffffffffffffffffffff19169055565b80546dffffffffffffffffffffffffffff60781b19169055565b604080516001600160a01b03831681526020810184905233917fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda391a26001600160a01b03165af161122f611a36565b50612043565b346102ac5760603660031901126102ac576004356001600160401b0381116102ac57611265903690600401610f9b565b602435906112728261031c565b6044356001600160401b0381116102ac57611294610df49136906004016104d3565b61129c611925565b6112a585612e8b565b6112c6816112bc6112b682896125a5565b90612f77565b9643600052612b22565b954360005260009260609460018060a01b038316611327575b505050608001519361130d60406112ff602084015165ffffffffffff1690565b92015165ffffffffffff1690565b90604051968796630116f59360e71b88526004880161209d565b600094508493955083906113406040518094819361208f565b03925af190608061134f611a36565b92919038806112df565b346102ac5761136736610faa565b61136f611925565b61137882612e8b565b61138281836125a5565b825160a001516113f5906113a3906001600160a01b031661306e565b61306e565b8451519092906113d3906113bf906001600160a01b031661306e565b966113c86120d8565b506040810190611b54565b906014821061150357610e0e610e086113ef9361139e93611d43565b93612f77565b80516001600160a01b03169060018060a01b03821660018114916114836080880151976114746040820151936060611449604061143b602085015165ffffffffffff1690565b93015165ffffffffffff1690565b93015194611455610454565b9b8c5260208c015286151560408c015265ffffffffffff1660608b0152565b65ffffffffffff166080890152565b60a0870152151590816114fa575b506114b45750610df49160405194859463e0cff05f60e01b8652600486016121e1565b90610df4926114c28361306e565b6114dc6114cd610463565b6001600160a01b039095168552565b6020840152604051633ebb2d3960e21b815295869560048701612158565b90501538611491565b50506113ef600061306e565b346102ac5760203660031901126102ac5760043561152c8161031c565b6001600160a01b031660009081526020818152604091829020805460019091015483516001600160701b038084168252607084901c60ff1615158286015260789390931c9092169382019390935263ffffffff8316606082015291901c65ffffffffffff16608082015260a090f35b156115a257565b60405162461bcd60e51b815260206004820152601a60248201527f6d757374207370656369667920756e7374616b652064656c61790000000000006044820152606490fd5b156115ee57565b60405162461bcd60e51b815260206004820152601c60248201527f63616e6e6f7420646563726561736520756e7374616b652074696d65000000006044820152606490fd5b634e487b7160e01b600052601160045260246000fd5b9190820180921161165657565b611633565b1561166257565b60405162461bcd60e51b81526020600482015260126024820152711b9bc81cdd185ad9481cdc1958da599a595960721b6044820152606490fd5b156116a357565b60405162461bcd60e51b815260206004820152600e60248201526d7374616b65206f766572666c6f7760901b6044820152606490fd5b9065ffffffffffff6080600161033a946117136001600160701b0386511682906001600160701b03166001600160701b0319825416179055565b6020850151815460408701516effffffffffffffffffffffffffffff60701b1990911691151560701b60ff60701b169190911760789190911b6dffffffffffffffffffffffffffff60781b1617815560608501519101805463ffffffff191663ffffffff92909216919091178155920151825469ffffffffffff000000001916911660201b69ffffffffffff0000000016179055565b60001981146116565760010190565b156117bf57565b60405162461bcd60e51b815260206004820152601760248201527f4141393220696e7465726e616c2063616c6c206f6e6c790000000000000000006044820152606490fd5b60005b8381106118175750506000910152565b8181015183820152602001611807565b9060209161184081518092818552858086019101611804565b601f01601f1916010190565b906020610683928181520190611827565b9291925a9061186d3033146117b8565b8251906040820151915a6113886060830151850101116118fd5781516118b0575b505050610683936118aa915a900360808401510193369161049c565b90612378565b516118cd926118c99290916001600160a01b0316612244565b1590565b6118d95738808061188e565b610df46118e4612256565b60405163231638d960e11b81529182916004830161184c565b63deaddead60e01b60005260206000fd5b6001600160401b0381116103e85760051b60200190565b60405190611932826103cd565b6000608083604051611943816103ed565b83815283602082015283604082015283606082015283838201528360a08201528360c08201528360e082015281528260208201528260408201528260608201520152565b906119918261190e565b61199e6040519182610424565b82815280926119af601f199161190e565b019060005b8281106119c057505050565b6020906119cb611925565b828285010152016119b4565b634e487b7160e01b600052603260045260246000fd5b8051821015611a015760209160051b010190565b6119d7565b9190811015611a015760051b8101359061015e19813603018212156102ac570190565b9190820391821161165657565b3d15611a61573d90611a4782610481565b91611a556040519384610424565b82523d6000602084013e565b606090565b15611a6d57565b60405162461bcd60e51b81526020600482015260126024820152716661696c656420746f20776974686472617760701b6044820152606490fd5b9190811015611a015760051b81013590605e19813603018212156102ac570190565b903590601e19813603018212156102ac57018035906001600160401b0382116102ac57602001918160051b360383136102ac57565b356106838161031c565b15611b0f57565b60405162461bcd60e51b815260206004820152601760248201527f4141393620696e76616c69642061676772656761746f720000000000000000006044820152606490fd5b903590601e19813603018212156102ac57018035906001600160401b0382116102ac576020019181360383136102ac57565b9035601e19823603018112156102ac5701602081359101916001600160401b0382116102ac5781360383136102ac57565b908060209392818452848401376000828201840152601f01601f1916010190565b61068391611bf681611be984610349565b6001600160a01b03169052565b60208201356020820152611ca4611c98611c47611c2c611c196040870187611b86565b6101606040880152610160870191611bb7565b611c396060870187611b86565b908683036060880152611bb7565b6080850135608085015260a085013560a085015260c085013560c085015260e085013560e0850152610100850135610100850152611c89610120860186611b86565b90858303610120870152611bb7565b92610140810190611b86565b91610140818503910152611bb7565b94939192909483604082016040835252606081019560608560051b830101948160009061015e1981360301995b838310611cff5750505050506106839495506020818503910152611bb7565b9091929397605f1986820301825288358b8112156102ac576020611d2860019386839401611bd8565b9a019201930191909392611ce0565b6040513d6000823e3d90fd5b906014116102ac5790601490565b356bffffffffffffffffffffffff19811692919060148210611d71575050565b6bffffffffffffffffffffffff1960149290920360031b82901b16169150565b908160209103126102ac57516106838161031c565b916020610683938181520191611bb7565b6020810135611e85611dd5611dcf6040850185611b54565b90613afa565b91611e77611de9611dcf6060870187611b54565b61010086013560e087013560c088013560a089013560808a0135611e14611dcf6101208d018d611b54565b956040519a8b9960208b01809e60018060a01b03903516909693909a9998959261012098959261014089019c60018060a01b03168952602089015260408801526060870152608086015260a085015260c084015260e08301526101008201520152565b03601f198101835282610424565b51902060408051602081019283523091810191909152466060820152611eae8160808101611e77565b51902090565b611ebe3482612da4565b60018060a01b03168060005260006020527f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c460206001600160701b0360406000205416604051908152a2565b15611f1157565b60405162461bcd60e51b8152602060048201526011602482015270616c726561647920756e7374616b696e6760781b6044820152606490fd5b9065ffffffffffff8091169116019065ffffffffffff821161165657565b15611f6f57565b60405162461bcd60e51b81526020600482015260146024820152734e6f207374616b6520746f20776974686472617760601b6044820152606490fd5b15611fb257565b60405162461bcd60e51b815260206004820152601d60248201527f6d7573742063616c6c20756e6c6f636b5374616b6528292066697273740000006044820152606490fd5b15611ffe57565b60405162461bcd60e51b815260206004820152601b60248201527f5374616b65207769746864726177616c206973206e6f742064756500000000006044820152606490fd5b1561204a57565b60405162461bcd60e51b815260206004820152601860248201527f6661696c656420746f207769746864726177207374616b6500000000000000006044820152606490fd5b908092918237016000815290565b929365ffffffffffff60c095610683989794829487526020870152166040850152166060830152151560808201528160a08201520190611827565b60405190604082018281106001600160401b038211176103e85760405260006020838281520152565b9060c060a061068393805184526020810151602085015260408101511515604085015265ffffffffffff606082015116606085015265ffffffffffff60808201511660808501520151918160a08201520190611827565b92946121bb61033a956121a96101009599986121976121836020976101408b526101408b0190612101565b9b878a019060208091805184520151910152565b80516060890152602001516080880152565b805160a08701526020015160c0860152565b80516001600160a01b031660e08501520151805191909201908152602091820151910152565b61222a61033a9461221861220360a0959998969960e0865260e0860190612101565b98602085019060208091805184520151910152565b80516060840152602001516080830152565b019060208091805184520151910152565b61033a33611eb4565b9060009283809360208451940192f190565b3d610800811161227b575b604051906020818301016040528082526000602083013e90565b50610800612261565b6003111561228e57565b634e487b7160e01b600052602160045260246000fd5b93929190600381101561228e576040916122cb918652606060208701526060860190611827565b930152565b60009060033d116122dd57565b905060046000803e60005160e01c90565b600060443d10610683576040513d600319016004823e8051913d60248401116001600160401b0384111761235b57828201928351916001600160401b038311612353573d84016003190185840160200111612353575061068392910160200190610424565b949350505050565b92915050565b604090610683939281528160208201520190611827565b92915a93805190612388826130ae565b60a08301805190959194916001600160a01b039091169081806124c057505083516001600160a01b03169050965b5a90030192830295604082019087825110612471577f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f926123ff6020928a600195510390612da4565b6124096000612284565b01519261246c6020612432612424845160018060a01b031690565b98516001600160a01b031690565b9201519589604051948594818060a01b031699818060a01b0316988590949392606092608083019683521515602083015260408201520152565b0390a4565b60408051631101335b60e11b8152600060048201526024810191909152602060448201527f414135312070726566756e642062656c6f772061637475616c476173436f73746064820152608490fd5b989181516124d0575b50506123b6565b6124da6000612284565b606086015191813b156102ac5761251092886000809460405180978196829563a9a2340960e01b84528c029085600485016122a4565b0393f18015610f9657612524575b806124c9565b80610bb5600061253393610424565b3861251e565b60028054146125485760028055565b633ee5aeb560e01b60005260046000fd5b1561256057565b60405162461bcd60e51b815260206004820152601860248201527f41413934206761732076616c756573206f766572666c6f7700000000000000006044820152606490fd5b916000915a938151906125b88282613122565b6125c181611db7565b60208401526125f76001600160781b03608084015160608501511760408501511760e08401356101008501359117171115612559565b612600826131ca565b61260d8185846000613271565b84519098919061262f906118c9906001600160a01b03166020880151906134e8565b6126ea5761263c43600052565b60a09490940151606094906001600160a01b03166126ce575b505a810360a08401351061267f5760809360c092604087015260608601525a900391013501910152565b60408051631101335b60e11b8152600060048201526024810191909152601e60448201527f41413430206f76657220766572696669636174696f6e4761734c696d697400006064820152608490fd5b909350816126e192975085846000613614565b95909238612655565b60408051631101335b60e11b8152600060048201526024810191909152601a60448201527f4141323520696e76616c6964206163636f756e74206e6f6e63650000000000006064820152608490fd5b9290916000925a825161274c8184613122565b61275583611db7565b602085015261278b6001600160781b03608083015160608401511760408401511760e08601356101008701359117171115612559565b612794816131ca565b6127a08186868b613271565b8351909991906127c2906118c9906001600160a01b03166020870151906134e8565b61287c576127cf43600052565b60a09390930151606093906001600160a01b0316612861575b505a840360a0860135106128145750604085015260608401526080919060c0905a900391013501910152565b60408051631101335b60e11b815260048101929092526024820152601e60448201527f41413430206f76657220766572696669636174696f6e4761734c696d697400006064820152608490fd5b90925081612873929850868685613614565b969091386127e8565b60408051631101335b60e11b8152600481018490526024810191909152601a60448201527f4141323520696e76616c6964206163636f756e74206e6f6e63650000000000006064820152608490fd5b91906128d6906137e1565b906001600160a01b03166129f2576129a3576128f1906137e1565b906001600160a01b031661295d576129065750565b60408051631101335b60e11b815260048101929092526024820152602160448201527f41413332207061796d61737465722065787069726564206f72206e6f742064756064820152606560f81b608482015260a490fd5b60408051631101335b60e11b8152600481018490526024810191909152601460448201527320a0999a1039b4b3b730ba3ab9329032b93937b960611b6064820152608490fd5b60408051631101335b60e11b8152600481018490526024810191909152601760448201527f414132322065787069726564206f72206e6f74206475650000000000000000006064820152608490fd5b60408051631101335b60e11b8152600481018590526024810191909152601460448201527320a0991a1039b4b3b730ba3ab9329032b93937b960611b6064820152608490fd5b9290612a43906137e1565b916001600160a01b039182169116036129f2576129a3576128f1906137e1565b908160209103126102ac575190565b90612a8e60809161068396946101c085526101c0850191611bb7565b9360e0815160018060a01b03815116602086015260208101516040860152604081015160608601526060810151848601528381015160a086015260018060a01b0360a08201511660c086015260c081015182860152015161010084015260208101516101208401526040810151610140840152606081015161016084015201516101808201526101a0818403910152611827565b612b59602091612b3b6060850151916060810190611b54565b9290916040519586948594630eb993ab60e11b865260048601612a72565b03816000305af160009181612bfc575b5061068357612b76611a36565b60206000803e60005163deaddead60e01b14612bbb57805115612b9b57805190602001fd5b60405163231638d960e11b81526020600482015260006024820152604490fd5b60408051631101335b60e11b8152600060048201526024810191909152600f60448201526e41413935206f7574206f662067617360881b6064820152608490fd5b612c1f91925060203d602011612c26575b612c178183610424565b810190612a63565b9038612b69565b503d612c0d565b929190612c49602091612b3b6060850151916060810190611b54565b03816000305af160009181612cd1575b50612ccd5782612c67611a36565b9060206000803e60005163deaddead60e01b14612c8e5750805115612b9b57805190602001fd5b60408051631101335b60e11b815260048101929092526024820152600f60448201526e41413935206f7574206f662067617360881b6064820152608490fd5b9150565b612ceb91925060203d602011612c2657612c178183610424565b9038612c59565b6001600160a01b03168015612d5f57600080809381935af1612d12611a36565b5015612d1a57565b60405162461bcd60e51b815260206004820152601f60248201527f41413931206661696c65642073656e6420746f2062656e6566696369617279006044820152606490fd5b60405162461bcd60e51b815260206004820152601860248201527f4141393020696e76616c69642062656e656669636961727900000000000000006044820152606490fd5b60018060a01b0316600052600060205260406000206001600160701b03815416918201809211611656576001600160701b038211612e03576001600160701b0361033a92166001600160701b03166001600160701b0319825416179055565b60405162461bcd60e51b815260206004820152601060248201526f6465706f736974206f766572666c6f7760801b6044820152606490fd5b90612e559061068396949593606084526060840191611bb7565b6001600160a01b039094166020820152808403604090910152611bb7565b90604061068392600081528160208201520190611827565b612e986040820182611b54565b612eb0612ea484611afe565b93610120810190611b54565b9290303b156102ac57600093612edb91604051968795869563957122ab60e01b875260048701612e3b565b0381305afa9081612f43575b5061033a576001612ef66122d0565b6308c379a014612f07575b610f9657565b612f0f6122ee565b80612f1b575b50612f01565b80516000925015612f1557604051631101335b60e11b8152908190610df49060048301612e73565b80610bb56000612f5293610424565b38612ee7565b60405190612f6582610409565b60006040838281528260208201520152565b612f8c612f9291612f86612f58565b50613832565b91613832565b81516001600160a01b031690811561305c575b82612fc260406112ff60206106839697015165ffffffffffff1690565b91612fdb60406112ff602084015165ffffffffffff1690565b9065ffffffffffff811665ffffffffffff841610613054575b5065ffffffffffff811665ffffffffffff84161161304a575b5061303b9061302c61301d610472565b6001600160a01b039096168652565b65ffffffffffff166020850152565b65ffffffffffff166040830152565b915061303b61300d565b915038612ff4565b80516001600160a01b03169150612fa5565b906130776120d8565b9160018060a01b0316600052600060205263ffffffff600160406000206001600160701b03815460781c1685520154166020830152565b60e060c08201519101518082146130d2574801808210156130cd575090565b905090565b5090565b156130dd57565b60405162461bcd60e51b815260206004820152601d60248201527f4141393320696e76616c6964207061796d6173746572416e64446174610000006044820152606490fd5b6131879061313f61313282611afe565b6001600160a01b03168452565b602081013560208401526080810135604084015260a0810135606084015260c0810135608084015260e081013560c084015261010081013560e0840152610120810190611b54565b9081156131bf576131b1610e0e610e088460a0946131ac601461033a999810156130d6565b611d43565b6001600160a01b0316910152565b505060a06000910152565b60a08101516001600160a01b0316156131ff5760c060035b60ff60408401519116606084015102016080830151019101510290565b60c060016131e2565b61322060409295949395606083526060830190611bd8565b9460208201520152565b9061033a602f60405180946e020a09919903932bb32b93a32b21d1608d1b60208301526132608151809260208686019101611804565b81010301601f198101845283610424565b93929190915a916133026020825195613290875160018060a01b031690565b936132a96132a16040840184611b54565b90838d61388d565b60a08801516001600160a01b0316916132c143600052565b6001600160a01b0390921615976000929089613490575b6060015191840151604051633a871cdd60e01b815295869485936000938593929160048501613208565b03926001600160a01b03881690f16000918161346f575b506133b157866133276122d0565b6308c379a014613378575b60408051631101335b60e11b81526004810192909252602482015260166044820152754141323320726576657274656420286f72204f4f472960501b6064820152608490fd5b6133806122ee565b8061338b5750613332565b6133949061322a565b604051631101335b60e11b8152918291610df49160048401612361565b949592936133c3575b5050505a900391565b6001600160a01b03166000908152602081905260409020916133ef61022784546001600160701b031690565b90818311613422575082546dffffffffffffffffffffffffffff19169190036001600160701b03161790553880806133ba565b60408051631101335b60e11b815260048101929092526024820152601760448201527f41413231206469646e2774207061792070726566756e640000000000000000006064820152608490fd5b61348991925060203d602011612c2657612c178183610424565b9038613319565b92506134c16102276134b48860018060a01b03166000526000602052604060002090565b546001600160701b031690565b878111156134db57506000846060825b95925050506132d8565b8460606000928a036134d1565b6001600160a01b0316600090815260016020908152604080832084821c845290915290208054916001600160401b0391613521846117a9565b9055161490565b1561352f57565b60405162461bcd60e51b815260206004820152601f60248201527f4141343120746f6f206c6974746c6520766572696669636174696f6e476173006044820152606490fd5b91906040838203126102ac5782516001600160401b0381116102ac5783019080601f830112156102ac578151916135aa83610481565b916135b86040519384610424565b838352602084830101116102ac576020926135d891848085019101611804565b92015190565b9061033a602f60405180946e020a09999903932bb32b93a32b21d1608d1b60208301526132608151809260208686019101611804565b939094929194855161364060a0606083015192613632868511613528565b01516001600160a01b031690565b9261365d8460018060a01b03166000526000602052604060002090565b61367161022782546001600160701b031690565b868110613792579160206136d1999a6136b189989796946001600160701b0360009b8c9803166001600160701b03166001600160701b0319825416179055565b0151604051637a32e3bf60e11b8152998a97889687939060048501613208565b03946001600160a01b03169103f1918260009160009461376b575b5061376757836136fa6122d0565b6308c379a01461374b575b60408051631101335b60e11b81526004810192909252602482015260166044820152754141333320726576657274656420286f72204f4f472960501b6064820152608490fd5b6137536122ee565b8061375e5750613705565b613394906135de565b9250565b90935061378b91503d806000833e6137838183610424565b810190613574565b92386136ec565b60408051631101335b60e11b8152600481018b90526024810191909152601e60448201527f41413331207061796d6173746572206465706f73697420746f6f206c6f7700006064820152608490fd5b8015613829576137f090613832565b65ffffffffffff60408201511642118015613814575b90516001600160a01b031691565b5065ffffffffffff6020820151164210613806565b50600090600090565b61383a612f58565b5065ffffffffffff8160a01c168015613880575b65ffffffffffff906040519261386384610409565b6001600160a01b038116845260d01c602084015216604082015290565b5065ffffffffffff61384e565b9290918161389c575b50505050565b8251516001600160a01b031693843b613aad5760608451015160206040518092632b870d1b60e11b8252816000816138d88a8a60048401611da6565b03927f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690f1908115610f9657600091613a8e575b506001600160a01b038116958615613a3f576001600160a01b0316958690036139f0573b156139a35750610e0e610e087fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d9361397093611d43565b602083810151935160a00151604080516001600160a01b039485168152939091169183019190915290a338808080613896565b60408051631101335b60e11b815260048101929092526024820152602060448201527f4141313520696e6974436f6465206d757374206372656174652073656e6465726064820152608490fd5b60408051631101335b60e11b8152600481018490526024810191909152602060448201527f4141313420696e6974436f6465206d7573742072657475726e2073656e6465726064820152608490fd5b60408051631101335b60e11b8152600481018590526024810191909152601b60448201527f4141313320696e6974436f6465206661696c6564206f72204f4f4700000000006064820152608490fd5b613aa7915060203d602011610f8f57610f818183610424565b38613915565b60408051631101335b60e11b815260048101929092526024820152601f60448201527f414131302073656e64657220616c726561647920636f6e7374727563746564006064820152608490fd5b81604051918237209056fea264697066735822122004879b10293ccc3e386f846b9c17bc5a179b5346e08f6a388511912c45c049a564736f6c634300081a0033" + "0x60806040526004361015610023575b361561001957600080fd5b610021612369565b005b60003560e01c80630396cb60146101635780630bd28e3b1461015e5780631b2e01b8146101595780631d732756146101545780631fad948c1461014f578063205c28781461014a57806335567e1a146101455780634b1d7cf5146101405780635287ce121461013b57806370a08231146101365780638f41ec5a14610131578063957122ab1461012c5780639b249f6914610127578063a619353114610122578063b760faf91461011d578063bb9fe6bf14610118578063c23a5cea14610113578063d6383f941461010e578063ee219423146101095763fc7e286d0361000e5761163d565b611487565b611363565b61124c565b611142565b611122565b611102565b610ff8565b610ea5565b610e89565b610e38565b610d08565b610a40565b6109d7565b6108b5565b61068d565b610500565b610354565b6102c7565b60203660031901126102ac5760043563ffffffff81168082036102ac573360009081526020819052604090207fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c01916102a7916101e990916101c58115156116c9565b6101e26101d9600185015463ffffffff1690565b63ffffffff1690565b1115611715565b5492610289610233610208346001600160701b03607889901c16611777565b95610214871515611789565b6102276001600160701b038811156117ca565b6001600160701b031690565b61024d61023e610445565b6001600160701b039092168252565b600160208201526001600160701b038616604082015263ffffffff83166060820152600060808201819052338152602081905260409020611807565b6040805194855263ffffffff90911660208501523393918291820190565b0390a2005b600080fd5b602435906001600160c01b03821682036102ac57565b346102ac5760203660031901126102ac576004356001600160c01b03811681036102ac573360009081526001602090815260408083206001600160c01b0390941683529290522061031881546118d7565b9055005b6001600160a01b038116036102ac57565b6024359061033a8261031c565b565b60c4359061033a8261031c565b359061033a8261031c565b346102ac5760403660031901126102ac5760206103ae6004356103768161031c565b61037e6102b1565b6001600160a01b0390911660009081526001845260408082206001600160c01b0390931682526020929092522090565b54604051908152f35b634e487b7160e01b600052604160045260246000fd5b60a081019081106001600160401b038211176103e857604052565b6103b7565b61010081019081106001600160401b038211176103e857604052565b606081019081106001600160401b038211176103e857604052565b90601f801991011681019081106001600160401b038211176103e857604052565b6040519061033a60a083610424565b6040519061033a60c083610424565b6040519061033a604083610424565b6040519061033a606083610424565b6001600160401b0381116103e857601f01601f191660200190565b9291926104a882610481565b916104b66040519384610424565b8294818452818301116102ac578281602093846000960137010152565b9181601f840112156102ac578235916001600160401b0383116102ac57602083818601950101116102ac57565b346102ac576101c03660031901126102ac576004356001600160401b0381116102ac57366023820112156102ac5761054290369060248160040135910161049c565b366023190161018081126102ac5761010060405191610560836103cd565b126102ac57604051610571816103ed565b61057961032d565b815260443560208201526064356040820152608435606082015260a43560808201526105a361033c565b60a082015260e43560c08201526101043560e082015281526101243560208201526101443560408201526101643560608201526101843560808201526101a435906001600160401b0382116102ac5761061f9261060761060f9336906004016104d3565b92909161198b565b6040519081529081906020820190565b0390f35b9060406003198301126102ac576004356001600160401b0381116102ac5760040160009280601f83011215610689578135936001600160401b03851161068657506020808301928560051b0101116102ac5791906024356106838161031c565b90565b80fd5b8380fd5b346102ac5761069b36610623565b6106a6829392611ab5565b60005b84811061071c57506000927fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f9728480a183915b8583106106ec576100218585612ca8565b909193600190610712610700878987611b34565b61070a8886611b1b565b519088612be3565b01940191906106db565b61074761074061072e83859795611b1b565b5161073a848987611b34565b84612847565b9190613797565b906001600160a01b031661086f576108205761076290613797565b906001600160a01b03166107da5761077f576001019290926106a9565b60408051631101335b60e11b815260048101929092526024820152602160448201527f41413332207061796d61737465722065787069726564206f72206e6f742064756064820152606560f81b608482015260a490fd5b0390fd5b60408051631101335b60e11b8152600481018490526024810191909152601460448201527320a0999a1039b4b3b730ba3ab9329032b93937b960611b6064820152608490fd5b60408051631101335b60e11b8152600481018490526024810191909152601760448201527f414132322065787069726564206f72206e6f74206475650000000000000000006064820152608490fd5b60408051631101335b60e11b8152600481018590526024810191909152601460448201527320a0991a1039b4b3b730ba3ab9329032b93937b960611b6064820152608490fd5b346102ac5760403660031901126102ac576004356108d28161031c565b60243533600052600060205260406000209182546001600160701b03811683116109925760008084819461093d886109236102276100219a61091e610227899b6001600160701b031690565b611b57565b6001600160701b03166001600160701b0319825416179055565b604080516001600160a01b03831681526020810184905233917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb91a26001600160a01b03165af161098c611b64565b50611b94565b60405162461bcd60e51b815260206004820152601960248201527f576974686472617720616d6f756e7420746f6f206c61726765000000000000006044820152606490fd5b346102ac5760403660031901126102ac5760206004356109f68161031c565b6109fe6102b1565b6001600160a01b0390911660009081526001835260408082206001600160c01b03841683526020529020546040805192901b67ffffffffffffffff1916178152f35b346102ac57610a4e36610623565b9060009160005b828110610c135750610a678493611ab5565b7fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f972600080a16000805b848110610b8a57505060009260009060005b818110610ad957610021868660007f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d8180a2612ca8565b610b30610ae782848a611bd5565b610b05610af9610af960208401611c2c565b6001600160a01b031690565b7f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d600080a280611bf7565b906000915b808310610b4757505050600101610aa2565b90919497610b81610b7b600192610b758c8b610b6e82610b688e8b8d611b34565b92611b1b565b5191612be3565b90611777565b996118d7565b95019190610b35565b610b95818688611bd5565b6020610bad610ba48380611bf7565b92909301611c2c565b6000926001600160a01b03909116905b828410610bd05750505050600101610a90565b90919294610c0981610c0485610bfd610beb6001968d611b1b565b51610bf78c8b8a611b34565b85612847565b908b6129d9565b6118d7565b9501929190610bbd565b610c1e818487611bd5565b93610c298580611bf7565b9190610c3a610af960208901611c2c565b966001600160a01b038816610c526001821415611c36565b610c73575b50506001929394955090610c6a91611777565b93929101610a55565b806040610c81920190611c82565b889291923b156102ac5760405163e3563a4f60e01b81529260009284928392610caf92899060048601611de1565b03818a5afa9081610ced575b50610cde5763086a9f7560e41b6000526001600160a01b03861660045260246000fd5b9394508493610c6a6001610c57565b80610cfc6000610d0293610424565b80610e7e565b38610cbb565b346102ac5760203660031901126102ac57600435610d258161031c565b60006080604051610d35816103cd565b828152826020820152826040820152826060820152015260018060a01b0316600052600060205261061f6040600020610ddb610dcc600160405193610d79856103cd565b6001600160701b038154818116875260ff8160701c161515602088015260781c1660408601520154610dbe610db18263ffffffff1690565b63ffffffff166060860152565b60201c65ffffffffffff1690565b65ffffffffffff166080830152565b60405191829182919091608065ffffffffffff8160a08401956001600160701b0381511685526020810151151560208601526001600160701b03604082015116604086015263ffffffff6060820151166060860152015116910152565b346102ac5760203660031901126102ac57600435610e558161031c565b60018060a01b0316600052600060205260206001600160701b0360406000205416604051908152f35b60009103126102ac57565b346102ac5760003660031901126102ac57602060405160018152f35b346102ac5760603660031901126102ac576004356001600160401b0381116102ac57610ed59036906004016104d3565b9050602435610ee38161031c565b6044356001600160401b0381116102ac57610f029036906004016104d3565b919092159081610fee575b50610fa9576014811015610f3b575b60405162461bcd60e51b81526020600482015260006024820152604490fd5b610f4b610f5191610f5793611e71565b90611e7f565b60601c90565b3b15610f64573880610f1c565b60405162461bcd60e51b815260206004820152601b60248201527f41413330207061796d6173746572206e6f74206465706c6f79656400000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601960248201527f41413230206163636f756e74206e6f74206465706c6f796564000000000000006044820152606490fd5b90503b1538610f0d565b346102ac5760203660031901126102ac576004356001600160401b0381116102ac57602061102d6110499236906004016104d3565b604051632b870d1b60e11b815293849283929060048401611ed4565b03816000737fc98430eaedbb6070b35b39d7987250490883485af19081156110c457600091611095575b50633653dc0360e11b60009081526001600160a01b0391909116600452602490fd5b6110b7915060203d6020116110bd575b6110af8183610424565b810190611ebf565b38611073565b503d6110a5565b611e65565b90816101609103126102ac5790565b60206003198201126102ac57600435906001600160401b0382116102ac57610683916004016110c9565b346102ac57602061111a611115366110d8565b611ee5565b604051908152f35b60203660031901126102ac5761002160043561113d8161031c565b611fe2565b346102ac5760003660031901126102ac573360005260006020526040600020600181019081549063ffffffff82161561121a576111d06111aa61119c6101d96111dd956101d9611197875460ff9060701c1690565b612038565b65ffffffffffff4216612078565b845469ffffffffffff000000001916602082901b69ffffffffffff000000001617909455565b805460ff60701b19169055565b60405165ffffffffffff909116815233907ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a9080602081016102a7565b60405162461bcd60e51b815260206004820152600a6024820152691b9bdd081cdd185ad95960b21b6044820152606490fd5b346102ac5760203660031901126102ac5761002160008080806004356112718161031c565b3360009081526020819052604090209061130e61129c61022784546001600160701b039060781c1690565b926112a8841515612096565b6112f4600182016112e165ffffffffffff6112cd835465ffffffffffff9060201c1690565b166112d98115156120d9565b421015612125565b805469ffffffffffffffffffff19169055565b80546dffffffffffffffffffffffffffff60781b19169055565b604080516001600160a01b03831681526020810184905233917fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda391a26001600160a01b03165af161135d611b64565b50612171565b346102ac5760603660031901126102ac576004356001600160401b0381116102ac576113939036906004016110c9565b602435906113a08261031c565b6044356001600160401b0381116102ac576113c26107d69136906004016104d3565b6113ca611a53565b6113d385612e41565b6113f4816113ea6113e482896126b3565b90612f2d565b9643600052612ad8565b954360005260009260609460018060a01b038316611455575b505050608001519361143b604061142d602084015165ffffffffffff1690565b92015165ffffffffffff1690565b90604051968796630116f59360e71b8852600488016121cb565b6000945084939550839061146e604051809481936121bd565b03925af190608061147d611b64565b929190388061140d565b346102ac57611495366110d8565b61149d611a53565b6114a682612e41565b6114b081836126b3565b825160a00151611523906114d1906001600160a01b0316613024565b613024565b845151909290611501906114ed906001600160a01b0316613024565b966114f6612206565b506040810190611c82565b906014821061163157610f51610f4b61151d936114cc93611e71565b93612f2d565b80516001600160a01b03169060018060a01b03821660018114916115b16080880151976115a260408201519360606115776040611569602085015165ffffffffffff1690565b93015165ffffffffffff1690565b93015194611583610454565b9b8c5260208c015286151560408c015265ffffffffffff1660608b0152565b65ffffffffffff166080890152565b60a087015215159081611628575b506115e257506107d69160405194859463e0cff05f60e01b86526004860161230f565b906107d6926115f083613024565b61160a6115fb610463565b6001600160a01b039095168552565b6020840152604051633ebb2d3960e21b815295869560048701612286565b905015386115bf565b505061151d6000613024565b346102ac5760203660031901126102ac5760043561165a8161031c565b6001600160a01b031660009081526020818152604091829020805460019091015483516001600160701b038084168252607084901c60ff1615158286015260789390931c9092169382019390935263ffffffff8316606082015291901c65ffffffffffff16608082015260a090f35b156116d057565b60405162461bcd60e51b815260206004820152601a60248201527f6d757374207370656369667920756e7374616b652064656c61790000000000006044820152606490fd5b1561171c57565b60405162461bcd60e51b815260206004820152601c60248201527f63616e6e6f7420646563726561736520756e7374616b652074696d65000000006044820152606490fd5b634e487b7160e01b600052601160045260246000fd5b9190820180921161178457565b611761565b1561179057565b60405162461bcd60e51b81526020600482015260126024820152711b9bc81cdd185ad9481cdc1958da599a595960721b6044820152606490fd5b156117d157565b60405162461bcd60e51b815260206004820152600e60248201526d7374616b65206f766572666c6f7760901b6044820152606490fd5b9065ffffffffffff6080600161033a946118416001600160701b0386511682906001600160701b03166001600160701b0319825416179055565b6020850151815460408701516effffffffffffffffffffffffffffff60701b1990911691151560701b60ff60701b169190911760789190911b6dffffffffffffffffffffffffffff60781b1617815560608501519101805463ffffffff191663ffffffff92909216919091178155920151825469ffffffffffff000000001916911660201b69ffffffffffff0000000016179055565b60001981146117845760010190565b156118ed57565b60405162461bcd60e51b815260206004820152601760248201527f4141393220696e7465726e616c2063616c6c206f6e6c790000000000000000006044820152606490fd5b60005b8381106119455750506000910152565b8181015183820152602001611935565b9060209161196e81518092818552858086019101611932565b601f01601f1916010190565b906020610683928181520190611955565b9291925a9061199b3033146118e6565b8251906040820151915a611388606083015185010111611a2b5781516119de575b505050610683936119d8915a900360808401510193369161049c565b906124a6565b516119fb926119f79290916001600160a01b0316612372565b1590565b611a07573880806119bc565b6107d6611a12612384565b60405163231638d960e11b81529182916004830161197a565b63deaddead60e01b60005260206000fd5b6001600160401b0381116103e85760051b60200190565b60405190611a60826103cd565b6000608083604051611a71816103ed565b83815283602082015283604082015283606082015283838201528360a08201528360c08201528360e082015281528260208201528260408201528260608201520152565b90611abf82611a3c565b611acc6040519182610424565b8281528092611add601f1991611a3c565b019060005b828110611aee57505050565b602090611af9611a53565b82828501015201611ae2565b634e487b7160e01b600052603260045260246000fd5b8051821015611b2f5760209160051b010190565b611b05565b9190811015611b2f5760051b8101359061015e19813603018212156102ac570190565b9190820391821161178457565b3d15611b8f573d90611b7582610481565b91611b836040519384610424565b82523d6000602084013e565b606090565b15611b9b57565b60405162461bcd60e51b81526020600482015260126024820152716661696c656420746f20776974686472617760701b6044820152606490fd5b9190811015611b2f5760051b81013590605e19813603018212156102ac570190565b903590601e19813603018212156102ac57018035906001600160401b0382116102ac57602001918160051b360383136102ac57565b356106838161031c565b15611c3d57565b60405162461bcd60e51b815260206004820152601760248201527f4141393620696e76616c69642061676772656761746f720000000000000000006044820152606490fd5b903590601e19813603018212156102ac57018035906001600160401b0382116102ac576020019181360383136102ac57565b9035601e19823603018112156102ac5701602081359101916001600160401b0382116102ac5781360383136102ac57565b908060209392818452848401376000828201840152601f01601f1916010190565b61068391611d2481611d1784610349565b6001600160a01b03169052565b60208201356020820152611dd2611dc6611d75611d5a611d476040870187611cb4565b6101606040880152610160870191611ce5565b611d676060870187611cb4565b908683036060880152611ce5565b6080850135608085015260a085013560a085015260c085013560c085015260e085013560e0850152610100850135610100850152611db7610120860186611cb4565b90858303610120870152611ce5565b92610140810190611cb4565b91610140818503910152611ce5565b94939192909483604082016040835252606081019560608560051b830101948160009061015e1981360301995b838310611e2d5750505050506106839495506020818503910152611ce5565b9091929397605f1986820301825288358b8112156102ac576020611e5660019386839401611d06565b9a019201930191909392611e0e565b6040513d6000823e3d90fd5b906014116102ac5790601490565b356bffffffffffffffffffffffff19811692919060148210611e9f575050565b6bffffffffffffffffffffffff1960149290920360031b82901b16169150565b908160209103126102ac57516106838161031c565b916020610683938181520191611ce5565b6020810135611fb3611f03611efd6040850185611c82565b90613a9a565b91611fa5611f17611efd6060870187611c82565b61010086013560e087013560c088013560a089013560808a0135611f42611efd6101208d018d611c82565b956040519a8b9960208b01809e60018060a01b03903516909693909a9998959261012098959261014089019c60018060a01b03168952602089015260408801526060870152608086015260a085015260c084015260e08301526101008201520152565b03601f198101835282610424565b51902060408051602081019283523091810191909152466060820152611fdc8160808101611fa5565b51902090565b611fec3482612d5a565b60018060a01b03168060005260006020527f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c460206001600160701b0360406000205416604051908152a2565b1561203f57565b60405162461bcd60e51b8152602060048201526011602482015270616c726561647920756e7374616b696e6760781b6044820152606490fd5b9065ffffffffffff8091169116019065ffffffffffff821161178457565b1561209d57565b60405162461bcd60e51b81526020600482015260146024820152734e6f207374616b6520746f20776974686472617760601b6044820152606490fd5b156120e057565b60405162461bcd60e51b815260206004820152601d60248201527f6d7573742063616c6c20756e6c6f636b5374616b6528292066697273740000006044820152606490fd5b1561212c57565b60405162461bcd60e51b815260206004820152601b60248201527f5374616b65207769746864726177616c206973206e6f742064756500000000006044820152606490fd5b1561217857565b60405162461bcd60e51b815260206004820152601860248201527f6661696c656420746f207769746864726177207374616b6500000000000000006044820152606490fd5b908092918237016000815290565b929365ffffffffffff60c095610683989794829487526020870152166040850152166060830152151560808201528160a08201520190611955565b60405190604082018281106001600160401b038211176103e85760405260006020838281520152565b9060c060a061068393805184526020810151602085015260408101511515604085015265ffffffffffff606082015116606085015265ffffffffffff60808201511660808501520151918160a08201520190611955565b92946122e961033a956122d76101009599986122c56122b16020976101408b526101408b019061222f565b9b878a019060208091805184520151910152565b80516060890152602001516080880152565b805160a08701526020015160c0860152565b80516001600160a01b031660e08501520151805191909201908152602091820151910152565b61235861033a9461234661233160a0959998969960e0865260e086019061222f565b98602085019060208091805184520151910152565b80516060840152602001516080830152565b019060208091805184520151910152565b61033a33611fe2565b9060009283809360208451940192f190565b3d61080081116123a9575b604051906020818301016040528082526000602083013e90565b5061080061238f565b600311156123bc57565b634e487b7160e01b600052602160045260246000fd5b9392919060038110156123bc576040916123f9918652606060208701526060860190611955565b930152565b60009060033d1161240b57565b905060046000803e60005160e01c90565b600060443d10610683576040513d600319016004823e8051913d60248401116001600160401b0384111761248957828201928351916001600160401b038311612481573d84016003190185840160200111612481575061068392910160200190610424565b949350505050565b92915050565b604090610683939281528160208201520190611955565b92915a938051906124b682613064565b60a08301805190959194916001600160a01b039091169081806125ee57505083516001600160a01b03169050965b5a9003019283029560408201908782511061259f577f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f9261252d6020928a600195510390612d5a565b61253760006123b2565b01519261259a6020612560612552845160018060a01b031690565b98516001600160a01b031690565b9201519589604051948594818060a01b031699818060a01b0316988590949392606092608083019683521515602083015260408201520152565b0390a4565b60408051631101335b60e11b8152600060048201526024810191909152602060448201527f414135312070726566756e642062656c6f772061637475616c476173436f73746064820152608490fd5b989181516125fe575b50506124e4565b61260860006123b2565b606086015191813b156102ac5761263e92886000809460405180978196829563a9a2340960e01b84528c029085600485016123d2565b0393f180156110c457612652575b806125f7565b80610cfc600061266193610424565b3861264c565b1561266e57565b60405162461bcd60e51b815260206004820152601860248201527f41413934206761732076616c756573206f766572666c6f7700000000000000006044820152606490fd5b916000915a938151906126c682826130d8565b6126cf81611ee5565b60208401526127056001600160781b03608084015160608501511760408501511760e08401356101008501359117171115612667565b61270e82613180565b61271b8185846000613227565b84519098919061273d906119f7906001600160a01b031660208801519061349e565b6127f85761274a43600052565b60a09490940151606094906001600160a01b03166127dc575b505a810360a08401351061278d5760809360c092604087015260608601525a900391013501910152565b60408051631101335b60e11b8152600060048201526024810191909152601e60448201527f41413430206f76657220766572696669636174696f6e4761734c696d697400006064820152608490fd5b909350816127ef929750858460006135ca565b95909238612763565b60408051631101335b60e11b8152600060048201526024810191909152601a60448201527f4141323520696e76616c6964206163636f756e74206e6f6e63650000000000006064820152608490fd5b9290916000925a825161285a81846130d8565b61286383611ee5565b60208501526128996001600160781b03608083015160608401511760408401511760e08601356101008701359117171115612667565b6128a281613180565b6128ae8186868b613227565b8351909991906128d0906119f7906001600160a01b031660208701519061349e565b61298a576128dd43600052565b60a09390930151606093906001600160a01b031661296f575b505a840360a0860135106129225750604085015260608401526080919060c0905a900391013501910152565b60408051631101335b60e11b815260048101929092526024820152601e60448201527f41413430206f76657220766572696669636174696f6e4761734c696d697400006064820152608490fd5b909250816129819298508686856135ca565b969091386128f6565b60408051631101335b60e11b8152600481018490526024810191909152601a60448201527f4141323520696e76616c6964206163636f756e74206e6f6e63650000000000006064820152608490fd5b92906129e490613797565b916001600160a01b0391821691160361086f5761082057612a0490613797565b906001600160a01b03166107da5761077f5750565b908160209103126102ac575190565b90612a4460809161068396946101c085526101c0850191611ce5565b9360e0815160018060a01b03815116602086015260208101516040860152604081015160608601526060810151848601528381015160a086015260018060a01b0360a08201511660c086015260c081015182860152015161010084015260208101516101208401526040810151610140840152606081015161016084015201516101808201526101a0818403910152611955565b612b0f602091612af16060850151916060810190611c82565b9290916040519586948594630eb993ab60e11b865260048601612a28565b03816000305af160009181612bb2575b5061068357612b2c611b64565b60206000803e60005163deaddead60e01b14612b7157805115612b5157805190602001fd5b60405163231638d960e11b81526020600482015260006024820152604490fd5b60408051631101335b60e11b8152600060048201526024810191909152600f60448201526e41413935206f7574206f662067617360881b6064820152608490fd5b612bd591925060203d602011612bdc575b612bcd8183610424565b810190612a19565b9038612b1f565b503d612bc3565b929190612bff602091612af16060850151916060810190611c82565b03816000305af160009181612c87575b50612c835782612c1d611b64565b9060206000803e60005163deaddead60e01b14612c445750805115612b5157805190602001fd5b60408051631101335b60e11b815260048101929092526024820152600f60448201526e41413935206f7574206f662067617360881b6064820152608490fd5b9150565b612ca191925060203d602011612bdc57612bcd8183610424565b9038612c0f565b6001600160a01b03168015612d1557600080809381935af1612cc8611b64565b5015612cd057565b60405162461bcd60e51b815260206004820152601f60248201527f41413931206661696c65642073656e6420746f2062656e6566696369617279006044820152606490fd5b60405162461bcd60e51b815260206004820152601860248201527f4141393020696e76616c69642062656e656669636961727900000000000000006044820152606490fd5b60018060a01b0316600052600060205260406000206001600160701b03815416918201809211611784576001600160701b038211612db9576001600160701b0361033a92166001600160701b03166001600160701b0319825416179055565b60405162461bcd60e51b815260206004820152601060248201526f6465706f736974206f766572666c6f7760801b6044820152606490fd5b90612e0b9061068396949593606084526060840191611ce5565b6001600160a01b039094166020820152808403604090910152611ce5565b90604061068392600081528160208201520190611955565b612e4e6040820182611c82565b612e66612e5a84611c2c565b93610120810190611c82565b9290303b156102ac57600093612e9191604051968795869563957122ab60e01b875260048701612df1565b0381305afa9081612ef9575b5061033a576001612eac6123fe565b6308c379a014612ebd575b6110c457565b612ec561241c565b80612ed1575b50612eb7565b80516000925015612ecb57604051631101335b60e11b81529081906107d69060048301612e29565b80610cfc6000612f0893610424565b38612e9d565b60405190612f1b82610409565b60006040838281528260208201520152565b612f42612f4891612f3c612f0e565b506137e8565b916137e8565b81516001600160a01b0316908115613012575b82612f78604061142d60206106839697015165ffffffffffff1690565b91612f91604061142d602084015165ffffffffffff1690565b9065ffffffffffff811665ffffffffffff84161061300a575b5065ffffffffffff811665ffffffffffff841611613000575b50612ff190612fe2612fd3610472565b6001600160a01b039096168652565b65ffffffffffff166020850152565b65ffffffffffff166040830152565b9150612ff1612fc3565b915038612faa565b80516001600160a01b03169150612f5b565b9061302d612206565b9160018060a01b0316600052600060205263ffffffff600160406000206001600160701b03815460781c1685520154166020830152565b60e060c082015191015180821461308857480180821015613083575090565b905090565b5090565b1561309357565b60405162461bcd60e51b815260206004820152601d60248201527f4141393320696e76616c6964207061796d6173746572416e64446174610000006044820152606490fd5b61313d906130f56130e882611c2c565b6001600160a01b03168452565b602081013560208401526080810135604084015260a0810135606084015260c0810135608084015260e081013560c084015261010081013560e0840152610120810190611c82565b90811561317557613167610f51610f4b8460a094613162601461033a9998101561308c565b611e71565b6001600160a01b0316910152565b505060a06000910152565b60a08101516001600160a01b0316156131b55760c060035b60ff60408401519116606084015102016080830151019101510290565b60c06001613198565b6131d660409295949395606083526060830190611d06565b9460208201520152565b9061033a602f60405180946e020a09919903932bb32b93a32b21d1608d1b60208301526132168151809260208686019101611932565b81010301601f198101845283610424565b93929190915a916132b86020825195613246875160018060a01b031690565b9361325f6132576040840184611c82565b90838d613843565b60a08801516001600160a01b03169161327743600052565b6001600160a01b0390921615976000929089613446575b6060015191840151604051633a871cdd60e01b8152958694859360009385939291600485016131be565b03926001600160a01b03881690f160009181613425575b5061336757866132dd6123fe565b6308c379a01461332e575b60408051631101335b60e11b81526004810192909252602482015260166044820152754141323320726576657274656420286f72204f4f472960501b6064820152608490fd5b61333661241c565b8061334157506132e8565b61334a906131e0565b604051631101335b60e11b81529182916107d6916004840161248f565b94959293613379575b5050505a900391565b6001600160a01b03166000908152602081905260409020916133a561022784546001600160701b031690565b908183116133d8575082546dffffffffffffffffffffffffffff19169190036001600160701b0316179055388080613370565b60408051631101335b60e11b815260048101929092526024820152601760448201527f41413231206469646e2774207061792070726566756e640000000000000000006064820152608490fd5b61343f91925060203d602011612bdc57612bcd8183610424565b90386132cf565b925061347761022761346a8860018060a01b03166000526000602052604060002090565b546001600160701b031690565b8781111561349157506000846060825b959250505061328e565b8460606000928a03613487565b6001600160a01b0316600090815260016020908152604080832084821c845290915290208054916001600160401b03916134d7846118d7565b9055161490565b156134e557565b60405162461bcd60e51b815260206004820152601f60248201527f4141343120746f6f206c6974746c6520766572696669636174696f6e476173006044820152606490fd5b91906040838203126102ac5782516001600160401b0381116102ac5783019080601f830112156102ac5781519161356083610481565b9161356e6040519384610424565b838352602084830101116102ac5760209261358e91848085019101611932565b92015190565b9061033a602f60405180946e020a09999903932bb32b93a32b21d1608d1b60208301526132168151809260208686019101611932565b93909492919485516135f660a06060830151926135e88685116134de565b01516001600160a01b031690565b926136138460018060a01b03166000526000602052604060002090565b61362761022782546001600160701b031690565b86811061374857916020613687999a61366789989796946001600160701b0360009b8c9803166001600160701b03166001600160701b0319825416179055565b0151604051637a32e3bf60e11b8152998a978896879390600485016131be565b03946001600160a01b03169103f19182600091600094613721575b5061371d57836136b06123fe565b6308c379a014613701575b60408051631101335b60e11b81526004810192909252602482015260166044820152754141333320726576657274656420286f72204f4f472960501b6064820152608490fd5b61370961241c565b8061371457506136bb565b61334a90613594565b9250565b90935061374191503d806000833e6137398183610424565b81019061352a565b92386136a2565b60408051631101335b60e11b8152600481018b90526024810191909152601e60448201527f41413331207061796d6173746572206465706f73697420746f6f206c6f7700006064820152608490fd5b80156137df576137a6906137e8565b65ffffffffffff604082015116421180156137ca575b90516001600160a01b031691565b5065ffffffffffff60208201511642106137bc565b50600090600090565b6137f0612f0e565b5065ffffffffffff8160a01c168015613836575b65ffffffffffff906040519261381984610409565b6001600160a01b038116845260d01c602084015216604082015290565b5065ffffffffffff613804565b92909181613852575b50505050565b8251516001600160a01b031693843b613a4d5760608451015160206040518092632b870d1b60e11b8252816000737fc98430eaedbb6070b35b39d798725049088348826138a38b8b60048401611ed4565b0393f19081156110c457600091613a2e575b506001600160a01b0381169586156139df576001600160a01b031695869003613990573b156139435750610f51610f4b7fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d9361391093611e71565b602083810151935160a00151604080516001600160a01b039485168152939091169183019190915290a33880808061384c565b60408051631101335b60e11b815260048101929092526024820152602060448201527f4141313520696e6974436f6465206d757374206372656174652073656e6465726064820152608490fd5b60408051631101335b60e11b8152600481018490526024810191909152602060448201527f4141313420696e6974436f6465206d7573742072657475726e2073656e6465726064820152608490fd5b60408051631101335b60e11b8152600481018590526024810191909152601b60448201527f4141313320696e6974436f6465206661696c6564206f72204f4f4700000000006064820152608490fd5b613a47915060203d6020116110bd576110af8183610424565b386138b5565b60408051631101335b60e11b815260048101929092526024820152601f60448201527f414131302073656e64657220616c726561647920636f6e7374727563746564006064820152608490fd5b81604051918237209056fea26469706673582212206cd609d83a11ec02e433d4d9a726ca359581bdb926a625edb4e7893d79f184d764736f6c634300081a0033" diff --git a/test/e2e/alto-config.json b/test/e2e/alto-config.json index 77d8d105..19f6de9d 100644 --- a/test/e2e/alto-config.json +++ b/test/e2e/alto-config.json @@ -22,5 +22,6 @@ "mempool-max-parallel-ops": 10, "mempool-max-queued-ops": 10, "enforce-unique-senders-per-bundle": false, + "code-override-support": true, "enable-instant-bundling-endpoint": true } diff --git a/test/e2e/tests/eth_estimateUserOperationGas.test.ts b/test/e2e/tests/eth_estimateUserOperationGas.test.ts index 71a45fed..9d8062dd 100644 --- a/test/e2e/tests/eth_estimateUserOperationGas.test.ts +++ b/test/e2e/tests/eth_estimateUserOperationGas.test.ts @@ -1,6 +1,12 @@ import type { EntryPointVersion } from "viem/account-abstraction" import { beforeEach, describe, expect, test } from "vitest" import { beforeEachCleanUp, getSmartAccountClient } from "../src/utils" +import { + decodeRevert, + getRevertCall, + deployRevertingContract +} from "../src/revertingContract" +import { Address, BaseError, ContractFunctionRevertedError } from "viem" describe.each([ { @@ -12,7 +18,10 @@ describe.each([ ])( "$entryPointVersion supports eth_estimateUserOperationGas", ({ entryPointVersion }) => { + let revertingContract: Address + beforeEach(async () => { + revertingContract = await deployRevertingContract() await beforeEachCleanUp() }) @@ -113,5 +122,27 @@ describe.each([ expect(estimation.paymasterPostOpGasLimit).toBe(0n) expect(estimation.paymasterVerificationGasLimit).toBe(0n) }) + + test.only("Should throw revert reason if simulation reverted during callphase", async () => { + const smartAccountClient = await getSmartAccountClient({ + entryPointVersion + }) + + try { + await smartAccountClient.estimateUserOperationGas({ + calls: [ + { + to: revertingContract, + data: getRevertCall("foobar"), + value: 0n + } + ] + }) + } catch (e: any) { + expect(e).toBeInstanceOf(BaseError) + const err = e.walk() + expect(err.reason).toEqual("foobar") + } + }) } )