axelarnetwork / support

Your source for support with the Axelar Network
3 stars 1 forks source link

solidity integration with sendToken, but tokens does not arrive on the destination #105

Closed devton closed 4 months ago

devton commented 5 months ago

Hi,

I've testing this contract snippet that I've created, but when I execute the the function to send tokens to Polygon destination chain the tokens does not arrive:

contract that I'm using:

https://github.com/devton/solidity-snippets/blob/main/AxelarIntegration.sol

The transaction was successful, the axlUSDC goes to the 0x00000 on base chain but not arrive on the Polygon destination.

Olanetsoft commented 5 months ago

@devton, could you please share the txn hash?

devton commented 5 months ago

@Olanetsoft 0xbb9b44cd3088c7e68058e9664530abc209db19225a955316af18985e610ff37d

Olanetsoft commented 5 months ago

Thank you for sharing the transaction hash, but it seems that there was an error that says "insufficient transfer fee." This indicates that the amount you want to transfer is too small. You can check the details of the error here at https://axelarscan.io/transfer/0xbb9b44cd3088c7e68058e9664530abc209db19225a955316af18985e610ff37d.

This is a mainnet txn, it might be better to test things out on the testnet first. The testnet doesn't require an actual fee, just a faucet, before you push to the mainnet.

devton commented 5 months ago

thanks @Olanetsoft I've forgot to check on the axelarscan, about this one the transfer fee would be 11.5 axelUSD? "Transfer Fee: 11.5", how I can calculate the transfee fee before send the tokens? and if I want to recover this 0,81 axlUSD I just need to add this 11.5 amount into the contract balance or is just gone?

Olanetsoft commented 5 months ago

@devton to calculate the transfer fee, you can use our JS SDK to do that as referenced here. To recover this txn, you can add more gas for it to go through using this API.