Contract

litewax.contract.Contract(name: str, client: Optional[Any] = None, actor: Optional[str] = None, permission: Optional[str] = 'active', force_recreate: Optional[bool] = False, node: Optional[str] = None) object[source]

Function for creating a contract object using wax abigen. Contract objects will be saved in the contracts folder.

Note

If you will pack your application to executable, generate the contracts before packing.

Parameters:
  • name (str) – The name of the contract (ex: res.pink)

  • client (litewax.clients.Client) – A litewax.clients.Client object (if actor is not provided)

  • actor (str) – The actor name (if client is not provided)

  • permission (str) – The permission to use (default: active)

  • force_recreate (bool) – Force the contract to be recreated (default: False)

  • node (str) – The node to use (default: https://wax.greymass.com)

Returns:

Contract object

Return type:

object

class litewax.contract.Action(contract: object, action: str, args: dict)[source]

Example Action object for calling actions on a contract

class litewax.contract.ExampleContract(actor: str = '', permission: str = 'active', node: str = 'https://wax.greymass.com')[source]

Example contract object

set_actor(actor: str)[source]
generatePayload(account: str, name: str) dict[source]
return_payload(payload, args) dict[source]
call(action: str, args: dict) dict[source]
action(arg1: str) dict[source]
push_actions(private_keys: list, *actions) tuple[source]
create_trx(private_key: str, **actions) tuple[source]