core.cleos_set

class eosfactory.core.cleos_set.SetAccountPermission(account, permission_name, authority=None, parent_permission_name=None, permission=None, add_code=False, remove_code=False, expiration_sec=None, skip_sign=0, dont_broadcast=0, return_packed=0, force_unique=0, max_cpu_usage=0, max_net_usage=0, ref_block=None, delay_sec=0, is_verbose=True, json=False)[source]

Bases: eosfactory.core.cleos.Cleos

Set parameters dealing with account permissions.

Parameters
  • account (str or interface.Account) – The account to set/delete a permission authority for.

  • permission_name (str or Permission) – The permission to set/delete an authority for (defaults to: “active”).

  • parent_permission_name (str or Permission) – The permission name of this parents permission (defaults to: “active”).

  • authority (str or dict or filename) – None to delete.

  • add_code (bool) – If set, add ‘eosio.code’ permission to specified permission authority. Default is false.

  • remove_code (bool) – If set, remove ‘eosio.code’ permission from specified permission authority. Default is false.

Exemplary values of the argument authority:

# bob, carol are account objects created with
# shell.account.create_account factory function

str_value = "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"

permission_value = bob.active()

dict_value = {
    "threshold" : 100,
    "keys" : [],
    "accounts" :
        [
            {
                "permission":
                    {
                        "actor": bob.active(),
                        "permission":"active"
                    },
                "weight":100
            }
        ]
}

See definitions of the remaining parameters: cleos.common_parameters().

Variables
  • account_name (str) – The EOSIO name of the contract’s account.

  • console (str) – [“processed”][“action_traces”][0][“console”] component of EOSIO cleos responce.

  • data (str) – [“processed”][“action_traces”][0][“act”][“data”] component of EOSIO cleos responce.

class eosfactory.core.cleos_set.SetActionPermission(account, code, action_type, requirement, permission=None, expiration_sec=None, skip_sign=0, dont_broadcast=0, return_packed=0, force_unique=0, max_cpu_usage=0, max_net_usage=0, ref_block=None, delay_sec=0, is_verbose=True, json=False)[source]

Bases: eosfactory.core.cleos.Cleos

Set parameters dealing with account permissions.

Parameters
  • account (str or interface.Account) – The account to set/delete a permission authority for.

  • code (str or interface.Account) – The account that owns the code for the action.

  • action_type (str) – The type of the action.

  • requirement (str) – The permission name require for executing the given action.

See definitions of the remaining parameters: cleos.common_parameters().

Variables
  • account_name (str) – The EOSIO name of the contract’s account.

  • console (str) – [“processed”][“action_traces”][0][“console”] component of EOSIO cleos responce.

  • data (str) – [“processed”][“action_traces”][0][“act”][“data”] component of EOSIO cleos responce.

class eosfactory.core.cleos_set.SetContract(account, contract_dir, wasm_file=None, abi_file=None, clear=False, permission=None, expiration_sec=None, skip_sign=0, dont_broadcast=0, force_unique=0, max_cpu_usage=0, max_net_usage=0, ref_block=None, delay_sec=0, is_verbose=True, json=False)[source]

Bases: eosfactory.core.cleos.Cleos

Create or update the contract on an account.

Parameters
  • account (str or interface.Account) – The account to publish a contract for.

  • contract_dir (str) – The path to a directory.

  • wasm_file (str) – The WASM file relative to the contract_dir.

  • abi_file (str) – The ABI file for the contract relative to the contract-dir.

  • clear (bool) – Remove contract on an account. Default is False.

See definitions of the remaining parameters: cleos.common_parameters().

Variables
  • contract_path_absolute (str) – The path to the contract project

  • account_name (str) – The EOSIO name of the contract’s account.