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 "EVM Fungible Token Transfers"
Update the page with following content:
Transferring a fungible asset between EVM chains
Transferring assets between 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 createFungibleAssetTransfer from @buildwithsygma/evm to create an instance of FungibleAssetTransfer
Check for any approvals required, and if required sign and broadcast these transactions.
Prepare, sign, and send the Transfer transaction to the Source network node
1. Create and initialize the transfer object
To initialize the asset transfer object, the following parameters are required:
An EIP1193 compatible EVM provider
Environment variable SYGMA_ENV needs to be set as mainnet or testnet
constfungibleTokenTransfer=awaitcreateFungibleAssetTransfer({source: 1,// Ethereum Mainnetdestination: 8453,// BasesourceNetworkProvider: eip1193CompatibleProvider,resource: "0x0000000000000000000000000000000000000000000000000000000000000002",// ETH Resource ID can be found here: https://github.com/sygmaprotocol/sygma-shared-configuration/blob/0e3470df4935ae3cce8b44f496723070ff3b3d1c/mainnet/shared-config-mainnet.jsonamount: BigInt(1)*BigInt(1e17),recipientAddress: "",sourceAddress: sourceAddress,// source wallet address});
2. Send Approval transactions
You can check if approvals are required for your transfer. If there are approvals required for the transfer, you can sign the transaction and send it.
The response object returned by the sendTransaction method contains a hash property. This transaction hash is logged to the console, and it can be used to look up the transaction on a block explorer.
The title of the page should be renamed to "EVM Fungible Token Transfers"
Update the page with following content:
Transferring a fungible asset between EVM chains
Transferring assets between EVM-based chains can be achieved using the Sygma SDK. To facilitate the transfer, the following steps are required:
createFungibleAssetTransfer
from@buildwithsygma/evm
to create an instance ofFungibleAssetTransfer
1. Create and initialize the transfer object
To initialize the asset transfer object, the following parameters are required:
SYGMA_ENV
needs to be set asmainnet
ortestnet
2. Send Approval transactions
You can check if approvals are required for your transfer. If there are approvals required for the transfer, you can sign the transaction and send it.
3. Send transfer transaction
Once all the approvals have been confirmed you can finally send the actual fungible token transfer transaction.
Checking transaction hash
The response object returned by the sendTransaction method contains a hash property. This transaction hash is logged to the console, and it can be used to look up the transaction on a block explorer.
A full example of the above can be found here
The text was updated successfully, but these errors were encountered: