starcoinorg/starmask-test-dapp

Support custom the contract function and setting arguments for call and execute function

Closed this issue · 2 comments

A user wants to call or execute a function in the module:

Support user input a module name and function name and setting arguments the execute it with a transaction or call it for query state.

Relative API:

  1. contract.resolve_function: Get a function ABI.
  2. contract.call_v2: Call a read-only function for query state.

#10 only implement query state by contract.call_v2, do not implement execute a script function by a transaction. reopen this.

#10 only implement query state by contract.call_v2, do not implement execute a script function by a transaction. reopen this.

This code implement execute a script function by a transaction in #10 .

image