Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Commit be7f6f3

Browse files
committed
update testnet fork test
1 parent 11930ba commit be7f6f3

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

solana/ts/src/testing/consts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ export const DEFAULT_ADDRESSES: {
9292
coreBridge: "3u8hJUVTA4jH1wYAyUur7FFZVQ8H635K3tSHHF4ssjQ5",
9393
matchingEngine: "mPydpGUWxzERTNpyvTKdvS7v8kvw5sgwfiP8WQFrXVS",
9494
tokenRouter: "tD8RmtdcV7bzBeuFgyrFc8wvayj988ChccEzRQzo6md",
95+
usdcMint: USDC_MINT_ADDRESS.toBase58(),
9596
tokenMessenger: "CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3",
9697
messageTransmitter: "CCTPmbSD7gX1bxKPAmg77w8oFzNFpaQiQUWD43TKaecd",
9798
upgradeManager: "ucdP9ktgrXgEUnn6roqD2SfdGMR2JSiWHUKv23oXwxt",
98-
usdcMint: "todo",
9999
},
100100
};

solana/ts/tests/12__testnetFork.ts

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
import { Connection, Keypair, PublicKey, Signer, TransactionInstruction } from "@solana/web3.js";
22
import { expect } from "chai";
33
import { uint64ToBN } from "../src/common";
4-
import * as matchingEngineSdk from "../src/matchingEngine";
4+
import { SolanaMatchingEngine, SolanaTokenRouter } from "../src/protocol";
55
import {
6+
DEFAULT_ADDRESSES,
67
LOCALHOST,
78
PAYER_KEYPAIR,
8-
USDC_MINT_ADDRESS,
99
expectIxErr,
1010
expectIxOk,
1111
expectIxOkDetails,
1212
loadProgramBpf,
1313
} from "../src/testing";
14-
import * as tokenRouterSdk from "../src/tokenRouter";
15-
import { UpgradeManagerProgram, UpgradeReceipt, testnet } from "../src/upgradeManager";
14+
import { UpgradeManagerProgram, UpgradeReceipt } from "../src/upgradeManager";
1615
import { BPF_LOADER_UPGRADEABLE_PROGRAM_ID, programDataAddress } from "../src/utils";
1716

1817
const KEYPATH = `${__dirname}/keys/pFCBP4bhqdSsrWUVTgqhPsLrfEdChBK17vgFM7TxjxQ.json`;
@@ -24,17 +23,15 @@ describe("Upgrade Manager", function () {
2423
const connection = new Connection(LOCALHOST, "processed");
2524
const payer = PAYER_KEYPAIR;
2625

27-
const matchingEngine = new matchingEngineSdk.MatchingEngineProgram(
26+
const network = "Testnet";
27+
const contracts = DEFAULT_ADDRESSES[network]!;
28+
const matchingEngine = new SolanaMatchingEngine(network, "Solana", connection, contracts);
29+
const tokenRouter = new SolanaTokenRouter(network, "Solana", connection, contracts);
30+
const upgradeManager = new UpgradeManagerProgram(
2831
connection,
29-
matchingEngineSdk.testnet(),
30-
USDC_MINT_ADDRESS,
32+
contracts.upgradeManager,
33+
contracts,
3134
);
32-
const tokenRouter = new tokenRouterSdk.TokenRouterProgram(
33-
connection,
34-
tokenRouterSdk.testnet(),
35-
matchingEngine.mint,
36-
);
37-
const upgradeManager = new UpgradeManagerProgram(connection, testnet());
3835

3936
describe("Upgrade Matching Engine", function () {
4037
it("Cannot Execute without Owner", async function () {

0 commit comments

Comments
 (0)