utils

eosfactory.create_project.main()[source]
usage: python3 -m eosfactory.create_project [-h] [–vsc]
[–throw] [–ovr] [–silent] name [template]

Given a workspace name and (optional) a template name, create a new workspace, compatible with Visual Studio Code.

Parameters:
  • name – Project name or directory.
  • template – Template name or directory.
  • --c_cpp_prop – c_cpp_properties.json file path.
  • --includes – Comma-separated list of include folders.
  • --libs – Comma-separated list of libraries.
  • --vsc – Open Visual Studio Code.
  • --throw – Throw error if the project exists.
  • --ovr – Overwrite any existing project.
  • --silent – Do not print info.
  • -h – Show help message and exit
eosfactory.build.main()[source]

Build a contract.

usage: python3 -m eosfactory.build [-h] [–compile] [–silent] dir

The contract is determined with its project directory. The directory may be absolute or relative to the contract workspace directory as defined with core.config.contract_workspace_dir(). If the dir argument is not set, it is substituted with the current working directory.

The dependencies of the contract are determined with the json file given with the argument c_cpp_prop – if it is set – or with the file .vscode/c_opp_properties.json in the project’s directory, otherwise.

Parameters:
  • dir – Contract name or directory.
  • --c_cpp_prop – c_cpp_properties.json file path.
  • --compile – Do not build, compile only.
  • --test_mode – Use test options, not code ones.
  • --execute – Execute the target.
  • --silent – Do not print info.
  • -h – Show help message and exit
eosfactory.testnets.main()[source]

usage: testnets.py [-h] [–name NAME] [–remove]

List saved testnets.

Parameters:
  • --name – print a testent of the given name
  • --remove – remove a testent of the given name
  • -h – show help message and exit
eosfactory.register_testnet.main()[source]

usage: python3 -m eosfactory.register_testnet [-h] [-a ACCOUNT ACCOUNT ACCOUNT] url [alias]

Given an url and an testnet alias (not obligatory), get registration data. Apply the data to the registration form of the testnet. Enter ‘go’ when ready.

Example using the jungle testnet https://monitor.jungletestnet.io/:

python3 -m eosfactory.register_testnet http://jungle2.cryptolions.io:80 jungle

If additional arguments are given, denoted as --account, then the given account is checked for existence, and then added as a testnet master account, for example:

python3 -m eosfactory.register_testnet http://jungle2.cryptolions.io:80 jungle -a dgxo1uyhoytn 5K4rezbmuoDUyBUntM3PqxwutPU3rYKrNzgF4f3djQDjfXF3Q67 5JCvLMJVR24WWvC6qD6VbLpdUMsjhiXmcrk4i7bdPfjDfNMNAeX

Parameters:
  • url – An URL of a public node offering access to the testnet, e.g. http://jungle2.cryptolions.io:80
  • alias – Testnet alias
  • -h – show this help message and exit
  • -a (ACCOUNT ACCOUNT ACCOUNT) – <name> <owner key> <active key>
eosfactory.register_testnet_via_faucet.main()[source]

usage: python3 -m eosfactory.register_testnet_via_faucet [-h] faucet url [alias]

Parameters: