From 406d4fd43359439c04fbade3b2224af8ea6e5d26 Mon Sep 17 00:00:00 2001 From: Foivos Date: Wed, 11 Dec 2024 15:21:50 +0200 Subject: [PATCH] fix tests and lint --- test/bcs.js | 7 ++++--- test/its.js | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test/bcs.js b/test/bcs.js index de651a42..57a2e370 100644 --- a/test/bcs.js +++ b/test/bcs.js @@ -6,7 +6,8 @@ const { expect } = require('chai'); // The following hex data is derived from the bcs bytes from the client.getObject() call. const hexData = { - ITSV0: '7d262a840033c9b6bc7a31d8ddf12bff891c6db6253dd5b8cf331bccd531a81e00000000000000006ccb9729af3569630b9171a0c1fd3eae9797d8122794be5d8cd01061b1dfcb86270c7f8b9757b05777d3cbf98fa1bb197e1f5a18c8ff7a8ef16e80bedf39a67f000000000000000000c101dbc800d8cf853e6d21c916aba7c92e4c2692527dc951c777dae15cf474000000000000000044bacbed87a2d5f871ce96f3245a293b936fb287605330b3859649f3a2697668000000000000000013bd4dc87b61a82ce5959e3ea8c3fed1e03d9c1f7246eef82722354d8e3c0d540000000000000000e5855b758d21f521071672cbce153167d49b4d15f11f5ca47528117312c2c1fa00000000000000000000000000000000000000000000000000000000000000000000000000000000010c0d72656769737465725f636f696e1e6465706c6f795f72656d6f74655f696e746572636861696e5f746f6b656e1873656e645f696e746572636861696e5f7472616e736665721b726563656976655f696e746572636861696e5f7472616e7366657225726563656976655f696e746572636861696e5f7472616e736665725f776974685f646174611f726563656976655f6465706c6f795f696e746572636861696e5f746f6b656e16676976655f756e726567697374657265645f636f696e136d696e745f61735f6469737472696275746f72166d696e745f746f5f61735f6469737472696275746f72136275726e5f61735f6469737472696275746f72157365745f747275737465645f6164647265737365731472656769737465725f7472616e73616374696f6e', + InterchainTokenService_v0: + '7d262a840033c9b6bc7a31d8ddf12bff891c6db6253dd5b8cf331bccd531a81e00000000000000006ccb9729af3569630b9171a0c1fd3eae9797d8122794be5d8cd01061b1dfcb86270c7f8b9757b05777d3cbf98fa1bb197e1f5a18c8ff7a8ef16e80bedf39a67f000000000000000000c101dbc800d8cf853e6d21c916aba7c92e4c2692527dc951c777dae15cf474000000000000000044bacbed87a2d5f871ce96f3245a293b936fb287605330b3859649f3a2697668000000000000000013bd4dc87b61a82ce5959e3ea8c3fed1e03d9c1f7246eef82722354d8e3c0d540000000000000000e5855b758d21f521071672cbce153167d49b4d15f11f5ca47528117312c2c1fa00000000000000000000000000000000000000000000000000000000000000000000000000000000010c0d72656769737465725f636f696e1e6465706c6f795f72656d6f74655f696e746572636861696e5f746f6b656e1873656e645f696e746572636861696e5f7472616e736665721b726563656976655f696e746572636861696e5f7472616e7366657225726563656976655f696e746572636861696e5f7472616e736665725f776974685f646174611f726563656976655f6465706c6f795f696e746572636861696e5f746f6b656e16676976655f756e726567697374657265645f636f696e136d696e745f61735f6469737472696275746f72166d696e745f746f5f61735f6469737472696275746f72136275726e5f61735f6469737472696275746f72157365745f747275737465645f6164647265737365731472656769737465725f7472616e73616374696f6e', GatewayV0: 'c15879de64dc6678674e5ad1a32c47319a1e9100bf21408173590455d01f9d160000000000000000196e295da7fe769ff56d2627c38252ee603f90829ea777bce36ce676b5e3d9d5a7f4b2d4c193987e5f01122bc9cce22a791447d10bc58299ced9e4e18db4c2c503000000000000000100000000000000537d294cfaa7dc649e43cab6a2d829674ea9c11c86517fec9e3984cdedaee42501000000000000000e59feaeb543924fabfbeb667efe707290cf4de9e667796b132260f33a84c26ee803000000000000b23c626b920100000f00000000000000010610617070726f76655f6d657373616765730e726f746174655f7369676e6572731369735f6d6573736167655f617070726f7665641369735f6d6573736167655f65786563757465641574616b655f617070726f7665645f6d6573736167650c73656e645f6d657373616765', GasServiceV0: @@ -20,8 +21,8 @@ describe('BCS', () => { expect(obj).to.deep.include({ id: expectedId, size }); }; - it('should decode ITS_v0 object successfully', () => { - const its = bcsStructs.its.ITS.parse(fromHEX(hexData.ITSV0)).value; + it('should decode InterchainTokenService_v0 object successfully', () => { + const its = bcsStructs.its.InterchainTokenService.parse(fromHEX(hexData.InterchainTokenService_v0)).value; checkIdAndSize(its.address_tracker.trusted_addresses, '270c7f8b9757b05777d3cbf98fa1bb197e1f5a18c8ff7a8ef16e80bedf39a67f'); checkIdAndSize(its.unregistered_coin_types, '00c101dbc800d8cf853e6d21c916aba7c92e4c2692527dc951c777dae15cf474'); diff --git a/test/its.js b/test/its.js index 21cc079b..e429fea2 100644 --- a/test/its.js +++ b/test/its.js @@ -119,8 +119,8 @@ describe('ITS', () => { singleton: findObjectId(deployments.example.publishTxn, 'its::Singleton'), tokenTreasuryCap: findObjectId(deployments.example.publishTxn, `TreasuryCap<${coinType}>`), tokenCoinMetadata: findObjectId(deployments.example.publishTxn, `CoinMetadata<${coinType}>`), - its: findObjectId(deployments.its.publishTxn, 'its::ITS'), - itsV0: findObjectId(deployments.its.publishTxn, 'its_v0::ITS_v0'), + its: findObjectId(deployments.its.publishTxn, 'its::InterchainTokenService'), + itsV0: findObjectId(deployments.its.publishTxn, 'its_v0::InterchainTokenService_v0'), relayerDiscovery: findObjectId( deployments.relayer_discovery.publishTxn, `${deployments.relayer_discovery.packageId}::discovery::RelayerDiscovery`,