gasLimitoptionalBN (Ethereum transaction gas limit)
gasPriceoptionalBN (Ethereum transaction gas price)
executeoptional bool (True if the action should execute and return a promise or false if it should return an action object. Default: true)
autoAllowTokensoptional bool (Defines if an action that needs token allowance should auto approve them. Default: true)
This method returns a Promise which resolves with the documented action response or an actionobject the option execute is set to true.
It contains the information and methods about a action.
0 Not executed
Current status of the action execution.
When the action has status 1,2 or 3 it contains the Ethereum transaction hash.
gasLimit string (Transaction gas limit in hexadecimal format)
gasPrice string (Transaction gas price in hexadecimal format)
to string (Transaction to address)
from string (Transaction from address)
value string (Transaction value in hexadecimal format)
Transaction information to be executed.
The final response of the action method as documented.
//Executes the action, not wait to finish and return the action updated.
const action =await action.execute(false);
//Executes the action and returns the final response
const response =await action.execute(true);
True if the action should execute and wait for the final response. False if should execute but not wait for the transaction to finish.
This method returns a Promise which resolves with the documented action response if the option wait is set to true or the actionobject updated if the option wait is set to false.
Update status method
This method checks the current status of the transaction that the action is executing and update the status field of the action. If the transaction finished and it was successful, it also updates the result field of the action.