Skip to main content

Module Configuration

The Coinweb contract module configuration mainly consists of internal .yaml configuration files. The following will explain each of the files used in a contract module setup.

Coinweb Configuration Folder

The folder .cweb-config at the monorepo's root level keeps general Coinweb configuration files.

├── calls-template.yaml
├── calls.yaml
├── create-calls.mjs
├── cweb-pack.yaml
├── dapp-ecosystem.yaml
├── mnemonic.txt
└── unsafe_wallet_mnemonic
calls-template.yamlAggregates all call files from different contract modules under packages/*.cm
calls.yamlGenerated .yaml file from aggregated call configurations in calls-tamplate.yaml
create-calls.mjsScript that aggregates all calls via calls-template.yaml into calls.yaml
cweb-pack.yamlConfiguration .yaml file for the @coinweb/cweb-tool pack command which is part of the @coinweb/cweb-tool
dapp-ecosystem.yamlInternal configuration .yaml file for Coinweb contract modules
mnemonic.txtThe general/main Coinweb wallet that will be considered for all interactions with the contract modules directly or indirectly. This file carries a default DEVNET seed phrase. Be careful working with seed phrases in production environment.
unsafe_wallet_mnemonicThis is an auto-generated temporary wallet used to ultimately execute actions. It exists because of security reasons and will be generated if missing and/or topped up from the main mnemonic.txt wallet when needed.


The calls template includes all contract modules' configuration calls.yaml files to generate the root calls.yaml file.

- !include packages/


The root calls.yaml file generated from calls-template.yaml. In case of the it consists of only one call containing the hash of the contract.

- 221b344e9e801f1106e2769e6ff7fc9be9947aa9e1ad65fb82c607d32560cc67:
- {}
cweb_provided: 80000
auth: false

Each contract hash is associated with a map in the following format:

argsA list of arguments to provide when calling the contract.
cweb_providedAmount of CWEBs needed to provide for contract execution.
authBoolean that indicates whether authentication for the given contract is obligatory.


Create-calls.mjs is a Javascript (ESM) script that transpiles the calls-template.yaml into calls.yaml.

const callsTemplateJSON = yaml.load(
path.join(workdirPath, '/.cweb-config/calls-template.yaml'),
{ schema: extendedSchema }

path.join(workdirPath, '/.cweb-config/calls.yaml'),
{ encoding: 'utf8' }


url: >-
blake3: dd71f72c924435a9e8698734ba859b2b1d2f543926a64a60f9b7feb5b029123b
urlThe currently used ecosystem in form of a yaml file.
blake3The blake 3 hash of the ecosystem file that is in use.


This is a "index source" that specifies the dApp world as you see it. This index defines what interpreters, contract templates etc you want to use, and what they should be called. You can include external sources for this information in the includes section, and you include your own smart contract in the contract_templates section.

The following illustrated the configuration in the example.

# We currently use a reference to the Coinweb in-house ecosystem definition file for devnet.
- url: >-
blake3: dd71f72c924435a9e8698734ba859b2b1d2f543926a64a60f9b7feb5b029123b

interpreters: {}

# Our contract module. The contract module is an npm package created in the `dist/out`
# directory using the `yarn build` and `yarn pack` commands.
- file:///./packages/


Mnemonic.txt contains a Coinweb seed phrase that is used for the execution of all actions. In the case of the hello-world contract it is just some arbitrary default DEVNET seed phrase.

priority supply couple broccoli balcony sort flag keep original wrong pottery version

Be careful not to expose the seed phrase when committing code to production. It is better to set them up in you environment files.


The unsafe wallet is just a middleman that is used for security reasons when interacting with Coinweb. If it does not exist it will be created by the cweb-tool. If it exists it will be used for all upcoming actions. If the balance is less than the needed balance for the execution of an action it will be topped up from the main mnemonic wallet

baby pair impose hybrid reform network cream suspect better flash asthma oil