-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
146 changed files
with
35,053 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ build/ | |
|
||
dist/ | ||
data/ | ||
|
||
.envrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package appconst | ||
|
||
import ( | ||
"os" | ||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
const AppName = "Archway" | ||
|
||
// We pull these out so we can set them with LDFLAGS in the Makefile | ||
var ( | ||
NodeDir = ".archway" | ||
Bech32Prefix = "archway" | ||
) | ||
|
||
// These constants are derived from the above variables. | ||
// These are the ones we will want to use in the code, based on | ||
// any overrides above | ||
var ( | ||
// DefaultNodeHome default home directories for archwayd | ||
DefaultNodeHome = os.ExpandEnv("$HOME/") + NodeDir | ||
|
||
// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address | ||
Bech32PrefixAccAddr = Bech32Prefix | ||
// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key | ||
Bech32PrefixAccPub = Bech32Prefix + sdk.PrefixPublic | ||
// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address | ||
Bech32PrefixValAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator | ||
// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key | ||
Bech32PrefixValPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic | ||
// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address | ||
Bech32PrefixConsAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus | ||
// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key | ||
Bech32PrefixConsPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/CosmWasm/wasmd/app" | ||
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
func SetPrefixes() { | ||
cfg := sdk.GetConfig() | ||
cfg.SetBech32PrefixForAccount(app.Bech32PrefixAccAddr, app.Bech32PrefixAccPub) | ||
cfg.SetBech32PrefixForValidator(app.Bech32PrefixValAddr, app.Bech32PrefixValPub) | ||
cfg.SetBech32PrefixForConsensusNode(app.Bech32PrefixConsAddr, app.Bech32PrefixConsPub) | ||
cfg.SetAddressVerifier(wasmtypes.VerifyAddressLen()) | ||
cfg.Seal() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.