Jenesis is a command line tool for rapid contract and service development for the Fetch.ai blockchain ecosystem and other CosmWasm-enabled blockchains.
Install jenesis for Python 3.7 or newer via PyPI:
There are multiple commands integrated into jenesis that allow you to perform a variety of tasks these commands are:
Create a new project¶
Create a project using the
This will create a new directory called
my_project. You can use
--network optional arguments, when they aren't used, profile and network will be set to
fetchai-testnet respectively. Inside this directory a
jenesis.toml file will be created containing the following information:
[project] name = "my_project" authors = [ "Alice Tyler <[email protected]>",] [profile.my_profile.network] name = "fetchai-testnet" chain_id = "dorado-1" fee_minimum_gas_price = 5000000000 fee_denomination = "atestfet" staking_denomination = "atestfet" url = "grpc+https://grpc-dorado.fetch.ai" faucet_url = "https://faucet-dorado.fetch.ai" is_local = false [profile.my_profile.contracts]
The project name is the argument passed to the
new command while the authors field is populated by querying the user's GitHub username and email address. The profile's network will be filled with the relevant configuration variables. The contracts field will remain empty until new contracts are added.
contracts folder will also be created inside
my_project directory that will eventually contain all the information needed to compile and deploy the desired contracts.
init command is similar to the
new command, but in this case, you won't need a project name argument since this command is intended to run inside an existing project directory.
This command will create the same files and folders inside your project directory as the ones described for the
If using a cargo workspace, you just need to navigate to the top level of your project and run the
init command shown above. This will create the
jenesis.toml configuration file inside your workspace including all the relevant information from existing contracts.
Configure a network¶
By default, jenesis will configure the project to run on the latest stable Fetch.ai testnet. Use
fetchai-mainnet to configure for the Fetch.ai mainnet or directly edit the
jenesis.toml file to configure for other networks.
To test on a local node, pass the argument
--network fetchai-localnode when creating a project:
The configuration can be found under the
network heading in the
jenesis.toml file and can be changed as desired:
[profile.testing.network] name = "fetchai-localnode" chain_id = "localnode" fee_minimum_gas_price = 5000000000 fee_denomination = "atestfet" staking_denomination = "atestfet" url = "grpc+http://127.0.0.1:9090/" is_local = true keep_running = false cli_binary = "fetchd" validator_key_name = "validator" mnemonic = "gap bomb bulk border original scare assault pelican resemble found laptop skin gesture height inflict clinic reject giggle hurdle bubble soldier hurt moon hint" password = "12345678" moniker = "test-node" genesis_accounts = [ "fetch1vas6cc9650z0s08230ytqjphgzl5tcq9crqhhu",]
genesis_accountsfield with the addresses to be funded.
When running any of the commands
jenesis will check for a currently running local node, and if there is none, a new one will be created in a docker container.
If you wish to keep a local node running, you need to set the
keep_running parameter to
true. Otherwise, nodes will be stopped after any of the command mentioned above finish running.
At any time, you can start or stop a local node by running
jenesis network start/stop --profile <PROFILE>