From f249d482d27da4bba6ae907831931ae7bd149cfb Mon Sep 17 00:00:00 2001 From: Victor Oliva Date: Fri, 30 Aug 2024 12:04:57 +0200 Subject: [PATCH] add tests for chainHead_v1 --- packages/e2e/package.json | 3 + .../__snapshots__/chainHead_v1.test.ts.snap | 87 +++++++++++ packages/e2e/src/chainHead_v1.test.ts | 145 ++++++++++++++++++ packages/e2e/src/helper.ts | 24 ++- yarn.lock | 68 +++++++- 5 files changed, 324 insertions(+), 3 deletions(-) create mode 100644 packages/e2e/src/__snapshots__/chainHead_v1.test.ts.snap create mode 100644 packages/e2e/src/chainHead_v1.test.ts diff --git a/packages/e2e/package.json b/packages/e2e/package.json index 75196558..ed238b12 100644 --- a/packages/e2e/package.json +++ b/packages/e2e/package.json @@ -13,6 +13,9 @@ "devDependencies": { "@acala-network/chopsticks": "workspace:*", "@acala-network/chopsticks-testing": "workspace:*", + "@polkadot-api/substrate-bindings": "^0.6.3", + "@polkadot-api/substrate-client": "^0.2.1", + "@polkadot-api/ws-provider": "^0.2.0", "@polkadot/api": "^12.3.1", "typescript": "^5.5.3", "vitest": "^1.4.0" diff --git a/packages/e2e/src/__snapshots__/chainHead_v1.test.ts.snap b/packages/e2e/src/__snapshots__/chainHead_v1.test.ts.snap new file mode 100644 index 00000000..4fa29044 --- /dev/null +++ b/packages/e2e/src/__snapshots__/chainHead_v1.test.ts.snap @@ -0,0 +1,87 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`chainHead_v1 rpc > reports the chain state 1`] = ` +{ + "finalizedBlockHashes": [ + "0x0df086f32a9c3399f7fa158d3d77a1790830bd309134c5853718141c969299c7", + ], + "finalizedBlockRuntime": { + "apis": [ + [ + "0xdf6acb689907609b", + 4, + ], + [ + "0x37e397fc7c91f5e4", + 1, + ], + [ + "0x40fe3ad401f8959a", + 6, + ], + [ + "0xd2bc9897eed08f15", + 3, + ], + [ + "0xf78b278be53f454c", + 2, + ], + [ + "0xdd718d5cc53262d4", + 1, + ], + [ + "0xab3c0572291feb8b", + 1, + ], + [ + "0xbc9d89904f5b923f", + 1, + ], + [ + "0x37c8bb1350a9a2a8", + 2, + ], + [ + "0x6ef953004ba30e59", + 1, + ], + [ + "0x955e168e0cfb3409", + 1, + ], + [ + "0xe3df3f2aa8a5cc57", + 2, + ], + [ + "0xea93e3f16f3d6962", + 2, + ], + ], + "authoringVersion": 1, + "implName": "acala", + "implVersion": 0, + "specName": "acala", + "specVersion": 2170, + "stateVersion": 0, + "transactionVersion": 2, + }, + "type": "initialized", +} +`; + +exports[`chainHead_v1 rpc > resolves storage queries 1`] = `"0x0000000000000000010000000000000000408d39445802000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"`; + +exports[`chainHead_v1 rpc > resolves the header for a specific block 1`] = `"0xb60cb17d118325e80e5d1b36a5fe97115fc7b56230d5f3e287fc0317d4b16edf02efe700f058a653118a5b6d17532b5f05be14ccd2e1e48ac629f90fddd0173ac11ed5b83510ab964253daa8300bb0d49e37c6ac4940e954866862d3985f0ba13f9968e90806617572612051e260080000000005617572610101649411576e676f2a8635f943502bdfb6739282702112299fb5e6c346a93f1866b62a4e747dde76f738e492ca2eb0a03ed996336d7356988ab9d5adc19204cd87"`; + +exports[`chainHead_v1 rpc > retrieves the body for a specific block 1`] = ` +[ + "0x280401000bc6ad70bd8801", + "0xc1b2041e00e9026c0bed8ea286dbea10d9add16a898ffe1943bb298283c4e52c4745f4f9e7bd1bfeeee700440ed43d7b7698bda1f350a6c89bdf2ecf1228b5b4322ecfb77d1c607d9e7b80fa7941f26fff6290c514267179c088e4a0b185fa23eafabd9ba29d53861953910806617572612050e260080000000005617572610101a66761c6f75913d47b4881ab589eee15fa8c0aeb6ed38b941108edd2642d7c3ddcc42ab8e79a244d06520e61c0670628415b4e4f6018d744da1fe19b87146d8e99bef30039f24216a73fcc139aa779b5095a61bc12a9f934f10d59fa2740fd000c769c2e000050002901b456f5a4efb16ffa83d0070000804e75289a0a452807295c0050bd79ff49e15816d25f31d5f8b0b901491a9f3527d856f5a4efb16ffa83d0070000a428e8030000d4070000d6070000d8070000db070000dc070000f0070000f2070000f3070000f5070000e856f5a4efb16ffa83d0070000b42ce8030000d4070000d6070000d8070000db070000dc070000f0070000f2070000f3070000f50700003808000099015c61975d97255ddb070000d00700005501e803000000900100009001000000000000000000018c74408c28f6627f58a8e10b3ec06b98b0166bfb148641a35c5cdfc7a56e68fb00e8764817000000000000000000000000e8764817000000000000000000000099015c8c2de8299067f3070000d00700005501e80300000090010000900100000000000000000001772e98610c34bfcf0dfbdde1794231c18cef8e0d65b360eaa5be668c4c4f3bc700e8764817000000000000000000000000e876481700000000000000000000009d015d01c872d0ebaf85d0070000f50700005501e803000000900100009001000000000000000000011a55dc86f62772e32e58a2b8d0371c0940701e21d0f42134905ad3e3c1d2070500e8764817000000000000000000000000e876481700000000000000000000009d015d0452a22bee61fad0070000f20700005501e8030000009001000090010000000000000000000187a6fe1514fd0de8ea5c6f8a7101ee5145aa4fb16e43d0c84860331ae44d402000e8764817000000000000000000000000e876481700000000000000000000009d015d04d2a15ab51127e8030000d00700005501e8030000009001000090010000000000000000000171cdacbf1af48f4252086a6b2134ee98abd462392270f81885cef0c3f2ed8da100e8764817000000000000000000000000e876481700000000000000000000009d015d057a605f506cfcd4070000d00700005501e80300000090010000900100000000000000000001be71a21c87fd9fd837b0608dc9f780a666c890be213bb36ddc79179384c6683500e8764817000000000000000000000000e876481700000000000000000000009d015d07edc4cbc65e03d0070000d40700005501e80300000090010000900100000000000000000001436ee8e8e7d06535bf6e65ab2f678f695100c87c22b60360c62a5712e2409f7a00e8764817000000000000000000000000e8764817000000000000000000000019015d0a87461a6f93a938080000d0070000d4e8030000009001000090010000000000000000000000e8764817000000000000000000000000e876481700000000000000000000009d015d0b652b2ae6ed1ddc070000d00700005501e80300000090010000900100000000000000000001e66816642666a6ac1017fe14aa32407c4129bb05bd0e3f6786ac58945c025c9600e8764817000000000000000000000000e876481700000000000000000000009d015d0bc334ef110d8af5070000d00700005501e80300000090010000900100000000000000000001ee81f513b9828daddab221068bba9249fe60f5cde84201ce0190b8e9c86010c000e8764817000000000000000000000000e876481700000000000000000000009d015d0be1ee506d55f8d0070000f30700005501e8030000009001000090010000000000000000000159898a2874487a46052f949bdc904ec14c45f5597fec9a64e53c73e1b15ae53900e8764817000000000000000000000000e876481700000000000000000000009d015d0c472775baca93f0070000d00700005501e803000000900100009001000000000000000000019e938c3bafc461a3c99f1a18cf08ead21e2473f2eae1d67a6a2ffaefce6f49ce00e8764817000000000000000000000000e876481700000000000000000000009d015e046fae65527199f2070000d00700005501e803000000900100009001000000000000000000011623200dc56d973c200448bf7a939ef621fe5f54fad26b838a7201459bf77e1e00e8764817000000000000000000000000e876481700000000000000000000009d015e1a4e21b9b6ce11d8070000d00700005501e803000000900100009001000000000000000000015063b45fb0f97475aae3195a3a5ee0b06ce909ecc8c856d42d51ebde6fc6773900e8764817000000000000000000000000e876481700000000000000000000009d015e36ad4314650419d0070000f00700005501e803000000900100009001000000000000000000019f71e512f2d1cc38cef38aa8b517deaa0731e0d94a20e7907e7d2ed4d5767d0800e8764817000000000000000000000000e876481700000000000000000000009d015e36c65ca123d5fbd0070000dc0700005501e803000000900100009001000000000000000000016cc7baf613a7d02ff83b8c42d19ca65e4a2d054a136df871cb1aac62e941965000e8764817000000000000000000000000e87648170000000000000000000000c45e414cb008e0e61e46722aa60abdd67280647979f673b44a6927553adcc3d3b6eede7a2346b4665dd6ec19c8a10ceff6719d015e4f36708366b722d0070000e80300005501e80300000090010000900100000000000000000001055771e1276fbc23eb4b7b4631d55e489b0a77310bc21d7da7f443f0973a0e1300e8764817000000000000000000000000e876481700000000000000000000009d015e55c8e02d73966fd6070000d00700005501e80300000090010000900100000000000000000001fdf3e3a2d06e4834b3f407d6b2e7a547795f302818e7f9e9775135e70f0012b700e8764817000000000000000000000000e87648170000000000000000000000c85e77dfdb8adb10f78f10a5df8742c5458401614798c9b3f2ad435f4118b7f3af954904d78cc26443aadb8190dba355a2c6c09d015ea99274c2ff3639d0070000d60700005501e80300000090010000900100000000000000000001ff53da92e719208899fa521ea30b07cfce7c94299ba5c6de879d5a9c141bd65300e8764817000000000000000000000000e876481700000000000000000000009d015ec412f496dcf830d0070000d80700005501e8030000009001000090010000000000000000000162a9718fbc71e7dcc66f1dd50e9e4e2e7e825bf5e76f8a7993b6c1910360b28b00e8764817000000000000000000000000e876481700000000000000000000009d015ec648b30353eed1d0070000db0700005501e8030000009001000090010000000000000000000100382d804f7b02c95c2d6b3b6a9cad2c97c2d7570bdfd32f8e8d961754b74b6d00e8764817000000000000000000000000e87648170000000000000000000000c45ee678799d3eff024253b90e84927cc680f126c9e4609547475ec38b61ba89dad52e716489aeae728840491797acbc07c479035f04b49d95320d9021994c850f25b8e3852d030000a000005000000a00000000c8000000c800000a0000000a00000040380000580200000000500000c800000700e8764817020040011e0000000000000000e8764817000000000000000000000000e87648170000000000000000000000e8030000009001001e00000000000000009001004038000000000000000000000a0000000a0000000a00000001000000010500000001c80000000600000058020000580200000200000059000000000000001e000000280000000700c817a8040200400101020000001400000015018000148087a6bf935205a5258f5fd2e7a80027f6584311e8eb535a47e5984ce9a754c2db80445d631a1ecd6de9476c8b816d77a7a810d1d37497334536acb58c58f9a6a700d48000c0787694c040f5e73d9b7addd6cb603d15d3b0021d9da3ceafbd080d00000401485e4993f016e2d2f8e5f43be7bb2594860400150180010180e76205a9f40ea9d935f10dd1b76ec68ba02cb858e680311cf06493dbd52b7d2080ab8ec58738d227c258a530d72dfb279742d9074f55c71d366a57349989683df71501800102805ea926398d7f22c34a76cd27394e42b38b67d9a8e12682d42ef2c022f1e9d0a580c7a667171df523ff10c4bd107fff0b8505f0ed517343daf43db58f2589c919b91501800110802d0c8b37d222227c6599f8ddbc147a2a86601b6a6c3b350ab285fbbee6af0d3f800ebe650369ce0e3ce85b22816181f598cc6ecf7a3b22314357ab4181b9ccb867150180011080523c559cf4c2ecd7395a65d872d15cd441f3ee50ec5ac49b4d04bea30abc5970809ad1ad94de0fee6b6abf940739b2f72f260f8d952305ace91f4a7bd2976b89991501800404801f8c5940bb92977d89e30a335a296ca56a9ceb755370f6421d3bba50612f74ea800fe6b03639ff2739e42b263a64b97458bbb7b04a7f13a7dd10b77ba5c3d3940e1d028004648006eb75d1d207a5ff8776e8595245535c6a007781de7dcdd23e27eef27f87485580892ca882bcb7de6b01abe0617adeef1193fc432099544de3d933c433ad24f7a280df898b803d545cb2f590dac6c9e1264d7119e23eafb19fefa1826185bb3f6c9b809443b1774e380ca4f8ca172eb56d8f22fd0380e9171f3d411614bd136694300a150180080280ca984071022534f19a8a83a50f126ed05857e02e28cec9ed17eb2e285c7bb2158074b84c6cfc31dba4635917acd4d1ded1cbdb9853a998208eb17a4506d5564fb8150180080480cfd43d9d9f3bcc3622d30d6d839780cd864cebd53703d40f6e514a3eb60196018084bd8a9563de5ba3de25fd5fbd51e8dbf97ec84b7694b1dccc80c0562e5de4c3990180080c80d066a00dc79b0a8601ea466d09a4c969c246ed7d8b4f029afcd41944e33ae8b08021228c026fb40364eb5d5bd4b2ff1a3ea147449371719ba784241847db09c3a48097db38ba14a5a63a79e6b7ffc5541f99c82f13634789753afbb2fc365a500d6e290180085080720475da1eb4b5f077fca4ad1e6add131c2ce61ab829c8ca4ef18029c79bacc048563524f87eaf5eaf000800001404e8030000485628b8ad2696ed532c0800001404f20700002901800850808eaf571106205a34213fb1fa2fa165744e6c0fe81f161d0cf6331d4158d0b8e648563524f87eaf5eaf000800001404e8030000485628b8ad2696ed532c0800001404f2070000990180085080df4e4471ef3fea64b11dae1a81bb5b7bb5137ad4da9fa73906039a4c6a8f125c80aa355c7789c126573837fde95fd60e274cddf219667c77dafaf68056bda3be66808df47344d894c3b42ac9e47e98f014f07ae4bc17bc37bb734e57b5894fa3e2dba9038008bd80d7f054065a25e81afdd87d81191cd0d3f63cfbb65534cc6e94d8450084771f1480ae61c0d02438db7adda8e05b69b2e2fc6ff776a09c4521f3a149bcac39ba499a80e21ec27f1f4b8d429b10752c2d22caa92a36d14dd2610a9eb7f3a39ad27781b1803198918edb1541db193c4f4aa6969a32daf26c6b917b261b73550565953172cb8049dad376e9ab8f63f3ae0e31bcf7e01d034573a23c163336f64bb34e9932383080f3a4aaff8c298bf9e91f54c86240e0cafd4b03e75f1b01708b9953ad8afa91298065609a7ff729add198685230069fdafe46a61294414ffcc75e75841f37f9cf879101800c2078767bbb460270642b5bcaf032ea04d56aab6cb5748316c751060d00000400800c44b03e6e46f7d2749af6f5865af2e095c316ee46b1c0357e27ebfc030787e0806d2cefd922087a778a4b4c4110218b7257a9d0345d84f7ee90ef7e6635edc6dda10280101780214e0b3c1f1f8612ec8f8aedef5aaf9506c3ce2a2c3aaee20c7ec4eb80d274628075efd7ab003c663694f2168b8d18dfc395c531648e6a70bc1b831c499605963f80650d2f8aa2a5ef7119dd61f2c588410067b818c017139aa00d2ec6b84322fca580b02c981e77385f780fddf5a86b75d190a78e3ccde529266be13dffe7f3ac191080782da7db6940d8fe5817d87b19c484c1bb74e67f7bcc2bdf35270d081060ceb399018010608055f7120dbee2fc56df98dae7b16f99a6c1a0083180db28e75a0c7de276fb89b080130d8ca189ca04528b6c768c16d91748f4e8c4098239bf15ed58ceaaecc7ca64805f738e2d7016159bb83f0acfc05b94f3bfed39826328fbea9a5a6844b0ee9f62150180120080c087c34a62c2aafdef39ea9be0f9ac5764a624624f6259dc54d5e0825208ed5780a18673b451b154098a7a400495526a375c86a62e3c8f6def0a67b00eb6d26e87b104801b7680b63aa2fda4bc82cc53ddf68902b524145f83417dba47e44ff19e77ace918f53c803cc55fe3807c21dfb0360ec823ecf876e3b34c2c3e59c33d1aa9cfdc30bb697c80e3bac8ff7c3819e8351a6f38c6c32b2685a550ce4af50b631025a5d2ba7bdc5e80624df3ef29fac7071167c35c8080908b56cf1c2b209ee3140ed75bf93107b3c980787bcd8639494b1b4ac2cfe8a085b773c02770e2a0738c3ccbd81c2745eca42e80fe171033e944641bd7003b6bac42f5497a9fe6b398ad5beceaa1c4d7ed2d97bc8082e17813e9e31777745163d87491a58c355858f3b1f31dd88768344bb32ae9f880a6c7686e79b1c26c491f34f404aeab80c6d35a8d487b41a0f7bfc21712bbe27a80c6e23d4e232a91069bdb681e7e5a8309c6537da00df3ef481d6bc2859e0085c6250380225580c7f341af5a9b1a28524bb8b74512c3d9fab1b164dc92262c59af7aa77641db3d807eb28ee6f9bd0023945be7c0c9aff04734d59de30f2b74df7336317c968df73280a7114079c6e443ae5d81a7b2c9f316c8b77f977c7ef05ef29db60396009df42080d6c3ff5cce56c85a153f0ae049876fd59e17cdf75633440b597eb6b83a23148e8077e20e3e8fd18cebde793df6204f3259fb7851cd86b5e29df9245d4bb4d06fee80ad4b1f1bff610d731ae7bab96ee9dbd3c0396f92a720cc9a814202f007dc03fca10280283880a1a229374bb2b10777a483d6ca69fb41bd0f999d8212b78295a707c033637e9480b8ba9d6c26212e08a754b28634f4a39e298ee2b8ce7e8226f5649a8d9aa45ea5801e985a45c3af4b96423135fb9555c1a0b08b6d35f2d2265dcc14039b87f7ba5180aa48bfdc4268bca63120e4a05a80f2916c9fe68fda15eaf77f49070eb0201a728075e3a11a7e0bf3219c9d0e1fb599bb7a8ec67d80927cc485e540d7053d9bbe9c25038032468005d4a34f30db091ad60651636fd42946c1ef81c2d6355e9558ccdf18d75c61e0809b5ae29a9e4559ef4b9747b6cb051ad6f5e6e89dbdb07430fe996c3bf3f5991c807bd7b7016c35992cfcafdc5e3ce3a63a3282d189b49b23fa983eec1c3dd48e54802e4abf2a2bc7869170aa8c265f52eae73d46c3b30a1e38d66a01f6d54ad2735a808aa52620ee7b00389eeafb3bc397c1eced571825dd4c52c5d4678f9d7689efa5807b0bae7c6263eb548aee2f93c4ea7dc89a19b9357fc3be85b21487a979bb9458150180400880b83b0bcef0c15daf055f31e7bf25e31064a12ff9853c7d956a3938227a724d29808c68f773671aec1db46b2c37b4c827e64aa7290d65e305cdaaa6b175596256f11d028041098065b7de50f125aa94dadcb284b6416887705b8905fc50681983f3c6893d158c3b803fb4f928fe8c91abaf2bcd5d307bac924916635ea28caae82c6f81f1c6ec6b65805fdb71f3db4adaa5f1baf89d0dea15d9fdb4a1c8ac29a00ed1b8b6492bfdb35080efeb2226f503c7503e66a480da0364f772fec0db9bf08c8dd719f3056065d1eda1028048c2803b80402c3c9da1ee24b7f58d5321a089c7574ebc3d736a1b4177ccd2d5a81745801bb1bdd7cf0d97cece397f12e8518260848791b15d899aa1a91b27c5003ced198049da90db410ddc5fcb63a6ba31fff1140f1f027eab9f575207946938a6dff049800ab18793233e36de606cd42e3f040db265e3d13d2a9cf152634c6bd24818e0f6807185cd7e8b82776f18b6b6bd5010d88f653e6d8e2243c2a79ce200a34d324bcf250380505580acd9a3a26826803b03dd89f38fb37efbb0f5f45265ae3487af73cb081accebb680ebc042f91c3b3ae11ba93023785f7a812cc6d0af3650f6586de4ae0d24f0e64e80d216ec578538ea388262fdf0b4759d80d792b12ea4af54e394af19e6bc7465ee80cbc649bccb6cbe2678b258eb56b9985865852f8dc3ca4ac4608b46dc9a61a56580ffa8502e24b21c91f76c055be08dc51d52cee2fad51822ae96db01d78d0fada380692755c9209155bd724071de137657f492de5bb5479738d1af7119739b4df4731d02806500804727e8335c8d377bc2a4a9a5616df462601badc67dce6a7bf7bbe9782891d5128027b71acae222d753d0287662fc06e65809b2ab3b5e64d332d028349967678ecd80d886f041d6f6bd1d74dc4eff6fc050d2615e9a21355e539fc86362ebcde336e880af579d5ddc5c697d42bfc014076594e66c7b324cfd3017810c4e93e4f6f0ae9e15018080018068269bb8490669b94a5f1e0c3b4864e03224a2048271f11b8a95ea616875657380a37ee7ba5fb410d4656108ad2024fc1b0e9c3f2a3976094df2924503585748f425038086388068678eeef859c1acdee44e1d84ce7a69946ec7f9c5a98a7450de5d1160e325c5802fdf503990ad68c9e62cbbb53965c1b6754c6a252dd6704effb23a417b22f914807b7ad6eb73914fd07fc55ad89ba771070c1da532a9269475dc64f1995d4d9266801433baba94dada26a0bf7f2d9de0a4596261d582034ea9f3c802afe1a387ee23805bb9d84942e3c2a1d4d500b96ce9dc51ae0742a8f6d3b00a65904044f6a7f5b48084c1872503d1732a826b802530df0e02bfdc2c36f15472ccf7a22dc6c34b7e1b350580a7f28067a21fc297c072d86af8833dc8b7516ed7acfefe62347fdcc1a6aa3a7cf104eb80b4d6046e53d27c2b61d3af6e263b781d1a8acfeb2e90eefe2ba057bdb4be755e80f5d1bed807825da595b42ef1ac5619b90267c8a050a1a31ac7da9cf6f72b2f1c80ad0516c224a82f7c79d92f80f0b981c4edfee0f289f8d3e7cba5d584cd9b902a809a590d525881dd1982fe49342f2653320d885a5f20e8fdf6d49b5ad4e382879280378f7572795fb309410c1ecc04d82f00d15f0ba10daafef82b29aa0bb756e59f808fac6f5b26a0a091512ba579c768e78cd75b5f91ff02dcd27a011a1b9d3f8ca080aa9e94e049bcc2e0a5c905c06becceb05c00f9c80fcc9eb29366c73d1bf39b6a804d651edc43661d09e568716193187ab514517f6da8312e9657b13950f354d5f78006d4df118575950e562e99bb07c62e5bc6f92f32485be7b652d27a1f4c62f57bb10480b07b80f29c4fd8a0371ece6addc60a44846a6d1ce1535d00da6b93538cc74f8765a87e80461382cb1a3fb00528ee91d3438f042ffcc9a642fd6cad4de17cd78dd01da288807b69f5768869fca9dd833ddc7f79ecf65270670bc4e58afeae697e8f9dc0056f80bbf66f21d5dabbaf6d44f75020c92c76a3605752f6e0dc45f0117b82f1c7d47180b2c508bc1d844471c7ad2f7c5ca97fef59a081548aae90e0aa9e06d0153f871780970a300007c393772874653f354eb1e7834043f14c769f609de82db81164766d80f917d605e5ad49102aea239730d2e54412a70f70b8ba1185dcbe7501eea0910180e4cb877f7d9e4c10c8decd44b0394bc965745f657e509104168dc2687a17e2a180573b2ec10c21cde2f64d5929d775f718e9ef643064c478022a0fb2c17a2a7f3db10480cdd8802654f350f2901df03459efca15248804666c7ce2397bf89b8a61a52a7cb4908580342367be78060ae023356f64f72a9cb4833d12d07538b80f1a421b5e9e2fc3b3802e1953c645c2b0ed27aacb7a47675de1f2fb687cdc7cc67f2b4d9fc329e898ca80375a559dd205e45e904000e25e1603f6fcd32fa10bf10882a90c432d5f7002c780735ef803cdd397217afdfbbe850b3f5151d915a0e011e24fefe257f00327e91480045622a5e6f1835b920bbb8a0b3fd8c31f3516b74ddbc93628e6d8e2f830cebf80dc8ba398e0ab0313cff307a9bf29dbf30509bc737d3bcafcfb647f8a0b81290f80c02bd1fef4b8c700febf28d1739305b4a093ccf3fe0476b62c7861e865ad315180b53cae3c5263f0ac4bb987569a1db3ac0b8fcfd84053e6d35042b1dd7f83f0c84d0880ffff80347a6d9dfdaf17f1eeb537940a79510a99974493403a0b4242840ee08fee5c4c80a2cd072f120925b66f62e5278d73fa3a051cc137a6949b8636e0ae0625ea864080c31fe347c6cd57509acc5062b983205154a67256ceda0acda36d4965eeee764380bbbe76a4e854d9ee6ce37ca49c7d6992bdfcfb05c475e8034b0d9345df09df0d8073086e273c13d929bd9860a8d21c84478f64c9f97b9f18732d4c4c098d7bab07803ecf380b4e9dd41abbccdc65fa4d5c27741e6668ec465884d760ec2c13d147c2809b6e1e6f7470e20a2c4dee8a4fff29135fdbf2300ea5f4b277186ce2b5897fb3806adbdd9a456a56259ee5820fadd6b3321d563ff788fa93af1295d64d391f547280300ebfbed38b5b4db4a16474537035ea5afee43f789b6a766206af83a7a60f948055654aa1980d378c0f6ec10fe302a67593670337764a22d73dfa563f3d41496680c8c3f6c3916d046b56bb730f72ce63d3cceea92bd973f9e14f3df8b73503d6d780d0a76b51892298ba5a2f7e4370e3a97062fff76b8a2237398d23a288b69ef149804b56df7e832b1c5ca953e4bb42f3cf63885204ce6c9a1421c9a1994fcd2e76c280cab1191a4cd184502b7e9a860bd88fa54453e1086e62454ad0091e252e6f48fd80639a5762d502d2604443c6b04b714f320c9c38cecb45d159e5cd6cbe718df28380034677f9b06cb6eb74d93d2b47fdf822a5751799171879656c6af1b256efbed319018104090080bc3f526a853aef4ff8114cf9cc66e985bbf2bd836dfd2daa4be6292ebdb21499803b53cd7f8ee1ca0f9f9c28ae7330e7642cbab7bb4b114c004388bf876cf26346190181094001802df21d34fc4a95552ecb4e5f3f60e87e672905f9d1233e56ae6ebf4f8c2f0201803ad6bcad5d50683ed394aa9543d0ff55a0bd771b34edcc738add0896fdd08aa289019d007f03cfdce586301014700e2c2593414080776fdf331ededb557c273c87efa8d2e3919d6745e8645214665bf43afed8b5e9685f0d9ef3b78afddab7f5c7142131132ad42001000000000000004c5f0ec2d17a76153ff51817f12d9cfc3c7f040069049d0da05ca59913bc38a8630590f2627c07d9807d7de5a84809ca0b00a3ac866f86ae192d9f555d89b54faa6b8b7ff339ebf57c807a4afdbcd9cddae700652a9761fe5b87b86c50af152c8d96bebc658bf05166e6804cdd47050100982ed82bcfbd2aced0e8c1d7275a6b18fb43a2b38ddf175c51ab80dc9d3cbc43f9cdc5bbc40ef84d8493032a9284fdaea687ef27a833cdd7a12b1680777eca83403a79449b66ec72c8aa2c0b84d1824fc153325461efa5e22b010948804697609c51dc2ac58602f900a420a83a75f697102ed5c2b5df7676f8e8578a1e80e67bd2679abaf77e739ef31e2b1baf3b5d1f399f2f875a2a2553ea3f3ecaa65a801115a088852d0ab6cfa99007dd06e27364f12461fe516fd08bfa9b962e769ed5c1059e710b30bd2eab0352ddcc26417aa1945fd380a5122525df5d4cde481b758f7e06e43285ef68ffbc29b9594aa256d0eaf189fa8073c944f552a01b6fef2f8d9fdb2c3d7610d07049c652a5a5fc000c95822bb4e880251d3bb85380f154e39d6cf3f404d5e0db5b1441dd2f015842af4238eaad4814800187bf6b3d6c60fad89302cb112941c3df3b340ee8aee067cd9f369574bb915580b9aee043e378f8313e68a6030679ccf3880fa1e7ab19b6244b5c262b7a152f004c5f03c716fb8fff3de61a883bb76adb34a204008076f995cf48b511e3d0749120e9346d5075258b2ef294ebe38a67ad738c2f43ea8008a0c609ab4888f02c2545c002153297c2641c5a7b4f3d8e25c634e721f80bea80b6617c764df278313c426c46961ccde8ee7a03f9007b74bc8bc6c49d1583cf7d8050aa57828deb4541b9f63bc8c115854c0d027258bee71127479ae54790cafdee80e3c402b167106adc3b6086cbafa410a0887b999a326ad3abe29a74bf94b26f727d059eb6f36e027abb2091cfb5110ab5087ff96e685f06155b3cd9a8c9e5e9a23fd5dc13a5ed20a3c4c11000000000685f08316cbf8fa0da822a20ac1c55bf1be3201f1a000000000000505f0e7b9012096b41c4eb3aaf947f6ea42908000080dc92d628c176bb2c4e8acf32f34d8faf6ba994f594830a4fd910d989cebfe05680ccd7eea271ab4ba95eed0fbf898a82fb654e2a3232ed1234bcaa4ab30e8e91ec8029f757f1d06d3000cd4662c35d2313adc96c09c67a7fd7a96e74bfa481eb5e65800d49fef039517cc312c00412803ca1df50ac6d90c50541f649a9c85b83c0fdd880900b2ea5a9f88d4685b457687c6fb3a7494d91e6be35610fdda816f41c5546528047025a4ed8613e95ef3d1dcfb90c646d19355c7cadc95e6db0dbfa33f0338d0e8024632a360b69ce0f9f0ce4164ff4f3848b0bd75f3dcb67a0e23ed081a38a18c8685f090e2fbf2d792cb324bffa9427fe1f0e20d6b1f30029bbf30071019ede3d8a54d27e44a9d5ce189618f22d3008505f0e7b9012096b41c4eb3aaf947f6ea4290804004c5f03b4123b2e186e07fb7bad5dda5f55c0040080eb9400585a9e8b2f26f1ee751ba989620f460abf9e3ce7c6b91693d785d8d45351019ef78c98723ddc9073523ef3beefda0c100480f42c96236046f82b2b806746899e19e343576bb3c9a25fa4f39d3265e57bc92f8015aa329318b096e60063c610e350f1e1c8c13ca41f7f42cbb1c65ef959dcc09a85069f012b746dcf32e843354583c9702cc020ebbf4c57071ceff5b0f64d362e0800001404e803000080028dd19f9b7cb9cce329f090558b22d9bbfa1721c31c00624b0ee03b220163f780f8bead3458984257ef05d8569dbc03a65da511a627f8dcfb7ab3ab162713ee1e5c570f9d7e46afdef838d80700002408d0070000db0700008090b114f5c86023a95e5f98df73f8c47d95ec44082dd256a205fb2d136839d80e5c5700bd9a93e85e3ce1d20700002408d6070000dc07000080a22f25d7fd290f9c429c2435de4d3e652d2c8bd1b9212aa775f19e86a81c64918013664977c26a236045847eab84cdc0d81d74758abc89b90def871b9761647a0380bb97fb91938928cec97e87489ddd099cb1c4c8a6ec647f6dbebc1061b81c44b0802e2ee0831ba08eca89fbd8019acce5cee3981ec17fd6b881f5d4f4a693e93a6f80e5436286787e3ab5d17473ef24f26a433911086e875c80ea01d4ccb21a926dd280f16a8f3131a154cf5d143f612a03093561b7ce489a137180482ff8b80979f1af80c1fe76ee3b8cbf409e83f93c3f68f0d2095d8b111cce1b7ba5d98a70fa09dd348d089f06604cff828a6e3f579ca6c59ace013dffff809f1aa60b8d6e164483585f5cabc66a8b3dabf6d32a061755b66c0ee8b07595ec803e24ed622a15d729f7733e3892da1ab85676a70b1484bf39eb266e76f5f648918077e2e88905558ce5fdd271aea9357a1ba2232b79290b7137ec47d9b1d9966d888034baf1d2500a71627f88a8704ebe32746110956adc5bfcc02a3f8272d75fd7b880e72e5072b6333f61e271155161fdbc62e2b59b99281c133f86cefa9b21cb79f180a61e3b977f78fd4ba2f77469f2fc95beb3c196cbe198f06a09728bf3bbda644280bab75c7b22dff2b024cc899516e753cc17781c31ee47b2eb049b331ed6ac0fce8081e1463c86e8fa454a912998fda31e316e4f21d55ec17f3d6300deea5b2e774380ad9a376d36c370d3c8191ca1c3e14244405d9b435e9a4830731a24ae7d81736b80e01b925960e184afada5789d57dea8cbcaeb0866208725faa02a72503137ff1a804080a720d1eb23a3dbb415ff4a480f4639dcec3be925f22c2311d079e4f08a2a80510d59ea25b1fdae0278b904b89a6c8110da8edb7214c214e12eb14c49dc0b6d80ade20331f0fa754c0253841206e936d98995c8f054f858fe40d20715b7251d1a8081c1b041da80a4efa6469be72bd39a4016c7612d95ef7abecb89ac4651fa6a0b8088878cbd74a2a9b37077b3d448ff88db9350b6c395bd2024a1cf5be2c9d46ff880ce0116dc0f1aacea40db35dd1418a60c74d40328624db29751efb3c82d06eb8985069f0d3719f5b0b12c7105c073c507445948ebbf4c57071ceff5b0f64d362e0800001404e803000080908a4b83685980351382690794f2ba84e53bde8de88ac588b0e0cc0ddff6b03f800ca466110f080b72ac06a6a66b93c07fdf236804dcb37e3b386e5ad3f9b8722b5c570f9d7e46afdef838d80700002408d0070000db0700008002764f06c998b78ae818bed2ab379c3decbf086b87ee6e023be93cccafbb2db05c5700bd9a93e85e3ce1d20700002408d6070000dc0700008016d78a932ae335ecf7bb8553c6daf0b8fc78104569dba075413a3643c55fba0e8013664977c26a236045847eab84cdc0d81d74758abc89b90def871b9761647a0380bb97fb91938928cec97e87489ddd099cb1c4c8a6ec647f6dbebc1061b81c44b08012f1c805be5454f3059856ecb07f622d2d3d1c50c5fa8bc15242b9adeacbf4bd80e5436286787e3ab5d17473ef24f26a433911086e875c80ea01d4ccb21a926dd280f16a8f3131a154cf5d143f612a03093561b7ce489a137180482ff8b80979f1af803dc949b2d2c13a2f6ae200948d5e3b65f8dc3433fd731c4fd88dde33f5dc51b985079f0d7fefc408aac59dbfe80a72ac8e3ce5efbf805de2fa9a7cd87e554c2c8f29ee571f7dd17d8376129da6d11e01bc09e27b1d2e80c232dc1e7f67225218ddffc59ec9fc0f84530088bee316ef968315ebf5271cea807e1ee2c8362cd0745aa0c58780b99fefa1024c1b472d3386a2319e71b68028a680f7bca5e5caf5e8ef06c7b007aa8d6ca8493d952a71be8f334dea27ac6aca65a780dbc4dbcd82a9e3b1a99d25480444bf12317c55399f8eedfa3427cea02f19f89e80a2abd4abb01ffcf96a1d5176f5139f0efa879bc4be75c990cccaaec497e8903080a8842b069c158af198d7d570838f69a2f4c9a218d51c69ad60361a873a11bbea808257de717492dbeecc986a37b7ab4ec8d6160878c62ab15f0467b76acab83d79808dece2162d961f2c7ee521bc8a28035dca6dd9f6522cefc2d83c92ba8ae2f4f580dc8e6d2539404d5b0e899e75a60cf05696a6e8f7adb21048fdf6e826aa9a47b3806cb69d11563a5e8fb0cb211e2b4c1376eebf07bf33e2b0e0f5b6e7f7af6f43d1807d23d1ff5d1ca574f6f3d6905f7d25787c45e242415336eb11ebc6f3947f51c280aa6764053c327575cc0994647ca26d558cedefc08f07c41016bc995bca7a422d801dbb6ce0a615feb35e02a2f85d780a0135efb634ea49394a62496ac1124bdd13002ce803000000d407000000d607000000d807000000db07000000dc07000000f007000000f207000000f307000000f5070000003808000000", + "0x45028400507018e82cca161de634262fea6ac93bc0421e8680622da20704b4f52e9ac50f01082e923eb657565d5acb9e2f86b36930ce03c6f6586d0f9bcd67ab3ac6a41263d8be7953a9fdf27f91f0eb6bc7e6e526c400a65167cfd9b92f8b6cc0b73ab88cc401667e010000460008000200c01f837cdc4a3f0000000000000000000000d49cb103b47f000000000000000000", +] +`; + +exports[`chainHead_v1 rpc > runs runtime calls 1`] = `"0x146163616c61146163616c61010000007a0800000000000034df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000dd718d5cc53262d401000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a8020000006ef953004ba30e5901000000955e168e0cfb340901000000e3df3f2aa8a5cc5702000000ea93e3f16f3d6962020000000200000000"`; diff --git a/packages/e2e/src/chainHead_v1.test.ts b/packages/e2e/src/chainHead_v1.test.ts new file mode 100644 index 00000000..1784205b --- /dev/null +++ b/packages/e2e/src/chainHead_v1.test.ts @@ -0,0 +1,145 @@ +import { Binary } from '@polkadot-api/substrate-bindings' +import { describe, expect, it, vi } from 'vitest' +import type { FollowEventWithRuntime, StorageItemResponse } from '@polkadot-api/substrate-client' + +import { api, asyncSpy, dev, env, setupApi, substrateClient } from './helper.js' + +setupApi(env.acala) + +describe('chainHead_v1 rpc', () => { + it('reports the chain state', async () => { + const onEvent = asyncSpy<[FollowEventWithRuntime], []>() + const onError = vi.fn() + const follower = substrateClient.chainHead(true, onEvent, onError) + + const initialized = await onEvent.nextCall() + expect(initialized).toMatchSnapshot() + + const blockHash = await dev.newBlock() + + const [[newBlock], [bestBlock], [finalized]] = onEvent.mock.calls.slice(1) + + expect(newBlock).toEqual({ + type: 'newBlock', + blockHash, + parentBlockHash: {}, + newRuntime: null, + }) + expect(bestBlock).toEqual({ + type: 'bestBlockChanged', + bestBlockHash: blockHash, + }) + expect(finalized).toEqual({ + type: 'finalized', + finalizedBlockHashes: [blockHash], + prunedBlockHashes: [], + }) + + expect(onError).not.toHaveBeenCalled() + follower.unfollow() + }) + + it('resolves storage queries', async () => { + const onEvent = asyncSpy<[FollowEventWithRuntime], []>() + const onError = vi.fn() + const follower = substrateClient.chainHead(true, onEvent, onError) + + const initialized = await onEvent.nextCall() + const initializedHash = (initialized.type === 'initialized' && initialized.finalizedBlockHashes[0]) || '' + + const key = Binary.fromBytes( + api.query.system.account.creator('5F98oWfz2r5rcRVnP9VCndg33DAAsky3iuoBSpaPUbgN9AJn').slice(2), + ).asHex() + + // An empty value resolves to null + expect(await follower.storage(initializedHash, 'value', key, null)).toEqual(null) + + // With an existing value it returns the SCALE-encoded value. + const hash = '0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c' + expect(await follower.storage(hash, 'value', key, null)).toMatchSnapshot() + + expect(onError).not.toHaveBeenCalled() + follower.unfollow() + }) + + it('resolves partial key storage queries', async () => { + const onEvent = asyncSpy<[FollowEventWithRuntime], []>() + const onError = vi.fn() + const follower = substrateClient.chainHead(true, onEvent, onError) + + const initialized = await onEvent.nextCall() + const initializedHash = (initialized.type === 'initialized' && initialized.finalizedBlockHashes[0]) || '' + + const key = Binary.fromBytes(api.query.tokens.totalIssuance.creator.iterKey!()).asHex() + + // An empty value resolves to null + let receivedItems: StorageItemResponse[] = [] + const onDone = asyncSpy() + const onDiscardedItems = vi.fn() + follower.storageSubscription( + initializedHash, + [ + { + key, + type: 'descendantsValues', + }, + ], + null, + (items) => (receivedItems = [...receivedItems, ...items]), + onError, + onDone, + onDiscardedItems, + ) + await onDone.nextCall() + + expect(onDiscardedItems).toHaveBeenCalledWith(0) + expect(receivedItems.length).toEqual(23) + + expect(onError).not.toHaveBeenCalled() + follower.unfollow() + }) + + it('resolves the header for a specific block', async () => { + const onEvent = asyncSpy<[FollowEventWithRuntime], []>() + const onError = vi.fn() + const follower = substrateClient.chainHead(true, onEvent, onError) + + const initialized = await onEvent.nextCall() + const hash = (initialized.type === 'initialized' && initialized.finalizedBlockHashes[0]) || '' + + expect(await follower.header(hash)).toMatchSnapshot() + + expect(onError).not.toHaveBeenCalled() + follower.unfollow() + }) + + it('runs runtime calls', async () => { + const onEvent = asyncSpy<[FollowEventWithRuntime], []>() + const onError = vi.fn() + const follower = substrateClient.chainHead(true, onEvent, onError) + + const initialized = await onEvent.nextCall() + const hash = (initialized.type === 'initialized' && initialized.finalizedBlockHashes[0]) || '' + + expect(await follower.call(hash, 'Core_version', '')).toMatchSnapshot() + + await expect(follower.call(hash, 'bruh', '')).rejects.toThrow('Function to start was not found') + + expect(onError).not.toHaveBeenCalled() + follower.unfollow() + }) + + it('retrieves the body for a specific block', async () => { + const onEvent = asyncSpy<[FollowEventWithRuntime], []>() + const onError = vi.fn() + const follower = substrateClient.chainHead(true, onEvent, onError) + + const initialized = await onEvent.nextCall() + const hash = (initialized.type === 'initialized' && initialized.finalizedBlockHashes[0]) || '' + + expect(await follower.body(hash)).toMatchSnapshot() + + expect(onError).not.toHaveBeenCalled() + follower.unfollow() + }) +}) diff --git a/packages/e2e/src/helper.ts b/packages/e2e/src/helper.ts index 4399198e..73c5b6c3 100644 --- a/packages/e2e/src/helper.ts +++ b/packages/e2e/src/helper.ts @@ -2,13 +2,15 @@ import { ApiPromise, HttpProvider, WsProvider } from '@polkadot/api' import { HexString } from '@polkadot/util/types' import { ProviderInterface } from '@polkadot/rpc-provider/types' import { RegisteredTypes } from '@polkadot/types/types' +import { SubstrateClient, createClient } from '@polkadot-api/substrate-client' import { beforeAll, beforeEach, expect, vi } from 'vitest' +import { getWsProvider } from '@polkadot-api/ws-provider/node' import { Api } from '@acala-network/chopsticks' import { Blockchain, BuildBlockMode, StorageValues } from '@acala-network/chopsticks-core' +import { Deferred, defer } from '@acala-network/chopsticks-core/utils/index.js' import { SqliteDatabase } from '@acala-network/chopsticks-db' import { createServer } from '@acala-network/chopsticks/server.js' -import { defer } from '@acala-network/chopsticks-core/utils/index.js' import { genesisFromUrl } from '@acala-network/chopsticks/context.js' import { handler } from '@acala-network/chopsticks/rpc/index.js' import { inherentProviders } from '@acala-network/chopsticks-core/blockchain/inherent/index.js' @@ -102,13 +104,17 @@ export const setupAll = async ({ noInitWarn: true, }) + const substrateClient = createClient(getWsProvider(`ws://localhost:${port}`)) + await apiPromise.isReady return { chain, ws, api: apiPromise, + substrateClient, async teardown() { + substrateClient.destroy() await apiPromise.disconnect() await delay(100) await close() @@ -125,6 +131,7 @@ export const setupAll = async ({ export let api: ApiPromise export let chain: Blockchain export let ws: WsProvider +export let substrateClient: SubstrateClient export const setupApi = (option: SetupOption) => { let setup: Awaited>['setup'] @@ -141,11 +148,26 @@ export const setupApi = (option: SetupOption) => { api = res.api chain = res.chain ws = res.ws + substrateClient = res.substrateClient return res.teardown }) } +export const asyncSpy = (implementation?: (...args: TArgs) => TReturn) => { + let deferred: Deferred> | null = null + const nextCall = () => (deferred ?? (deferred = defer())).promise + + const result = vi.fn((...args: TArgs) => { + deferred?.resolve((args.length === 1 ? args[0] : args) as any) + deferred = null + return implementation?.(...args) as TReturn + }) + + return Object.assign(result, { nextCall }) +} +type Flatten> = T['length'] extends 1 ? (T extends Array ? R : never) : T + export const dev = { newBlock: (param?: { count?: number; to?: number }): Promise => { return ws.send('dev_newBlock', [param]) diff --git a/yarn.lock b/yarn.lock index 4c2f5fd7..9ebe0901 100644 --- a/yarn.lock +++ b/yarn.lock @@ -53,6 +53,9 @@ __metadata: dependencies: "@acala-network/chopsticks": "workspace:*" "@acala-network/chopsticks-testing": "workspace:*" + "@polkadot-api/substrate-bindings": "npm:^0.6.3" + "@polkadot-api/substrate-client": "npm:^0.2.1" + "@polkadot-api/ws-provider": "npm:^0.2.0" "@polkadot/api": "npm:^12.3.1" typescript: "npm:^5.5.3" vitest: "npm:^1.4.0" @@ -1261,6 +1264,13 @@ __metadata: languageName: node linkType: hard +"@noble/hashes@npm:^1.4.0": + version: 1.5.0 + resolution: "@noble/hashes@npm:1.5.0" + checksum: 10c0/1b46539695fbfe4477c0822d90c881a04d4fa2921c08c552375b444a48cac9930cb1ee68de0a3c7859e676554d0f3771999716606dc4d8f826e414c11692cdd9 + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -1389,6 +1399,13 @@ __metadata: languageName: node linkType: hard +"@polkadot-api/json-rpc-provider-proxy@npm:0.2.0": + version: 0.2.0 + resolution: "@polkadot-api/json-rpc-provider-proxy@npm:0.2.0" + checksum: 10c0/f8b314e35b14d1b8599ad134246e6c006e5c13aa42d6c2d868c28fa69701becb05f142ce765258061b0320750abbe39654a26ea6b734b5ccb83e0193f59d2697 + languageName: node + linkType: hard + "@polkadot-api/json-rpc-provider@npm:0.0.1": version: 0.0.1 resolution: "@polkadot-api/json-rpc-provider@npm:0.0.1" @@ -1396,6 +1413,13 @@ __metadata: languageName: node linkType: hard +"@polkadot-api/json-rpc-provider@npm:0.0.3": + version: 0.0.3 + resolution: "@polkadot-api/json-rpc-provider@npm:0.0.3" + checksum: 10c0/7c27bf20263fea8d6f0b7c77e2498c535889448c3f65a8100f95f761859db39cd4bfdc6646fa2bda3af345d853a5320695cd3630506792f5a323077964c04399 + languageName: node + linkType: hard + "@polkadot-api/metadata-builders@npm:0.0.1": version: 0.0.1 resolution: "@polkadot-api/metadata-builders@npm:0.0.1" @@ -1432,6 +1456,18 @@ __metadata: languageName: node linkType: hard +"@polkadot-api/substrate-bindings@npm:^0.6.3": + version: 0.6.3 + resolution: "@polkadot-api/substrate-bindings@npm:0.6.3" + dependencies: + "@noble/hashes": "npm:^1.4.0" + "@polkadot-api/utils": "npm:0.1.1" + "@scure/base": "npm:^1.1.7" + scale-ts: "npm:^1.6.0" + checksum: 10c0/5405e536a03033b8b2d122214136166cd1f45502ae7089cd6dc59bdc5b50f07155fa03578da4a05a3b22ad4bd30ea17f3c1476114eae8601297b10dea045880a + languageName: node + linkType: hard + "@polkadot-api/substrate-client@npm:0.0.1": version: 0.0.1 resolution: "@polkadot-api/substrate-client@npm:0.0.1" @@ -1439,6 +1475,16 @@ __metadata: languageName: node linkType: hard +"@polkadot-api/substrate-client@npm:^0.2.1": + version: 0.2.1 + resolution: "@polkadot-api/substrate-client@npm:0.2.1" + dependencies: + "@polkadot-api/json-rpc-provider": "npm:0.0.3" + "@polkadot-api/utils": "npm:0.1.1" + checksum: 10c0/c057688c926e0a59009508017ff56708d2f58d4a126bd1ce45c677de7e6c38fa7675ec1634602dce606f97df0f97e6f3d61dec504075f4839381ff2dd14cc116 + languageName: node + linkType: hard + "@polkadot-api/utils@npm:0.0.1": version: 0.0.1 resolution: "@polkadot-api/utils@npm:0.0.1" @@ -1446,6 +1492,24 @@ __metadata: languageName: node linkType: hard +"@polkadot-api/utils@npm:0.1.1": + version: 0.1.1 + resolution: "@polkadot-api/utils@npm:0.1.1" + checksum: 10c0/25e4da0e2defb713d18cd0c0db594a89cc4e23f36b2ebc5bccb1e2a8ba9a9814d09630d577b98ebcfdbbda2861fa8be48e914bf5f461481f3a09f1627ea6e784 + languageName: node + linkType: hard + +"@polkadot-api/ws-provider@npm:^0.2.0": + version: 0.2.0 + resolution: "@polkadot-api/ws-provider@npm:0.2.0" + dependencies: + "@polkadot-api/json-rpc-provider": "npm:0.0.3" + "@polkadot-api/json-rpc-provider-proxy": "npm:0.2.0" + ws: "npm:^8.18.0" + checksum: 10c0/502dab5f7888a895b990d954a6b0327e318d34f07b04b38c04cc4e2db6022f9b46fed546ead6b21b13946e07ce7e833d427e173fcfe3aa7b0be2b189bcb2a693 + languageName: node + linkType: hard + "@polkadot/api-augment@npm:12.3.1, @polkadot/api-augment@npm:^12.3.1": version: 12.3.1 resolution: "@polkadot/api-augment@npm:12.3.1" @@ -1991,7 +2055,7 @@ __metadata: languageName: node linkType: hard -"@scure/base@npm:^1.1.1, @scure/base@npm:^1.1.5": +"@scure/base@npm:^1.1.1, @scure/base@npm:^1.1.5, @scure/base@npm:^1.1.7": version: 1.1.7 resolution: "@scure/base@npm:1.1.7" checksum: 10c0/2d06aaf39e6de4b9640eb40d2e5419176ebfe911597856dcbf3bc6209277ddb83f4b4b02cb1fd1208f819654268ec083da68111d3530bbde07bae913e2fc2e5d @@ -10068,7 +10132,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.16.0, ws@npm:^8.17.1, ws@npm:^8.8.1": +"ws@npm:^8.16.0, ws@npm:^8.17.1, ws@npm:^8.18.0, ws@npm:^8.8.1": version: 8.18.0 resolution: "ws@npm:8.18.0" peerDependencies: