|
| 1 | +# Configuration |
| 2 | + |
| 3 | +With Starport your blockchain can be configured with `config.yml`. |
| 4 | + |
| 5 | +## `accounts` |
| 6 | + |
| 7 | +A list of user accounts created during genesis of your application. |
| 8 | + |
| 9 | +| Key | Required | Type | Description | |
| 10 | +| ----- | -------- | --------------- | ------------------------------------------------- | |
| 11 | +| name | Y | String | Local name of a key pair | |
| 12 | +| coins | Y | List of Strings | Initial coins with denominations (e.g. "100coin") | |
| 13 | + |
| 14 | +### Example |
| 15 | + |
| 16 | +```yaml |
| 17 | +accounts: |
| 18 | + - name: alice |
| 19 | + coins: ["1000token", "100000000stake"] |
| 20 | + - name: bob |
| 21 | + coins: ["500token"] |
| 22 | +``` |
| 23 | +
|
| 24 | +## `validator` |
| 25 | + |
| 26 | +A blockchain has to have at least one validator-node. `validator` specifies the account that will be used to initialize the validator and parameters of the validator. |
| 27 | + |
| 28 | +| Key | Required | Type | Description | |
| 29 | +| ------ | -------- | ------ | --------------------------------------------------------------------------------- | |
| 30 | +| name | Y | String | Name of a key pair. `name` must be in `accounts` | |
| 31 | +| staked | Y | String | Amount of coins to bond. Must be less or equal to the amount of coins account has | |
| 32 | + |
| 33 | +### Example |
| 34 | + |
| 35 | +```yaml |
| 36 | +accounts: |
| 37 | + - name: alice |
| 38 | + coins: ["1000token", "100000000stake"] |
| 39 | +validator: |
| 40 | + name: user1 |
| 41 | + staked: "100000000stake" |
| 42 | +``` |
| 43 | + |
| 44 | +## `init.home` |
| 45 | + |
| 46 | +A blockchain stores data and configuration in a data directory. This property specifies a path to the data directory. |
| 47 | + |
| 48 | +### Example |
| 49 | + |
| 50 | +```yaml |
| 51 | +init: |
| 52 | + home: "~/.myblockchain" |
| 53 | +``` |
| 54 | + |
| 55 | +## `init.config` |
| 56 | + |
| 57 | +Overwrites properties in `config/config.toml` in the data directory. |
| 58 | + |
| 59 | +## `init.app` |
| 60 | + |
| 61 | +Overwrites properties in `config/app.toml` in the data directory. |
| 62 | + |
| 63 | +## `init.keyring-backend` |
| 64 | + |
| 65 | +Specifies a [keyring backend](https://docs.cosmos.network/master/run-node/keyring.html). |
| 66 | + |
| 67 | +### Example |
| 68 | + |
| 69 | +```yaml |
| 70 | +init: |
| 71 | + keyring-backend: "os" |
| 72 | +``` |
| 73 | + |
| 74 | +## `genesis` |
| 75 | + |
| 76 | +Overwrites properties in `config.genesis.json` in the data directory. |
| 77 | + |
| 78 | +### Example |
| 79 | + |
| 80 | +```yaml |
| 81 | +genesis: |
| 82 | + chain-id: "foobar" |
| 83 | +``` |
| 84 | + |
| 85 | +## Learn more |
| 86 | + |
| 87 | +- [Starport](https://github.com/tendermint/starport) |
| 88 | +- [Cosmos SDK documentation](https://docs.cosmos.network) |
| 89 | +- [Cosmos Tutorials](https://tutorials.cosmos.network) |
| 90 | +- [Channel on Discord](https://discord.gg/W8trcGV) |
0 commit comments