axelarnetwork / support

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

Where can I get all the values contained in Network Base Fee that are currently use? #113

Closed peculiarity closed 1 month ago

peculiarity commented 2 months ago

I have an application that is going to be used through protocols ( meaning other contracts ). I don't have the possibility to use any js library / SDK to calculate the gas. I have a way to calculate the dest chain execution cost. What is missing are the values that constitute the so called Network Base Fee.

Following the documentation the values that I'm referring to are:

It is mentioned in the documentation that these are fixed fees according to the chains being involved. I would assume that these are some configurations. Where can I get these values from?

I need a specific answer which points to a place / way to get concrete values.

Disclaimer: I repeat that using SDK is not an option.

I've been exploring your code base and there is this test suite that contains a test scenario with specific values for axelarBaseFee. Where is this 90000000000 taken from ? Is this only for the tests? Where can I get this gasInfo?

Disclaimer: I know there is an on-chain gas estimation on testnets which is expected to go mainnet in couple of week but for me that's not an option. I would like to be able to read the current value ( hardcode them if needed in my contracts ).

Thank you in advance!

benjamin852 commented 2 months ago

Hey @peculiarity the network base fee is basically the cost you pay for the transaction going through the Axelar chain itself it is set to 0.2 AXL.

It can be broken down to

  1. Confirmation - triggering validators vote on Axelar (included in the base fee). This is the 0.2 fee I mentioned before.
  2. Approval for execution on dest chain - execution of the transaction signed by validators in result of the voting (also included in the base fee).

This is in contract to the execution fee which is the fee you're paying when the tx is executed on the destination chain. This is dependent on the gas cost of the destination chain and the logic being run in your execute function