Skip to content

Commit

Permalink
chore(types): import CctpTxEvidence
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Dec 17, 2024
1 parent 0dc0083 commit 998db91
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 7 additions & 3 deletions multichain-testing/test/fast-usdc/fast-usdc.test.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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');

Expand Down Expand Up @@ -233,16 +238,15 @@ 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,
txHash: `0xc81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff3875527617${makeRandomDigits(makeRandomNumber(), 2n)}`,
tx: {
amount: mintAmount,
forwardingAddress: userForwardingAddr,
sender: '0x9a9eE9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9',
sender: '0x9a9eE9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9' as EvmAddress,
},
aux: {
forwardingChannel: nobleAgoricChannelId,
Expand Down
3 changes: 2 additions & 1 deletion multichain-testing/tools/noble-tools.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 998db91

Please sign in to comment.