diff --git a/tests/cassettes/test_aa_bundler/test_build_user_operation.yaml b/tests/cassettes/test_aa_bundler/test_build_user_operation.yaml index 10e9130..e8a3b1c 100644 --- a/tests/cassettes/test_aa_bundler/test_build_user_operation.yaml +++ b/tests/cassettes/test_aa_bundler/test_build_user_operation.yaml @@ -1,217 +1,89 @@ interactions: -- request: - body: '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": - 0}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '73' - Content-Type: - - application/json - User-Agent: - - web3.py/7.3.0/web3.providers.rpc.rpc.HTTPProvider - method: POST - uri: https://polygon-mainnet.g.alchemy.com - response: - body: - string: '{"jsonrpc":"2.0","id":0,"result":"bor/v1.5.0/linux-amd64/go1.22.1"}' - headers: - Access-Control-Allow-Origin: - - '*' - CF-Cache-Status: - - DYNAMIC - CF-Ray: - - 8ecb0a552b8f1e7e-EZE - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Wed, 04 Dec 2024 10:16:20 GMT - Server: - - cloudflare - Set-Cookie: - - _cfuvid=rkOYJfxOfTGuakplT1T76iPeO0I.9XBgttwXa4O1_80-1733307380455-0.0.1.1-604800000; - path=/; domain=.g.alchemy.com; HttpOnly; Secure; SameSite=None - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - access-control-allow-credentials: - - 'true' - x-alchemy-response-status: - - '200' - x-alchemy-trace-id: - - 7d832b0cf660b09bf405c83c89987783 - status: - code: 200 - message: OK -- request: - body: '{"jsonrpc": "2.0", "method": "eth_estimateUserOperationGas", "params": - [{"sender": "0xE8B412158c205B0F605e0FC09dCdA27d3F140FE9", "nonce": "0xae85c374ae0606ed34d0ee009a9ca43a757a8a46a324510000000000000000", - "callData": "0xb61d27f60000000000000000000000002791bca1f2de4661ed88a30c99a7a9449aa84174000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000007ace242f32208d836a2245df957c08547059bf45ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000", - "signature": "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"}, - "0x0000000071727De22E5E9d8BAf0edAc6f37da032"], "id": 0}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '885' - Content-Type: - - application/json - User-Agent: - - web3.py/7.3.0/web3.providers.rpc.rpc.HTTPProvider - method: POST - uri: https://polygon-mainnet.g.alchemy.com - response: - body: - string: '{"jsonrpc":"2.0","id":0,"result":{"preVerificationGas":"0xb5c8","callGasLimit":"0xcbb8","verificationGasLimit":"0x1365b","paymasterVerificationGasLimit":null}}' - headers: - Access-Control-Allow-Origin: - - '*' - CF-Cache-Status: - - DYNAMIC - CF-Ray: - - 8ecb0a589c82c199-EZE - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Wed, 04 Dec 2024 10:16:21 GMT - Server: - - cloudflare - Set-Cookie: - - _cfuvid=5yQWpiBWm8396mNFYUaLoo3qEWO67ESfBpymI1t9xzw-1733307381018-0.0.1.1-604800000; - path=/; domain=.g.alchemy.com; HttpOnly; Secure; SameSite=None - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - access-control-allow-credentials: - - 'true' - x-alchemy-response-status: - - '200' - x-alchemy-trace-id: - - 9e8370a608ee204903e661d87e28fa15 - status: - code: 200 - message: OK -- request: - body: '{"jsonrpc": "2.0", "method": "rundler_maxPriorityFeePerGas", "params": - [], "id": 1}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '83' - Content-Type: - - application/json - Cookie: - - _cfuvid=5yQWpiBWm8396mNFYUaLoo3qEWO67ESfBpymI1t9xzw-1733307381018-0.0.1.1-604800000 - User-Agent: - - web3.py/7.3.0/web3.providers.rpc.rpc.HTTPProvider - method: POST - uri: https://polygon-mainnet.g.alchemy.com - response: - body: - string: '{"jsonrpc":"2.0","id":1,"result":"0x7aef40a00"}' - headers: - Access-Control-Allow-Origin: - - '*' - CF-Cache-Status: - - DYNAMIC - CF-Ray: - - 8ecb0a5c08bd9b23-EZE - Connection: - - keep-alive - Content-Length: - - '47' - Content-Type: - - application/json - Date: - - Wed, 04 Dec 2024 10:16:21 GMT - Server: - - cloudflare - Vary: - - Accept-Encoding - access-control-allow-credentials: - - 'true' - x-alchemy-response-status: - - '200' - x-alchemy-trace-id: - - f4da45617a92fa10d2b49a1199b371e7 - status: - code: 200 - message: OK -- request: - body: '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["latest", - false], "id": 1}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '90' - Content-Type: - - application/json - Cookie: - - _cfuvid=rkOYJfxOfTGuakplT1T76iPeO0I.9XBgttwXa4O1_80-1733307380455-0.0.1.1-604800000 - User-Agent: - - web3.py/7.3.0/web3.providers.rpc.rpc.HTTPProvider - method: POST - uri: https://polygon-mainnet.g.alchemy.com - response: - body: - string: '{"jsonrpc":"2.0","id":1,"result":{"baseFeePerGas":"0xef8cf5da","difficulty":"0x16","extraData":"0xd78301040183626f7288676f312e32322e37856c696e75780000000000000000f8d380f8d0c0c0c101c0c102c0c0c0c106c108c109c10ac0c0c104c10ec10fc110c111c112c113c114c115c116c117c21116c315190ec3171a12c3150f18c11cc0c0c31e1302c120c121c0c118c11dc122c22625c3271318c128c122c0c0c12ac12dc12ec0c0c130c21e2ec0c2262fc135c136c137c138c139c13ac13bc13cc13dc13ec13fc140c141c142c143c144c145c146c147c133c0c0c0c0c148c14ec14fc150c151c152c153c0c155c156c154c158c0c0c0c127c0c0c15fc159c161c3624824c0c163c0c15dc0c0c169c162c16ac165c0c036fbc1d83393ad7842e0f4e59d6bf40e3739a7537c8f67dd235f03fd567dbc8b532be94f21324dab9fe3bc04433e5d88aad7d5509acd965f18e86ea65e237b0501","gasLimit":"0x1c9c380","gasUsed":"0x11e2679","hash":"0x9812df824fe86ee7666ee52ba40e8a07bd840d179b2355584ee17c4f0b28bfac","logsBloom":"0xa7fbbb7f99f75e978e44ca40c6b732d58b0c834c509119afb9a3062ce3f7e354d33c8aff5435fbbffbc3829bf5056a7f2d7f879ac2da27613e010ba2c77832d4adf4369cf746e5a8438feadeb9facab22e3336ee155c9902dd5b8fed3132af81fcba60d65ec928a1097fc525086fef4e2f95fdc0d9ff9c7dd28fef3258de2a833b536a603be8f5e1019892d7a76c47f0bdf38ecb699cb15ef8872cd67fec1c6d3aed17eb9494333a7873fc78b6ab2fe74b5d381e7aa6179cb41f378baa4177c5fbcdc46be3cf473996232a3e68f6792c7107adeaa608ae11d5f3ff9be997ac4e42ddace1bd66c3cbccc5ffb04a22ab26dae95637930bbc5bc1fccf1cdad4d83d","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0x3e0dfa3","parentHash":"0xc116078cf08fdc3698450f99c3fb8174b3f963f3ef69940798ecb80685bd5403","receiptsRoot":"0xa9dcec0fbae87f1ba0b6e00e24f1d4cc85e946f79efd09595dcee8adde3c308f","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x14a38","stateRoot":"0x91298e6d8f1f78389a8fa9ffd4fa8faba6df3874ac2378ff81f1b79ab8f2c0ca","timestamp":"0x67502bea","totalDifficulty":"0x49922530","transactions":["0x9467c7880dee353a78ddf750a671c77427959f1419f24721516b064a77e5cb14","0x2aeaee1abd69bcadd2d1409d0c20ddb1ca21e3f8371357d7dd354f2428c2f2cd","0xf52b3c9298195a53a4ac25f299e61b17e75e5f88e29456e47f0fcaf233829ae8","0x5d0892b203171f520ff6f712e0e532214f63d2ccdba02e62b231611ad6775bcc","0x9f02c7acaf92db5663c0d0d3ffbab5046e8691c28042465113c8b7df35ad92af","0x8f3eefed92190625cef38e1dc0068743fb2a36765a69775d0cb00fe191299f3b","0xef8c9786a01b9056d6e523e03f22878370c4181eadf7cc920f62b290c48c46b5","0x028dbcec1869203239ebebd9cdda153f748a89d846821af62f15eb59cbda24bb","0xa2184979376cd003dd3d4136355fa207a13a6c57cb91b369f3a84466148d27ef","0xd2f2c6ac1f5ba4bcca22de71a43b692fe220e63d6c5aa3265e021c5dea2c07ca","0x901a50d3407350cf8a0bc70e508532a718df4010474876b5ffa0a9cebe0a1283","0x6661e2d00576609d85848a9c274c496b31711493664cf754c004ca46c3075a89","0x9ec2e632cc7140d129ad80f04848fdee603596820aef775d4cf8ea5e3c6da4fe","0x08ead36f41411b692b42abf3a1b2ddefc9716fe61ed9fef30062f85ac1d907f2","0xdd52c363257371f554a86190b539c6eedcefa467f3321fece1a8642c441acdaa","0xbc36a622b69157e2e93290b25a2da00a1a871b5c37b69e77466ecfedf1777017","0x93caa9947534ddbdf3cdd632d391b0560725448256f12f9b5a8dfd5711722cdf","0x209292631fd5d359edb537a4c6a71425dfac541d2fdd2c439918038a10ac567a","0xfda41e6a50e7e2690a527927ac63d7ef16272f4421f31c10c6ba081b6d72314e","0xde4e8b79a8f4b694722d9fcf5be8532afbfcbb561cdcef99d54f96a58b8cb8b2","0x446930f11fbe56d3e3ccdc189c450c31051c46ad5eb79642782ff4ce1e454b12","0x0b1cedf3efe3571381fdda301f264e27940782dc51811315c0f98c36aa69f64a","0x8838c302df826f2efd21df59b94791c85a83c5afaa1cf1585016c89396d58ccb","0xc1a692e1da455a7707574361bea76c4c3fc1a249c6807c73c7dfb4f1456ffefa","0xffa5d659f0115253447ebd2544070bc3ff923d0df0ba6efc523ab30dc813177c","0xb7e2176f1aabe0b1a88334f281291d8c2aa2f5bd863b5447822eb06b89643599","0x079509573f1e3b81ef8a382199d7916ddbc637af015fd022e06bbbe3c7c59d36","0x2b86554f06f3885fc070f693899f81f40ab4f57bec426ac5c985aad0c716d569","0x80d703deafdac37b1ec50e14e7112a7260141f8c5118990f1696b129e02f9015","0x2ab499209082ecf9d52c5e777928fe4e250523cc1f36a7e553b9551e0207c85a","0x68ae0a7618c1c361fc457b27e27b6cb25711bf4f52780d83c087784048284640","0x3ef5754e36e395e177277ee213bf31d2e9bfb0b03ec73ee772f9fb145371a224","0x60404a9d0686fb05486af0a7ac1bd4fe2fe7814c170a440516d3b8668d9b1637","0x05911f20485c649e9b8096072b487d3f5b12da42c18f580b2a40f53d130e6b7f","0x079c7e93fd0da0a1b414c23a6130ff49ba45e7fa0b2db5e36ee50f98eba86248","0xeb3e28c8a4885fbf29aa4302e54beba30a652d23de4d0a200fc4aa96d95891df","0x35d89299631753af9d0e9090243638273b04878178253d012071cde1c1acad56","0xc090afb4928cf05560ed88353609ef8600e9c5e2a540c3e11475f669edeabe1c","0xe7d13a119ca701a531f44d64c3eb7196e2595ca872c4e41476451615a1176f95","0x5dd204491b05dce1e3e7e5ad59110eb56f07059b716916b2fa8029f146e20efa","0x9db22f1cddb27d05589479b42936e9b18ef15859b6abf52d16e12148fb90c134","0x2aff8676b986cfea88f89232b82e95854f65eb710786e6bd661e5c90e0c28987","0x8467aa2a85753a7c2fe2b13db1e454eaa226900d18e5a3b64c412a3415857266","0xe5a2df1308395b8ebd8be24e79f080faa3f397c5711615f64e92d22c9c8dc38a","0xe0f6b6a7589407dcd462bd6811b804843994449777995be60ce3f7bba4c33508","0xf34817162b2cf4d3388f0bc2d2a63788648abc83152a696fd732102e1b945dca","0x6c453737ace4db950dc29c620f922f2e0c8f4a90cc63f3a99969530538b394e3","0x1864f6a6114fa42c167ab4262a5628c62f7080542e4dac192f12370e0c70c7e7","0xf0926e427fa6c1c0726ba9ef57a3171282d48d369c1a088a64ce23065960d8a9","0x82084eaa79f267ccee4d1b7598c702dc60b7381ee705940dc89729bb8a402b2a","0xa40ee21e1b478547a5256c9efa96903d032545babd0292ef01531062242d9a88","0x69766eacc25cac03db983b44606226317c039b45052d63d1cd55c4f90aecdaba","0xc8e76268ad97b9f77d72f5698b79fbdc2d280157066153b423030277eedae0d3","0x87c81b17573f30c66e1eafc0e29777750a6f9910f82424ef7eac8356bc56ac27","0x8ec5d3051e6928dc69f285dc38c384abdb0d4d661d722d6f594abb38b89ba1f2","0xad453e2430f1884a36db126b3275612a796fae8feddd25d7bdc801cdd2b63629","0xd8adef0545a76940ffc11a4cca01079c3c8e1674d3074a49ace216a24c27f76c","0xef614fe6ba9ae78eaa996d01282b2edda35387684189eb5f08255b7b1ffbb087","0xbe5e5e695578c35b50acff70a2ba1999a330d080b65a33286eea250d4d0dbf48","0x5adbcc0a227540e5815b57e0c9710c8b864948f544f023b78fd569ac6c3c1f55","0x649e57394caceb1af49e093d4c7be905b51a0e3b89d6553254e97f0e97ca0364","0x749fbd1f138623f0fd4c7b3fb9b70ee891cb854a557107d05f2ee76e4768d49a","0xe6ddf788cab10f89a3d100a97bbaead4a048176f13845bb32413534167056965","0xa660b081401bedd5ea242cc214f356130d1548afa273a416de5e004a81447c07","0x432a7c13e86c21626359e3c452887da87e3a13ae60ef4416b5a06cbb270c8abe","0xa7c6ebe000b8e38dab5d06f0f8692c127f38f9de1aad87f0969d6e4ce4ef9612","0x73092537ea644320bf77393f0903a38005b181559fa06d1b0b9e965a44289a74","0x5dd72e461b83ca26cf13d8e2bbc316306fc73428834060330dde3c89989917f2","0x67a45e16233f812520d50f1aa0590968f56a0c8313c1bd5c19ed31e97e66078e","0x8f0b49330f079d4211e3ec86c02d9b3ec0cc988892842b7ab9da2e609aa0f484","0x45f6e96275911f5af90f0e5e594b2d1a9633b45d140bdac514515d346d6c28ad","0x5d3f1bdc15feeac7cd57b34d61cd033ca8809948b877e1f5187fceda839835fa","0x8532b3cc5edaf2f3fdf3383f080fff6d37f9704652f6252a0928501ec148e097","0x4b05e95f41ffc7f1e4bbbf4aae15a6a9ba4ec362e6895be732e931c7ff1c912e","0x14b2e5c406bab9e3c5ec05847514b55ae838ffb74247816b32475639864549d9","0x9ee4e0aadb2bf327ffc6f2ad147e854770d18769b9e97dac34a47c98acb64b1c","0x5b3d81327c6fa993e01c23eed82bfeb8af7d74389c5c8b7441cd564327cff526","0x718b58b5b24c1246003fb3350cf1990974da6a7bdb4547645d610fab8c4e4aef","0x6a122b47bd207f16253b1112df590cb20440e0f482ef7b761835be3482f933a2","0xe9b0b80b0179fdebcfb872c9b288b22104bfc23d50a37f2f13963c610af2ee6f","0x6b8974a4226e063e0d31f8bd1e644aa38370fed3f1bb7872018fbd7940eab5c8","0x762a8e38b253f4fca380c55038d40a678fd0d5421ae117b24436f6e8d6af2f5b","0x99edb1d86a6a0286875c7fa11d5d86de16650644ec7d788f655db3a76662c1c6","0x5fe2326620141bf79cb5270e03fd5bf6d0021dcd2eb2193259eadffffa7426bf","0x9605cbcc3ed7eb5b94fef3bde07ac737fe2b45da8049075166b3ce32be184c7a","0x73240b4fba4c2ae0632f85e8c8f53931fb8fc83b39d85d29bdfc2c31737cdbc2","0x5dc249897cbec45274c61e1cbee654e99cd612538b788afdc4dc6cbddb903d69","0xf150c25a5e623f34d931b64ab3a0ae2c73655b287dc1b3c328b4945981bfef89","0xa3e78ed6100bdcc973b316914da588f26705e1e0ca1516fef9cbd0e7d6c89333","0xfe2f254fa72723d3e3c87c931a154a30f309000235a703adb4ede0abac9fed5c","0x8e8898b5208755574768f31030e1b15ede1f31d9037177a2a9f30aec3d0461d2","0x1b1eab7319230bd4c17040a2105865875aaf9f4b563ffe5fa0fe26856c1a429c","0x7a706fc8003c49fcd935cf6244de0e8ece1d98afcb6aad90287d13ac3f4014f4","0x9a2c596d2dd56876d9d31ca51bbc0fa6d64fac5372ddac4405cb11bd916de98a","0xb452beb2c34b60e12bbc6bd4a230529257f1300f3b93d8d2bbd01d4efd4214bc","0x597127293efbc838d99f39928ad2a0b5290774fb2fa5fd5e0a5a4be2f4fac56b","0x7ea193cd63b3f45da8c4386af1a93959938591f69848559901204f38adc2ffb2","0xc3dff26f750923b047bb750fa9085d6f16c4997ea441f558210e0fd24f291b89","0x735b165364534e270dead9a4eecbe4334b410551af8884be206cfafc5a5067e6","0x343ee164ae7aaca37ea20abd638bb99197db5d6a8f50d499a2c1d557e0c66ba9","0xbe0c8a138b9ea8735ef2ceaaa3d6449730247d2013d16f91802c0490b22de6ae","0xd173a5684a6b47cf7e46b9fa324dfe79661284076d248acf656a9f6693d69fa0","0x42ff00b4fca45c51bdad3fb298ff8826a3f0a0c5ef36223aa1a2a39bca008422","0x0ba664b6149d498663110480d568ec62cb1dec2f748670a15a08babfc0380821","0xde32b9a10bca6b355f54282972057cf453109bd1b3d47c910fb5e8d16ec31038","0x1d11a0089905d9e563868cd023903e38404a6a0f6b9fbe43cb55ea102cd2c273","0x6647a553748e8484ff4cb8e7826dd62dd9f177107d4d1d5bec5fbef084c7735f","0x27302f702eb8553410d750824a5e327cfd7577cfa5719f723fbcb63fa27cba6d","0x15aed6e395006bf128c372dec290183b27a5496b5201e449bf8c1a93ee04df98","0x3039af717e97c777a7e8a497791ea88cb9de9058ccf69fba583551e190557b19","0xd842413ab6d7ddfbfeae4b06aeebfd87804291a087559018bbd84a8ffcac2417","0x89a190f819544c65cb94617009757c6d9221cdbf8554548f8fc3d534e06c53af"],"transactionsRoot":"0xb1785109127e5a11ae4dd1cca6150f6581cd43b9eae3654408643cb51f3b4060","uncles":[]}}' - headers: - Access-Control-Allow-Origin: - - '*' - CF-Cache-Status: - - DYNAMIC - CF-Ray: - - 8ecb0a5e6a2f9b12-EZE - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Length: - - '5564' - Content-Type: - - application/json - Date: - - Wed, 04 Dec 2024 10:16:21 GMT - Server: - - cloudflare - Vary: - - Accept-Encoding - access-control-allow-credentials: - - 'true' - x-alchemy-response-status: - - '200' - x-alchemy-trace-id: - - f4f7b19149dbb48e9c995fa6889409eb - status: - code: 200 - message: OK + - request: + body: '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": + 0}' + headers: + Content-Length: + - "73" + Content-Type: + - application/json + method: POST + uri: https://polygon-mainnet.g.alchemy.com + response: + body: + string: '{"jsonrpc":"2.0","id":0,"result":"bor/v1.5.0/linux-amd64/go1.22.1"}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK + - request: + body: '{"jsonrpc": "2.0", "method": "eth_estimateUserOperationGas", "params": + [{"sender": "0xE8B412158c205B0F605e0FC09dCdA27d3F140FE9", "nonce": "0xae85c374ae0606ed34d0ee009a9ca43a757a8a46a324510000000000000000", + "callData": "0xb61d27f60000000000000000000000002791bca1f2de4661ed88a30c99a7a9449aa84174000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000007ace242f32208d836a2245df957c08547059bf45ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000", + "signature": "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"}, + "0x0000000071727De22E5E9d8BAf0edAc6f37da032"], "id": 0}' + headers: + Content-Length: + - "885" + Content-Type: + - application/json + method: POST + uri: https://polygon-mainnet.g.alchemy.com + response: + body: + string: '{"jsonrpc":"2.0","id":0,"result":{"preVerificationGas":"0xb5c8","callGasLimit":"0xcbb8","verificationGasLimit":"0x1365b","paymasterVerificationGasLimit":null}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK + - request: + body: '{"jsonrpc": "2.0", "method": "rundler_maxPriorityFeePerGas", "params": + [], "id": 1}' + headers: + Content-Length: + - "83" + Content-Type: + - application/json + method: POST + uri: https://polygon-mainnet.g.alchemy.com + response: + body: + string: '{"jsonrpc":"2.0","id":1,"result":"0x7aef40a00"}' + headers: + Content-Length: + - "47" + Content-Type: + - application/json + status: + code: 200 + message: OK + - request: + body: '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["latest", + false], "id": 1}' + headers: + Accept: + - "*/*" + Content-Length: + - "90" + Content-Type: + - application/json + User-Agent: + - web3.py/7.3.0/web3.providers.rpc.rpc.HTTPProvider + method: POST + uri: https://polygon-mainnet.g.alchemy.com + response: + body: + string: '{"jsonrpc":"2.0","id":1,"result":{"baseFeePerGas":"0xef8cf5da","difficulty":"0x16","extraData":"0xd78301040183626f7288676f312e32322e37856c696e75780000000000000000f8d380f8d0c0c0c101c0c102c0c0c0c106c108c109c10ac0c0c104c10ec10fc110c111c112c113c114c115c116c117c21116c315190ec3171a12c3150f18c11cc0c0c31e1302c120c121c0c118c11dc122c22625c3271318c128c122c0c0c12ac12dc12ec0c0c130c21e2ec0c2262fc135c136c137c138c139c13ac13bc13cc13dc13ec13fc140c141c142c143c144c145c146c147c133c0c0c0c0c148c14ec14fc150c151c152c153c0c155c156c154c158c0c0c0c127c0c0c15fc159c161c3624824c0c163c0c15dc0c0c169c162c16ac165c0c036fbc1d83393ad7842e0f4e59d6bf40e3739a7537c8f67dd235f03fd567dbc8b532be94f21324dab9fe3bc04433e5d88aad7d5509acd965f18e86ea65e237b0501","gasLimit":"0x1c9c380","gasUsed":"0x11e2679","hash":"0x9812df824fe86ee7666ee52ba40e8a07bd840d179b2355584ee17c4f0b28bfac","logsBloom":"0xa7fbbb7f99f75e978e44ca40c6b732d58b0c834c509119afb9a3062ce3f7e354d33c8aff5435fbbffbc3829bf5056a7f2d7f879ac2da27613e010ba2c77832d4adf4369cf746e5a8438feadeb9facab22e3336ee155c9902dd5b8fed3132af81fcba60d65ec928a1097fc525086fef4e2f95fdc0d9ff9c7dd28fef3258de2a833b536a603be8f5e1019892d7a76c47f0bdf38ecb699cb15ef8872cd67fec1c6d3aed17eb9494333a7873fc78b6ab2fe74b5d381e7aa6179cb41f378baa4177c5fbcdc46be3cf473996232a3e68f6792c7107adeaa608ae11d5f3ff9be997ac4e42ddace1bd66c3cbccc5ffb04a22ab26dae95637930bbc5bc1fccf1cdad4d83d","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0x3e0dfa3","parentHash":"0xc116078cf08fdc3698450f99c3fb8174b3f963f3ef69940798ecb80685bd5403","receiptsRoot":"0xa9dcec0fbae87f1ba0b6e00e24f1d4cc85e946f79efd09595dcee8adde3c308f","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x14a38","stateRoot":"0x91298e6d8f1f78389a8fa9ffd4fa8faba6df3874ac2378ff81f1b79ab8f2c0ca","timestamp":"0x67502bea","totalDifficulty":"0x49922530","transactions":["0x9467c7880dee353a78ddf750a671c77427959f1419f24721516b064a77e5cb14","0x2aeaee1abd69bcadd2d1409d0c20ddb1ca21e3f8371357d7dd354f2428c2f2cd","0xf52b3c9298195a53a4ac25f299e61b17e75e5f88e29456e47f0fcaf233829ae8","0x5d0892b203171f520ff6f712e0e532214f63d2ccdba02e62b231611ad6775bcc","0x9f02c7acaf92db5663c0d0d3ffbab5046e8691c28042465113c8b7df35ad92af","0x8f3eefed92190625cef38e1dc0068743fb2a36765a69775d0cb00fe191299f3b","0xef8c9786a01b9056d6e523e03f22878370c4181eadf7cc920f62b290c48c46b5","0x028dbcec1869203239ebebd9cdda153f748a89d846821af62f15eb59cbda24bb","0xa2184979376cd003dd3d4136355fa207a13a6c57cb91b369f3a84466148d27ef","0xd2f2c6ac1f5ba4bcca22de71a43b692fe220e63d6c5aa3265e021c5dea2c07ca","0x901a50d3407350cf8a0bc70e508532a718df4010474876b5ffa0a9cebe0a1283","0x6661e2d00576609d85848a9c274c496b31711493664cf754c004ca46c3075a89","0x9ec2e632cc7140d129ad80f04848fdee603596820aef775d4cf8ea5e3c6da4fe","0x08ead36f41411b692b42abf3a1b2ddefc9716fe61ed9fef30062f85ac1d907f2","0xdd52c363257371f554a86190b539c6eedcefa467f3321fece1a8642c441acdaa","0xbc36a622b69157e2e93290b25a2da00a1a871b5c37b69e77466ecfedf1777017","0x93caa9947534ddbdf3cdd632d391b0560725448256f12f9b5a8dfd5711722cdf","0x209292631fd5d359edb537a4c6a71425dfac541d2fdd2c439918038a10ac567a","0xfda41e6a50e7e2690a527927ac63d7ef16272f4421f31c10c6ba081b6d72314e","0xde4e8b79a8f4b694722d9fcf5be8532afbfcbb561cdcef99d54f96a58b8cb8b2","0x446930f11fbe56d3e3ccdc189c450c31051c46ad5eb79642782ff4ce1e454b12","0x0b1cedf3efe3571381fdda301f264e27940782dc51811315c0f98c36aa69f64a","0x8838c302df826f2efd21df59b94791c85a83c5afaa1cf1585016c89396d58ccb","0xc1a692e1da455a7707574361bea76c4c3fc1a249c6807c73c7dfb4f1456ffefa","0xffa5d659f0115253447ebd2544070bc3ff923d0df0ba6efc523ab30dc813177c","0xb7e2176f1aabe0b1a88334f281291d8c2aa2f5bd863b5447822eb06b89643599","0x079509573f1e3b81ef8a382199d7916ddbc637af015fd022e06bbbe3c7c59d36","0x2b86554f06f3885fc070f693899f81f40ab4f57bec426ac5c985aad0c716d569","0x80d703deafdac37b1ec50e14e7112a7260141f8c5118990f1696b129e02f9015","0x2ab499209082ecf9d52c5e777928fe4e250523cc1f36a7e553b9551e0207c85a","0x68ae0a7618c1c361fc457b27e27b6cb25711bf4f52780d83c087784048284640","0x3ef5754e36e395e177277ee213bf31d2e9bfb0b03ec73ee772f9fb145371a224","0x60404a9d0686fb05486af0a7ac1bd4fe2fe7814c170a440516d3b8668d9b1637","0x05911f20485c649e9b8096072b487d3f5b12da42c18f580b2a40f53d130e6b7f","0x079c7e93fd0da0a1b414c23a6130ff49ba45e7fa0b2db5e36ee50f98eba86248","0xeb3e28c8a4885fbf29aa4302e54beba30a652d23de4d0a200fc4aa96d95891df","0x35d89299631753af9d0e9090243638273b04878178253d012071cde1c1acad56","0xc090afb4928cf05560ed88353609ef8600e9c5e2a540c3e11475f669edeabe1c","0xe7d13a119ca701a531f44d64c3eb7196e2595ca872c4e41476451615a1176f95","0x5dd204491b05dce1e3e7e5ad59110eb56f07059b716916b2fa8029f146e20efa","0x9db22f1cddb27d05589479b42936e9b18ef15859b6abf52d16e12148fb90c134","0x2aff8676b986cfea88f89232b82e95854f65eb710786e6bd661e5c90e0c28987","0x8467aa2a85753a7c2fe2b13db1e454eaa226900d18e5a3b64c412a3415857266","0xe5a2df1308395b8ebd8be24e79f080faa3f397c5711615f64e92d22c9c8dc38a","0xe0f6b6a7589407dcd462bd6811b804843994449777995be60ce3f7bba4c33508","0xf34817162b2cf4d3388f0bc2d2a63788648abc83152a696fd732102e1b945dca","0x6c453737ace4db950dc29c620f922f2e0c8f4a90cc63f3a99969530538b394e3","0x1864f6a6114fa42c167ab4262a5628c62f7080542e4dac192f12370e0c70c7e7","0xf0926e427fa6c1c0726ba9ef57a3171282d48d369c1a088a64ce23065960d8a9","0x82084eaa79f267ccee4d1b7598c702dc60b7381ee705940dc89729bb8a402b2a","0xa40ee21e1b478547a5256c9efa96903d032545babd0292ef01531062242d9a88","0x69766eacc25cac03db983b44606226317c039b45052d63d1cd55c4f90aecdaba","0xc8e76268ad97b9f77d72f5698b79fbdc2d280157066153b423030277eedae0d3","0x87c81b17573f30c66e1eafc0e29777750a6f9910f82424ef7eac8356bc56ac27","0x8ec5d3051e6928dc69f285dc38c384abdb0d4d661d722d6f594abb38b89ba1f2","0xad453e2430f1884a36db126b3275612a796fae8feddd25d7bdc801cdd2b63629","0xd8adef0545a76940ffc11a4cca01079c3c8e1674d3074a49ace216a24c27f76c","0xef614fe6ba9ae78eaa996d01282b2edda35387684189eb5f08255b7b1ffbb087","0xbe5e5e695578c35b50acff70a2ba1999a330d080b65a33286eea250d4d0dbf48","0x5adbcc0a227540e5815b57e0c9710c8b864948f544f023b78fd569ac6c3c1f55","0x649e57394caceb1af49e093d4c7be905b51a0e3b89d6553254e97f0e97ca0364","0x749fbd1f138623f0fd4c7b3fb9b70ee891cb854a557107d05f2ee76e4768d49a","0xe6ddf788cab10f89a3d100a97bbaead4a048176f13845bb32413534167056965","0xa660b081401bedd5ea242cc214f356130d1548afa273a416de5e004a81447c07","0x432a7c13e86c21626359e3c452887da87e3a13ae60ef4416b5a06cbb270c8abe","0xa7c6ebe000b8e38dab5d06f0f8692c127f38f9de1aad87f0969d6e4ce4ef9612","0x73092537ea644320bf77393f0903a38005b181559fa06d1b0b9e965a44289a74","0x5dd72e461b83ca26cf13d8e2bbc316306fc73428834060330dde3c89989917f2","0x67a45e16233f812520d50f1aa0590968f56a0c8313c1bd5c19ed31e97e66078e","0x8f0b49330f079d4211e3ec86c02d9b3ec0cc988892842b7ab9da2e609aa0f484","0x45f6e96275911f5af90f0e5e594b2d1a9633b45d140bdac514515d346d6c28ad","0x5d3f1bdc15feeac7cd57b34d61cd033ca8809948b877e1f5187fceda839835fa","0x8532b3cc5edaf2f3fdf3383f080fff6d37f9704652f6252a0928501ec148e097","0x4b05e95f41ffc7f1e4bbbf4aae15a6a9ba4ec362e6895be732e931c7ff1c912e","0x14b2e5c406bab9e3c5ec05847514b55ae838ffb74247816b32475639864549d9","0x9ee4e0aadb2bf327ffc6f2ad147e854770d18769b9e97dac34a47c98acb64b1c","0x5b3d81327c6fa993e01c23eed82bfeb8af7d74389c5c8b7441cd564327cff526","0x718b58b5b24c1246003fb3350cf1990974da6a7bdb4547645d610fab8c4e4aef","0x6a122b47bd207f16253b1112df590cb20440e0f482ef7b761835be3482f933a2","0xe9b0b80b0179fdebcfb872c9b288b22104bfc23d50a37f2f13963c610af2ee6f","0x6b8974a4226e063e0d31f8bd1e644aa38370fed3f1bb7872018fbd7940eab5c8","0x762a8e38b253f4fca380c55038d40a678fd0d5421ae117b24436f6e8d6af2f5b","0x99edb1d86a6a0286875c7fa11d5d86de16650644ec7d788f655db3a76662c1c6","0x5fe2326620141bf79cb5270e03fd5bf6d0021dcd2eb2193259eadffffa7426bf","0x9605cbcc3ed7eb5b94fef3bde07ac737fe2b45da8049075166b3ce32be184c7a","0x73240b4fba4c2ae0632f85e8c8f53931fb8fc83b39d85d29bdfc2c31737cdbc2","0x5dc249897cbec45274c61e1cbee654e99cd612538b788afdc4dc6cbddb903d69","0xf150c25a5e623f34d931b64ab3a0ae2c73655b287dc1b3c328b4945981bfef89","0xa3e78ed6100bdcc973b316914da588f26705e1e0ca1516fef9cbd0e7d6c89333","0xfe2f254fa72723d3e3c87c931a154a30f309000235a703adb4ede0abac9fed5c","0x8e8898b5208755574768f31030e1b15ede1f31d9037177a2a9f30aec3d0461d2","0x1b1eab7319230bd4c17040a2105865875aaf9f4b563ffe5fa0fe26856c1a429c","0x7a706fc8003c49fcd935cf6244de0e8ece1d98afcb6aad90287d13ac3f4014f4","0x9a2c596d2dd56876d9d31ca51bbc0fa6d64fac5372ddac4405cb11bd916de98a","0xb452beb2c34b60e12bbc6bd4a230529257f1300f3b93d8d2bbd01d4efd4214bc","0x597127293efbc838d99f39928ad2a0b5290774fb2fa5fd5e0a5a4be2f4fac56b","0x7ea193cd63b3f45da8c4386af1a93959938591f69848559901204f38adc2ffb2","0xc3dff26f750923b047bb750fa9085d6f16c4997ea441f558210e0fd24f291b89","0x735b165364534e270dead9a4eecbe4334b410551af8884be206cfafc5a5067e6","0x343ee164ae7aaca37ea20abd638bb99197db5d6a8f50d499a2c1d557e0c66ba9","0xbe0c8a138b9ea8735ef2ceaaa3d6449730247d2013d16f91802c0490b22de6ae","0xd173a5684a6b47cf7e46b9fa324dfe79661284076d248acf656a9f6693d69fa0","0x42ff00b4fca45c51bdad3fb298ff8826a3f0a0c5ef36223aa1a2a39bca008422","0x0ba664b6149d498663110480d568ec62cb1dec2f748670a15a08babfc0380821","0xde32b9a10bca6b355f54282972057cf453109bd1b3d47c910fb5e8d16ec31038","0x1d11a0089905d9e563868cd023903e38404a6a0f6b9fbe43cb55ea102cd2c273","0x6647a553748e8484ff4cb8e7826dd62dd9f177107d4d1d5bec5fbef084c7735f","0x27302f702eb8553410d750824a5e327cfd7577cfa5719f723fbcb63fa27cba6d","0x15aed6e395006bf128c372dec290183b27a5496b5201e449bf8c1a93ee04df98","0x3039af717e97c777a7e8a497791ea88cb9de9058ccf69fba583551e190557b19","0xd842413ab6d7ddfbfeae4b06aeebfd87804291a087559018bbd84a8ffcac2417","0x89a190f819544c65cb94617009757c6d9221cdbf8554548f8fc3d534e06c53af"],"transactionsRoot":"0xb1785109127e5a11ae4dd1cca6150f6581cd43b9eae3654408643cb51f3b4060","uncles":[]}}' + headers: + Content-Length: + - "5564" + Content-Type: + - application/json + status: + code: 200 + message: OK version: 1 diff --git a/tests/conftest.py b/tests/conftest.py index 7c5eddd..2722ae4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -50,7 +50,11 @@ def pytest_recording_configure(config, vcr: VCR): @pytest.fixture(autouse=True) def vcr_config(): - return {"match_on": ["json_rpc"], "allow_playback_repeats": True} + return { + "match_on": ["json_rpc"], + "allow_playback_repeats": True, + "allowed_hosts": ["localhost", "127.0.0.1", "::1"], + } @pytest.fixture(scope="session") diff --git a/tests/test_aa_bundler.py b/tests/test_aa_bundler.py index 0de5efb..db1cb96 100644 --- a/tests/test_aa_bundler.py +++ b/tests/test_aa_bundler.py @@ -13,11 +13,6 @@ from . import factories -@pytest.fixture -def bundler(): - return aa_bundler.Bundler(w3, w3.provider._get_active_provider(use_cache=True).endpoint_uri) - - def test_pack_two(): assert aa_bundler.pack_two(0, 0) == HASH_ZERO assert aa_bundler.pack_two(1, 2) == "0x0000000000000000000000000000000100000000000000000000000000000002" @@ -293,7 +288,6 @@ def test_build_user_operation(): userop = aa_bundler.Bundler( w3, - w3.provider._get_active_provider(True).endpoint_uri, nonce_mode=aa_bundler.NonceMode.FIXED_KEY_LOCAL_NONCE, fixed_nonce_key=0xAE85C374AE0606ED34D0EE009A9CA43A757A8A46A32451, executor_pk=TEST_PRIVATE_KEY, diff --git a/tox.ini b/tox.ini index 6201be1..249c3a5 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,8 @@ description = invoke pytest to run automated tests isolated_build = True setenv = TOXINIDIR = {toxinidir} - TEST_ENV = pure-python + TEST_ENV = web3py + WEB3_PROVIDER_URI = https://polygon-mainnet.g.alchemy.com/v2/FAKEY passenv = HOME WADRAY_USE_GMPY2 @@ -29,8 +30,7 @@ extras = deps = warrant @ git+https://github.com/gnarvaja/warrant.git#egg=warrant commands = - pytest {posargs} - + pytest --block-network {posargs} [testenv:{clean,build}] description =