๐ŸณCook Book

Bridge Assets Cook Bookโ€‹

EOA Method (Native Token): Transfer your assets to a maker address and the value end with security code.

Contract Method: Call the Vizing Bridge Router Contract with target parameters.

Tips

EOA Methodโ€‹

Native Token From EVM Chainโ€‹

import { JsonRpcProvider, TransactionLike, Wallet, parseEther } from 'ethers';
const provider = new JsonRpcProvider('https://arb1.arbitrum.io/rpc');
const wallet = new Wallet('YOUR WALLET PRIVATE KEY', provider);
const maker = '0x454d5dc8956c468111e3e31315ac2b38b03bf576'; // get from API
const securityCode = '9561'; // get from API
const value = parseEther(`0.12340000000${securityCode}`);
const req: TransactionLike = {
    from: wallet.address,
    to: maker,
    value,
};
const transactionRequest = await wallet.populateTransaction(req);
const result = await wallet.sendTransaction(transactionRequest);
console.log(result.hash);

Native Token From TON Chainโ€‹

Contract Methodโ€‹

Contract From EVM Chainโ€‹

Contract From TONโ€‹

Last updated

Was this helpful?