-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from terpnetwork/hard-nett/v0.4.0
Hard nett/v0.4.0
- Loading branch information
Showing
82 changed files
with
12,400 additions
and
995 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 |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: bufbuild/buf-setup-action@v1.9.0 | ||
- uses: bufbuild/buf-setup-action@v1.13.1 | ||
|
||
# lint checks | ||
- uses: bufbuild/buf-lint-action@v1 | ||
|
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
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,26 @@ | ||
package params | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
// AccountAddressPrefix defines the Paloma network's Bech32 address prefix. | ||
const AccountAddressPrefix = "terp" | ||
|
||
// Account specific Bech32 prefixes. | ||
var ( | ||
AccountPubKeyPrefix = AccountAddressPrefix + "pub" | ||
ValidatorAddressPrefix = AccountAddressPrefix + "valoper" | ||
ValidatorPubKeyPrefix = AccountAddressPrefix + "valoperpub" | ||
ConsNodeAddressPrefix = AccountAddressPrefix + "valcons" | ||
ConsNodePubKeyPrefix = AccountAddressPrefix + "valconspub" | ||
) | ||
|
||
// SetAddressConfig sets Paloma's address configuration. | ||
func SetAddressConfig() { | ||
config := sdk.GetConfig() | ||
config.SetBech32PrefixForAccount(AccountAddressPrefix, AccountPubKeyPrefix) | ||
config.SetBech32PrefixForValidator(ValidatorAddressPrefix, ValidatorPubKeyPrefix) | ||
config.SetBech32PrefixForConsensusNode(ConsNodeAddressPrefix, ConsNodePubKeyPrefix) | ||
config.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* package upgrades | ||
import ( | ||
store "github.com/cosmos/cosmos-sdk/store/types" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
abci "github.com/tendermint/tendermint/abci/types" | ||
"github.com/terpnetwork/terp-core/app/keepers" | ||
) | ||
// BaseAppParamManager defines an interrace that BaseApp is expected to fullfil | ||
// that allows upgrade handlers to modify BaseApp parameters. | ||
type BaseAppParamManager interface { | ||
GetConsensusParams(ctx sdk.Context) *abci.ConsensusParams | ||
StoreConsensusParams(ctx sdk.Context, cp *abci.ConsensusParams) | ||
} | ||
// Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal | ||
// must have written, in order for the state migration to go smoothly. | ||
// An upgrade must implement this struct, and then set it in the app.go. | ||
// The app.go will then define the handler. | ||
type Upgrade struct { | ||
// Upgrade version name, for the upgrade handler, e.g. `v7` | ||
UpgradeName string | ||
// CreateUpgradeHandler defines the function that creates an upgrade handler | ||
CreateUpgradeHandler func( | ||
*module.Manager, | ||
module.Configurator, | ||
*keepers.AppKeepers, | ||
) upgradetypes.UpgradeHandler | ||
// Store upgrades, should be used for any new modules introduced, new modules deleted, or store names renamed. | ||
StoreUpgrades store.StoreUpgrades | ||
} | ||
*/ |
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,18 @@ | ||
/*package v1 | ||
import ( | ||
store "github.com/cosmos/cosmos-sdk/store/types" | ||
"github.com/terpnetwork/terp-core/app/upgrades" | ||
) | ||
// UpgradeName defines the on-chain upgrade name for the Terp Network v1 upgrade. | ||
const UpgradeName = "v1" // maybe ? | ||
var Upgrade = upgrades.Upgrade{ | ||
UpgradeName: UpgradeName, | ||
CreateUpgradeHandler: CreateV1UpgradeHandler, | ||
StoreUpgrades: store.StoreUpgrades{ | ||
Added: []string{TBD.StoreKey, TBD.StoreKey}, | ||
}, | ||
} | ||
*/ |
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,22 @@ | ||
/*package v1 | ||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
"github.com/terpnetwork/terp-core/app/keepers" | ||
) | ||
// CreateV10UpgradeHandler makes an upgrade handler for v10 of Juno | ||
func CreateV1UpgradeHandler( | ||
mm *module.Manager, | ||
cfg module.Configurator, | ||
keepers *keepers.AppKeepers, | ||
) upgradetypes.UpgradeHandler { | ||
return func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { | ||
// mint module consensus version bumped | ||
return mm.RunMigrations(ctx, cfg, vm) | ||
} | ||
} | ||
*/ |
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 |
---|---|---|
|
@@ -3,4 +3,4 @@ package docs | |
import "embed" | ||
|
||
//go:embed static | ||
var Docs embed.FS | ||
var Docs embed.FS |
Oops, something went wrong.