Processes a token transfer to the bridge on top level of abstracttion, handling both ERC20 and ERC721 tokens.
Example
// this short example could miss some params, please look at types for correct info constdepositParams = { resourceId:'0x123', amountOrId:"100", recepientAddress:"0x0123", feeData:"// fee data ///" }; constbridgeConfig = { tokens: [{ resourceId:'0x123', address:'0x456', type:'erc20' }], bridgeAddress:'0x789', domainId:1 }; constprovider = newethers.providers.Web3Provider(window.ethereum); // any override settting for etherjs tranasaction constoverrides = { gasLimit:100000 }; constreceipt = awaitprocessTokenTranfer({ depositParams, bridgeConfig, provider, overrides }); // use the getDepositEventFromReceipt method to get the depositNonce
Returns
A promise that resolves to the transaction receipt once the transfer is complete.
Processes a token transfer to the bridge on top level of abstracttion, handling both ERC20 and ERC721 tokens.
Example
Returns