pendulum-chain / api-solang

This is the code for the npm package @pendulum-chain/api-solang
0 stars 0 forks source link

Add API to dry run all methods #4

Closed TorstenStueber closed 4 months ago

TorstenStueber commented 4 months ago

At the moment api-solang offers only one function to invoke contract methods, called messageCall. This function serves two purposes:

An important difference between the RPC call and the actual execution is that the RPC call returns the return value of the method call.

This feature is interesting also for mutating methods. In Nabla for example this allows to estimate how many LP tokens will be minted when depositing some liquidity into a pool.

TODO

Replace messageCall with two new methods:

The mutating attribute of the metadata should be ignored.