Skip to content

Commit c334485

Browse files
committed
chore(solana): add deployment addresses
1 parent e95d833 commit c334485

4 files changed

Lines changed: 11 additions & 7 deletions

File tree

solana/scripts/addresses.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const ADDRESSES = {
2+
bridge: "0xA6d78F4F39A9dEE0d62f2B4DFb969e645dA016D8",
3+
wrappedSOL: "0xfDaB33bcbD3801BE97056c3541cEC59760E23a3B",
4+
wrappedSPL: "0x8cB2961F96325c64572a67d855ebAB50A3c8332D",
5+
} as const;

solana/scripts/base-to-solana/prove-message.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { decodeEventLog } from "viem/utils";
88
import type { Bridge } from "../../target/types/bridge";
99
import { BRIDGE_ABI } from "../utils/bridge.abi";
1010
import { getConstantValue } from "../utils/constants";
11+
import { ADDRESSES } from "../addresses";
1112

1213
const TRANSACTION_HASH =
1314
"0x1558d0b5366a42738af3952ff985ed27e604a405793dec8476a38ff2cd3100b8";
@@ -156,7 +157,7 @@ async function generateProof(
156157
// FIXME: Something is off here, the returned proof does not match the MMR root registered in the OutputRoot PDA
157158
// even though we're using the same block number
158159
const [rawProof, totalLeafCount] = await publicClient.readContract({
159-
address: "0xA6d78F4F39A9dEE0d62f2B4DFb969e645dA016D8",
160+
address: ADDRESSES.bridge,
160161
abi: BRIDGE_ABI,
161162
functionName: "generateProof",
162163
args: [event.message.nonce],

solana/scripts/solana-to-base/bridge-sol.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ import { toBytes } from "viem";
66
import type { Bridge } from "../../target/types/bridge";
77
import { confirmTransaction } from "../utils/confirm-tx";
88
import { getConstantValue } from "../utils/constants";
9+
import { ADDRESSES } from "../addresses";
910

1011
type BridgeSolParams = Parameters<Program<Bridge>["methods"]["bridgeSol"]>;
1112

12-
const WRAPPED_SOL_ADDRESS = "0xfDaB33bcbD3801BE97056c3541cEC59760E23a3B";
13-
1413
async function main() {
1514
const provider = anchor.AnchorProvider.env();
1615
anchor.setProvider(provider);
@@ -22,7 +21,7 @@ async function main() {
2221
const to: BridgeSolParams[1] = [
2322
...toBytes("0x0000000000000000000000000000000000000000"),
2423
];
25-
const remoteToken: BridgeSolParams[2] = [...toBytes(WRAPPED_SOL_ADDRESS)];
24+
const remoteToken: BridgeSolParams[2] = [...toBytes(ADDRESSES.wrappedSOL)];
2625
const amount: BridgeSolParams[3] = new anchor.BN(1);
2726
const call: BridgeSolParams[4] = null;
2827

solana/scripts/solana-to-base/bridge-spl.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import { toBytes } from "viem";
1010
import type { Bridge } from "../../target/types/bridge";
1111
import { confirmTransaction } from "../utils/confirm-tx";
1212
import { getConstantValue } from "../utils/constants";
13-
14-
const WRAPPED_SPL_ADDRESS = "0x0000000000000000000000000000000000000000";
13+
import { ADDRESSES } from "../addresses";
1514

1615
type BridgeSplParams = Parameters<Program<Bridge>["methods"]["bridgeSpl"]>;
1716

@@ -26,7 +25,7 @@ async function main() {
2625
const to: BridgeSplParams[1] = [
2726
...toBytes("0x0000000000000000000000000000000000000000"), // Recipient on Base
2827
];
29-
const remoteToken: BridgeSplParams[2] = [...toBytes(WRAPPED_SPL_ADDRESS)];
28+
const remoteToken: BridgeSplParams[2] = [...toBytes(ADDRESSES.wrappedSPL)];
3029
const amount: BridgeSplParams[3] = new anchor.BN(1);
3130
const call: BridgeSplParams[4] = null;
3231

0 commit comments

Comments
 (0)