Creating clients
const sourceChain = CHAIN_ID_BSC;
const targetChain = CHAIN_ID_SOLANA;
const ethClient = new ZebecEthBridgeClient(
BSC_ZEBEC_BRIDGE_ADDRESS,
signer,
sourceChain
);const connection = new Connection(SOLANA_HOST);
const wallet = new anchor.Wallet(keypair);
const achorProvider = new anchor.AnchorProvider(
connection,
wallet,
AnchorProvider.defaultOptions()
);
const wormholeConfig = {
coreBridgeProgram: new PublicKey(SOL_BRIDGE_ADDRESS),
tokenBridgeProgram: new PublicKey(SOL_TOKEN_BRIDGE_ADDRESS),
};
const FEE_RECEIVER = "<solana pubkey>"
const zebecInstructions = new ZebecInstructions(anchorProvider);
const bridgeProgram = ZebecSolBridge__factory.getProgram(new PublicKey(SOL_ZEBEC_BRIDGE_ADDRESS), anchorProvider);
const bridgeTransactions = new ZebecBridgeTransactions(bridgeProgram);
const solanaClient = new ZebecSolBridgeClient(
anchorProvider,
bridgeProgram,
bridgeTransactions,
zebecInstructions,
wormholeConfig,
FEE_RECEIVER,
);Last updated