From 249bfad89cd6f9fac71ebac918b0e951a9b6bf5c Mon Sep 17 00:00:00 2001 From: Kendrick Date: Tue, 18 Jul 2023 12:13:05 +0800 Subject: [PATCH] bugfix: prefix mismatch causing transformations.yml to fail (#20) --- app/app.go | 14 +++++++------- config/localnet/config.json | 6 +++--- config/mainnet/config.json | 14 +++++++------- transformations.yml | 5 +++-- 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/app/app.go b/app/app.go index a60723f..b4a14af 100644 --- a/app/app.go +++ b/app/app.go @@ -165,13 +165,13 @@ import ( // DO NOT change the names of these variables! // TODO: to prevent other users from changing these variables, we could probably just publish our own package like https://pkg.go.dev/github.com/cosmos/cosmos-sdk/version var ( - AccountAddressPrefix = "feath" - AccountPubKeyPrefix = "feathpub" - ValidatorAddressPrefix = "feathvaloper" - ValidatorPubKeyPrefix = "feathvaloperpub" - ConsensusNodeAddressPrefix = "feathvalcons" - ConsensusNodePubKeyPrefix = "feathvalconspub" - BondDenom = "featherstake" + AccountAddressPrefix = "transformableprefix" + AccountPubKeyPrefix = "transformableprefixpub" + ValidatorAddressPrefix = "transformableprefixvaloper" + ValidatorPubKeyPrefix = "transformableprefixvaloperpub" + ConsensusNodeAddressPrefix = "transformableprefixvalcons" + ConsensusNodePubKeyPrefix = "transformableprefixvalconspub" + BondDenom = "transformablestake" AppName = "feather-core" ) diff --git a/config/localnet/config.json b/config/localnet/config.json index 7a220bd..4fed932 100644 --- a/config/localnet/config.json +++ b/config/localnet/config.json @@ -9,7 +9,7 @@ "amount": "20000" }, { - "denom": "stake", + "denom": "transformablestake", "amount": "200000000" } ] @@ -22,7 +22,7 @@ "amount": "10000" }, { - "denom": "stake", + "denom": "transformablestake", "amount": "100000000" } ] @@ -32,7 +32,7 @@ { "name": "alice", "bonded": { - "denom": "stake", + "denom": "transformablestake", "amount": "100000000" } } diff --git a/config/mainnet/config.json b/config/mainnet/config.json index 48041f0..bd68743 100644 --- a/config/mainnet/config.json +++ b/config/mainnet/config.json @@ -2,13 +2,13 @@ "chain_id": "feather-1", "app_name": "feather-core", "app_binary_name": "feather-cored", - "account_address_prefix": "feath", - "account_pubkey_prefix": "feathpub", - "validator_address_prefix": "feathvaloper", - "validator_pubkey_prefix": "feathvaloperpub", - "consensus_node_address_prefix": "feathvalcons", - "consensus_node_pubkey_prefix": "feathvalconspub", - "bond_denom": "stake", + "account_address_prefix": "transformableprefix", + "account_pubkey_prefix": "transformableprefixpub", + "validator_address_prefix": "transformableprefixvaloper", + "validator_pubkey_prefix": "transformableprefixvaloperpub", + "consensus_node_address_prefix": "transformableprefixvalcons", + "consensus_node_pubkey_prefix": "transformableprefixvalconspub", + "bond_denom": "transformablestake", "bond_supply": "1000000000", "unbonding_time": "1814400s", "max_validators": 130, diff --git a/transformations.yml b/transformations.yml index bc6d713..93e2484 100644 --- a/transformations.yml +++ b/transformations.yml @@ -47,14 +47,15 @@ transformations: - name: account prefix type: replace - pattern: pfeath + # replaces account prefixes in config.json + pattern: transformableprefix replacement: "{{ .account_prefix }}" files: - "config/mainnet/config.json" - name: bond denom type: replace - pattern: stake + pattern: transformablestake replacement: "{{ .bond_denom }}" files: - "config/localnet/config.json"