You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The title of the page should be renamed to "Substrate Fungible Token Transfers"
Update the page with following contents:
Substrate to EVM Fungible token transfer
Transferring assets from Substrate-based chains to EVM-based chains can be achieved using the Sygma SDK. To facilitate the transfer, the following steps are required:
Specify transfer parameters such as amount, recipient address, token, destination chain and use the method createSubstrateFungibleAssetTransfer from @buildwithsygma/substrate to create an instance of SubstrateFungibleAssetTransfer
Sign and send the transfer transaction using polkadot.js
1. Create and initialize the transfer object
To initialize the asset transfer object, the following parameters need to be supplied:
An instance of the PolkadotJS ApiPromise object
Environment variable SYGMA_ENV needs to be set as mainnet or testnet
constfungibleTokenTransfer=awaitcreateSubstrateFungibleAssetTransfer({source: 5232,// Phaladestination: 1,// Ethereum MainnetsourceNetworkProvider: apiPromise,sourceAddress: "<substrate_address>",resource: "0x0000000000000000000000000000000000000000000000000000000000000001",// PHA resource ID more resources can be found here: https://github.com/sygmaprotocol/sygma-shared-configuration/blob/main/mainnet/shared-config-mainnet.jsonamount: BigInt(1)*BigInt(1e12),destinationAddress: "<evm_recipient_address>",});
2. Sign and send transfer transaction
consttx=awaitfungibleTokenTransfer.getTransferTransaction();awaittransferTx.signAndSend(account,(results)=>{const{ status }=results;console.log(`Current status is ${status.toString()}`);});
The title of the page should be renamed to "Substrate Fungible Token Transfers"
Update the page with following contents:
Substrate to EVM Fungible token transfer
Transferring assets from Substrate-based chains to EVM-based chains can be achieved using the Sygma SDK. To facilitate the transfer, the following steps are required:
createSubstrateFungibleAssetTransfer
from@buildwithsygma/substrate
to create an instance ofSubstrateFungibleAssetTransfer
polkadot.js
1. Create and initialize the transfer object
To initialize the asset transfer object, the following parameters need to be supplied:
ApiPromise
objectSYGMA_ENV
needs to be set asmainnet
ortestnet
2. Sign and send transfer transaction
A full example of the above can be found here
The text was updated successfully, but these errors were encountered: