axelarnetwork / support

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

How to predict gas on source chain, in the contract itself? #34

Closed Olanetsoft closed 10 months ago

Olanetsoft commented 10 months ago

I am currently building a solution where my contracts are automated based on various off-chain and on-chain conditions, now, I cannot use the js SDK as the automated call will happen on-chain.

What's the best way to implement this? Is there a way to deduct some amount of the assets being transferred as gas at the destination chain? Also, what would be the ideal solution when building something that has automation in smart contract executions?

Olanetsoft commented 10 months ago

We do not currently support onchain gas payment, but we have this in pipeline and we will share an update publicly when its available. For the other question, In theory, if a method was discovered to pay for confirmation using AXL, it would be possible to invoke your own execute method within the chain. However, to initiate this process, a trigger such as Chainlink's Automation would be required.