Skip to content

Commit

Permalink
bugfix: prefix mismatch causing transformations.yml to fail (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
KendrickAng authored Jul 18, 2023
1 parent bea76d1 commit 249bfad
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
14 changes: 7 additions & 7 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
6 changes: 3 additions & 3 deletions config/localnet/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"amount": "20000"
},
{
"denom": "stake",
"denom": "transformablestake",
"amount": "200000000"
}
]
Expand All @@ -22,7 +22,7 @@
"amount": "10000"
},
{
"denom": "stake",
"denom": "transformablestake",
"amount": "100000000"
}
]
Expand All @@ -32,7 +32,7 @@
{
"name": "alice",
"bonded": {
"denom": "stake",
"denom": "transformablestake",
"amount": "100000000"
}
}
Expand Down
14 changes: 7 additions & 7 deletions config/mainnet/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions transformations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 249bfad

Please sign in to comment.