fix address issue

This commit is contained in:
Solovyov1796 2024-04-25 11:33:14 +08:00
parent 2336a0b0e2
commit b03ef157d5
3 changed files with 8 additions and 7 deletions

1
.gitignore vendored
View File

@ -41,3 +41,4 @@ build/linux
# Go workspace files # Go workspace files
go.work go.work
go.work.sum go.work.sum
.build/0gchaind

View File

@ -2,21 +2,21 @@ package chaincfg
import ( import (
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
ethaccounts "github.com/ethereum/go-ethereum/accounts"
) )
var ( var (
// Bip44CoinType satisfies EIP84. See https://github.com/ethereum/EIPs/issues/84 for more info. // Bip44CoinType satisfies EIP84. See https://github.com/ethereum/EIPs/issues/84 for more info.
Bip44CoinType uint32 = 60 // TODO: need new coin type for 0g-chain (a0gi) Bip44CoinType uint32 = 459 // TODO: need new coin type for 0g-chain (a0gi)
// eth = 60
// kava = 459 // see https://github.com/satoshilabs/slips/blob/master/slip-0044.md
// BIP44HDPath is the default BIP44 HD path used on Ethereum. // BIP44HDPath is the default BIP44 HD path used on Ethereum.
BIP44HDPath = ethaccounts.DefaultBaseDerivationPath.String() //BIP44HDPath = ethaccounts.DefaultBaseDerivationPath.String()
) )
// TODO: Implement BIP44CoinType and BIP44HDPath // TODO: Implement BIP44CoinType and BIP44HDPath
// SetBip44CoinType sets the global coin type to be used in hierarchical deterministic wallets. // SetBip44CoinType sets the global coin type to be used in hierarchical deterministic wallets.
func setBip44CoinType(config *sdk.Config) { func setBip44CoinType(config *sdk.Config) {
config.SetCoinType(Bip44CoinType) config.SetCoinType(Bip44CoinType)
config.SetPurpose(sdk.Purpose) // Shared //config.SetPurpose(sdk.Purpose) // Shared
config.SetFullFundraiserPath(BIP44HDPath) //nolint: staticcheck //config.SetFullFundraiserPath(BIP44HDPath) //nolint: staticcheck
} }

View File

@ -10,6 +10,6 @@ const (
func SetSDKConfig() *sdk.Config { func SetSDKConfig() *sdk.Config {
config := sdk.GetConfig() config := sdk.GetConfig()
setBech32Prefixes(config) setBech32Prefixes(config)
// setBip44CoinType(config) setBip44CoinType(config)
return config return config
} }