patractlabs/redspot

[Question] How do we send value into transaction calling payable contract functions?

forgetso opened this issue · 1 comments

In polkadot api, assuming a contract with function called inc, you can do:

await contract
  .exec('inc', { value, gasLimit }, incValue)

In redspot, using this format contract.tx.inc(args) only allows the arguments of the contract function, not the value and gas limit.

How are the value and gas limit set in redspot?

Nevermind, I see that the overrides are added after the function parameters:

contract.tx.inc(args, { gasLimit:1000000000, value:10 })