From 073d4ce843b0d7d0a0a91487f98dd9d8fd16e441 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Thu, 11 Apr 2024 16:54:51 -0700 Subject: [PATCH] refactor: use cosmjs-types Any --- packages/boot/package.json | 9 +++++---- .../boot/test/bootstrapTests/test-vat-orchestration.ts | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/boot/package.json b/packages/boot/package.json index 8c603233ecaa..d899fcf2fb1b 100644 --- a/packages/boot/package.json +++ b/packages/boot/package.json @@ -19,12 +19,12 @@ "license": "Apache-2.0", "dependencies": { "@agoric/assert": "^0.6.0", - "@agoric/cosmic-proto": "^0.4.0", "@agoric/builders": "^0.1.0", + "@agoric/cosmic-proto": "^0.4.0", "@agoric/cosmic-swingset": "^0.41.3", "@agoric/ertp": "^0.16.2", - "@agoric/internal": "^0.3.2", "@agoric/inter-protocol": "^0.16.1", + "@agoric/internal": "^0.3.2", "@agoric/kmarshal": "^0.1.0", "@agoric/notifier": "^0.6.2", "@agoric/orchestration": "^0.1.0", @@ -37,12 +37,12 @@ "@agoric/vm-config": "^0.1.0", "@agoric/zoe": "^0.26.2", "@agoric/zone": "^0.2.2", - "@endo/marshal": "^1.4.1", "@endo/bundle-source": "^3.2.2", "@endo/captp": "^4.1.1", "@endo/eventual-send": "^1.2.1", - "@endo/init": "^1.1.1", "@endo/far": "^1.1.1", + "@endo/init": "^1.1.1", + "@endo/marshal": "^1.4.1", "@endo/promise-kit": "^1.1.1", "@endo/stream": "^1.2.1", "import-meta-resolve": "^2.2.1" @@ -56,6 +56,7 @@ "@endo/patterns": "^1.3.1", "ava": "^5.3.0", "c8": "^9.1.0", + "cosmjs-types": "^0.9.0", "tsx": "3.12.8" }, "files": [ diff --git a/packages/boot/test/bootstrapTests/test-vat-orchestration.ts b/packages/boot/test/bootstrapTests/test-vat-orchestration.ts index 8f96c46e1ebb..456059c9d482 100644 --- a/packages/boot/test/bootstrapTests/test-vat-orchestration.ts +++ b/packages/boot/test/bootstrapTests/test-vat-orchestration.ts @@ -1,12 +1,13 @@ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import type { ExecutionContext, TestFn } from 'ava'; + import { MsgDelegate, MsgDelegateResponse, } from '@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js'; import { decodeBase64 } from '@endo/base64'; import { M, matches } from '@endo/patterns'; -import { txToBase64 } from '@agoric/orchestration'; +import { Any } from 'cosmjs-types/google/protobuf/any.js'; import { makeWalletFactoryContext } from './walletFactory.ts'; const makeTestContext = async (t: ExecutionContext) => @@ -22,7 +23,7 @@ const test: TestFn = anyTest; * If adding a new msg, reference the mock in the `sendPacket` switch statement * in [supports.ts](../../tools/supports.ts). */ -const delegateMsgSuccess = txToBase64( +const delegateMsgSuccess = Any.fromJSON( MsgDelegate.toProtoMsg({ delegatorAddress: 'cosmos1test', validatorAddress: 'cosmosvaloper1test', @@ -157,7 +158,7 @@ test('ICA connection can send msg with proto3', async t => { 'txWithOptions', ); - const delegateMsgFailure = txToBase64( + const delegateMsgFailure = Any.fromJSON( MsgDelegate.toProtoMsg({ delegatorAddress: 'cosmos1fail', validatorAddress: 'cosmosvaloper1fail',