diff --git a/.changeset/ninety-forks-eat.md b/.changeset/ninety-forks-eat.md new file mode 100644 index 00000000..ac168d61 --- /dev/null +++ b/.changeset/ninety-forks-eat.md @@ -0,0 +1,5 @@ +--- +"permissionless": patch +--- + +Added support for Etherspot Smart Account diff --git a/.size-limit.json b/.size-limit.json index b05e258b..5ec3d468 100644 --- a/.size-limit.json +++ b/.size-limit.json @@ -2,7 +2,7 @@ { "name": "permissionless (esm)", "path": "./packages/permissionless/_esm/index.js", - "limit": "50 kB", + "limit": "55 kB", "import": "*" }, { diff --git a/packages/permissionless-test/mock-aa-infra/alto/constants.ts b/packages/permissionless-test/mock-aa-infra/alto/constants.ts index a88cd656..a6c5ee90 100644 --- a/packages/permissionless-test/mock-aa-infra/alto/constants.ts +++ b/packages/permissionless-test/mock-aa-infra/alto/constants.ts @@ -189,6 +189,18 @@ export const TRUST_DEFAULT_FALLBACK_HANDLER: Hex = export const ERC_7579_TEST_MODULE_CREATECALL = "0x03b79c840000000000000000000000000000000000000000000000000000000000001337dbca873b13c783c0c9c6ddfc4280e505580bf6cc3dac83f8a0f7b44acaafca4f00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000010c000000000000000000000000000000000000000000000000000000000000010e00000000000000000000000000000000000000000000000000000000000000ffb6080604052348015600e575f80fd5b50610fdf8061001c5f395ff3fe6080604052600436106100a5575f3560e01c8063d26cdce311610062578063d26cdce3146101b7578063d60b347f146101ca578063e5086003146101f9578063ecd059611461020c578063fbe5ce0a1461022c578063fd8b84b11461024b575f80fd5b806306fdde03146100a957806354fd4d50146100f25780636d61fe701461011f5780637065cb48146101405780638a91b0e31461015f578063ccfdec8c1461017e575b5f80fd5b3480156100b4575f80fd5b5060408051808201909152600f81526e27bbb730b13632a2bc32b1baba37b960891b60208201525b6040516100e99190610b67565b60405180910390f35b3480156100fd575f80fd5b506040805180820190915260058152640312e302e360dc1b60208201526100dc565b34801561012a575f80fd5b5061013e610139366004610be1565b610277565b005b34801561014b575f80fd5b5061013e61015a366004610c3b565b61036a565b34801561016a575f80fd5b5061013e610179366004610be1565b61045c565b348015610189575f80fd5b506101a9610198366004610c3b565b60016020525f908152604090205481565b6040519081526020016100e9565b61013e6101c5366004610c54565b6104ae565b3480156101d5575f80fd5b506101e96101e4366004610c3b565b61056d565b60405190151581526020016100e9565b61013e610207366004610c54565b61059c565b348015610217575f80fd5b506101e9610226366004610ca3565b60021490565b348015610237575f80fd5b5061013e610246366004610cba565b6105f2565b348015610256575f80fd5b5061026a610265366004610c3b565b610665565b6040516100e99190610ceb565b335f6102866014828587610d37565b61028f91610d5e565b60601c9050806102c25760405163b20f76e360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b6001600160a01b0382165f9081526020819052604090206102e29061069b565b6001600160a01b0382165f90815260208190526040902061030390826106f6565b6001600160a01b0382165f8181526001602081905260409182902055517f1cd4a6da6e6a6f4dc754cedd54ead3b9cd0e2f5804cda2ba60506c2899fb29df9061035c9084906001600160a01b0391909116815260200190565b60405180910390a250505050565b336103748161056d565b61039c5760405163f91bd6f160e01b81526001600160a01b03821660048201526024016102b9565b6001600160a01b0382166103ce5760405163b20f76e360e01b81526001600160a01b03831660048201526024016102b9565b6001600160a01b0381165f9081526020819052604090206103ef90836106f6565b6001600160a01b0381165f90815260016020526040812080549161041283610da7565b90915550506040516001600160a01b0383811682528216907fc82bdbbf677a2462f2a7e22e4ba9abd209496b69cd7b868b3b1d28f76e09a40a906020015b60405180910390a25050565b335f908152602081905260409020610473906107ca565b335f81815260016020526040808220829055517f9d00629762554452d03c3b45626436df6ca1c3795d05d04df882f6db481b1be09190a25050565b6001600160a01b0383165f9081526020819052604090206104cf9033610825565b6104ec57604051631a27eac360e11b815260040160405180910390fd5b826001600160a01b031663d691c9643461050461085f565b85856040518563ffffffff1660e01b815260040161052493929190610dbf565b5f6040518083038185885af115801561053f573d5f803e3d5ffd5b50505050506040513d5f823e601f3d908101601f191682016040526105679190810190610e39565b50505050565b6001600160a01b038181165f908152602081815260408083206001845290915281205490911615155b92915050565b6001600160a01b0383165f9081526020819052604090206105bd9033610825565b6105da57604051631a27eac360e11b815260040160405180910390fd5b826001600160a01b031663d691c96434610504610871565b335f90815260208190526040902061060b908383610882565b335f90815260016020526040812080549161062583610f47565b90915550506040516001600160a01b038216815233907fe594d081b4382713733fe631966432c9cea5199afb2db5c3c1931f9f9300367990602001610450565b6001600160a01b0381165f90815260016020818152604080842054918490529092206060926106949290610955565b5092915050565b60015f908152602082905260409020546001600160a01b0316156106d2576040516329e42f3360e11b815260040160405180910390fd5b60015f818152602092909252604090912080546001600160a01b0319169091179055565b6001600160a01b038116158061071557506001600160a01b0381166001145b1561073e57604051637c84ecfb60e01b81526001600160a01b03821660048201526024016102b9565b6001600160a01b038181165f90815260208490526040902054161561078157604051631034f46960e21b81526001600160a01b03821660048201526024016102b9565b60015f818152602093909352604080842080546001600160a01b039485168087529286208054959091166001600160a01b03199586161790559190935280549091169091179055565b60015f908152602082905260409020546001600160a01b03165b6001600160a01b03811615610821576001600160a01b039081165f90815260208390526040902080546001600160a01b03198116909155166107e4565b5050565b5f60016001600160a01b0383161480159061085857506001600160a01b038281165f908152602085905260409020541615155b9392505050565b5f61086c81808080610afd565b905090565b5f61086c600160f81b828080610afd565b6001600160a01b03811615806108a157506001600160a01b0381166001145b156108ca57604051637c84ecfb60e01b81526001600160a01b03831660048201526024016102b9565b6001600160a01b038281165f9081526020859052604090205481169082161461091157604051637c84ecfb60e01b81526001600160a01b03821660048201526024016102b9565b6001600160a01b039081165f8181526020949094526040808520805494841686529085208054949093166001600160a01b0319948516179092559092528154169055565b60605f6001600160a01b03841660011480159061097957506109778585610825565b155b156109a257604051637c84ecfb60e01b81526001600160a01b03851660048201526024016102b9565b825f036109c25760405163f725081760e01b815260040160405180910390fd5b8267ffffffffffffffff8111156109db576109db610df4565b604051908082528060200260200182016040528015610a04578160200160208202803683370190505b506001600160a01b038086165f90815260208890526040812054929450911691505b6001600160a01b03821615801590610a4857506001600160a01b038216600114155b8015610a5357508381105b15610aac5781838281518110610a6b57610a6b610f5c565b6001600160a01b039283166020918202929092018101919091529281165f908152928790526040909220549091169080610aa481610da7565b915050610a26565b6001600160a01b038216600114801590610ac557505f81115b15610af15782610ad6600183610f70565b81518110610ae657610ae6610f5c565b602002602001015191505b80835250935093915050565b604080516001600160f81b03198087166020830152851660218201525f602282018190526001600160e01b03198516602683015269ffffffffffffffffffff198416602a8301529101604051602081830303815290604052610b5e90610f83565b95945050505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f8083601f840112610bac575f80fd5b50813567ffffffffffffffff811115610bc3575f80fd5b602083019150836020828501011115610bda575f80fd5b9250929050565b5f8060208385031215610bf2575f80fd5b823567ffffffffffffffff811115610c08575f80fd5b610c1485828601610b9c565b90969095509350505050565b80356001600160a01b0381168114610c36575f80fd5b919050565b5f60208284031215610c4b575f80fd5b61085882610c20565b5f805f60408486031215610c66575f80fd5b610c6f84610c20565b9250602084013567ffffffffffffffff811115610c8a575f80fd5b610c9686828701610b9c565b9497909650939450505050565b5f60208284031215610cb3575f80fd5b5035919050565b5f8060408385031215610ccb575f80fd5b610cd483610c20565b9150610ce260208401610c20565b90509250929050565b602080825282518282018190525f9190848201906040850190845b81811015610d2b5783516001600160a01b031683529284019291840191600101610d06565b50909695505050505050565b5f8085851115610d45575f80fd5b83861115610d51575f80fd5b5050820193919092039150565b6bffffffffffffffffffffffff198135818116916014851015610d8b5780818660140360031b1b83161692505b505092915050565b634e487b7160e01b5f52601160045260245ffd5b5f60018201610db857610db8610d93565b5060010190565b83815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610e3157610e31610df4565b604052919050565b5f6020808385031215610e4a575f80fd5b825167ffffffffffffffff80821115610e61575f80fd5b8185019150601f86601f840112610e76575f80fd5b825182811115610e8857610e88610df4565b8060051b610e97868201610e08565b918252848101860191868101908a841115610eb0575f80fd5b87870192505b83831015610f3957825186811115610ecc575f80fd5b8701603f81018c13610edc575f80fd5b88810151604088821115610ef257610ef2610df4565b610f03828901601f19168c01610e08565b8281528e82848601011115610f16575f80fd5b828285018d83015e5f9281018c0192909252508352509187019190870190610eb6565b9a9950505050505050505050565b5f81610f5557610f55610d93565b505f190190565b634e487b7160e01b5f52603260045260245ffd5b8181038181111561059657610596610d93565b80516020808301519190811015610fa3575f198160200360031b1b821691505b5091905056fea2646970667358221220fd20c30d790f9e29c7fee691f54ed598408181fcc342f8f909eaa9478dfd384a64736f6c63430008190033000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" +export const ETHERSPOT_BOOTSTRAP_CREATECALL = + "0x4d6f64756c6172457468657273706f7457616c6c65743a437265617465323a73608060405234801561001057600080fd5b5061158c806100206000396000f3fe60806040526004361061007f5760003560e01c8063855713681161004e578063855713681461025a578063b0d691fe14610288578063ea5f61d0146102ab578063eac9b20d146102cb57610086565b80630a664dba146101bb5780635e87556d146101ed578063642219af1461021a5780636b0d5cc41461023a57610086565b3661008657005b61009b6000356001600160e01b0319166102f8565b600080356001600160e01b03191681526000805160206115378339815191526020526040902080546001600160a01b03811690600160a01b900460f81b8161010957604051632464e76d60e11b81526001600160e01b03196000351660048201526024015b60405180910390fd5b61011781607f60f91b6103ac565b1561016b5760408051368101909152366000823760408051601481019091523360601b90526000803660140183865afa90506101593d60408051918201905290565b3d6000823e81610167573d81fd5b3d81f35b6101768160006103ac565b156101b95760408051368101909152366000823760408051601481019091523360601b9052600080366014018382875af190506101593d60408051918201905290565b005b3480156101c757600080fd5b506101d06103c3565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101f957600080fd5b5061020d610208366004610fab565b6103f2565b6040516101e491906110b8565b34801561022657600080fd5b506101b9610235366004610fab565b61047b565b34801561024657600080fd5b506101b96102553660046110e3565b6106c7565b34801561026657600080fd5b5061027a610275366004611168565b6106d7565b6040516101e4929190611194565b34801561029457600080fd5b506f71727de22e5e9d8baf0edac6f37da0326101d0565b3480156102b757600080fd5b5061027a6102c6366004611168565b610714565b3480156102d757600080fd5b506102eb6102e63660046111f7565b610744565b6040516101e49190611221565b6001600160e01b031981166000908152600080516020611537833981519152602090815260408083206001018054825181850281018501909352808352919290919083018282801561037357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610355575b505050505090506103848133610817565b15156000036103a8576040516332cf492b60e11b8152336004820152602401610100565b5050565b6001600160f81b0319828116908216145b92915050565b60006103ed7f36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb284316085490565b905090565b606030306001600160a01b031663642219af8a8a8a8a8a8a8a60405160240161042197969594939291906113a6565b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505060405160200161045f929190611404565b6040516020818303038152906040529050979650505050505050565b60005b868110156104fa576104f288888381811061049b5761049b611430565b90506020028101906104ad9190611446565b6104bb906020810190611466565b8989848181106104cd576104cd611430565b90506020028101906104df9190611446565b6104ed906020810190611483565b61082d565b60010161047e565b5060005b848110156105bc57600086868381811061051a5761051a611430565b905060200281019061052c9190611446565b61053a906020810190611466565b6001600160a01b0316146105b4576105b486868381811061055d5761055d611430565b905060200281019061056f9190611446565b61057d906020810190611466565b87878481811061058f5761058f611430565b90506020028101906105a19190611446565b6105af906020810190611483565b6108b4565b6001016104fe565b5060006105cc6020850185611466565b6001600160a01b0316146105fc576105fc6105ea6020850185611466565b6105f76020860186611483565b6108df565b60005b818110156106bd57600083838381811061061b5761061b611430565b905060200281019061062d9190611446565b61063b906020810190611466565b6001600160a01b0316146106b5576106b583838381811061065e5761065e611430565b90506020028101906106709190611446565b61067e906020810190611466565b84848481811061069057610690611430565b90506020028101906106a29190611446565b6106b0906020810190611483565b610966565b6001016105ff565b5050505050505050565b6106d283838361082d565b505050565b606060007ff88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02610707818686610bd7565b92509250505b9250929050565b606060007ff88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea03610707818686610bd7565b6040805160608082018352600080835260208084018290528385018390526001600160e01b0319861682526000805160206115378339815191528152908490208451928301855280546001600160a01b0381168452600160a01b900460f81b6001600160f81b03191683830152600181018054865181850281018501885281815295969495929486019383018282801561080757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116107e9575b5050505050815250509050919050565b6000806108248484610d74565b95945050505050565b7ff88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea026108588185610dda565b6040516306d61fe760e41b81526001600160a01b03851690636d61fe709061088690869086906004016114ca565b600060405180830381600087803b1580156108a057600080fd5b505af11580156106bd573d6000803e3d6000fd5b7ff88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea036108588185610dda565b60006109097f36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb284316085490565b90506001600160a01b0381161561093e5760405163741cbe0360e01b81526001600160a01b0382166004820152602401610100565b610858847f36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb2843160855565b600082828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051818a01356020818102601f01601f19168301909352969750893596918a018035965090945060609350915b818110156109e8576020810283810160600135908601526001016109c9565b505060408101356020818301033560608181528183850160208301379350610a1e92508591506001600160f81b031990506103ac565b15610a3c57604051633accf26360e11b815260040160405180910390fd5b6001600160e01b03198416600090815260008051602061153783398151915260205260409020546001600160a01b031615610ab95760405162461bcd60e51b815260206004820152601e60248201527f46756e6374696f6e2073656c6563746f7220616c7265616479207573656400006044820152606401610100565b604080516060810182526001600160a01b038a1681526001600160f81b0319851660208201529081018390527ff88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea026001600160e01b0319861660009081526002919091016020908152604091829020835181548584015160f81c600160a01b026001600160a81b03199091166001600160a01b0390921691909117178155918301518051610b6c9260018501920190610eec565b50506040516306d61fe760e41b81526001600160a01b038a169150636d61fe7090610b9b9084906004016110b8565b600060405180830381600087803b158015610bb557600080fd5b505af1158015610bc9573d6000803e3d6000fd5b505050505050505050505050565b606060006001600160a01b038416600114801590610bfa5750610bfa8585610eb0565b15610c2357604051637c84ecfb60e01b81526001600160a01b0385166004820152602401610100565b82600003610c445760405163f725081760e01b815260040160405180910390fd5b8267ffffffffffffffff811115610c5d57610c5d6114de565b604051908082528060200260200182016040528015610c86578160200160208202803683370190505b506001600160a01b03808616600090815260208890526040812054929450911691505b6001600160a01b03821615801590610ccb57506001600160a01b038216600114155b8015610cd657508381105b15610d305781838281518110610cee57610cee611430565b6001600160a01b039283166020918202929092018101919091529281166000908152928790526040909220549091169080610d288161150a565b915050610ca9565b6001600160a01b038216600114610d685782610d4d600183611523565b81518110610d5d57610d5d611430565b602002602001015191505b80835250935093915050565b81516000908190815b81811015610dcc57846001600160a01b0316868281518110610da157610da1611430565b60200260200101516001600160a01b031603610dc45792506001915061070d9050565b600101610d7d565b506000958695509350505050565b6001600160a01b0381161580610df957506001600160a01b0381166001145b15610e2257604051637c84ecfb60e01b81526001600160a01b0382166004820152602401610100565b6001600160a01b038181166000908152602084905260409020541615610e6657604051631034f46960e21b81526001600160a01b0382166004820152602401610100565b60016000818152602093909352604080842080546001600160a01b039485168087529286208054959091166001600160a01b03199586161790559190935280549091169091179055565b600060016001600160a01b03831614801590610ee557506001600160a01b038281166000908152602085905260409020541615155b9392505050565b828054828255906000526020600020908101928215610f41579160200282015b82811115610f4157825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190610f0c565b50610f4d929150610f51565b5090565b5b80821115610f4d5760008155600101610f52565b60008083601f840112610f7857600080fd5b50813567ffffffffffffffff811115610f9057600080fd5b6020830191508360208260051b850101111561070d57600080fd5b60008060008060008060006080888a031215610fc657600080fd5b873567ffffffffffffffff80821115610fde57600080fd5b610fea8b838c01610f66565b909950975060208a013591508082111561100357600080fd5b61100f8b838c01610f66565b909750955060408a013591508082111561102857600080fd5b908901906040828c03121561103c57600080fd5b9093506060890135908082111561105257600080fd5b5061105f8a828b01610f66565b989b979a50959850939692959293505050565b6000815180845260005b818110156110985760208185018101518683018201520161107c565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610ee56020830184611072565b6001600160a01b03811681146110e057600080fd5b50565b6000806000604084860312156110f857600080fd5b8335611103816110cb565b9250602084013567ffffffffffffffff8082111561112057600080fd5b818601915086601f83011261113457600080fd5b81358181111561114357600080fd5b87602082850101111561115557600080fd5b6020830194508093505050509250925092565b6000806040838503121561117b57600080fd5b8235611186816110cb565b946020939093013593505050565b604080825283519082018190526000906020906060840190828701845b828110156111d65781516001600160a01b0316845292840192908401906001016111b1565b5050506001600160a01b039490941660209390930192909252509092915050565b60006020828403121561120957600080fd5b81356001600160e01b031981168114610ee557600080fd5b602080825282516001600160a01b0390811683830152838201516001600160f81b031916604080850191909152840151606080850152805160808501819052600093929183019190849060a08701905b8083101561129357845184168252938501936001929092019190850190611271565b50979650505050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600081356112d5816110cb565b6001600160a01b03168352602082013536839003601e190181126112f857600080fd5b820160208101903567ffffffffffffffff81111561131557600080fd5b80360382131561132457600080fd5b6040602086015261082460408601828461129f565b6000838385526020808601955060208560051b830101846000805b8881101561139857858403601f19018a52823536899003603e19018112611379578283fd5b611385858a83016112c8565b9a86019a94505091840191600101611354565b509198975050505050505050565b6080815260006113ba60808301898b611339565b82810360208401526113cd81888a611339565b905082810360408401526113e181876112c8565b905082810360608401526113f6818587611339565b9a9950505050505050505050565b6001600160a01b038316815260406020820181905260009061142890830184611072565b949350505050565b634e487b7160e01b600052603260045260246000fd5b60008235603e1983360301811261145c57600080fd5b9190910192915050565b60006020828403121561147857600080fd5b8135610ee5816110cb565b6000808335601e1984360301811261149a57600080fd5b83018035915067ffffffffffffffff8211156114b557600080fd5b60200191503681900382131561070d57600080fd5b60208152600061142860208301848661129f565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161151c5761151c6114f4565b5060010190565b818103818111156103bd576103bd6114f456fef88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea04a2646970667358221220876ac0e3ce11f73be9184d4db171ae8b1071fbe27610263c00fe879ede1ae83264736f6c63430008170033" + +export const ETHERSPOT_IMPLEMENTATION = + "0x4d6f64756c6172457468657273706f7457616c6c65743a437265617465323a7360a06040523060805234801561001457600080fd5b506080516140dd610037600039600081816104ca0152610d7401526140dd6000f3fe6080604052600436106101f25760003560e01c80637dcab4ce1161010d578063bf57159b116100a0578063d691c9641161006f578063d691c964146106de578063e9ae5c53146106fe578063ea5f61d014610711578063eac9b20d14610731578063f2dc691d1461075e576101f9565b8063bf57159b14610662578063c3db883814610678578063c7f758a81461068d578063d03c7914146106be576101f9565b8063a1c0d459116100dc578063a1c0d459146105ec578063a526d83b1461060c578063a71763a81461062c578063b0d691fe1461063f576101f9565b80637dcab4ce1461053f578063855713681461055f5780639517e29f1461058d5780639cfd7cff146105a0576101f9565b80632f54bf6e116101855780635c60da1b116101545780635c60da1b146104b85780637065cb48146104ec578063714041561461050c57806372aea6541461052c576101f9565b80632f54bf6e1461045a57806341c9ddff1461047a5780634b6a14191461048f57806354387ad7146104a2576101f9565b80631626ba7e116101c15780631626ba7e146103d8578063173825d91461041157806319822f7c146104315780632dfca44514610444576101f9565b80630a664dba146103325780630c68ba21146103645780630db0262214610394578063112d3a7d146103b8576101f9565b366101f957005b61020e6000356001600160e01b03191661077e565b6000610218610831565b600080356001600160e01b03191681526002919091016020526040902080549091506001600160a01b03811690600160a01b900460f81b8161028057604051632464e76d60e11b81526001600160e01b03196000351660048201526024015b60405180910390fd5b61028e81607f60f91b610855565b156102e25760408051368101909152366000823760408051601481019091523360601b90526000803660140183865afa90506102d03d60408051918201905290565b3d6000823e816102de573d81fd5b3d81f35b6102ed816000610855565b156103305760408051368101909152366000823760408051601481019091523360601b9052600080366014018382875af190506102d03d60408051918201905290565b005b34801561033e57600080fd5b5061034761086c565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561037057600080fd5b5061038461037f366004613617565b610889565b604051901515815260200161035b565b3480156103a057600080fd5b506103aa60005481565b60405190815260200161035b565b3480156103c457600080fd5b506103846103d3366004613675565b6108a7565b3480156103e457600080fd5b506103f86103f33660046136d0565b61090c565b6040516001600160e01b0319909116815260200161035b565b34801561041d57600080fd5b5061033061042c366004613617565b6109e2565b6103aa61043f366004613734565b610aa9565b34801561045057600080fd5b506103aa60025481565b34801561046657600080fd5b50610384610475366004613617565b610b8f565b34801561048657600080fd5b50610330610bad565b61033061049d366004613781565b610d6a565b3480156104ae57600080fd5b506103aa60015481565b3480156104c457600080fd5b506103477f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f857600080fd5b50610330610507366004613617565b610e5e565b34801561051857600080fd5b50610330610527366004613617565b610f1c565b61033061053a3660046137c2565b610fb9565b34801561054b57600080fd5b5061033061055a366004613617565b611099565b34801561056b57600080fd5b5061057f61057a3660046137f6565b61125e565b60405161035b929190613867565b61033061059b366004613675565b611285565b3480156105ac57600080fd5b50604080518082018252601e81527f657468657273706f7477616c6c65742e6d6f64756c61722e76312e302e3000006020820152905161035b91906138e1565b3480156105f857600080fd5b506103306106073660046138f4565b611374565b34801561061857600080fd5b50610330610627366004613617565b6113a9565b61033061063a366004613675565b611467565b34801561064b57600080fd5b506f71727de22e5e9d8baf0edac6f37da032610347565b34801561066e57600080fd5b506103aa60035481565b34801561068457600080fd5b50610330611530565b34801561069957600080fd5b506106ad6106a83660046138f4565b611673565b60405161035b95949392919061390d565b3480156106ca57600080fd5b506103846106d93660046138f4565b61177d565b6106f16106ec3660046136d0565b61181c565b60405161035b9190613948565b61033061070c3660046136d0565b611e73565b34801561071d57600080fd5b5061057f61072c3660046137f6565b6122e8565b34801561073d57600080fd5b5061075161074c3660046139c2565b612305565b60405161035b91906139df565b34801561076a57600080fd5b506103846107793660046138f4565b6123dd565b6000610788610831565b6001600160e01b0319831660009081526002919091016020908152604091829020600101805483518184028101840190945280845290918301828280156107f857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116107da575b50505050509050610809813361242c565b151560000361082d576040516332cf492b60e11b8152336004820152602401610277565b5050565b7ff88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea0290565b6001600160f81b0319828116908216145b92915050565b60006108846000805160206140888339815191525490565b905090565b6001600160a01b031660009081526005602052604090205460ff1690565b6000600185036108c1576108ba84612439565b9050610904565b600285036108d2576108ba84612457565b600385036108ef576108ba6108e9838501856139c2565b85612471565b60048503610900576108ba846124af565b5060005b949350505050565b60008061091c6014828587613a5d565b61092591613a87565b60601c905061093381612439565b61095b57604051635c93ff2f60e11b81526001600160a01b0382166004820152602401610277565b6001600160a01b03811663f551e2ee3387610979876014818b613a5d565b6040518563ffffffff1660e01b81526004016109989493929190613ae3565b602060405180830381865afa1580156109b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d99190613b15565b95945050505050565b6109eb33610b8f565b806109f557503330145b610a12576040516311d9f09160e01b815260040160405180910390fd5b610a1b81610b8f565b610a385760405163f1369ccb60e01b815260040160405180910390fd5b600160005411610a5b5760405163021870b960e11b815260040160405180910390fd5b610a64816124e1565b604080513081526001600160a01b03831660208201527fe594d081b4382713733fe631966432c9cea5199afb2db5c3c1931f9f9300367991015b60405180910390a150565b6000336f71727de22e5e9d8baf0edac6f37da03214610adb57604051635629665f60e11b815260040160405180910390fd5b816020850135606081901c90610af082612439565b610aff57600193505050610b75565b604051639700320360e01b81526001600160a01b03831690639700320390610b2d908a908a90600401613b77565b6020604051808303816000875af1158015610b4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b709190613c76565b935050505b8015610b875760003860003884335af1505b509392505050565b6001600160a01b031660009081526004602052604090205460ff1690565b610bb633610889565b610bd357604051636570ecab60e11b815260040160405180910390fd5b600254600081815260066020526040812090829003610c0557604051631dc0650160e31b815260040160405180910390fd5b610c0e82612516565b15610c2c576040516320181a3560e21b815260040160405180910390fd5b610c4e600254600090815260066020526040902054600160a01b900460ff1690565b15610c6c57604051638b19dbcb60e01b815260040160405180910390fd5b60008281526006602090815260408220600180820180549182018155845291832090910180546001600160a01b03191633179055838252600201805491610cb283613ca5565b909155505080546001600160a01b0316610ccb8361258d565b15610cfd576000838152600660205260409020805460ff60a01b1916600160a01b179055610cf8816125c7565b505050565b6000838152600660209081526040918290206002015482513081529182018690526001600160a01b0384169282019290925260608101919091527f7afa94f51443879f537b9be4f09d5d734c2c233b788d2f6af6565add34706bab906080015b60405180910390a1505050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610db3576040516308e3edd160e41b815260040160405180910390fd5b610dbb6125f7565b60008080610dcb84860186613d81565b925092509250610dda836125c7565b6000826001600160a01b031682604051610df49190613de2565b600060405180830381855af49150503d8060008114610e2f576040519150601f19603f3d011682016040523d82523d6000602084013e610e34565b606091505b5050905080610e5657604051631b79777760e11b815260040160405180910390fd5b505050505050565b610e6733610b8f565b80610e7157503330145b610e8e576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b0381161580610ea85750610ea881610889565b80610eb75750610eb781610b8f565b15610ed557604051631a1aefc560e21b815260040160405180910390fd5b610ede816125c7565b604080513081526001600160a01b03831660208201527fc82bdbbf677a2462f2a7e22e4ba9abd209496b69cd7b868b3b1d28f76e09a40a9101610a9e565b610f2533610b8f565b80610f2f57503330145b610f4c576040516311d9f09160e01b815260040160405180910390fd5b610f5581610889565b610f725760405163985f453960e01b815260040160405180910390fd5b610f7b8161261b565b604080513081526001600160a01b03831660208201527fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b9101610a9e565b336f71727de22e5e9d8baf0edac6f37da0321480610fd657503330145b610ff357604051635629665f60e11b815260040160405180910390fd5b3660006110036060840184613dfe565b611011916004908290613a5d565b915091506000306001600160a01b03168383604051611031929190613e44565b600060405180830381855af49150503d806000811461106c576040519150601f19603f3d011682016040523d82523d6000602084013e611071565b606091505b505090508061109357604051632b3f6d1160e21b815260040160405180910390fd5b50505050565b6110a233610889565b6110bf57604051636570ecab60e11b815260040160405180910390fd5b6001600160a01b03811615806110d957506110d981610889565b806110e857506110e881610b8f565b1561110657604051631a1aefc560e21b815260040160405180910390fd5b6003600154101561112a57604051636bb07db960e11b815260040160405180910390fd5b600254600090815260066020526040902060018101541580159061115757508054600160a01b900460ff16155b1561117557604051639fa6dc5760e01b815260040160405180910390fd5b600060025460016111869190613e54565b6000818152600660209081526040822080546001600160a01b0388166001600160a01b03199182161782556001808301805491820181558552928420909201805490921633179091558282526002018054929350906111e483613ca5565b9091555050600081815260066020908152604091829020805460ff60a01b1916815542600390910155600283905581513081529081018390526001600160a01b038516918101919091523360608201527f9fb4a8d051aad8866705f4d52eb05a29939e15ad43dd4aab82cf31806759eac390608001610d5d565b606060008061126b610831565b905061127881868661267c565b92509250505b9250929050565b336f71727de22e5e9d8baf0edac6f37da03214806112a257503330145b6112bf57604051635629665f60e11b815260040160405180910390fd5b600184036112d7576112d2838383612818565b61132c565b600284036112ea576112d2838383612894565b600384036112fd576112d28383836128ad565b60048403611310576112d2838383612ade565b60405163041c38b360e41b815260048101859052602401610277565b604080518581526001600160a01b03851660208201527fd21d0b289f126c4b473ea641963e766833c2f13866e4ff480abd787c100ef12391015b60405180910390a150505050565b61137d33610b8f565b8061138757503330145b6113a4576040516311d9f09160e01b815260040160405180910390fd5b600355565b6113b233610b8f565b806113bc57503330145b6113d9576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b03811615806113f357506113f381610889565b80611402575061140281610b8f565b156114205760405163053bd11560e31b815260040160405180910390fd5b61142981612b41565b604080513081526001600160a01b03831660208201527fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a9101610a9e565b336f71727de22e5e9d8baf0edac6f37da032148061148457503330145b6114a157604051635629665f60e11b815260040160405180910390fd5b600184036114b9576114b4838383612b73565b6114f2565b600284036114cc576114b4838383612c04565b600384036114df576114b4838383612c22565b60048403611310576114b4838383612eff565b604080518581526001600160a01b03851660208201527f341347516a9de374859dfda710fa4828b2d48cb57d4fbe4c1149612b8e02276e9101611366565b61153933610b8f565b80611548575061154833610889565b8061155257503330145b61156f576040516302d8be6160e21b815260040160405180910390fd5b60025460009081526006602052604081206003549091901561159357600354611598565b620151805b90506115bc600254600090815260066020526040902054600160a01b900460ff1690565b156115da57604051638b19dbcb60e01b815260040160405180910390fd5b60006115e533610889565b90508080156116035750428284600301546116009190613e54565b10155b156116215760405163ae18e9c760e01b815260040160405180910390fd5b825460ff60a01b1916600160a01b17835560025460408051308152602081019290925233908201527faf7f1090397448391393dc134b45d6d20e79a9d2a8f5a82fb42d1514a55ecbf990606001610d5d565b60008060608180851580611688575060025486115b156116a657604051631dc0650160e31b815260040160405180910390fd5b6000868152600660209081526040808320815160a08101835281546001600160a01b0381168252600160a01b900460ff1615158185015260018201805484518187028101870186528181529295939486019383018282801561173157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611713575b5050505050815260200160028201548152602001600382015481525050905080600001518160600151826040015183602001518460800151955095509550955095505091939590929450565b600081600881901b61179382600160f81b610855565b156117a157600192506117e4565b6117ac826000610855565b156117ba57600192506117e4565b6117cc826001600160f81b0319610855565b156117da57600192506117e4565b5060009392505050565b6117ef816000610855565b156117fd5760019250611815565b61180b81600160f81b610855565b156117da57600192505b5050919050565b60606000611828610831565b60010190506118378133612f7b565b61185657604051635c93ff2f60e11b8152336004820152602401610277565b600061186e6000805160206140888339815191525490565b90506001600160a01b038116611b2e5785600881901b61189282600160f81b610855565b1561190157863587016020810190356118ac836000610855565b156118c2576118bb8282612fb5565b96506118fa565b6118d083600160f81b610855565b156118df576118bb828261308d565b826040516308c3ee0360e11b81526004016102779190613e67565b5050611b27565b61190c826000610855565b15611a5a576000803660006119218b8b6131ba565b6040805160018082528183019092529498509296509094509250816020015b606081526020019060019003908161194057905050985060006119638682610855565b15611997576119748585858561320b565b8a60008151811061198757611987613e7c565b6020026020010181905250611a50565b6119a586600160f81b610855565b15611a35576119b685858585613241565b8b6000815181106119c9576119c9613e7c565b6020908102919091010152905080611a30577fe723f28f104e46b47fd3531f3608374ac226bcf3ddda334a23a266453e0efdb760008b600081518110611a1157611a11613e7c565b6020026020010151604051611a27929190613e92565b60405180910390a15b611a50565b856040516308c3ee0360e11b81526004016102779190613e67565b5050505050611b27565b611a6c826001600160f81b0319610855565b15611b0c576000611a80601482898b613a5d565b611a8991613a87565b60601c9050366000611a9e896014818d613a5d565b9092509050611aae846000610855565b15611ac457611abe838383613272565b50611b04565b611ad284600160f81b610855565b15611ae957611ae28383836132a6565b5050611b04565b836040516308c3ee0360e11b81526004016102779190613e67565b505050611b27565b81604051632e5bf3f960e21b81526004016102779190613e67565b5050611e6a565b604051631057c74d60e11b81526000906001600160a01b038316906320af8e9a90611b6190339085903690600401613eab565b6000604051808303816000875af1158015611b80573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611ba89190810190613ed0565b905086600881901b611bbe82600160f81b610855565b15611c125787358801602081019035611bd8836000610855565b15611bee57611be78282612fb5565b9750611c0b565b611bfc83600160f81b610855565b156118df57611be7828261308d565b5050611dda565b611c1d826000610855565b15611d4b57600080366000611c328c8c6131ba565b6040805160018082528183019092529498509296509094509250816020015b6060815260200190600190039081611c515790505099506000611c748682610855565b15611ca857611c858585858561320b565b8b600081518110611c9857611c98613e7c565b6020026020010181905250611d41565b611cb686600160f81b610855565b15611a3557611cc785858585613241565b8c600081518110611cda57611cda613e7c565b6020908102919091010152905080611d41577fe723f28f104e46b47fd3531f3608374ac226bcf3ddda334a23a266453e0efdb760008c600081518110611d2257611d22613e7c565b6020026020010151604051611d38929190613e92565b60405180910390a15b5050505050611dda565b611d5d826001600160f81b0319610855565b15611b0c576000611d716014828a8c613a5d565b611d7a91613a87565b60601c9050366000611d8f8a6014818e613a5d565b9092509050611d9f846000610855565b15611db557611daf838383613272565b50611dd6565b611dc384600160f81b610855565b15611ae957611dd38383836132a6565b50505b5050505b5050604051630b9dfbed60e11b81526001600160a01b0383169063173bf7da90611e089084906004016138e1565b6020604051808303816000875af1158015611e27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e4b9190613f3d565b611e685760405163546b3e6360e01b815260040160405180910390fd5b505b50509392505050565b336f71727de22e5e9d8baf0edac6f37da0321480611e9057503330145b611ead57604051635629665f60e11b815260040160405180910390fd5b6000611ec56000805160206140888339815191525490565b90506001600160a01b0381166120695783600881901b611ee982600160f81b610855565b15611f3c5784358501602081019035611f03836000610855565b15611f1857611f128282612fb5565b50611f35565b611f2683600160f81b610855565b156118df57611f12828261308d565b5050612062565b611f47826000610855565b15611fd357600080366000611f5c89896131ba565b9350935093509350611f7285600060f81b610855565b15611f8957611f838484848461320b565b50611fca565b611f9785600160f81b610855565b15611faf57611fa884848484613241565b5050611fca565b846040516308c3ee0360e11b81526004016102779190613e67565b50505050612062565b611fe5826001600160f81b0319610855565b15611b0c576000611ff96014828789613a5d565b61200291613a87565b60601c9050366000612017876014818b613a5d565b9092509050612027846000610855565b1561203d57612037838383613272565b5061205e565b61204b84600160f81b610855565b15611ae95761205b8383836132a6565b50505b5050505b5050611093565b604051631057c74d60e11b81526000906001600160a01b038316906320af8e9a9061209c90339085903690600401613eab565b6000604051808303816000875af11580156120bb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120e39190810190613ed0565b905084600881901b6120f982600160f81b610855565b1561214c5785358601602081019035612113836000610855565b15612128576121228282612fb5565b50612145565b61213683600160f81b610855565b156118df57612122828261308d565b5050612253565b612157826000610855565b156121c45760008036600061216c8a8a6131ba565b935093509350935061218285600060f81b610855565b15612199576121938484848461320b565b506121bb565b6121a785600160f81b610855565b15611faf576121b884848484613241565b50505b50505050612253565b6121d6826001600160f81b0319610855565b15611b0c5760006121ea601482888a613a5d565b6121f391613a87565b60601c9050366000612208886014818c613a5d565b9092509050612218846000610855565b1561222e57612228838383613272565b5061224f565b61223c84600160f81b610855565b15611ae95761224c8383836132a6565b50505b5050505b5050604051630b9dfbed60e11b81526001600160a01b0383169063173bf7da906122819084906004016138e1565b6020604051808303816000875af11580156122a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122c49190613f3d565b6122e15760405163546b3e6360e01b815260040160405180910390fd5b5050505050565b60606000806122f5610831565b600101905061127881868661267c565b60408051606080820183526000808352602083015291810191909152612329610831565b6001600160e01b0319831660009081526002919091016020908152604091829020825160608101845281546001600160a01b0381168252600160a01b900460f81b6001600160f81b03191681840152600182018054855181860281018601875281815292959394938601938301828280156123cd57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116123af575b5050505050815250509050919050565b6000600182036123ef57506001919050565b600282036123ff57506001919050565b6003820361240f57506001919050565b6004820361241f57506001919050565b506000919050565b919050565b6000806109d984846132d5565b600080612444610831565b90506124508184612f7b565b9392505050565b600080612462610831565b60010190506124508184612f7b565b60008061247c610831565b6001600160e01b0319949094166000908152600290940160205250506040909120546001600160a01b0390811691161490565b6000816001600160a01b03166124d16000805160206140888339815191525490565b6001600160a01b03161492915050565b6001600160a01b0381166000908152600460205260408120805460ff191690558054908061250e83613f5f565b919050555050565b6000805b60008381526006602052604090206001015481101561258457600083815260066020526040902060010180543391908390811061255957612559613e7c565b6000918252602090912001546001600160a01b03160361257c5750600192915050565b60010161251a565b50600092915050565b6001546000828152600660205260408120600201549091610258916125b5906103e890613f76565b6125bf9190613f8d565b101592915050565b6001600160a01b0381166000908152600460205260408120805460ff191660011790558054908061250e83613ca5565b6000612601610831565b905061260f8160010161333b565b6126188161333b565b50565b6001600160a01b0381166000908152600560205260408120805460ff19169055600180549161264983613f5f565b9190505550612670600254600090815260066020526040902054600160a01b900460ff1690565b61261857612618611530565b606060006001600160a01b03841660011480159061269f575061269f8585612f7b565b156126c857604051637c84ecfb60e01b81526001600160a01b0385166004820152602401610277565b826000036126e95760405163f725081760e01b815260040160405180910390fd5b826001600160401b0381111561270157612701613cbe565b60405190808252806020026020018201604052801561272a578160200160208202803683370190505b506001600160a01b03808616600090815260208890526040812054929450911691505b6001600160a01b0382161580159061276f57506001600160a01b038216600114155b801561277a57508381105b156127d4578183828151811061279257612792613e7c565b6001600160a01b0392831660209182029290920181019190915292811660009081529287905260409092205490911690806127cc81613ca5565b91505061274d565b6001600160a01b03821660011461280c57826127f1600183613faf565b8151811061280157612801613e7c565b602002602001015191505b80835250935093915050565b6000612822610831565b905061282e8185613398565b6040516306d61fe760e41b81526001600160a01b03851690636d61fe709061285c9086908690600401613fc2565b600060405180830381600087803b15801561287657600080fd5b505af115801561288a573d6000803e3d6000fd5b5050505050505050565b600061289e610831565b600101905061282e8185613398565b600082828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051818a01356020818102601f01601f19168301909352969750893596918a018035965090945060609350915b8181101561292f57602081028381016060013590860152600101612910565b50506040810135602081830103356060818152818385016020830137935061296592508591506001600160f81b03199050610855565b1561298357604051633accf26360e11b815260040160405180910390fd5b61298c8461346e565b156129d95760405162461bcd60e51b815260206004820152601e60248201527f46756e6374696f6e2073656c6563746f7220616c7265616479207573656400006044820152606401610277565b604080516060810182526001600160a01b038a1681526001600160f81b031985166020820152908101839052612a0d610831565b6001600160e01b0319861660009081526002919091016020908152604091829020835181548584015160f81c600160a01b026001600160a81b03199091166001600160a01b0390921691909117178155918301518051612a73926001850192019061357d565b50506040516306d61fe760e41b81526001600160a01b038a169150636d61fe7090612aa29084906004016138e1565b600060405180830381600087803b158015612abc57600080fd5b505af1158015612ad0573d6000803e3d6000fd5b505050505050505050505050565b6000612af66000805160206140888339815191525490565b90506001600160a01b03811615612b2b5760405163741cbe0360e01b81526001600160a01b0382166004820152602401610277565b61282e8460008051602061408883398151915255565b6001600160a01b0381166000908152600560205260408120805460ff1916600190811790915580549161264983613ca5565b6000612b7d610831565b9050600080612b8e84860186613fd6565b9092509050612b9e8383886134a8565b604051638a91b0e360e01b81526001600160a01b03871690638a91b0e390612bca9084906004016138e1565b600060405180830381600087803b158015612be457600080fd5b505af1158015612bf8573d6000803e3d6000fd5b50505050505050505050565b6000612c0e610831565b6001019050600080612b8e84860186613fd6565b6000612c316004828486613a5d565b612c3a91614025565b90506000612c4b8360048187613a5d565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929350612c8e925084915061346e9050565b612cda5760405162461bcd60e51b815260206004820152601a60248201527f46756e6374696f6e2073656c6563746f72206e6f7420757365640000000000006044820152606401610277565b6000612ce4610831565b6001600160e01b0319841660009081526002919091016020908152604091829020825160608101845281546001600160a01b0381168252600160a01b900460f81b6001600160f81b0319168184015260018201805485518186028101860187528181529295939493860193830182828015612d8857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612d6a575b5050505050815250509050856001600160a01b031681600001516001600160a01b031614612e0b5760405162461bcd60e51b815260206004820152602a60248201527f46756e6374696f6e2073656c6563746f72206e6f74207573656420627920746860448201526934b9903430b7323632b960b11b6064820152608401610277565b6020810151612e22816001600160f81b0319610855565b15612e4057604051633accf26360e11b815260040160405180910390fd5b60408051600080825260808201835260208201818152928201526060810181905290612e6a610831565b6001600160e01b0319871660009081526002919091016020908152604091829020835181548584015160f81c600160a01b026001600160a81b03199091166001600160a01b0390921691909117178155918301518051612ed0926001850192019061357d565b5050604051638a91b0e360e01b81526001600160a01b038a169150638a91b0e390612aa29087906004016138e1565b612f16600060008051602061408883398151915255565b604051638a91b0e360e01b81526001600160a01b03841690638a91b0e390612f449085908590600401613fc2565b600060405180830381600087803b158015612f5e57600080fd5b505af1158015612f72573d6000803e3d6000fd5b50505050505050565b600060016001600160a01b038316148015906124505750506001600160a01b03908116600090815260209290925260409091205416151590565b606081806001600160401b03811115612fd057612fd0613cbe565b60405190808252806020026020018201604052801561300357816020015b6060815260200190600190039081612fee5790505b50915060005b81811015613085573685858381811061302457613024613e7c565b90506020028101906130369190614053565b905061305f6130486020830183613617565b602083013561305a6040850185613dfe565b61320b565b84838151811061307157613071613e7c565b602090810291909101015250600101613009565b505092915050565b606081806001600160401b038111156130a8576130a8613cbe565b6040519080825280602002602001820160405280156130db57816020015b60608152602001906001900390816130c65790505b50915060005b8181101561308557368585838181106130fc576130fc613e7c565b905060200281019061310e9190614053565b905060006131396131226020840184613617565b60208401356131346040860186613dfe565b613241565b86858151811061314b5761314b613e7c565b60209081029190910101529050806131b0577fe723f28f104e46b47fd3531f3608374ac226bcf3ddda334a23a266453e0efdb78386858151811061319157613191613e7c565b60200260200101516040516131a7929190613e92565b60405180910390a15b50506001016130e1565b60008036816131cc6014828789613a5d565b6131d591613a87565b60601c93506131e8603460148789613a5d565b6131f191614069565b92506132008560348189613a5d565b949793965094505050565b60405181838237600038838387895af1613228573d6000823e3d81fd5b3d8152602081013d6000823e3d01604052949350505050565b604051600090828482376000388483888a5af191503d8152602081013d6000823e3d81016040525094509492505050565b604051818382376000388383875af461328e573d6000823e3d81fd5b3d8152602081013d6000823e3d016040529392505050565b604051600090828482376000388483885af491503d8152602081013d6000823e3d810160405250935093915050565b81516000908190815b8181101561332d57846001600160a01b031686828151811061330257613302613e7c565b60200260200101516001600160a01b0316036133255792506001915061127e9050565b6001016132de565b506000958695509350505050565b60016000908152602082905260409020546001600160a01b031615613373576040516329e42f3360e11b815260040160405180910390fd5b60016000818152602092909252604090912080546001600160a01b0319169091179055565b6001600160a01b03811615806133b757506001600160a01b0381166001145b156133e057604051637c84ecfb60e01b81526001600160a01b0382166004820152602401610277565b6001600160a01b03818116600090815260208490526040902054161561342457604051631034f46960e21b81526001600160a01b0382166004820152602401610277565b60016000818152602093909352604080842080546001600160a01b039485168087529286208054959091166001600160a01b03199586161790559190935280549091169091179055565b600080613479610831565b6001600160e01b03199093166000908152600293909301602052505060409020546001600160a01b0316151590565b6001600160a01b03811615806134c757506001600160a01b0381166001145b156134f057604051637c84ecfb60e01b81526001600160a01b0383166004820152602401610277565b6001600160a01b0382811660009081526020859052604090205481169082161461353857604051637c84ecfb60e01b81526001600160a01b0382166004820152602401610277565b6001600160a01b0390811660008181526020949094526040808520805494841686529085208054949093166001600160a01b0319948516179092559092528154169055565b8280548282559060005260206000209081019282156135d2579160200282015b828111156135d257825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061359d565b506135de9291506135e2565b5090565b5b808211156135de57600081556001016135e3565b6001600160a01b038116811461261857600080fd5b8035612427816135f7565b60006020828403121561362957600080fd5b8135612450816135f7565b60008083601f84011261364657600080fd5b5081356001600160401b0381111561365d57600080fd5b60208301915083602082850101111561127e57600080fd5b6000806000806060858703121561368b57600080fd5b84359350602085013561369d816135f7565b925060408501356001600160401b038111156136b857600080fd5b6136c487828801613634565b95989497509550505050565b6000806000604084860312156136e557600080fd5b8335925060208401356001600160401b0381111561370257600080fd5b61370e86828701613634565b9497909650939450505050565b6000610120828403121561372e57600080fd5b50919050565b60008060006060848603121561374957600080fd5b83356001600160401b0381111561375f57600080fd5b61376b8682870161371b565b9660208601359650604090950135949350505050565b6000806020838503121561379457600080fd5b82356001600160401b038111156137aa57600080fd5b6137b685828601613634565b90969095509350505050565b6000602082840312156137d457600080fd5b81356001600160401b038111156137ea57600080fd5b6109048482850161371b565b6000806040838503121561380957600080fd5b8235613814816135f7565b946020939093013593505050565b60008151808452602080850194506020840160005b8381101561385c5781516001600160a01b031687529582019590820190600101613837565b509495945050505050565b60408152600061387a6040830185613822565b905060018060a01b03831660208301529392505050565b60005b838110156138ac578181015183820152602001613894565b50506000910152565b600081518084526138cd816020860160208601613891565b601f01601f19169290920160200192915050565b60208152600061245060208301846138b5565b60006020828403121561390657600080fd5b5035919050565b60018060a01b038616815284602082015260a06040820152600061393460a0830186613822565b931515606083015250608001529392505050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b8281101561399f57603f1988860301845261398d8583516138b5565b94509285019290850190600101613971565b5092979650505050505050565b6001600160e01b03198116811461261857600080fd5b6000602082840312156139d457600080fd5b8135612450816139ac565b602080825282516001600160a01b0390811683830152838201516001600160f81b031916604080850191909152840151606080850152805160808501819052600093929183019190849060a08701905b80831015613a5157845184168252938501936001929092019190850190613a2f565b50979650505050505050565b60008085851115613a6d57600080fd5b83861115613a7a57600080fd5b5050820193919092039150565b6bffffffffffffffffffffffff1981358181169160148510156130855760149490940360031b84901b1690921692915050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b0385168152836020820152606060408201526000613b0b606083018486613aba565b9695505050505050565b600060208284031215613b2757600080fd5b8151612450816139ac565b6000808335601e19843603018112613b4957600080fd5b83016020810192503590506001600160401b03811115613b6857600080fd5b80360382131561127e57600080fd5b60408152613b9860408201613b8b8561360c565b6001600160a01b03169052565b602083013560608201526000613bb16040850185613b32565b610120806080860152613bc961016086018385613aba565b9250613bd86060880188613b32565b9250603f19808786030160a0880152613bf2858584613aba565b9450608089013560c088015260a089013560e0880152610100935060c089013584880152613c2360e08a018a613b32565b9250818887030184890152613c39868483613aba565b955050613c48848a018a613b32565b9450925080878603016101408801525050613c64838383613aba565b93505050508260208301529392505050565b600060208284031215613c8857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600060018201613cb757613cb7613c8f565b5060010190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613cfc57613cfc613cbe565b604052919050565b60006001600160401b03821115613d1d57613d1d613cbe565b50601f01601f191660200190565b600082601f830112613d3c57600080fd5b8135613d4f613d4a82613d04565b613cd4565b818152846020838601011115613d6457600080fd5b816020850160208301376000918101602001919091529392505050565b600080600060608486031215613d9657600080fd5b8335613da1816135f7565b92506020840135613db1816135f7565b915060408401356001600160401b03811115613dcc57600080fd5b613dd886828701613d2b565b9150509250925092565b60008251613df4818460208701613891565b9190910192915050565b6000808335601e19843603018112613e1557600080fd5b8301803591506001600160401b03821115613e2f57600080fd5b60200191503681900382131561127e57600080fd5b8183823760009101908152919050565b8082018082111561086657610866613c8f565b6001600160f81b031991909116815260200190565b634e487b7160e01b600052603260045260246000fd5b82815260406020820152600061090460408301846138b5565b6001600160a01b03841681526040602082018190526000906109d99083018486613aba565b600060208284031215613ee257600080fd5b81516001600160401b03811115613ef857600080fd5b8201601f81018413613f0957600080fd5b8051613f17613d4a82613d04565b818152856020838501011115613f2c57600080fd5b6109d9826020830160208601613891565b600060208284031215613f4f57600080fd5b8151801515811461245057600080fd5b600081613f6e57613f6e613c8f565b506000190190565b808202811582820484141761086657610866613c8f565b600082613faa57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561086657610866613c8f565b602081526000610904602083018486613aba565b60008060408385031215613fe957600080fd5b8235613ff4816135f7565b915060208301356001600160401b0381111561400f57600080fd5b61401b85828601613d2b565b9150509250929050565b6001600160e01b031981358181169160048510156130855760049490940360031b84901b1690921692915050565b60008235605e19833603018112613df457600080fd5b8035602083101561086657600019602084900360031b1b169291505056fe36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608a26469706673582212200e9d8fa1e71878c2dfec2573076fa2365235920bb8d728db041006fbfbfa65af64736f6c63430008170033" + +export const ETHERSPOT_MULTIPLE_OWNER_ECDSA_VALIDATOR_CREATECALL = + "0x4d6f64756c6172457468657273706f7457616c6c65743a437265617465323a73608060405234801561001057600080fd5b50610948806100206000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80636d61fe70146100675780638a91b0e31461007c578063970032031461008f578063d60b347f146100b5578063ecd05961146100f1578063f551e2ee14610105575b600080fd5b61007a6100753660046106aa565b610131565b005b61007a61008a3660046106aa565b610187565b6100a261009d3660046106ec565b6101d4565b6040519081526020015b60405180910390f35b6100e16100c3366004610753565b6001600160a01b031660009081526020819052604090205460ff1690565b60405190151581526020016100ac565b6100e16100ff366004610775565b60011490565b61011861011336600461078e565b6103ad565b6040516001600160e01b031990911681526020016100ac565b3360009081526020819052604090205460ff1615610169576040516393360fbf60e01b81523360048201526024015b60405180910390fd5b5050336000908152602081905260409020805460ff19166001179055565b3360009081526020819052604090205460ff166101b95760405163f91bd6f160e01b8152336004820152602401610160565b5050336000908152602081905260409020805460ff19169055565b600080610206836020527b19457468657265756d205369676e6564204d6573736167653a0a3332600052603c60042090565b9050600061025861021b6101008701876107e8565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250869392505061057f9050565b90506001600160a01b03811615806102d557506040516317aa5fb760e11b81526001600160a01b03821660048201523390632f54bf6e90602401602060405180830381865afa1580156102af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d3919061082f565b155b156102e5576001925050506103a7565b60006102f460608701876107e8565b61030391600491600091610851565b61030c9161087b565b9050600061031d60608801886107e8565b600481811061032e5761032e6108ab565b909101356001600160f81b0319169150369050600061035060608a018a6107e8565b61035e916024908290610851565b9092509050600160f81b6001600160f81b03198416146103a0576001600160f81b031983166103a0576000803660006103978686610610565b50505050505050505b5050505050505b92915050565b6000806103f08585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061057f92505050565b6040516317aa5fb760e11b81526001600160a01b03821660048201529091503390632f54bf6e90602401602060405180830381865afa158015610437573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045b919061082f565b156104705750630b135d3f60e11b9050610577565b60006104a1866020527b19457468657265756d205369676e6564204d6573736167653a0a3332600052603c60042090565b905060006104e58287878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061057f92505050565b6040516317aa5fb760e11b81526001600160a01b03821660048201529091503390632f54bf6e90602401602060405180830381865afa15801561052c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610550919061082f565b156105685750630b135d3f60e11b9250610577915050565b506001600160e01b0319925050505b949350505050565b60405160019083600052602083015160405260408351036105bb57604083015160ff81901c601b016020526001600160ff1b03166060526105e1565b60418351036105dc57606083015160001a60205260408301516060526105e1565b600091505b6020600160806000855afa5191503d61060257638baa579f6000526004601cfd5b600060605260405292915050565b60008036816106226014828789610851565b61062b916108c1565b60601c935061063e603460148789610851565b610647916108f4565b92506106568560348189610851565b949793965094505050565b60008083601f84011261067357600080fd5b50813567ffffffffffffffff81111561068b57600080fd5b6020830191508360208285010111156106a357600080fd5b9250929050565b600080602083850312156106bd57600080fd5b823567ffffffffffffffff8111156106d457600080fd5b6106e085828601610661565b90969095509350505050565b600080604083850312156106ff57600080fd5b823567ffffffffffffffff81111561071657600080fd5b8301610120818603121561072957600080fd5b946020939093013593505050565b80356001600160a01b038116811461074e57600080fd5b919050565b60006020828403121561076557600080fd5b61076e82610737565b9392505050565b60006020828403121561078757600080fd5b5035919050565b600080600080606085870312156107a457600080fd5b6107ad85610737565b935060208501359250604085013567ffffffffffffffff8111156107d057600080fd5b6107dc87828801610661565b95989497509550505050565b6000808335601e198436030181126107ff57600080fd5b83018035915067ffffffffffffffff82111561081a57600080fd5b6020019150368190038213156106a357600080fd5b60006020828403121561084157600080fd5b8151801515811461076e57600080fd5b6000808585111561086157600080fd5b8386111561086e57600080fd5b5050820193919092039150565b6001600160e01b031981358181169160048510156108a35780818660040360031b1b83161692505b505092915050565b634e487b7160e01b600052603260045260246000fd5b6bffffffffffffffffffffffff1981358181169160148510156108a35760149490940360031b84901b1690921692915050565b803560208310156103a757600019602084900360031b1b169291505056fea2646970667358221220cf50a432d078d95e4c4634ecba8b551dafcfbcd111305e547d4efbad316f8e9264736f6c63430008170033" + +export const ETHERSPOT_WALLET_FACTORY_CREATECALL = + "0x4d6f64756c6172457468657273706f7457616c6c65743a437265617465323a7360a060405234801561001057600080fd5b50604051610b0e380380610b0e83398101604081905261002f916100a4565b806100398161004c565b50506001600160a01b03166080526100d7565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b80516001600160a01b038116811461009f57600080fd5b919050565b600080604083850312156100b757600080fd5b6100c083610088565b91506100ce60208401610088565b90509250929050565b608051610a0e6101006000396000818161016c0152818161050401526105b30152610a0e6000f3fe6080604052600436106100dd5760003560e01c80638da5cb5b1161007f578063f04e283e11610059578063f04e283e14610207578063f2fde38b1461021a578063f8a593701461022d578063fee81cf41461024057600080fd5b80638da5cb5b146101ae578063b36f9705146101c7578063d959fd0e146101e757600080fd5b806354d1f13d116100bb57806354d1f13d1461011f57806356c717f5146101275780635c60da1b1461015a578063715018a6146101a657600080fd5b806325692962146100e257806345171159146100ec5780634a1ce599146100ff575b600080fd5b6100ea610273565b005b6100ea6100fa36600461087f565b6102c3565b34801561010b57600080fd5b506100ea61011a3660046108c1565b610356565b6100ea6103db565b34801561013357600080fd5b506101476101423660046108e5565b610417565b6040519081526020015b60405180910390f35b34801561016657600080fd5b5061018e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610151565b6100ea61044d565b3480156101ba57600080fd5b50638b78c6d8195461018e565b3480156101d357600080fd5b506100ea6101e2366004610961565b610461565b3480156101f357600080fd5b5061018e6102023660046108e5565b6104ef565b6100ea6102153660046108c1565b610533565b6100ea6102283660046108c1565b610573565b61018e61023b3660046108e5565b61059a565b34801561024c57600080fd5b5061014761025b3660046108c1565b63389a75e1600c908152600091909152602090205490565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b6102cb610682565b6001600160a01b0382166102f2576040516301650c7760e51b815260040160405180910390fd5b604051621cb65b60e51b815263ffffffff821660048201526001600160a01b03831690630396cb609034906024016000604051808303818588803b15801561033957600080fd5b505af115801561034d573d6000803e3d6000fd5b50505050505050565b61035e610682565b6001600160a01b038116610385576040516301650c7760e51b815260040160405180910390fd5b806001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156103c057600080fd5b505af11580156103d4573d6000803e3d6000fd5b5050505050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b600083838360405160200161042e9392919061098f565b6040516020818303038152906040528051906020012090509392505050565b610455610682565b61045f600061069d565b565b610469610682565b6001600160a01b038216610490576040516301650c7760e51b815260040160405180910390fd5b60405163611d2e7560e11b81526001600160a01b03828116600483015283169063c23a5cea90602401600060405180830381600087803b1580156104d357600080fd5b505af11580156104e7573d6000803e3d6000fd5b505050505050565b6000806104fd858585610417565b905061052a7f000000000000000000000000000000000000000000000000000000000000000082306106db565b95945050505050565b61053b610682565b63389a75e1600c52806000526020600c20805442111561056357636f5e88186000526004601cfd5b600090556105708161069d565b50565b61057b610682565b8060601b61059157637448fbae6000526004601cfd5b6105708161069d565b6000806105a8858585610417565b90506000806105d8347f000000000000000000000000000000000000000000000000000000000000000085610764565b915091508161067857604051634b6a141960e01b81526001600160a01b03821690634b6a14199061060f90899089906004016109a9565b600060405180830381600087803b15801561062957600080fd5b505af115801561063d573d6000803e3d6000fd5b50506040513392506001600160a01b03841691507f1637bbe505dfa57dd508725e4a807eafc818ed7f588e2bae3e57f195ea53ad7090600090a35b9695505050505050565b638b78c6d81954331461045f576382b429006000526004601cfd5b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b60008061075785604080517fcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f360609081527f5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e20768352616009602052601e9390935268603d3d8160223d3973600a52605f6021209152600090915290565b905061052a818585610848565b6000806040517fcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f36060527f5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e207660405261600960205284601e5268603d3d8160223d3973600a52605f60212060358201523060581b815260ff8153836015820152605581209150813b6108105783605f602188f591508161080b5763301164256000526004601cfd5b610836565b6001925085156108365760003860003889865af16108365763b12d13eb6000526004601cfd5b80604052506000606052935093915050565b600060ff60005350603592835260601b60015260155260556000908120915290565b6001600160a01b038116811461057057600080fd5b6000806040838503121561089257600080fd5b823561089d8161086a565b9150602083013563ffffffff811681146108b657600080fd5b809150509250929050565b6000602082840312156108d357600080fd5b81356108de8161086a565b9392505050565b6000806000604084860312156108fa57600080fd5b83359250602084013567ffffffffffffffff8082111561091957600080fd5b818601915086601f83011261092d57600080fd5b81358181111561093c57600080fd5b87602082850101111561094e57600080fd5b6020830194508093505050509250925092565b6000806040838503121561097457600080fd5b823561097f8161086a565b915060208301356108b68161086a565b838152818360208301376000910160200190815292915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fea26469706673582212204c4bf9d68187fb7cd2fde5d6423e331a1970029a223f4658090d1ff58ff83f7964736f6c63430008170033000000000000000000000000202a5598bdba2ce62bffa13ecccb04969719fad900000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + export const THIRDWEB_FACTORY_V06_CREATECALL = "0x2941b584dbc3085f5c1f208bcbf0a2f1e407b4fb7ea5d5135384ded28b2b3d5460c06040523480156200001157600080fd5b506040516200666a3803806200666a833981016040819052620000349162000297565b8030604051620000449062000270565b6001600160a01b03928316815291166020820152604001604051809103906000f08015801562000078573d6000803e3d6000fd5b506001600160a01b03908116608052811660a05262000099600083620000a1565b50506200031e565b620000ad8282620000bd565b620000b9828262000137565b5050565b60008281527f0a7b0f5c59907924802379ebe98cdc23e2ee7820f63d30126e10b3752010e500602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60006200014362000205565b60008481526020919091526040902054905060016200016162000205565b600085815260209190915260408120805490919062000182908490620002ec565b909155508290506200019362000205565b6000858152602091825260408082208583526001019092522080546001600160a01b0319166001600160a01b039290921691909117905580620001d562000205565b6000948552602090815260408086206001600160a01b03909516865260029094019052919092205550565b905090565b60006200020060008060ff196200023e60017f0c4ba382c0009cf238e4c1ca1a52f51c61e6248a70bdfb34e5ed49d5578a5c0c62000308565b6040516020016200025191815260200190565b60408051601f1981840301815291905280516020909101201692915050565b6141f5806200247583390190565b6001600160a01b03811681146200029457600080fd5b50565b60008060408385031215620002ab57600080fd5b8251620002b8816200027e565b6020840151909250620002cb816200027e565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b80820180821115620003025762000302620002d6565b92915050565b81810381811115620003025762000302620002d6565b60805160a05161211562000360600039600081816102a30152610b760152600081816101780152818161060001528181610ad20152610df601526121156000f3fe608060405234801561001057600080fd5b50600436106101285760003560e01c806308e93d0a1461012d5780630b61e12b1461014b5780630e6254fd1461016057806311464fbe14610173578063248a9ca3146101b25780632f2ff15d146101d357806336568abe146101e657806358451f97146101f957806383a03f8c146102015780638878ed33146102145780639010d07c1461022757806391d148541461023a5780639387a3801461025d578063938e3d7b14610270578063a217fddf14610283578063a32fa5b31461028b578063a65d69d41461029e578063ac9650d8146102c5578063c3c5a547146102e5578063ca15c873146102f8578063d547741f1461030b578063d8fd8f441461031e578063e68a7c3b14610331578063e8a3d48514610344575b600080fd5b610135610359565b6040516101429190611945565b60405180910390f35b61015e6101593660046119ae565b61036a565b005b61013561016e3660046119d8565b61040b565b61019a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610142565b6101c56101c03660046119f3565b610435565b604051908152602001610142565b61015e6101e1366004611a0c565b610453565b61015e6101f4366004611a0c565b6104fd565b6101c561055c565b61015e61020f3660046119f3565b610568565b61019a610222366004611a38565b6105b6565b61019a610235366004611aba565b610630565b61024d610248366004611a0c565b61073e565b6040519015158152602001610142565b61015e61026b3660046119ae565b610772565b61015e61027e366004611af2565b610809565b6101c5600081565b61024d610299366004611a0c565b61085a565b61019a7f000000000000000000000000000000000000000000000000000000000000000081565b6102d86102d3366004611ba2565b6108bd565b6040516101429190611c66565b61024d6102f33660046119d8565b610a19565b6101c56103063660046119f3565b610a25565b61015e610319366004611a0c565b610ac2565b61019a61032c366004611a38565b610acd565b61013561033f366004611aba565b610c18565b61034c610d49565b6040516101429190611cca565b60606103656000610de1565b905090565b336103758183610dee565b61039a5760405162461bcd60e51b815260040161039190611cdd565b60405180910390fd5b6001600160a01b03831660009081526002602052604081206103bc9083610e32565b9050801561040557836001600160a01b0316826001600160a01b03167f12146497b3b826918ec47f0cac7272a09ed06b30c16c030e99ec48ff5dd60b4760405160405180910390a35b50505050565b6001600160a01b038116600090815260026020526040902060609061042f90610de1565b92915050565b600061043f610e47565b600092835260010160205250604090205490565b61047761045e610e47565b6000848152600191909101602052604090205433610e6b565b61047f610e47565b6000838152602091825260408082206001600160a01b0385168352909252205460ff16156104ef5760405162461bcd60e51b815260206004820152601d60248201527f43616e206f6e6c79206772616e7420746f206e6f6e20686f6c646572730000006044820152606401610391565b6104f98282610ef0565b5050565b336001600160a01b038216146105525760405162461bcd60e51b815260206004820152601a60248201527921b0b71037b7363c903932b737bab731b2903337b91039b2b63360311b6044820152606401610391565b6104f98282610f04565b60006103656000610f18565b336105738183610dee565b61058f5760405162461bcd60e51b815260040161039190611cdd565b61059a600082610e32565b6104f95760405162461bcd60e51b815260040161039190611d14565b6000806105f98585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f2292505050565b90506106257f000000000000000000000000000000000000000000000000000000000000000082610f55565b9150505b9392505050565b60008061063b610fb5565b600085815260209190915260408120549150805b82811015610735576000610661610fb5565b60008881526020918252604080822085835260010190925220546001600160a01b0316146106d9578482036106c757610698610fb5565b600087815260209182526040808220938252600190930190915220546001600160a01b0316925061042f915050565b6106d2600183611d74565b9150610723565b6106e486600061073e565b801561071057506106f3610fb5565b600087815260209182526040808220828052600201909252205481145b1561072357610720600183611d74565b91505b61072e600182611d74565b905061064f565b50505092915050565b6000610748610e47565b6000938452602090815260408085206001600160a01b039490941685529290525090205460ff1690565b3361077d8183610dee565b6107995760405162461bcd60e51b815260040161039190611cdd565b6001600160a01b03831660009081526002602052604081206107bb9083610fbf565b9050801561040557836001600160a01b0316826001600160a01b03167f98d1ebbe00ae92a5de96a0f49742a8afa89f42363592bc2e7cfaaed68b45e7a660405160405180910390a350505050565b610811610fd4565b61084e5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b6044820152606401610391565b61085781610fe0565b50565b6000610864610e47565b600084815260209182526040808220828052909252205460ff166108b45761088a610e47565b6000848152602091825260408082206001600160a01b0386168352909252205460ff16905061042f565b50600192915050565b6060816001600160401b038111156108d7576108d7611adc565b60405190808252806020026020018201604052801561090a57816020015b60608152602001906001900390816108f55790505b509050336000805b848110156107355781156109915761096f3087878481811061093657610936611d87565b90506020028101906109489190611d9d565b8660405160200161095b93929190611dea565b6040516020818303038152906040526110c7565b84828151811061098157610981611d87565b6020026020010181905250610a11565b6109f3308787848181106109a7576109a7611d87565b90506020028101906109b99190611d9d565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506110c792505050565b848281518110610a0557610a05611d87565b60200260200101819052505b600101610912565b600061042f81836110ec565b600080610a30610fb5565b6000848152602091909152604081205491505b81811015610a9d576000610a55610fb5565b60008681526020918252604080822085835260010190925220546001600160a01b031614610a8b57610a88600184611d74565b92505b610a96600182611d74565b9050610a43565b50610aa983600061073e565b15610abc57610ab9600183611d74565b91505b50919050565b61055261045e610e47565b6000807f000000000000000000000000000000000000000000000000000000000000000090506000610b358686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f2292505050565b90506000610b438383610f55565b90506001600160a01b0381163b15610b5f579250610629915050565b610b69838361110e565b9050336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610bc257610ba6600082610e32565b610bc25760405162461bcd60e51b815260040161039190611d14565b610bce818888886111a5565b866001600160a01b0316816001600160a01b03167fac631f3001b55ea1509cf3d7e74898f85392a61a76e8149181ae1259622dabc860405160405180910390a39695505050505050565b60608183108015610c325750610c2e6000610f18565b8211155b610c8a5760405162461bcd60e51b815260206004820152602360248201527f426173654163636f756e74466163746f72793a20696e76616c696420696e646960448201526263657360e81b6064820152608401610391565b6000610c968484611e0b565b9050610ca28484611e0b565b6001600160401b03811115610cb957610cb9611adc565b604051908082528060200260200182016040528015610ce2578160200160208202803683370190505b50915060005b81811015610d4157610d05610cfd8683611d74565b60009061120d565b838281518110610d1757610d17611d87565b6001600160a01b0390921660209283029190910190910152610d3a600182611d74565b9050610ce8565b505092915050565b6060610d53611219565b8054610d5e90611e1e565b80601f0160208091040260200160405190810160405280929190818152602001828054610d8a90611e1e565b8015610dd75780601f10610dac57610100808354040283529160200191610dd7565b820191906000526020600020905b815481529060010190602001808311610dba57829003601f168201915b5050505050905090565b606060006106298361123d565b600080610e1b7f000000000000000000000000000000000000000000000000000000000000000084610f55565b6001600160a01b0385811691161491505092915050565b6000610629836001600160a01b038416611299565b7f0a7b0f5c59907924802379ebe98cdc23e2ee7820f63d30126e10b3752010e50090565b610e73610e47565b6000838152602091825260408082206001600160a01b0385168352909252205460ff166104f957610eae816001600160a01b031660146112e8565b610eb98360206112e8565b604051602001610eca929190611e52565b60408051601f198184030181529082905262461bcd60e51b825261039191600401611cca565b610efa8282611483565b6104f982826114ec565b610f0e82826115ab565b6104f98282611614565b600061042f825490565b60008282604051602001610f37929190611ebf565b60405160208183030381529060405280519060200120905092915050565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff602482015260148101839052733d602d80600a3d3981f3363d3d373d3d3d363d738152605881018290526037600c82012060788201526055604390910120600090610629565b60006103656116a3565b6000610629836001600160a01b038416611705565b6000610365813361073e565b6000610fea611219565b8054610ff590611e1e565b80601f016020809104026020016040519081016040528092919081815260200182805461102190611e1e565b801561106e5780601f106110435761010080835404028352916020019161106e565b820191906000526020600020905b81548152906001019060200180831161105157829003601f168201915b505050505090508161107e611219565b906110899082611f34565b507fc9c7c3fe08b88b4df9d4d47ef47d2c43d55c025a0ba88ca442580ed9e7348a1681836040516110bb929190611ff3565b60405180910390a15050565b606061062983836040518060600160405280602781526020016120b9602791396117f8565b6001600160a01b03811660009081526001830160205260408120541515610629565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b03811661042f5760405162461bcd60e51b8152602060048201526017602482015276115490cc4c4d8dce8818dc99585d194c8819985a5b1959604a1b6044820152606401610391565b60405163347d5e2560e21b81526001600160a01b0385169063d1f57894906111d590869086908690600401612018565b600060405180830381600087803b1580156111ef57600080fd5b505af1158015611203573d6000803e3d6000fd5b5050505050505050565b60006106298383611870565b7f4bc804ba64359c0e35e5ed5d90ee596ecaa49a3a930ddcb1470ea0dd625da90090565b60608160000180548060200260200160405190810160405280929190818152602001828054801561128d57602002820191906000526020600020905b815481526020019060010190808311611279575b50505050509050919050565b60008181526001830160205260408120546112e05750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561042f565b50600061042f565b606060006112f7836002612058565b611302906002611d74565b6001600160401b0381111561131957611319611adc565b6040519080825280601f01601f191660200182016040528015611343576020820181803683370190505b509050600360fc1b8160008151811061135e5761135e611d87565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061138d5761138d611d87565b60200101906001600160f81b031916908160001a90535060006113b1846002612058565b6113bc906001611d74565b90505b6001811115611434576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106113f0576113f0611d87565b1a60f81b82828151811061140657611406611d87565b60200101906001600160f81b031916908160001a90535060049490941c9361142d8161206f565b90506113bf565b5083156106295760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610391565b600161148d610e47565b6000848152602091825260408082206001600160a01b0386168084529352808220805460ff1916941515949094179093559151339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60006114f6610fb5565b6000848152602091909152604090205490506001611512610fb5565b6000858152602091909152604081208054909190611531908490611d74565b90915550829050611540610fb5565b6000858152602091825260408082208583526001019092522080546001600160a01b0319166001600160a01b039290921691909117905580611580610fb5565b6000948552602090815260408086206001600160a01b03909516865260029094019052919092205550565b6115b58282610e6b565b6115bd610e47565b6000838152602091825260408082206001600160a01b0385168084529352808220805460ff191690555133929185917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061161e610fb5565b6000848152602091825260408082206001600160a01b03861683526002019092522054905061164b610fb5565b6000848152602091825260408082208483526001019092522080546001600160a01b031916905561167a610fb5565b6000938452602090815260408085206001600160a01b0390941685526002909301905250812055565b60008060ff196116d460017f0c4ba382c0009cf238e4c1ca1a52f51c61e6248a70bdfb34e5ed49d5578a5c0c611e0b565b6040516020016116e691815260200190565b60408051601f1981840301815291905280516020909101201692915050565b600081815260018301602052604081205480156117ee576000611729600183611e0b565b855490915060009061173d90600190611e0b565b90508181146117a257600086600001828154811061175d5761175d611d87565b906000526020600020015490508087600001848154811061178057611780611d87565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806117b3576117b3612086565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061042f565b600091505061042f565b6060600080856001600160a01b031685604051611815919061209c565b600060405180830381855af49150503d8060008114611850576040519150601f19603f3d011682016040523d82523d6000602084013e611855565b606091505b50915091506118668683838761189a565b9695505050505050565b600082600001828154811061188757611887611d87565b9060005260206000200154905092915050565b60608315611909578251600003611902576001600160a01b0385163b6119025760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610391565b5081611913565b611913838361191b565b949350505050565b81511561192b5781518083602001fd5b8060405162461bcd60e51b81526004016103919190611cca565b6020808252825182820181905260009190848201906040850190845b818110156119865783516001600160a01b031683529284019291840191600101611961565b50909695505050505050565b80356001600160a01b03811681146119a957600080fd5b919050565b600080604083850312156119c157600080fd5b6119ca83611992565b946020939093013593505050565b6000602082840312156119ea57600080fd5b61062982611992565b600060208284031215611a0557600080fd5b5035919050565b60008060408385031215611a1f57600080fd5b82359150611a2f60208401611992565b90509250929050565b600080600060408486031215611a4d57600080fd5b611a5684611992565b925060208401356001600160401b0380821115611a7257600080fd5b818601915086601f830112611a8657600080fd5b813581811115611a9557600080fd5b876020828501011115611aa757600080fd5b6020830194508093505050509250925092565b60008060408385031215611acd57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600060208284031215611b0457600080fd5b81356001600160401b0380821115611b1b57600080fd5b818401915084601f830112611b2f57600080fd5b813581811115611b4157611b41611adc565b604051601f8201601f19908116603f01168101908382118183101715611b6957611b69611adc565b81604052828152876020848701011115611b8257600080fd5b826020860160208301376000928101602001929092525095945050505050565b60008060208385031215611bb557600080fd5b82356001600160401b0380821115611bcc57600080fd5b818501915085601f830112611be057600080fd5b813581811115611bef57600080fd5b8660208260051b8501011115611c0457600080fd5b60209290920196919550909350505050565b60005b83811015611c31578181015183820152602001611c19565b50506000910152565b60008151808452611c52816020860160208601611c16565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015611cbd57603f19888603018452611cab858351611c3a565b94509285019290850190600101611c8f565b5092979650505050505050565b6020815260006106296020830184611c3a565b6020808252601f908201527f4163636f756e74466163746f72793a206e6f7420616e206163636f756e742e00604082015260600190565b6020808252602a908201527f4163636f756e74466163746f72793a206163636f756e7420616c7265616479206040820152691c9959da5cdd195c995960b21b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561042f5761042f611d5e565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112611db457600080fd5b8301803591506001600160401b03821115611dce57600080fd5b602001915036819003821315611de357600080fd5b9250929050565b8284823760609190911b6001600160601b0319169101908152601401919050565b8181038181111561042f5761042f611d5e565b600181811c90821680611e3257607f821691505b602082108103610abc57634e487b7160e01b600052602260045260246000fd5b7402832b936b4b9b9b4b7b7399d1030b1b1b7bab73a1605d1b815260008351611e82816015850160208801611c16565b7001034b99036b4b9b9b4b733903937b6329607d1b6015918401918201528351611eb3816026840160208801611c16565b01602601949350505050565b6001600160a01b038316815260406020820181905260009061191390830184611c3a565b601f821115611f2f576000816000526020600020601f850160051c81016020861015611f0c5750805b601f850160051c820191505b81811015611f2b57828155600101611f18565b5050505b505050565b81516001600160401b03811115611f4d57611f4d611adc565b611f6181611f5b8454611e1e565b84611ee3565b602080601f831160018114611f965760008415611f7e5750858301515b600019600386901b1c1916600185901b178555611f2b565b600085815260208120601f198616915b82811015611fc557888601518255948401946001909101908401611fa6565b5085821015611fe35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6040815260006120066040830185611c3a565b82810360208401526106258185611c3a565b6001600160a01b03841681526040602082018190528101829052818360608301376000818301606090810191909152601f909201601f1916010192915050565b808202811582820484141761042f5761042f611d5e565b60008161207e5761207e611d5e565b506000190190565b634e487b7160e01b600052603160045260246000fd5b600082516120ae818460208701611c16565b919091019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212208fee46949383576f28224ce9e6b6a4b07519741c4de38b0c75218e600dce91e564736f6c634300081700336101806040523480156200001257600080fd5b50604051620041f5380380620041f5833981016040819052620000359162000250565b60408051808201825260078152661058d8dbdd5b9d60ca1b60208083019182528351808501855260018152603160f81b908201529151902060e08190527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66101008190524660a081815285517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818701819052818801959095526060810193909352608080840192909252308382018190528651808503909201825260c093840190965280519401939093209092529190526101205281816200011762000134565b6001600160a01b03908116610140521661016052506200028f9050565b7f322cf19c484104d3b1a9c2982ebae869ede3fa5f6c4703ca41b9a48c76ee03005460ff808216916101009004168015620001c55760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60ff828116101562000233577f322cf19c484104d3b1a9c2982ebae869ede3fa5f6c4703ca41b9a48c76ee0300805460ff191660ff90811790915560408051918252517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989181900360200190a15b5050565b6001600160a01b03811681146200024d57600080fd5b50565b600080604083850312156200026457600080fd5b8251620002718162000237565b6020840151909250620002848162000237565b809150509250929050565b60805160a05160c05160e05161010051610120516101405161016051613ed66200031f60003960006115de01526000818161044b015281816120c20152818161225c0152818161228a015281816122e30152818161235e015261238e01526000611e1b01526000611e6a01526000611e4501526000611d9e01526000611dc801526000611df20152613ed66000f3fe60806040526004361061014b5760003560e01c806301ffc9a714610157578063150b7a021461018c5780631626ba7e146101c55780631dd756c5146101e557806324d7806c14610205578063399b77da146102255780633a871cdd1461025357806347e1da2a146102735780634a58db19146102955780634d44560d1461029d5780635892e236146102bd5780637dff5a79146102dd5780638b52d723146102fd578063938e3d7b1461031f578063a9082d841461033f578063ac9650d81461037e578063b0d691fe146103ab578063b61d27f6146103cd578063b76464d5146103ed578063bc197c811461040d578063c45a015514610439578063d087d2881461046d578063d1f5789414610482578063d42f2f35146104a2578063e8a3d485146104b7578063e9523c97146104d9578063f15d424e146104fb578063f23a6e611461052857600080fd5b3661015257005b600080fd5b34801561016357600080fd5b50610177610172366004612d97565b610554565b60405190151581526020015b60405180910390f35b34801561019857600080fd5b506101ac6101a7366004612ea3565b61059a565b6040516001600160e01b03199091168152602001610183565b3480156101d157600080fd5b506101ac6101e0366004612f0e565b6105ab565b3480156101f157600080fd5b50610177610200366004612f6d565b6106ca565b34801561021157600080fd5b50610177610220366004612fb2565b61098e565b34801561023157600080fd5b50610245610240366004612fcf565b6109bd565b604051908152602001610183565b34801561025f57600080fd5b5061024561026e366004612fe8565b610a88565b34801561027f57600080fd5b5061029361028e366004613079565b610aae565b005b610293610c15565b3480156102a957600080fd5b506102936102b8366004613112565b610c7d565b3480156102c957600080fd5b506102936102d836600461317f565b610cf0565b3480156102e957600080fd5b506101776102f8366004612fb2565b6110ad565b34801561030957600080fd5b50610312611166565b6040516101839190613292565b34801561032b57600080fd5b5061029361033a3660046132f6565b6113ad565b34801561034b57600080fd5b5061035f61035a36600461317f565b6113fe565b6040805192151583526001600160a01b03909116602083015201610183565b34801561038a57600080fd5b5061039e61039936600461333e565b611455565b60405161018391906133cf565b3480156103b757600080fd5b506103c06115ba565b6040516101839190613426565b3480156103d957600080fd5b506102936103e836600461343a565b611603565b3480156103f957600080fd5b50610293610408366004612fb2565b611693565b34801561041957600080fd5b506101ac610428366004613527565b63bc197c8160e01b95945050505050565b34801561044557600080fd5b506103c07f000000000000000000000000000000000000000000000000000000000000000081565b34801561047957600080fd5b506102456116c5565b34801561048e57600080fd5b5061029361049d3660046135d4565b611745565b3480156104ae57600080fd5b506103126118fd565b3480156104c357600080fd5b506104cc611a6e565b604051610183919061361b565b3480156104e557600080fd5b506104ee611b06565b604051610183919061362e565b34801561050757600080fd5b5061051b610516366004612fb2565b611b18565b604051610183919061367b565b34801561053457600080fd5b506101ac61054336600461368e565b63f23a6e6160e01b95945050505050565b60006001600160e01b03198216630271189760e51b148061058557506001600160e01b03198216630a85bd0160e11b145b80610594575061059482611bf0565b92915050565b630a85bd0160e11b5b949350505050565b6000806105b7846109bd565b905060006105c58285611c25565b90506105d08161098e565b156105e75750630b135d3f60e11b91506105949050565b3360006105f2611c49565b6001600160a01b038416600090815260069190910160205260409020905061061a8183611c6d565b8061064a575061062981611c8f565b600114801561064a5750600061063f8282611c99565b6001600160a01b0316145b6106a75760405162461bcd60e51b8152602060048201526024808201527f4163636f756e743a2063616c6c6572206e6f7420617070726f7665642074617260448201526333b2ba1760e11b60648201526084015b60405180910390fd5b6106b0836110ad565b156106c057630b135d3f60e11b94505b5050505092915050565b60006106d4611c49565b6001600160a01b0384166000908152600491909101602052604090205460ff161561070157506001610594565b600061070b611c49565b6001600160a01b0385166000908152600591909101602090815260408083208151606081018352815481526001909101546001600160801b0380821694830194909452600160801b9004909216908201529150610766611c49565b6006016000866001600160a01b03166001600160a01b0316815260200190815260200160002090504282602001516001600160801b031611806107b6575081604001516001600160801b03164210155b806107c757506107c581611c8f565b155b156107d757600092505050610594565b60006107ee6107e960608701876136f6565b611ca5565b905060006107fb83611c8f565b600114801561081c575060006108118482611c99565b6001600160a01b0316145b90506324f16c0560e11b6001600160e01b03198316016108935760008061084e61084960608a018a6136f6565b611cdf565b9150915082610874576108618583611c6d565b6108745760009650505050505050610594565b855181111561088c5760009650505050505050610594565b5050610981565b635c0f12eb60e11b6001600160e01b0319831601610974576000806108c36108be60608a018a6136f6565b611d44565b5091509150826109235760005b8251811015610921576109058382815181106108ee576108ee61373c565b602002602001015187611c6d90919063ffffffff16565b610919576000975050505050505050610594565b6001016108d0565b505b60005b825181101561096c578181815181106109415761094161373c565b602002602001015187600001511015610964576000975050505050505050610594565b600101610926565b505050610981565b6000945050505050610594565b5060019695505050505050565b6000610998611c49565b6001600160a01b03909216600090815260049290920160205250604090205460ff1690565b600080826040516020016109d391815260200190565b60405160208183030381529060405280519060200120905060007f82cac545155fcbf147f2a9013809613677ac7d65498556e6d19ce43bcbf6c28482604051602001610a29929190918252602082015260400190565b604051602081830303815290604052805190602001209050610a49611d91565b60405161190160f01b60208201526022810191909152604281018290526062016040516020818303038152906040528051906020012092505050919050565b6000610a92611eb8565b610a9c8484611f21565b9050610aa782612066565b9392505050565b610ab66115ba565b6001600160a01b0316336001600160a01b03161480610ad95750610ad93361098e565b610af55760405162461bcd60e51b815260040161069e90613752565b610afd6120b3565b8481148015610b0b57508483145b610b575760405162461bcd60e51b815260206004820152601d60248201527f4163636f756e743a2077726f6e67206172726179206c656e677468732e000000604482015260640161069e565b60005b85811015610c0c57610c03878783818110610b7757610b7761373c565b9050602002016020810190610b8c9190612fb2565b868684818110610b9e57610b9e61373c565b90506020020135858585818110610bb757610bb761373c565b9050602002810190610bc991906136f6565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061219992505050565b50600101610b5a565b50505050505050565b610c1d6115ba565b6001600160a01b031663b760faf934306040518363ffffffff1660e01b8152600401610c499190613426565b6000604051808303818588803b158015610c6257600080fd5b505af1158015610c76573d6000803e3d6000fd5b5050505050565b610c8561220a565b610c8d6115ba565b6001600160a01b031663205c287883836040518363ffffffff1660e01b8152600401610cba929190613793565b600060405180830381600087803b158015610cd457600080fd5b505af1158015610ce8573d6000803e3d6000fd5b505050505050565b6000610cff6020850185612fb2565b905042610d1260e0860160c087016137c3565b6001600160801b031611158015610d415750610d35610100850160e086016137c3565b6001600160801b031642105b610d775760405162461bcd60e51b8152602060048201526007602482015266085c195c9a5bd960ca1b604482015260640161069e565b600080610d858686866113fe565b9150915081610dbf5760405162461bcd60e51b815260040161069e906020808252600490820152632173696760e01b604082015260600190565b6001610dc9611c49565b610100880135600090815260079190910160209081526040808320805460ff1916941515949094179093559091610e05919089019089016137ef565b60ff161115610e32576000610e2060408801602089016137ef565b60ff166001149050610c0c8482612248565b610e3b8361098e565b15610e705760405162461bcd60e51b815260206004820152600560248201526430b236b4b760d91b604482015260640161069e565b610e8583610e7c611c49565b6002019061231d565b50604051806060016040528087606001358152602001876080016020810190610eae91906137c3565b6001600160801b03168152602001610ecc60c0890160a08a016137c3565b6001600160801b03169052610edf611c49565b6001600160a01b03851660009081526005919091016020908152604080832084518155918401519301516001600160801b03908116600160801b02931692909217600190920191909155610f55610f34611c49565b6001600160a01b038616600090815260069190910160205260409020612332565b805190915060005b81811015610fbf57610fac838281518110610f7a57610f7a61373c565b6020026020010151610f8a611c49565b6001600160a01b0389166000908152600691909101602052604090209061233f565b50610fb8600182613820565b9050610f5d565b50610fcd6040890189613833565b9050905060005b8181101561104e5761103b610fec60408b018b613833565b83818110610ffc57610ffc61373c565b90506020020160208101906110119190612fb2565b611019611c49565b6001600160a01b0389166000908152600691909101602052604090209061231d565b50611047600182613820565b9050610fd4565b5061105888612354565b846001600160a01b0316836001600160a01b03167ff21d10c26e35863a8df291aca54181ee8c4a3bc8e00246c3f7a5a14b69d826a78a60405161109b919061390d565b60405180910390a35050505050505050565b6000806110b8611c49565b6001600160a01b038416600090815260059190910160209081526040918290208251606081018452815481526001909101546001600160801b03808216938301849052600160801b90910416928101929092529091504210801590611129575080604001516001600160801b031642105b8015610aa75750600061115e61113d611c49565b6001600160a01b038616600090815260069190910160205260409020611c8f565b119392505050565b6060600061117d611175611c49565b600201612332565b80519091506000805b8281101561120e576111b08482815181106111a3576111a361373c565b60200260200101516110ad565b156111c757816111bf816139f8565b9250506111fc565b60008482815181106111db576111db61373c565b60200260200101906001600160a01b031690816001600160a01b0316815250505b611207600182613820565b9050611186565b50806001600160401b0381111561122757611227612de6565b60405190808252806020026020018201604052801561126057816020015b61124d612d4d565b8152602001906001900390816112455790505b5093506000805b838110156113a55760006001600160a01b031685828151811061128c5761128c61373c565b60200260200101516001600160a01b0316146113935760008582815181106112b6576112b661373c565b6020026020010151905060006112ca611c49565b6001600160a01b038316600081815260059290920160209081526040928390208351606081018552815481526001909101546001600160801b0380821683850152600160801b9091041681850152835160a081019094529183529092508101611334610f34611c49565b81526020018260000151815260200182602001516001600160801b0316815260200182604001516001600160801b0316815250888580611373906139f8565b9650815181106113855761138561373c565b602002602001018190525050505b61139e600182613820565b9050611267565b505050505090565b6113b56123e9565b6113f25760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b604482015260640161069e565b6113fb81612401565b50565b60008061141461140d866124e8565b858561262c565b905061141e611c49565b6101008601356000908152600791909101602052604090205460ff1615801561144b575061144b8161098e565b9150935093915050565b6060816001600160401b0381111561146f5761146f612de6565b6040519080825280602002602001820160405280156114a257816020015b606081526020019060019003908161148d5790505b509050336000805b848110156115b157811561152957611507308787848181106114ce576114ce61373c565b90506020028101906114e091906136f6565b866040516020016114f393929190613a11565b60405160208183030381529060405261267e565b8482815181106115195761151961373c565b60200260200101819052506115a9565b61158b3087878481811061153f5761153f61373c565b905060200281019061155191906136f6565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061267e92505050565b84828151811061159d5761159d61373c565b60200260200101819052505b6001016114aa565b50505092915050565b6000806115c56126a3565b546001600160a01b0316905080156115dc57919050565b7f000000000000000000000000000000000000000000000000000000000000000091505090565b61160b6115ba565b6001600160a01b0316336001600160a01b0316148061162e575061162e3361098e565b61164a5760405162461bcd60e51b815260040161069e90613752565b6116526120b3565b610c76848484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061219992505050565b61169b61220a565b806116a46126a3565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60006116cf6115ba565b604051631aab3f0d60e11b8152306004820152600060248201526001600160a01b0391909116906335567e1a90604401602060405180830381865afa15801561171c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117409190613a32565b905090565b600061174f6126c7565b5460ff169050600061175f6126c7565b54610100900460ff169050801580801561177c575060018360ff16105b8061179b575061178b306126eb565b15801561179b57508260ff166001145b6117fe5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161069e565b60016118086126c7565b805460ff191660ff92909216919091179055801561184157600161182a6126c7565b80549115156101000261ff00199092169190911790555b6118818686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506126fa92505050565b6118896126a3565b6001018190555061189b866001612248565b8015610ce85760006118ab6126c7565b80549115156101000261ff0019909216919091179055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050505050565b6060600061190c611175611c49565b8051909150806001600160401b0381111561192957611929612de6565b60405190808252806020026020018201604052801561196257816020015b61194f612d4d565b8152602001906001900390816119475790505b50925060005b81811015611a685760008382815181106119845761198461373c565b602002602001015190506000611998611c49565b6001600160a01b038316600081815260059290920160209081526040928390208351606081018552815481526001909101546001600160801b0380821683850152600160801b9091041681850152835160a081019094529183529092508101611a02610f34611c49565b81526020018260000151815260200182602001516001600160801b0316815260200182604001516001600160801b0316815250868481518110611a4757611a4761373c565b60200260200101819052505050600181611a619190613820565b9050611968565b50505090565b6060611a7861272d565b8054611a8390613a4b565b80601f0160208091040260200160405190810160405280929190818152602001828054611aaf90613a4b565b8015611afc5780601f10611ad157610100808354040283529160200191611afc565b820191906000526020600020905b815481529060010190602001808311611adf57829003601f168201915b5050505050905090565b6060611740611b13611c49565b612332565b611b20612d4d565b6000611b2a611c49565b6001600160a01b038416600081815260059290920160209081526040928390208351606081018552815481526001909101546001600160801b0380821683850152600160801b9091041681850152835160a081019094529183529092508101611bb5611b94611c49565b6001600160a01b038716600090815260069190910160205260409020612332565b81526020018260000151815260200182602001516001600160801b0316815260200182604001516001600160801b0316815250915050919050565b60006001600160e01b03198216630271189760e51b148061059457506301ffc9a760e01b6001600160e01b0319831614610594565b6000806000611c348585612751565b91509150611c4181612796565b509392505050565b7f3181e78fc1b109bc611fd2406150bf06e33faa75f71cba12c3e1fd670f2def0090565b6001600160a01b03811660009081526001830160205260408120541515610aa7565b6000610594825490565b6000610aa783836128db565b60006004821015611cc85760405162461bcd60e51b815260040161069e90613a7f565b611cd6600460008486613a9e565b610aa791613ac8565b6000806044831015611d035760405162461bcd60e51b815260040161069e90613a7f565b611d11602460048587613a9e565b810190611d1e9190612fb2565b9150611d2e604460248587613a9e565b810190611d3b9190612fcf565b90509250929050565b606080806064841015611d695760405162461bcd60e51b815260040161069e90613a7f565b611d768460048188613a9e565b810190611d839190613b77565b919790965090945092505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015611dea57507f000000000000000000000000000000000000000000000000000000000000000046145b15611e1457507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b611ec06115ba565b6001600160a01b0316336001600160a01b031614611f1f5760405162461bcd60e51b815260206004820152601c60248201527b1858d8dbdd5b9d0e881b9bdd08199c9bdb48115b9d1c9e541bda5b9d60221b604482015260640161069e565b565b7b0ca2ba3432b932bab69029b4b3b732b21026b2b9b9b0b3b29d05199960211b6000908152601c829052603c81206000611f9f611f626101408701876136f6565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508693925050611c259050565b9050611fab81866106ca565b611fba57600192505050610594565b6000611fc4611c49565b6001600160a01b03929092166000908152600590920160209081526040808420815160608082018452825482526001909201546001600160801b0380821683870152600160801b8204908116928501929092528351928301845295825265ffffffffffff8087169483019490945292831691015260d09290921b6001600160d01b03191660a09290921b65ffffffffffff60a01b169190911795945050505050565b80156113fb57604051600090339060001990849084818181858888f193505050503d8060008114610c76576040519150601f19603f3d011682016040523d82523d6000602084013e610c76565b60405163c3c5a54760e01b81527f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b0382169063c3c5a54790612101903090600401613426565b602060405180830381865afa15801561211e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121429190613c5c565b6113fb57806001600160a01b03166383a03f8c61215d6126a3565b600101546040518263ffffffff1660e01b815260040161217f91815260200190565b600060405180830381600087803b158015610c6257600080fd5b60606000846001600160a01b031684846040516121b69190613c7e565b60006040518083038185875af1925050503d80600081146121f3576040519150601f19603f3d011682016040523d82523d6000602084013e6121f8565b606091505b509250905080611c4157815160208301fd5b6122133361098e565b611f1f5760405162461bcd60e51b815260206004820152600660248201526510b0b236b4b760d11b604482015260640161069e565b6122528282612905565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163b156123195780156122e1577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630b61e12b836122c06126a3565b600101546040518363ffffffff1660e01b8152600401610cba929190613793565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639387a380836122c06126a3565b5050565b6000610aa7836001600160a01b0384166129b4565b60606000610aa783612a03565b6000610aa7836001600160a01b038416612a5f565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163b156113fb576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016630b61e12b6123c06020840184612fb2565b6123c86126a3565b600101546040518363ffffffff1660e01b815260040161217f929190613793565b60006123f43361098e565b8061174057505030331490565b600061240b61272d565b805461241690613a4b565b80601f016020809104026020016040519081016040528092919081815260200182805461244290613a4b565b801561248f5780601f106124645761010080835404028352916020019161248f565b820191906000526020600020905b81548152906001019060200180831161247257829003601f168201915b505050505090508161249f61272d565b906124aa9082613ce7565b507fc9c7c3fe08b88b4df9d4d47ef47d2c43d55c025a0ba88ca442580ed9e7348a1681836040516124dc929190613da6565b60405180910390a15050565b60607f3fd4a1a1a267c84185e3b7eecd57c68783c0581d538b9d6e5f23e4670497c1e96125186020840184612fb2565b61252860408501602086016137ef565b6125356040860186613833565b604051602001612546929190613dd4565b60408051601f198184030181529190528051602090910120606086013561257360a08801608089016137c3565b61258360c0890160a08a016137c3565b61259360e08a0160c08b016137c3565b6125a46101008b0160e08c016137c3565b60408051602081019a909a526001600160a01b039098169789019790975260ff9095166060880152608087019390935260a08601919091526001600160801b0390811660c086015290811660e0850152908116610100848101919091529116610120830152830135610140820152610160016040516020818303038152906040529050919050565b60006105a383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250508751602089012061267892509050612b52565b90611c25565b6060610aa78383604051806060016040528060278152602001613e7a60279139612b7f565b7f036f52c1827dab135f7fd44ca0bddde297e2f659c710e0ec53e975f22b54830090565b7f322cf19c484104d3b1a9c2982ebae869ede3fa5f6c4703ca41b9a48c76ee030090565b6001600160a01b03163b151590565b6000828260405160200161270f929190613e16565b60405160208183030381529060405280519060200120905092915050565b7f4bc804ba64359c0e35e5ed5d90ee596ecaa49a3a930ddcb1470ea0dd625da90090565b60008082516041036127875760208301516040840151606085015160001a61277b87828585612bf7565b9450945050505061278f565b506000905060025b9250929050565b60008160048111156127aa576127aa613e3a565b036127b25750565b60018160048111156127c6576127c6613e3a565b0361280e5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b604482015260640161069e565b600281600481111561282257612822613e3a565b0361286f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161069e565b600381600481111561288357612883613e3a565b036113fb5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161069e565b60008260000182815481106128f2576128f261373c565b9060005260206000200154905092915050565b8061290e611c49565b6001600160a01b038416600090815260049190910160205260409020805460ff19169115159190911790558015612957576129518261294b611c49565b9061231d565b5061296b565b61296982612963611c49565b9061233f565b505b816001600160a01b03167f235bc17e7930760029e9f4d860a2a8089976de5b381cf8380fc11c1d88a11133826040516129a8911515815260200190565b60405180910390a25050565b60008181526001830160205260408120546129fb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610594565b506000610594565b606081600001805480602002602001604051908101604052809291908181526020018280548015612a5357602002820191906000526020600020905b815481526020019060010190808311612a3f575b50505050509050919050565b60008181526001830160205260408120548015612b48576000612a83600183613e50565b8554909150600090612a9790600190613e50565b9050818114612afc576000866000018281548110612ab757612ab761373c565b9060005260206000200154905080876000018481548110612ada57612ada61373c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612b0d57612b0d613e63565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610594565b6000915050610594565b6000610594612b5f611d91565b8360405161190160f01b8152600281019290925260228201526042902090565b6060600080856001600160a01b031685604051612b9c9190613c7e565b600060405180830381855af49150503d8060008114612bd7576040519150601f19603f3d011682016040523d82523d6000602084013e612bdc565b606091505b5091509150612bed86838387612cb1565b9695505050505050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03831115612c245750600090506003612ca8565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612c78573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612ca157600060019250925050612ca8565b9150600090505b94509492505050565b60608315612d1e578251600003612d1757612ccb856126eb565b612d175760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161069e565b50816105a3565b6105a38383815115612d335781518083602001fd5b8060405162461bcd60e51b815260040161069e919061361b565b6040518060a0016040528060006001600160a01b03168152602001606081526020016000815260200160006001600160801b0316815260200160006001600160801b031681525090565b600060208284031215612da957600080fd5b81356001600160e01b031981168114610aa757600080fd5b6001600160a01b03811681146113fb57600080fd5b8035612de181612dc1565b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612e2457612e24612de6565b604052919050565b60006001600160401b03831115612e4557612e45612de6565b612e58601f8401601f1916602001612dfc565b9050828152838383011115612e6c57600080fd5b828260208301376000602084830101529392505050565b600082601f830112612e9457600080fd5b610aa783833560208501612e2c565b60008060008060808587031215612eb957600080fd5b8435612ec481612dc1565b93506020850135612ed481612dc1565b92506040850135915060608501356001600160401b03811115612ef657600080fd5b612f0287828801612e83565b91505092959194509250565b60008060408385031215612f2157600080fd5b8235915060208301356001600160401b03811115612f3e57600080fd5b612f4a85828601612e83565b9150509250929050565b60006101608284031215612f6757600080fd5b50919050565b60008060408385031215612f8057600080fd5b8235612f8b81612dc1565b915060208301356001600160401b03811115612fa657600080fd5b612f4a85828601612f54565b600060208284031215612fc457600080fd5b8135610aa781612dc1565b600060208284031215612fe157600080fd5b5035919050565b600080600060608486031215612ffd57600080fd5b83356001600160401b0381111561301357600080fd5b61301f86828701612f54565b9660208601359650604090950135949350505050565b60008083601f84011261304757600080fd5b5081356001600160401b0381111561305e57600080fd5b6020830191508360208260051b850101111561278f57600080fd5b6000806000806000806060878903121561309257600080fd5b86356001600160401b03808211156130a957600080fd5b6130b58a838b01613035565b909850965060208901359150808211156130ce57600080fd5b6130da8a838b01613035565b909650945060408901359150808211156130f357600080fd5b5061310089828a01613035565b979a9699509497509295939492505050565b6000806040838503121561312557600080fd5b823561313081612dc1565b946020939093013593505050565b60008083601f84011261315057600080fd5b5081356001600160401b0381111561316757600080fd5b60208301915083602082850101111561278f57600080fd5b60008060006040848603121561319457600080fd5b83356001600160401b03808211156131ab57600080fd5b9085019061012082880312156131c057600080fd5b909350602085013590808211156131d657600080fd5b506131e38682870161313e565b9497909650939450505050565b6001600160801b03169052565b80516001600160a01b03908116835260208083015160a082860181905281519086018190526000939183019290849060c08801905b8083101561325457855185168252948301946001929092019190830190613232565b50604087015160408901526060870151945061327360608901866131f0565b6080870151945061328760808901866131f0565b979650505050505050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b828110156132e957603f198886030184526132d78583516131fd565b945092850192908501906001016132bb565b5092979650505050505050565b60006020828403121561330857600080fd5b81356001600160401b0381111561331e57600080fd5b8201601f8101841361332f57600080fd5b6105a384823560208401612e2c565b6000806020838503121561335157600080fd5b82356001600160401b0381111561336757600080fd5b61337385828601613035565b90969095509350505050565b60005b8381101561339a578181015183820152602001613382565b50506000910152565b600081518084526133bb81602086016020860161337f565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b828110156132e957603f198886030184526134148583516133a3565b945092850192908501906001016133f8565b6001600160a01b0391909116815260200190565b6000806000806060858703121561345057600080fd5b843561345b81612dc1565b93506020850135925060408501356001600160401b0381111561347d57600080fd5b6134898782880161313e565b95989497509550505050565b60006001600160401b038211156134ae576134ae612de6565b5060051b60200190565b600082601f8301126134c957600080fd5b813560206134de6134d983613495565b612dfc565b8083825260208201915060208460051b87010193508684111561350057600080fd5b602086015b8481101561351c5780358352918301918301613505565b509695505050505050565b600080600080600060a0868803121561353f57600080fd5b853561354a81612dc1565b9450602086013561355a81612dc1565b935060408601356001600160401b038082111561357657600080fd5b61358289838a016134b8565b9450606088013591508082111561359857600080fd5b6135a489838a016134b8565b935060808801359150808211156135ba57600080fd5b506135c788828901612e83565b9150509295509295909350565b6000806000604084860312156135e957600080fd5b83356135f481612dc1565b925060208401356001600160401b0381111561360f57600080fd5b6131e38682870161313e565b602081526000610aa760208301846133a3565b6020808252825182820181905260009190848201906040850190845b8181101561366f5783516001600160a01b03168352928401929184019160010161364a565b50909695505050505050565b602081526000610aa760208301846131fd565b600080600080600060a086880312156136a657600080fd5b85356136b181612dc1565b945060208601356136c181612dc1565b9350604086013592506060860135915060808601356001600160401b038111156136ea57600080fd5b6135c788828901612e83565b6000808335601e1984360301811261370d57600080fd5b8301803591506001600160401b0382111561372757600080fd5b60200191503681900382131561278f57600080fd5b634e487b7160e01b600052603260045260246000fd5b60208082526021908201527f4163636f756e743a206e6f742061646d696e206f7220456e747279506f696e746040820152601760f91b606082015260800190565b6001600160a01b03929092168252602082015260400190565b80356001600160801b0381168114612de157600080fd5b6000602082840312156137d557600080fd5b610aa7826137ac565b803560ff81168114612de157600080fd5b60006020828403121561380157600080fd5b610aa7826137de565b634e487b7160e01b600052601160045260246000fd5b808201808211156105945761059461380a565b6000808335601e1984360301811261384a57600080fd5b8301803591506001600160401b0382111561386457600080fd5b6020019150600581901b360382131561278f57600080fd5b6000808335601e1984360301811261389357600080fd5b83016020810192503590506001600160401b038111156138b257600080fd5b8060051b360382131561278f57600080fd5b8183526000602080850194508260005b858110156139025781356138e781612dc1565b6001600160a01b0316875295820195908201906001016138d4565b509495945050505050565b6020815261392e6020820161392184612dd6565b6001600160a01b03169052565b600061393c602084016137de565b60ff8116604084015250613953604084018461387c565b61012080606086015261396b610140860183856138c4565b925060608601356080860152613983608087016137ac565b915061399260a08601836131f0565b61399e60a087016137ac565b91506139ad60c08601836131f0565b6139b960c087016137ac565b91506139c860e08601836131f0565b6139d460e087016137ac565b91506101006139e5818701846131f0565b9590950135939094019290925250919050565b600060018201613a0a57613a0a61380a565b5060010190565b8284823760609190911b6001600160601b0319169101908152601401919050565b600060208284031215613a4457600080fd5b5051919050565b600181811c90821680613a5f57607f821691505b602082108103612f6757634e487b7160e01b600052602260045260246000fd5b602080825260059082015264214461746160d81b604082015260600190565b60008085851115613aae57600080fd5b83861115613abb57600080fd5b5050820193919092039150565b6001600160e01b03198135818116916004851015613af05780818660040360031b1b83161692505b505092915050565b600082601f830112613b0957600080fd5b81356020613b196134d983613495565b82815260059290921b84018101918181019086841115613b3857600080fd5b8286015b8481101561351c5780356001600160401b03811115613b5b5760008081fd5b613b698986838b0101612e83565b845250918301918301613b3c565b600080600060608486031215613b8c57600080fd5b83356001600160401b0380821115613ba357600080fd5b818601915086601f830112613bb757600080fd5b81356020613bc76134d983613495565b82815260059290921b8401810191818101908a841115613be657600080fd5b948201945b83861015613c0d578535613bfe81612dc1565b82529482019490820190613beb565b97505087013592505080821115613c2357600080fd5b613c2f878388016134b8565b93506040860135915080821115613c4557600080fd5b50613c5286828701613af8565b9150509250925092565b600060208284031215613c6e57600080fd5b81518015158114610aa757600080fd5b60008251613c9081846020870161337f565b9190910192915050565b601f821115613ce2576000816000526020600020601f850160051c81016020861015613cc35750805b601f850160051c820191505b81811015610ce857828155600101613ccf565b505050565b81516001600160401b03811115613d0057613d00612de6565b613d1481613d0e8454613a4b565b84613c9a565b602080601f831160018114613d495760008415613d315750858301515b600019600386901b1c1916600185901b178555610ce8565b600085815260208120601f198616915b82811015613d7857888601518255948401946001909101908401613d59565b5085821015613d965787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b604081526000613db960408301856133a3565b8281036020840152613dcb81856133a3565b95945050505050565b60008184825b85811015613e0b578135613ded81612dc1565b6001600160a01b031683526020928301929190910190600101613dda565b509095945050505050565b6001600160a01b03831681526040602082018190526000906105a3908301846133a3565b634e487b7160e01b600052602160045260246000fd5b818103818111156105945761059461380a565b634e487b7160e01b600052603160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220247c9feadcfb4aa67bba286fdc86b80cc167fce1383f2afbc218bf965fb6bc3264736f6c63430008170033000000000000000000000000dd99b75f095d0c4d5112ace938e4e6ed962fb0240000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d2789" diff --git a/packages/permissionless-test/mock-aa-infra/alto/index.ts b/packages/permissionless-test/mock-aa-infra/alto/index.ts index 99ecf303..d33028b7 100644 --- a/packages/permissionless-test/mock-aa-infra/alto/index.ts +++ b/packages/permissionless-test/mock-aa-infra/alto/index.ts @@ -20,6 +20,10 @@ import { ENTRY_POINT_V06_CREATECALL, ENTRY_POINT_V07_CREATECALL, ERC_7579_TEST_MODULE_CREATECALL, + ETHERSPOT_BOOTSTRAP_CREATECALL, + ETHERSPOT_IMPLEMENTATION, + ETHERSPOT_MULTIPLE_OWNER_ECDSA_VALIDATOR_CREATECALL, + ETHERSPOT_WALLET_FACTORY_CREATECALL, KERNEL_V06_ACCOUNT_V2_1_LOGIC_CREATECALL, KERNEL_V06_ACCOUNT_V2_2_LOGIC_CREATECALL, KERNEL_V06_ACCOUNT_V2_3_LOGIC_CREATECALL, @@ -385,6 +389,30 @@ export const setupContracts = async (rpc: string) => { gas: 15_000_000n, nonce: nonce++ }), + walletClient.sendTransaction({ + to: DETERMINISTIC_DEPLOYER, + data: ETHERSPOT_WALLET_FACTORY_CREATECALL, + gas: 15_000_000n, + nonce: nonce++ + }), + walletClient.sendTransaction({ + to: DETERMINISTIC_DEPLOYER, + data: ETHERSPOT_IMPLEMENTATION, + gas: 15_000_000n, + nonce: nonce++ + }), + walletClient.sendTransaction({ + to: DETERMINISTIC_DEPLOYER, + data: ETHERSPOT_BOOTSTRAP_CREATECALL, + gas: 15_000_000n, + nonce: nonce++ + }), + walletClient.sendTransaction({ + to: DETERMINISTIC_DEPLOYER, + data: ETHERSPOT_MULTIPLE_OWNER_ECDSA_VALIDATOR_CREATECALL, + gas: 15_000_000n, + nonce: nonce++ + }), walletClient.sendTransaction({ to: SAFE_SINGLETON_FACTORY, data: SAFE_7579_MODULE_CREATECALL, @@ -640,6 +668,10 @@ export const setupContracts = async (rpc: string) => { "0x3143E1C0Af0Cdc153423863923Cf4e3818e34Daa", // Trust TokenReceiverFacet "0xCe36b85d12D81cd619C745c7717f3396E184Ac7C", // Trust DiamondLoupeFacet "0x2e7f1dAe1F3799d20f5c31bEFdc7A620f664728D", // Trust DefaultFallbackHandler + "0x93FB56A4a0B7160fbf8903d251Cc7A3fb9bA0933", // Etherspot Factory + "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", // Etherspot Bootstrap + "0x7aCEE15c9FFc1e8f287C26E0f4C8244A0729F557", // Etherspot Multiple Owner ECDSA Validator + "0x202A5598bDba2cE62bFfA13EcccB04969719Fad9", // Etherspot implementation "0x4Fd8d57b94966982B62e9588C27B4171B55E8354", // ERC7579 Test Module "0x85e23b94e7F5E9cC1fF78BCe78cfb15B81f0DF00", // Thirdweb factory 0.6 "0x4be0ddfebca9a5a4a617dee4dece99e7c862dceb", // Thirdweb factory 0.7 diff --git a/packages/permissionless-test/src/utils.ts b/packages/permissionless-test/src/utils.ts index 530eea6c..15eacd93 100644 --- a/packages/permissionless-test/src/utils.ts +++ b/packages/permissionless-test/src/utils.ts @@ -18,6 +18,7 @@ import { toThirdwebSmartAccount } from "../../permissionless/accounts" import { toBiconomySmartAccount } from "../../permissionless/accounts/biconomy/toBiconomySmartAccount" +import { toEtherspotSmartAccount } from "../../permissionless/accounts/etherspot/toEtherspotSmartAccount" import { type LightAccountVersion, toLightSmartAccount @@ -395,6 +396,21 @@ export const getThirdwebClient = async < }) } +export const getEtherspotClient = async < + entryPointVersion extends "0.6" | "0.7" +>({ + anvilRpc +}: AAParamType) => { + return toEtherspotSmartAccount({ + client: getPublicClient(anvilRpc), + owners: [privateKeyToAccount(generatePrivateKey())], + entryPoint: { + address: entryPoint07Address, + version: "0.7" + } + }) +} + export const getCoreSmartAccounts = () => [ { name: "Trust", @@ -645,6 +661,19 @@ export const getCoreSmartAccounts = () => [ supportsEntryPointV07: true, isEip1271Compliant: true }, + { + name: "Etherspot", + getSmartAccountClient: async ( + conf: AAParamType + ) => + getBundlerClient({ + account: await getEtherspotClient(conf), + ...conf + }), + supportsEntryPointV06: false, + supportsEntryPointV07: true, + isEip1271Compliant: true + }, { name: "Thirdweb", getSmartAccountClient: async ( diff --git a/packages/permissionless/accounts/etherspot/abi/EtherspotBootstrapAbi.ts b/packages/permissionless/accounts/etherspot/abi/EtherspotBootstrapAbi.ts new file mode 100644 index 00000000..f6a5c9d6 --- /dev/null +++ b/packages/permissionless/accounts/etherspot/abi/EtherspotBootstrapAbi.ts @@ -0,0 +1,94 @@ +export const EtherspotBootstrapAbi = [ + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "module", + type: "address" + }, + { + internalType: "bytes", + name: "data", + type: "bytes" + } + ], + internalType: "struct BootstrapConfig[]", + name: "$valdiators", + type: "tuple[]" + }, + { + components: [ + { + internalType: "address", + name: "module", + type: "address" + }, + { + internalType: "bytes", + name: "data", + type: "bytes" + } + ], + internalType: "struct BootstrapConfig[]", + name: "$executors", + type: "tuple[]" + }, + { + components: [ + { + internalType: "address", + name: "module", + type: "address" + }, + { + internalType: "bytes", + name: "data", + type: "bytes" + } + ], + internalType: "struct BootstrapConfig", + name: "_hook", + type: "tuple" + }, + { + components: [ + { + internalType: "address", + name: "module", + type: "address" + }, + { + internalType: "bytes", + name: "data", + type: "bytes" + } + ], + internalType: "struct BootstrapConfig[]", + name: "_fallbacks", + type: "tuple[]" + } + ], + name: "initMSA", + outputs: [], + stateMutability: "nonpayable", + type: "function" + } +] + +export const EtherspotOnInstallAbi = [ + { + inputs: [ + { + internalType: "bytes", + name: "data", + type: "bytes" + } + ], + name: "onInstall", + outputs: [], + stateMutability: "nonpayable", + type: "function" + } +] as const diff --git a/packages/permissionless/accounts/etherspot/constants.ts b/packages/permissionless/accounts/etherspot/constants.ts new file mode 100644 index 00000000..92b4139b --- /dev/null +++ b/packages/permissionless/accounts/etherspot/constants.ts @@ -0,0 +1,27 @@ +import type { Address } from "viem" + +export const DUMMY_ECDSA_SIGNATURE = + "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c" + +export const VALIDATOR_TYPE = { + ROOT: "0x00", + VALIDATOR: "0x01", + PERMISSION: "0x02" +} as const + +export enum VALIDATOR_MODE { + DEFAULT = "0x00", + ENABLE = "0x01" +} + +export type NetworkAddresses = { + metaFactoryAddress: Address + bootstrapAddress: Address + validatorAddress: Address +} + +export const DEFAULT_CONTRACT_ADDRESS: NetworkAddresses = { + metaFactoryAddress: "0x93FB56A4a0B7160fbf8903d251Cc7A3fb9bA0933", // modularEtherspotWalletFactory + bootstrapAddress: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", + validatorAddress: "0x7aCEE15c9FFc1e8f287C26E0f4C8244A0729F557" // multipleOwnerECDSAValidator +} diff --git a/packages/permissionless/accounts/etherspot/toEtherspotSmartAccount.ts b/packages/permissionless/accounts/etherspot/toEtherspotSmartAccount.ts new file mode 100644 index 00000000..8f7e1cff --- /dev/null +++ b/packages/permissionless/accounts/etherspot/toEtherspotSmartAccount.ts @@ -0,0 +1,360 @@ +import { + type Account, + type Address, + type Assign, + type Chain, + type Client, + type EIP1193Provider, + type Hex, + type LocalAccount, + type OneOf, + type Transport, + type WalletClient, + encodeAbiParameters, + encodeFunctionData, + encodePacked, + toHex, + zeroAddress +} from "viem" +import { + type SmartAccount, + type SmartAccountImplementation, + type UserOperation, + entryPoint07Abi, + entryPoint07Address, + getUserOperationHash, + toSmartAccount +} from "viem/account-abstraction" +import { getChainId } from "viem/actions" +import { getAction } from "viem/utils" +import { getAccountNonce } from "../../actions/public/getAccountNonce.js" +import { getSenderAddress } from "../../actions/public/getSenderAddress.js" +import { encode7579Calls } from "../../utils/encode7579Calls.js" +import { toOwner } from "../../utils/index.js" +import { + DEFAULT_CONTRACT_ADDRESS, + DUMMY_ECDSA_SIGNATURE, + type NetworkAddresses +} from "./constants.js" +import { getInitMSAData } from "./utils/getInitMSAData.js" +import { getNonceKeyWithEncoding } from "./utils/getNonceKey.js" + +/** + * The account creation ABI for a modular etherspot smart account + */ +const createAccountAbi = [ + { + inputs: [ + { + internalType: "bytes32", + name: "salt", + type: "bytes32" + }, + { + internalType: "bytes", + name: "initCode", + type: "bytes" + } + ], + name: "createAccount", + outputs: [ + { + internalType: "address", + name: "", + type: "address" + } + ], + stateMutability: "payable", + type: "function" + } +] as const + +/** + * Get default addresses for Etherspot Smart Account based on chainId + * @param chainId + * @param validatorAddress + * @param accountLogicAddress + * @param factoryAddress + * @param metaFactoryAddress + */ +const getDefaultAddresses = ({ + validatorAddress: _validatorAddress, + metaFactoryAddress: _metaFactoryAddress, + bootstrapAddress: _bootstrapAddress +}: Partial): NetworkAddresses => { + const addresses = DEFAULT_CONTRACT_ADDRESS + const validatorAddress = _validatorAddress ?? addresses.validatorAddress + const metaFactoryAddress = + _metaFactoryAddress ?? addresses?.metaFactoryAddress ?? zeroAddress + const bootstrapAddress = + _bootstrapAddress ?? addresses.bootstrapAddress ?? zeroAddress + + return { + validatorAddress, + metaFactoryAddress, + bootstrapAddress + } +} + +/** + * Get the initialization data for a etherspot smart account + * @param entryPoint + * @param owner + * @param validatorAddress + */ +const getInitialisationData = ({ + owner, + validatorAddress, + bootstrapAddress +}: { + owner: Address + validatorAddress: Address + bootstrapAddress: Address +}) => { + const initMSAData = getInitMSAData(validatorAddress) + + const initCode = encodeAbiParameters( + [{ type: "address" }, { type: "address" }, { type: "bytes" }], + [owner, bootstrapAddress, initMSAData] + ) + + return initCode +} + +/** + * Get the account initialization code for a etherspot smart account + * @param entryPoint + * @param owner + * @param index + * @param validatorAddress + * @param bootstrapAddress + */ +const getAccountInitCode = async ({ + owner, + index, + validatorAddress, + bootstrapAddress +}: { + owner: Address + index: bigint + validatorAddress: Address + bootstrapAddress: Address +}): Promise => { + if (!owner) throw new Error("Owner account not found") + + // Build the account initialization data + const initialisationData = getInitialisationData({ + validatorAddress, + owner, + bootstrapAddress + }) + + return encodeFunctionData({ + abi: createAccountAbi, + functionName: "createAccount", + args: [toHex(index, { size: 32 }), initialisationData] + }) +} + +export type ToEtherspotSmartAccountParameters< + entryPointVersion extends "0.6" | "0.7" +> = { + client: Client + owners: [ + OneOf< + | EIP1193Provider + | WalletClient + | LocalAccount + > + ] + entryPoint?: { + address: Address + version: entryPointVersion + } + address?: Address + index?: bigint + metaFactoryAddress?: Address + validatorAddress?: Address + bootstrapAddress?: Address + nonceKey?: bigint +} + +export type EtherspotSmartAccountImplementation< + entryPointVersion extends "0.7" = "0.7" +> = Assign< + SmartAccountImplementation< + typeof entryPoint07Abi, + entryPointVersion + // { + // // entryPoint === ENTRYPOINT_ADDRESS_V06 ? "0.2.2" : "0.3.0-beta" + // abi: entryPointVersion extends "0.6" ? typeof BiconomyAbi + // factory: { abi: typeof FactoryAbi; address: Address } + // } + >, + { sign: NonNullable } +> + +export type ToEtherspotSmartAccountReturnType< + entryPointVersion extends "0.7" = "0.7" +> = SmartAccount> + +export async function toEtherspotSmartAccount( + parameters: ToEtherspotSmartAccountParameters +): Promise> { + const { + client, + owners, + address, + index = BigInt(0), + metaFactoryAddress: _metaFactoryAddress, + validatorAddress: _validatorAddress, + bootstrapAddress: _bootstrapAddress + } = parameters + + const localOwner = await toOwner({ owner: owners[0] }) + + const entryPoint = { + address: parameters.entryPoint?.address ?? entryPoint07Address, + abi: entryPoint07Abi, + version: parameters.entryPoint?.version ?? "0.7" + } as const + + const { validatorAddress, metaFactoryAddress, bootstrapAddress } = + getDefaultAddresses({ + validatorAddress: _validatorAddress, + metaFactoryAddress: _metaFactoryAddress, + bootstrapAddress: _bootstrapAddress + }) + + // Helper to generate the init code for the smart account + const generateInitCode = () => + getAccountInitCode({ + owner: localOwner.address, + index, + validatorAddress, + bootstrapAddress + }) + + let accountAddress: Address | undefined = address + + let chainId: number + + const getMemoizedChainId = async () => { + if (chainId) return chainId + chainId = client.chain + ? client.chain.id + : await getAction(client, getChainId, "getChainId")({}) + return chainId + } + + const getFactoryArgs = async () => { + return { + factory: metaFactoryAddress, + factoryData: await generateInitCode() + } + } + + return toSmartAccount({ + client, + entryPoint, + getFactoryArgs, + async getAddress() { + if (accountAddress) return accountAddress + + const { factory, factoryData } = await getFactoryArgs() + + // Get the sender address based on the init code + accountAddress = await getSenderAddress(client, { + factory, + factoryData, + entryPointAddress: entryPoint.address + }) + + return accountAddress + }, + async encodeCalls(calls) { + return encode7579Calls({ + mode: { + type: calls.length > 1 ? "batchcall" : "call", + revertOnError: false, + selector: "0x", + context: "0x" + }, + callData: calls + }) + }, + async getNonce(_args) { + return getAccountNonce(client, { + address: await this.getAddress(), + entryPointAddress: entryPoint.address, + key: getNonceKeyWithEncoding( + validatorAddress, + /*args?.key ?? */ parameters.nonceKey ?? 0n + ) + }) + }, + async getStubSignature() { + return DUMMY_ECDSA_SIGNATURE + }, + async sign({ hash }) { + return this.signMessage({ message: hash }) + }, + async signMessage({ message }) { + let signature: Hex = await localOwner.signMessage({ + message + }) + const potentiallyIncorrectV = Number.parseInt( + signature.slice(-2), + 16 + ) + if (![27, 28].includes(potentiallyIncorrectV)) { + const correctV = potentiallyIncorrectV + 27 + signature = (signature.slice(0, -2) + + correctV.toString(16)) as Hex + } + return encodePacked( + ["address", "bytes"], + [validatorAddress, signature] + ) + }, + async signTypedData(typedData) { + let signature: Hex = await localOwner.signTypedData(typedData) + + const potentiallyIncorrectV = Number.parseInt( + signature.slice(-2), + 16 + ) + if (![27, 28].includes(potentiallyIncorrectV)) { + const correctV = potentiallyIncorrectV + 27 + signature = (signature.slice(0, -2) + + correctV.toString(16)) as Hex + } + + return encodePacked( + ["address", "bytes"], + [validatorAddress, signature] + ) + }, + async signUserOperation(parameters) { + const { chainId = await getMemoizedChainId(), ...userOperation } = + parameters + + const hash = getUserOperationHash({ + userOperation: { + ...userOperation, + sender: userOperation.sender ?? (await this.getAddress()), + signature: "0x" + } as UserOperation, + entryPointAddress: entryPoint.address, + entryPointVersion: entryPoint.version, + chainId: chainId + }) + + const signature = await localOwner.signMessage({ + message: { raw: hash } + }) + + return signature + } + }) as Promise> +} diff --git a/packages/permissionless/accounts/etherspot/utils/getInitMSAData.ts b/packages/permissionless/accounts/etherspot/utils/getInitMSAData.ts new file mode 100644 index 00000000..8ad162d1 --- /dev/null +++ b/packages/permissionless/accounts/etherspot/utils/getInitMSAData.ts @@ -0,0 +1,56 @@ +import { type Address, encodeFunctionData, zeroAddress } from "viem" +import { + EtherspotBootstrapAbi, + EtherspotOnInstallAbi +} from "../abi/EtherspotBootstrapAbi.js" + +export const getInitMSAData = (ecdsaValidatorAddress: Address) => { + const validators = makeBootstrapConfig(ecdsaValidatorAddress, "0x") + const executors = makeBootstrapConfig(zeroAddress, "0x") + const hook = _makeBootstrapConfig(zeroAddress, "0x") + const fallbacks = makeBootstrapConfig(zeroAddress, "0x") + const initMSAData = encodeFunctionData({ + abi: EtherspotBootstrapAbi, + functionName: "initMSA", + args: [validators, executors, hook, fallbacks] + }) + + return initMSAData +} + +const _makeBootstrapConfig = (module: string, data: string) => { + const config = { + module: "", + data: "" + } + + config.module = module + + config.data = encodeFunctionData({ + abi: EtherspotOnInstallAbi, + functionName: "onInstall", + args: [data as `0x${string}`] + }) + + return config +} + +const makeBootstrapConfig = (module: string, data: string) => { + const config: { + module: string + data: `0x${string}` + }[] = [] + + const data1 = encodeFunctionData({ + abi: EtherspotOnInstallAbi, + functionName: "onInstall", + args: [data as `0x${string}`] + }) + + const newConfig = { + module: module, + data: data1 + } + config.push(newConfig) + return config +} diff --git a/packages/permissionless/accounts/etherspot/utils/getNonceKey.ts b/packages/permissionless/accounts/etherspot/utils/getNonceKey.ts new file mode 100644 index 00000000..c1e828f7 --- /dev/null +++ b/packages/permissionless/accounts/etherspot/utils/getNonceKey.ts @@ -0,0 +1,21 @@ +import { type Address, concatHex, pad, toHex } from "viem" +import { VALIDATOR_MODE, VALIDATOR_TYPE } from "../constants.js" + +export const getNonceKeyWithEncoding = ( + validatorAddress: Address, + nonceKey = 0n +) => { + const validatorMode = VALIDATOR_MODE.DEFAULT + const validatorType = VALIDATOR_TYPE.ROOT + const encoding = pad( + concatHex([ + validatorAddress, // 20 bytes + validatorMode, // 1 byte + validatorType, // 1 byte + toHex(nonceKey, { size: 2 }) // 2 byte + ]), + { size: 24 } + ) // 24 bytes + const encodedNonceKey = BigInt(encoding) + return encodedNonceKey +} diff --git a/packages/permissionless/accounts/etherspot/utils/wrapMessageHash.ts b/packages/permissionless/accounts/etherspot/utils/wrapMessageHash.ts new file mode 100644 index 00000000..87ed45fc --- /dev/null +++ b/packages/permissionless/accounts/etherspot/utils/wrapMessageHash.ts @@ -0,0 +1,42 @@ +import { + type Hex, + concatHex, + encodeAbiParameters, + keccak256, + stringToHex +} from "viem" +import { type Address, domainSeparator } from "viem" + +export type WrapMessageHashParams = { + accountAddress: Address + chainId: number +} + +export const wrapMessageHash = ( + messageHash: Hex, + { accountAddress, chainId }: WrapMessageHashParams +) => { + const _domainSeparator = domainSeparator({ + domain: { + name: "ModularEtherspotWallet", + chainId, + verifyingContract: accountAddress + } + }) + + const wrappedMessageHash = keccak256( + encodeAbiParameters( + [{ type: "bytes32" }, { type: "bytes32" }], + [ + keccak256(stringToHex("ModularEtherspotWallet(bytes32 hash)")), + messageHash + ] + ) + ) + + const digest = keccak256( + concatHex(["0x1901", _domainSeparator, wrappedMessageHash]) + ) + + return digest +} diff --git a/packages/permissionless/accounts/index.ts b/packages/permissionless/accounts/index.ts index 523b34f1..deae9d2e 100644 --- a/packages/permissionless/accounts/index.ts +++ b/packages/permissionless/accounts/index.ts @@ -20,6 +20,13 @@ import { toTrustSmartAccount } from "./trust/toTrustSmartAccount.js" +import { + type EtherspotSmartAccountImplementation, + type ToEtherspotSmartAccountParameters, + type ToEtherspotSmartAccountReturnType, + toEtherspotSmartAccount +} from "./etherspot/toEtherspotSmartAccount.js" + import { type SafeSmartAccountImplementation, type SafeVersion, @@ -103,5 +110,9 @@ export { type ToThirdwebSmartAccountReturnType, type ToThirdwebSmartAccountParameters, type ThirdwebSmartAccountImplementation, - toThirdwebSmartAccount + toThirdwebSmartAccount, + type ToEtherspotSmartAccountParameters, + type EtherspotSmartAccountImplementation, + type ToEtherspotSmartAccountReturnType, + toEtherspotSmartAccount } diff --git a/packages/permissionless/actions/etherspot.ts b/packages/permissionless/actions/etherspot.ts new file mode 100644 index 00000000..de7d9e47 --- /dev/null +++ b/packages/permissionless/actions/etherspot.ts @@ -0,0 +1,6 @@ +import { + type GetGasPriceResponseReturnType, + getUserOperationGasPrice +} from "./etherspot/getUserOperationGasPrice.js" + +export { type GetGasPriceResponseReturnType, getUserOperationGasPrice } diff --git a/packages/permissionless/actions/etherspot/getUserOperationGasPrice.ts b/packages/permissionless/actions/etherspot/getUserOperationGasPrice.ts new file mode 100644 index 00000000..a66c7c8f --- /dev/null +++ b/packages/permissionless/actions/etherspot/getUserOperationGasPrice.ts @@ -0,0 +1,32 @@ +import type { Account, Chain, Client, Transport } from "viem" +import type { EtherspotBundlerRpcSchema } from "../../types/etherspot.js" + +export type GetGasPriceResponseReturnType = { + maxFeePerGas: bigint + maxPriorityFeePerGas: bigint +} + +/** + * Returns the live gas prices that you can use to send a user operation. + * + * @param client that you created using viem's createClient whose transport url is pointing to the Etherspot's bundler. + * @returns maxFeePerGas & maxPriorityFeePerGas + */ +export const getUserOperationGasPrice = async ( + client: Client< + Transport, + Chain | undefined, + Account | undefined, + EtherspotBundlerRpcSchema + > +): Promise => { + const gasPrice = await client.request({ + method: "skandha_getGasPrice", + params: [] + }) + + return { + maxFeePerGas: BigInt(gasPrice.maxFeePerGas), + maxPriorityFeePerGas: BigInt(gasPrice.maxPriorityFeePerGas) + } +} diff --git a/packages/permissionless/package.json b/packages/permissionless/package.json index bf1f1d03..69b767af 100644 --- a/packages/permissionless/package.json +++ b/packages/permissionless/package.json @@ -39,6 +39,11 @@ "import": "./_esm/actions/pimlico.js", "default": "./_cjs/actions/pimlico.js" }, + "./actions/etherspot": { + "types": "./_types/actions/etherspot.d.ts", + "import": "./_esm/actions/etherspot.js", + "default": "./_cjs/actions/etherspot.js" + }, "./actions/smartAccount": { "types": "./_types/actions/smartAccount.d.ts", "import": "./_esm/actions/smartAccount.js", diff --git a/packages/permissionless/types/etherspot.ts b/packages/permissionless/types/etherspot.ts new file mode 100644 index 00000000..f3eb1408 --- /dev/null +++ b/packages/permissionless/types/etherspot.ts @@ -0,0 +1,12 @@ +type GetGasPriceResponse = { + maxFeePerGas: string + maxPriorityFeePerGas: string +} + +export type EtherspotBundlerRpcSchema = [ + { + Method: "skandha_getGasPrice" + Parameters: [] + ReturnType: GetGasPriceResponse + } +]