The contract static function problem

While I’m on call contract, if you don’t change data don’t want to pay for GAS, how should I’m mainnet calls, is I look at the node API calls this
https://testnet.aeternity.io/v2/debug/transactions/dry-run
but it seems can only be used in the test environment, if the mainnet should how to use

https://api-docs.aeternity.io/#/internal/DryRunTxs
This API doesn’t describe how the main chain is called

You certainly can use it on main net as well.
The gas is an expression of the computations being done. You pay for them. This debug API is being disabled on most nodes in main net because it could be abused - someone could use the node for free computations. If you want to do that, you’d need to find someone willing to do that for you or you should run a node of your own :slight_smile:

Note that this API call does not call the main chain and no transactions are being produced. It simply executes the contract call for you in the context of the latest blockchain’s top.

1 Like

Ok, I see. Thank you , But how should my own nodes open this interface?

You have to change your node’s config:

Setting this to true would enable all debug endpoints for you :slight_smile: Please note that those are part of the internal HTTP API and it is up to you to expose those (a few line above) and to protect somehow.

I am the node running in docker mode. How should I modify the configuration in this mode?

I am the node running in docker mode. How should I modify the configuration in this mode?

Maybe @dincho.chain can help you with the docker setup :slight_smile:

Hello,

changing node configuration in docker container is documented here

To use the internal API you’ll also need to map it’s port from docker -p 3113:3113

1 Like