abstractjs
version. Update it via your favourite package manager.
approximateExpectedInputAmount
this the amount that is going to be used as a benchmark to calculate the input/output bridge ratio. It is recommended that this amount is close to the runtime balance that is expected to be fetched using the params above.
approximateExpectedInputAmount
.inputAmountRuntimeParams
this is the replacement of the inputAmount
. Instead specifying the amount itself, one sets the params that define how to obtain the amount at the runtime. Those params include the
targetAddress
- the address of the account which erc20 balance is going to be used as the input amounttokenAddress
- the erc20 token. balance of this token is used as the input amountconstraints
- the array of arithmetical constraints to make sure the fetched amount will be satisfying certain conditions. More about constraints.runtimeERC20BalanceOf
function ensures instructions use the exact amount that arrives: