From 998db91f8caf38a42b020b94c35ef90543b0227a Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 16 Dec 2024 19:51:47 -0800 Subject: [PATCH] chore(types): import CctpTxEvidence --- multichain-testing/test/fast-usdc/fast-usdc.test.ts | 10 +++++++--- multichain-testing/tools/noble-tools.ts | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/multichain-testing/test/fast-usdc/fast-usdc.test.ts b/multichain-testing/test/fast-usdc/fast-usdc.test.ts index 3b4cba3d330..266032dc262 100644 --- a/multichain-testing/test/fast-usdc/fast-usdc.test.ts +++ b/multichain-testing/test/fast-usdc/fast-usdc.test.ts @@ -1,4 +1,5 @@ import anyTest from '@endo/ses-ava/prepare-endo.js'; + import type { TestFn } from 'ava'; import { encodeAddressHook } from '@agoric/cosmic-proto/address-hooks.js'; import { AmountMath } from '@agoric/ertp'; @@ -14,6 +15,10 @@ import { makeFeedPolicy, oracleMnemonics } from './config.js'; import { makeRandomDigits } from '../../tools/random.js'; import { balancesFromPurses } from '../../tools/purse.js'; import { makeTracer } from '@agoric/internal'; +import type { + CctpTxEvidence, + EvmAddress, +} from '@agoric/fast-usdc/src/types.js'; const log = makeTracer('MCFU'); @@ -233,8 +238,7 @@ test.serial('advance and settlement', async t => { const mintAmount = 800_000n; - // TODO export CctpTxEvidence type - const evidence = harden({ + const evidence: CctpTxEvidence = harden({ blockHash: '0x90d7343e04f8160892e94f02d6a9b9f255663ed0ac34caca98544c8143fee665', blockNumber: 21037663n, @@ -242,7 +246,7 @@ test.serial('advance and settlement', async t => { tx: { amount: mintAmount, forwardingAddress: userForwardingAddr, - sender: '0x9a9eE9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9', + sender: '0x9a9eE9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9' as EvmAddress, }, aux: { forwardingChannel: nobleAgoricChannelId, diff --git a/multichain-testing/tools/noble-tools.ts b/multichain-testing/tools/noble-tools.ts index 8a08e6a85bb..cd72a332857 100644 --- a/multichain-testing/tools/noble-tools.ts +++ b/multichain-testing/tools/noble-tools.ts @@ -1,6 +1,7 @@ import type { IBCChannelID } from '@agoric/vats'; import type { ExecSync } from './agd-lib.js'; import type { ChainAddress } from '@agoric/orchestration'; +import type { NobleAddress } from '@agoric/fast-usdc/src/types.js'; const kubectlBinary = 'kubectl'; const noblePod = 'noblelocal-genesis-0'; @@ -82,7 +83,7 @@ export const makeNobleTools = ( const queryForwardingAddress = ( channelId: IBCChannelID, address: ChainAddress['value'], - ): { address: string; exists: boolean } => { + ): { address: NobleAddress; exists: boolean } => { checkEnv(); log('querying forwarding address', address, channelId); return JSON.parse(