Copy const allowance : ethers . BigNumber = await getAllowanceEth ( "0xf72a04B891bA46819D83c75687d31f22f6d646c1" , "0xbF0482884043B7ea1eB55516770C217C77CC7A48" , signer);
Copy await approveEth (
"0xf72a04B891bA46819D83c75687d31f22f6d646c1" ,
"0xbF0482884043B7ea1eB55516770C217C77CC7A48" ,
signer , // Wallet from ethers js
AMOUNT_TO_TRANSFER
);
Copy const receipt : ethers . ContractReceipt = await transferFromEth (
"0xf72a04B891bA46819D83c75687d31f22f6d646c1" ,
signer , // Wallet from ethers js
ethAsset ,
BigInt ( 1000000 ) , // AMOUNT_TO_TRANSFER * (10 ^ ASSET_DECIMALS)
CHAIN_ID_ALGORAND ,
algosdk .decodeAddress ( wallet .addr).publicKey ,
"WORMHOLE"
);
4. getEmitterAddressEth()
Copy const emitterAddr = getEmitterAddressEth ( "0xf72a04B891bA46819D83c75687d31f22f6d646c1" );
5. parseSequenceFromLogEth()
Copy const sequence : string = parseSequenceFromLogEth (receipt , "0xE4DF23D087ef706a536527a41bef769a43656C91" );
Copy const signedVAA = await getSignedVAA ( GUARDIAN_GRPC , emitterAddr , 'CHAIN_ID_ETHEREUM' , sequence , 1000 , 20 )
Copy const redeemTxs = await redeemOnAlgorand (
client , // Algodv2 from algosdk
BigInt ( 114976173 ) ,
BigInt ( 114976156 ) ,
vaaBytes , // parsed signed vaa
SENDER_ADDRESS
);