diff --git a/config/network.json b/config/network.json new file mode 100644 index 0000000..6904702 --- /dev/null +++ b/config/network.json @@ -0,0 +1,45 @@ +{ + "chainId": "laconic-mainnet", + "chainName": "Laconicd", + "rpc": "http://localhost:26657", + "rest": "https://localhost:1317", + "bip44": { + "coinType": 118 + }, + "bech32Config": { + "bech32PrefixAccAddr": "laconic", + "bech32PrefixAccPub": "laconipub", + "bech32PrefixValAddr": "laconicvaloper", + "bech32PrefixValPub": "laconicvaloperpub", + "bech32PrefixConsAddr": "laconicvalcons", + "bech32PrefixConsPub": "laconicvalconspub" + }, + "currencies": [ + { + "coinDenom": "ALNT", + "coinMinimalDenom": "alnt", + "coinDecimals": 18 + } + ], + "feeCurrencies": [ + { + "coinDenom": "ALNT", + "coinMinimalDenom": "alnt", + "coinDecimals": 18 + } + ], + "stakeCurrency": { + "coinDenom": "ALNT", + "coinMinimalDenom": "alnt", + "coinDecimals": 18 + }, + "gasPriceStep": { + "low": 0.01, + "average": 0.01, + "high": 0.02 + }, + "features": [ + "stargate", + "ibc-transfer" + ] +} diff --git a/docs/demo.md b/docs/demo.md index bcf2393..6d913d5 100644 --- a/docs/demo.md +++ b/docs/demo.md @@ -386,6 +386,8 @@ ```bash # Set multisig app deployment directory export MULTISIG_DEPLOYMENT_DIR=cosmos-multisig-deployment + # Set path to custom network JSON file + export NETWORK_JSON_PATH=~/cerc/laconicd-stack/config/network.json ``` - Copy the example variables file: diff --git a/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml b/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml index b09d6d3..b277df3 100644 --- a/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml +++ b/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml @@ -8,6 +8,7 @@ multisig_deployment_dir: "{{ lookup('env', 'MULTISIG_DEPLOYMENT_DIR') }}" spec_output: "{{data_directory}}/cosmos-multisig-ui-spec.yml" spec_template: "./templates/specs/cosmos-multisig-app-spec-template.yml.j2" + network_json: "{{ lookup('env', 'NETWORK_JSON_PATH') }}" tasks: - name: Fail if DATA_DIRECTORY env var is not set fail: @@ -32,11 +33,11 @@ - name: Create deployment from spec file shell: | - laconic-so --stack ~/cerc/cosmos-multisig-ui/stack-orchestrator/stacks/cosmos-multisig-ui/ deploy create --spec-file {{ spec_output }} --deployment-dir {{ multisig_deployment_dir }} + laconic-so --stack ~/cerc/cosmos-multisig-ui/stack-orchestrator/stacks/cosmos-multisig-ui/ deploy create --spec-file {{ spec_output }} --deployment-dir {{data_directory}}/{{ multisig_deployment_dir }} - name: Create config.env in deployment dir copy: - dest: "{{ multisig_deployment_dir }}/config.env" + dest: "{{data_directory}}/{{ multisig_deployment_dir }}/config.env" content: | NEXT_PUBLIC_MULTICHAIN={{ next_public_multichain }} NEXT_PUBLIC_REGISTRY_NAME={{ next_public_registry_name }} @@ -51,8 +52,20 @@ NEXT_PUBLIC_GAS_PRICE={{ next_public_gas_price }} NEXT_PUBLIC_ADDRESS_PREFIX={{ next_public_address_prefix }} NEXT_PUBLIC_IS_HTTP_ENABLED={{ next_public_is_http_enabled }} + CHAIN_CONFIG_PATH="{{data_directory}}/{{ multisig_deployment_dir }}/config/cosmos-multisig-ui/network.json" + mode: '0644' + + - name: Fail if NETWORK_JSON_PATH env var is not set + fail: + msg: "Environment variable NETWORK_JSON_PATH is not set. Please export it before running the playbook." + when: lookup('env', 'NETWORK_JSON_PATH') == '' + + - name: Copy network JSON to deployment config directory + copy: + src: "{{ lookup('env', 'NETWORK_JSON_PATH') }}" + dest: "{{data_directory}}/{{ multisig_deployment_dir }}/config/cosmos-multisig-ui/network.json" mode: '0644' - name: Start the deployment shell: | - laconic-so deployment --dir {{ multisig_deployment_dir }} start + laconic-so deployment --dir {{data_directory}}/{{ multisig_deployment_dir }} start