-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: add rpcimportable test * add ci * fmt * use github.com/btcsuite/btcd/btcutil in pkg/chains * remove app imports types tests * use standalone sdkconfig package * fix policies test * move crosschain keeper tests from types to keeper * never seal config in tests * use zeta-chain/ethermint#126 * add some comments * use merged ethermint hash * show resulting go.mod
- Loading branch information
Showing
24 changed files
with
376 additions
and
303 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
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,15 @@ | ||
module github.com/zeta-chain/node/contrib/rpcimportable | ||
|
||
go 1.22.5 | ||
|
||
// this go.mod should be empty when committed | ||
// the go.sum should not be committed | ||
|
||
// this replacement is unavoidable until we upgrade cosmos sdk >=v0.50 | ||
// but we should not tolerate any other replacements | ||
replace ( | ||
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 | ||
) | ||
|
||
// uncomment this for local development/testing/debugging | ||
// replace github.com/zeta-chain/node => ../.. |
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,11 @@ | ||
package rpcimportable | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/zeta-chain/node/pkg/rpc" | ||
) | ||
|
||
func TestRPCImportable(t *testing.T) { | ||
_ = rpc.Clients{} | ||
} |
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,36 @@ | ||
package sdkconfig | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
const ( | ||
AccountAddressPrefix = "zeta" | ||
) | ||
|
||
var ( | ||
AccountPubKeyPrefix = AccountAddressPrefix + "pub" | ||
ValidatorAddressPrefix = AccountAddressPrefix + "valoper" | ||
ValidatorPubKeyPrefix = AccountAddressPrefix + "valoperpub" | ||
ConsNodeAddressPrefix = AccountAddressPrefix + "valcons" | ||
ConsNodePubKeyPrefix = AccountAddressPrefix + "valconspub" | ||
) | ||
|
||
func SetDefault(seal bool) { | ||
config := sdk.GetConfig() | ||
config.SetBech32PrefixForAccount(AccountAddressPrefix, AccountPubKeyPrefix) | ||
config.SetBech32PrefixForValidator(ValidatorAddressPrefix, ValidatorPubKeyPrefix) | ||
config.SetBech32PrefixForConsensusNode(ConsNodeAddressPrefix, ConsNodePubKeyPrefix) | ||
if seal { | ||
config.Seal() | ||
} | ||
} | ||
|
||
func Set(config *sdk.Config, seal bool) { | ||
config.SetBech32PrefixForAccount(AccountAddressPrefix, AccountPubKeyPrefix) | ||
config.SetBech32PrefixForValidator(ValidatorAddressPrefix, ValidatorPubKeyPrefix) | ||
config.SetBech32PrefixForConsensusNode(ConsNodeAddressPrefix, ConsNodePubKeyPrefix) | ||
if seal { | ||
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
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.