From a8ba31170628059307548d154072abf26c32fe2e Mon Sep 17 00:00:00 2001 From: Woosang Son Date: Fri, 23 Apr 2021 15:06:12 +0900 Subject: [PATCH] fix: modify default coin type, default address prefix (#140) --- client/keys/add.go | 1 - client/keys/add_ledger_test.go | 6 +- client/keys/export_test.go | 2 +- codec/amino_codec_test.go | 2 +- crypto/hd/hdpath_test.go | 10 +-- crypto/keyring/keyring_ledger_test.go | 20 +++--- crypto/keyring/keyring_test.go | 4 +- crypto/keyring/legacy_test.go | 2 +- crypto/keyring/types_test.go | 4 +- crypto/ledger/ledger_test.go | 72 +++++++++---------- .../adr-024-coin-metadata_genesis.json | 2 +- types/address.go | 10 +-- types/config.go | 2 +- types/rest/rest_test.go | 6 +- x/auth/client/cli/cli_test.go | 4 +- x/auth/legacy/v038/migrate_test.go | 14 ++-- x/auth/legacy/v039/migrate_test.go | 4 +- x/auth/legacy/v040/migrate_test.go | 14 ++-- x/auth/simulation/genesis_test.go | 2 +- x/auth/types/account_test.go | 2 +- x/bank/keeper/genesis_test.go | 4 +- x/bank/legacy/v040/migrate_test.go | 6 +- x/bank/simulation/genesis_test.go | 2 +- x/bank/simulation/operations_test.go | 8 +-- x/bank/types/balance_test.go | 12 ++-- x/bank/types/genesis_test.go | 8 +-- x/bank/types/key_test.go | 2 +- x/bank/types/msgs_test.go | 4 +- x/distribution/simulation/operations_test.go | 12 ++-- x/evidence/legacy/v040/migrate_test.go | 4 +- x/evidence/types/evidence_test.go | 4 +- x/genutil/legacy/v036/migrate_test.go | 4 +- x/genutil/legacy/v038/migrate_test.go | 16 ++--- x/genutil/legacy/v039/migrate_test.go | 16 ++--- x/genutil/types/genesis_state_test.go | 2 +- x/gov/legacy/v040/migrate_test.go | 4 +- x/gov/simulation/operations_test.go | 6 +- x/gov/types/msgs_test.go | 2 +- x/ibc/core/03-connection/types/msgs_test.go | 8 +-- x/slashing/legacy/v040/migrate_test.go | 28 ++++---- x/slashing/simulation/operations_test.go | 2 +- x/slashing/types/msg_test.go | 2 +- x/staking/client/cli/cli_test.go | 6 +- x/staking/client/cli/tx_test.go | 2 +- x/staking/legacy/v036/migrate_test.go | 4 +- x/staking/simulation/genesis_test.go | 6 +- x/staking/simulation/operations_test.go | 20 +++--- 47 files changed, 188 insertions(+), 189 deletions(-) diff --git a/client/keys/add.go b/client/keys/add.go index 9b2ec80d70..bead79b653 100644 --- a/client/keys/add.go +++ b/client/keys/add.go @@ -78,7 +78,6 @@ the flag --nosort is set. cmd.Flags().Uint32(flagAccount, 0, "Account number for HD derivation") cmd.Flags().Uint32(flagIndex, 0, "Address index number for HD derivation") cmd.Flags().String(flags.FlagKeyAlgorithm, string(hd.Secp256k1Type), "Key signing algorithm to generate keys for") - cmd.SetOut(cmd.OutOrStdout()) cmd.SetErr(cmd.ErrOrStderr()) diff --git a/client/keys/add_ledger_test.go b/client/keys/add_ledger_test.go index 8ac6a0aedd..fbfcf37981 100644 --- a/client/keys/add_ledger_test.go +++ b/client/keys/add_ledger_test.go @@ -77,8 +77,8 @@ func Test_runAddCmdLedgerWithCustomCoinType(t *testing.T) { "terrapub1addwnpepqvpg7r26nl2pvqqern00m6s9uaax3hauu2rzg8qpjzq9hy6xve7sw0d84m6", sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, key1.GetPubKey())) - config.SetCoinType(118) - config.SetFullFundraiserPath("44'/118'/0'/0/0") + config.SetCoinType(438) + config.SetFullFundraiserPath("44'/438'/0'/0/0") config.SetBech32PrefixForAccount(sdk.Bech32PrefixAccAddr, sdk.Bech32PrefixAccPub) config.SetBech32PrefixForValidator(sdk.Bech32PrefixValAddr, sdk.Bech32PrefixValPub) config.SetBech32PrefixForConsensusNode(sdk.Bech32PrefixConsAddr, sdk.Bech32PrefixConsPub) @@ -122,6 +122,6 @@ func Test_runAddCmdLedger(t *testing.T) { require.Equal(t, "keyname1", key1.GetName()) require.Equal(t, keyring.TypeLedger, key1.GetType()) require.Equal(t, - "cosmospub1addwnpepqd87l8xhcnrrtzxnkql7k55ph8fr9jarf4hn6udwukfprlalu8lgw0urza0", + "linkpub1addwnpepq27djm9tzq3sftqsayx95refxk8r5jn0kyshhql9mdjhjx829zlvzszgelc", sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, key1.GetPubKey())) } diff --git a/client/keys/export_test.go b/client/keys/export_test.go index cb238771d0..4e9df10903 100644 --- a/client/keys/export_test.go +++ b/client/keys/export_test.go @@ -65,5 +65,5 @@ func Test_runExportCmd(t *testing.T) { mockIn, mockOut := testutil.ApplyMockIO(cmd) mockIn.Reset("y\n") require.NoError(t, cmd.ExecuteContext(ctx)) - require.Equal(t, "2485e33678db4175dc0ecef2d6e1fc493d4a0d7f7ce83324b6ed70afe77f3485\n", mockOut.String()) + require.Equal(t, "d4bd5d54ee1b75abc6f5bab08e2e9d3a4b6dfbe6b50e2d6cf2426f3215633a1f\n", mockOut.String()) } diff --git a/codec/amino_codec_test.go b/codec/amino_codec_test.go index 55cde456ac..728e1e8581 100644 --- a/codec/amino_codec_test.go +++ b/codec/amino_codec_test.go @@ -120,7 +120,7 @@ func TestAminoCodecUnpackAnyFails(t *testing.T) { func TestAminoCodecFullDecodeAndEncode(t *testing.T) { // This tx comes from https://github.com/cosmos/cosmos-sdk/issues/8117. - txSigned := `{"type":"lbm-sdk/StdTx","value":{"msg":[{"type":"lbm-sdk/MsgCreateValidator","value":{"description":{"moniker":"fulltest","identity":"satoshi","website":"example.com","details":"example inc"},"commission":{"rate":"0.500000000000000000","max_rate":"1.000000000000000000","max_change_rate":"0.200000000000000000"},"min_self_delegation":"1000000","delegator_address":"cosmos14pt0q5cwf38zt08uu0n6yrstf3rndzr5057jys","validator_address":"cosmosvaloper14pt0q5cwf38zt08uu0n6yrstf3rndzr52q28gr","pubkey":{"type":"tendermint/PubKeyEd25519","value":"CYrOiM3HtS7uv1B1OAkknZnFYSRpQYSYII8AtMMtev0="},"value":{"denom":"umuon","amount":"700000000"}}}],"fee":{"amount":[{"denom":"umuon","amount":"6000"}],"gas":"160000"},"signatures":[{"pub_key":{"type":"tendermint/PubKeySecp256k1","value":"AwAOXeWgNf1FjMaayrSnrOOKz+Fivr6DiI/i0x0sZCHw"},"signature":"RcnfS/u2yl7uIShTrSUlDWvsXo2p2dYu6WJC8VDVHMBLEQZWc8bsINSCjOnlsIVkUNNe1q/WCA9n3Gy1+0zhYA=="}],"memo":"","timeout_height":"0"}}` + txSigned := `{"type":"lbm-sdk/StdTx","value":{"msg":[{"type":"lbm-sdk/MsgCreateValidator","value":{"description":{"moniker":"fulltest","identity":"satoshi","website":"example.com","details":"example inc"},"commission":{"rate":"0.500000000000000000","max_rate":"1.000000000000000000","max_change_rate":"0.200000000000000000"},"min_self_delegation":"1000000","delegator_address":"link120yvjfy7m2gnu9mvusrs40cxxhpt8nr3qhn8re","validator_address":"linkvaloper120yvjfy7m2gnu9mvusrs40cxxhpt8nr3jr36d2","pubkey":{"type":"tendermint/PubKeyEd25519","value":"CYrOiM3HtS7uv1B1OAkknZnFYSRpQYSYII8AtMMtev0="},"value":{"denom":"umuon","amount":"700000000"}}}],"fee":{"amount":[{"denom":"umuon","amount":"6000"}],"gas":"160000"},"signatures":[{"pub_key":{"type":"tendermint/PubKeySecp256k1","value":"AwAOXeWgNf1FjMaayrSnrOOKz+Fivr6DiI/i0x0sZCHw"},"signature":"RcnfS/u2yl7uIShTrSUlDWvsXo2p2dYu6WJC8VDVHMBLEQZWc8bsINSCjOnlsIVkUNNe1q/WCA9n3Gy1+0zhYA=="}],"memo":"","timeout_height":"0"}}` _, legacyCdc := simapp.MakeCodecs() var tx legacytx.StdTx diff --git a/crypto/hd/hdpath_test.go b/crypto/hd/hdpath_test.go index 5ad8d8ffb4..32c1bcaf2a 100644 --- a/crypto/hd/hdpath_test.go +++ b/crypto/hd/hdpath_test.go @@ -21,10 +21,10 @@ func mnemonicToSeed(mnemonic string) []byte { func TestStringifyFundraiserPathParams(t *testing.T) { path := hd.NewFundraiserParams(4, types.CoinType, 22) - require.Equal(t, "m/44'/118'/4'/0/22", path.String()) + require.Equal(t, "m/44'/438'/4'/0/22", path.String()) path = hd.NewFundraiserParams(4, types.CoinType, 57) - require.Equal(t, "m/44'/118'/4'/0/57", path.String()) + require.Equal(t, "m/44'/438'/4'/0/57", path.String()) path = hd.NewFundraiserParams(4, 12345, 57) require.Equal(t, "m/44'/12345'/4'/0/57", path.String()) @@ -200,7 +200,7 @@ func ExampleSomeBIP32TestVecs() { seed := mnemonicToSeed("barrel original fuel morning among eternal " + "filter ball stove pluck matrix mechanic") master, ch := hd.ComputeMastersFromSeed(seed) - fmt.Println("keys from fundraiser test-vector (cosmos, bitcoin, ether)") + fmt.Println("keys from fundraiser test-vector (link, bitcoin, ether)") fmt.Println() // cosmos priv, err := hd.DerivePrivateKeyForPath(master, ch, types.FullFundraiserPath) @@ -264,9 +264,9 @@ func ExampleSomeBIP32TestVecs() { priv, _ = hd.DerivePrivateKeyForPath(master, ch, "0/7") fmt.Println(hex.EncodeToString(priv[:])) - // Output: keys from fundraiser test-vector (cosmos, bitcoin, ether) + // Output: keys from fundraiser test-vector (link, bitcoin, ether) // - // bfcb217c058d8bbafd5e186eae936106ca3e943889b0b4a093ae13822fd3170c + // ae98c89aca32cb824f5b7ff94d7bf203e1f26d81787467d45422e4c7497342c9 // e77c3de76965ad89997451de97b95bb65ede23a6bf185a55d80363d92ee37c3d // 7fc4d8a8146dea344ba04c593517d3f377fa6cded36cd55aee0a0bb968e651bc // INVALID diff --git a/crypto/keyring/keyring_ledger_test.go b/crypto/keyring/keyring_ledger_test.go index 8a15f2a253..d05cdb89aa 100644 --- a/crypto/keyring/keyring_ledger_test.go +++ b/crypto/keyring/keyring_ledger_test.go @@ -16,7 +16,7 @@ import ( func TestInMemoryCreateLedger(t *testing.T) { kb := NewInMemory() - ledger, err := kb.SaveLedgerKey("some_account", hd.Secp256k1, "cosmos", 118, 3, 1) + ledger, err := kb.SaveLedgerKey("some_account", hd.Secp256k1, "link", 438, 3, 1) if err != nil { require.Error(t, err) @@ -30,7 +30,7 @@ func TestInMemoryCreateLedger(t *testing.T) { pubKey := ledger.GetPubKey() pk, err := sdk.Bech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, pubKey) require.NoError(t, err) - require.Equal(t, "cosmospub1addwnpepqdszcr95mrqqs8lw099aa9h8h906zmet22pmwe9vquzcgvnm93eqygufdlv", pk) + require.Equal(t, "linkpub1addwnpepqw830vud78huqu2dr5a6ptqn3rpjazec4krl6a5m4s955ywuur47zxh6gpv", pk) // Check that restoring the key gets the same results restoredKey, err := kb.Key("some_account") @@ -41,11 +41,11 @@ func TestInMemoryCreateLedger(t *testing.T) { pubKey = restoredKey.GetPubKey() pk, err = sdk.Bech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, pubKey) require.NoError(t, err) - require.Equal(t, "cosmospub1addwnpepqdszcr95mrqqs8lw099aa9h8h906zmet22pmwe9vquzcgvnm93eqygufdlv", pk) + require.Equal(t, "linkpub1addwnpepqw830vud78huqu2dr5a6ptqn3rpjazec4krl6a5m4s955ywuur47zxh6gpv", pk) path, err := restoredKey.GetPath() require.NoError(t, err) - require.Equal(t, "m/44'/118'/3'/0/1", path.String()) + require.Equal(t, "m/44'/438'/3'/0/1", path.String()) } // TestSignVerify does some detailed checks on how we sign and validate @@ -56,7 +56,7 @@ func TestSignVerifyKeyRingWithLedger(t *testing.T) { kb, err := New("keybasename", "test", dir, nil) require.NoError(t, err) - i1, err := kb.SaveLedgerKey("key", hd.Secp256k1, "cosmos", 118, 0, 0) + i1, err := kb.SaveLedgerKey("key", hd.Secp256k1, "link", 438, 0, 0) if err != nil { require.Equal(t, "ledger nano S: support for ledger devices is not available in this executable", err.Error()) t.Skip("ledger nano S: support for ledger devices is not available in this executable") @@ -94,10 +94,10 @@ func TestAltKeyring_SaveLedgerKey(t *testing.T) { require.NoError(t, err) // Test unsupported Algo - _, err = keyring.SaveLedgerKey("key", notSupportedAlgo{}, "cosmos", 118, 0, 0) + _, err = keyring.SaveLedgerKey("key", notSupportedAlgo{}, "link", 438, 0, 0) require.EqualError(t, err, ErrUnsupportedSigningAlgo.Error()) - ledger, err := keyring.SaveLedgerKey("some_account", hd.Secp256k1, "cosmos", 118, 3, 1) + ledger, err := keyring.SaveLedgerKey("some_account", hd.Secp256k1, "link", 438, 3, 1) if err != nil { require.Equal(t, "ledger nano S: support for ledger devices is not available in this executable", err.Error()) t.Skip("ledger nano S: support for ledger devices is not available in this executable") @@ -108,7 +108,7 @@ func TestAltKeyring_SaveLedgerKey(t *testing.T) { pubKey := ledger.GetPubKey() pk, err := sdk.Bech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, pubKey) require.NoError(t, err) - require.Equal(t, "cosmospub1addwnpepqdszcr95mrqqs8lw099aa9h8h906zmet22pmwe9vquzcgvnm93eqygufdlv", pk) + require.Equal(t, "linkpub1addwnpepqw830vud78huqu2dr5a6ptqn3rpjazec4krl6a5m4s955ywuur47zxh6gpv", pk) // Check that restoring the key gets the same results restoredKey, err := keyring.Key("some_account") @@ -119,9 +119,9 @@ func TestAltKeyring_SaveLedgerKey(t *testing.T) { pubKey = restoredKey.GetPubKey() pk, err = sdk.Bech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, pubKey) require.NoError(t, err) - require.Equal(t, "cosmospub1addwnpepqdszcr95mrqqs8lw099aa9h8h906zmet22pmwe9vquzcgvnm93eqygufdlv", pk) + require.Equal(t, "linkpub1addwnpepqw830vud78huqu2dr5a6ptqn3rpjazec4krl6a5m4s955ywuur47zxh6gpv", pk) path, err := restoredKey.GetPath() require.NoError(t, err) - require.Equal(t, "m/44'/118'/3'/0/1", path.String()) + require.Equal(t, "m/44'/438'/3'/0/1", path.String()) } diff --git a/crypto/keyring/keyring_test.go b/crypto/keyring/keyring_test.go index 26154e3355..a965defff6 100644 --- a/crypto/keyring/keyring_test.go +++ b/crypto/keyring/keyring_test.go @@ -79,7 +79,7 @@ func TestKeyManagementKeyRing(t *testing.T) { require.NotNil(t, err) _, err = kb.KeyByAddress(accAddr(i2)) require.NoError(t, err) - addr, err := sdk.AccAddressFromBech32("cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t") + addr, err := sdk.AccAddressFromBech32("link1yxfu3fldlgux939t0gwaqs82l4x77v2kasa7jf") require.NoError(t, err) _, err = kb.KeyByAddress(addr) require.NotNil(t, err) @@ -432,7 +432,7 @@ func TestInMemoryKeyManagement(t *testing.T) { require.NotNil(t, err) _, err = cstore.KeyByAddress(accAddr(i2)) require.NoError(t, err) - addr, err := sdk.AccAddressFromBech32("cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t") + addr, err := sdk.AccAddressFromBech32("link1yxfu3fldlgux939t0gwaqs82l4x77v2kasa7jf") require.NoError(t, err) _, err = cstore.KeyByAddress(addr) require.NotNil(t, err) diff --git a/crypto/keyring/legacy_test.go b/crypto/keyring/legacy_test.go index bc93c99d95..aef8c59378 100644 --- a/crypto/keyring/legacy_test.go +++ b/crypto/keyring/legacy_test.go @@ -44,7 +44,7 @@ func TestLegacyKeybase(t *testing.T) { require.NoError(t, err) require.NotEmpty(t, armoredInfo) - importer, err := keyring.NewInfoImporter("cosmos", "memory", "", nil) + importer, err := keyring.NewInfoImporter("link", "memory", "", nil) require.NoError(t, err) err = importer.Import("test", "") require.Error(t, err) diff --git a/crypto/keyring/types_test.go b/crypto/keyring/types_test.go index 464d8b7e24..e313f69462 100644 --- a/crypto/keyring/types_test.go +++ b/crypto/keyring/types_test.go @@ -21,9 +21,9 @@ func Test_writeReadLedgerInfo(t *testing.T) { path, err := lInfo.GetPath() require.NoError(t, err) - require.Equal(t, "m/44'/118'/5'/0/1", path.String()) + require.Equal(t, "m/44'/438'/5'/0/1", path.String()) require.Equal(t, - "cosmospub1addwnpepqddddqg2glc8x4fl7vxjlnr7p5a3czm5kcdp4239sg6yqdc4rc2r5wmxv8p", + "linkpub1addwnpepqddddqg2glc8x4fl7vxjlnr7p5a3czm5kcdp4239sg6yqdc4rc2r5lef0hg", sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, lInfo.GetPubKey())) // Serialize and restore diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index f6abbea3f7..1cd49535d5 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -27,32 +27,32 @@ func TestPublicKeyUnsafe(t *testing.T) { require.NoError(t, err) require.NotNil(t, priv) - require.Equal(t, "eb5ae98721034fef9cd7c4c63588d3b03feb5281b9d232cba34d6f3d71aee59211ffbfe1fe87", + require.Equal(t, "eb5ae9872102bcd96cab102304ac10e90c5a0f29358e3a4a6fb1217b83e5db657918ea28bec1", fmt.Sprintf("%x", cdc.Amino.MustMarshalBinaryBare(priv.PubKey())), "Is your device using test mnemonic: %s ?", testutil.TestMnemonic) pubKeyAddr, err := sdk.Bech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, priv.PubKey()) require.NoError(t, err) - require.Equal(t, "cosmospub1addwnpepqd87l8xhcnrrtzxnkql7k55ph8fr9jarf4hn6udwukfprlalu8lgw0urza0", + require.Equal(t, "linkpub1addwnpepq27djm9tzq3sftqsayx95refxk8r5jn0kyshhql9mdjhjx829zlvzszgelc", pubKeyAddr, "Is your device using test mnemonic: %s ?", testutil.TestMnemonic) addr := sdk.AccAddress(priv.PubKey().Address()).String() - require.Equal(t, "cosmos1w34k53py5v5xyluazqpq65agyajavep2rflq6h", + require.Equal(t, "link1tdl7n2acgmec0y5nng0q2fahl9khyct3cgsktn", addr, "Is your device using test mnemonic: %s ?", testutil.TestMnemonic) } func TestPublicKeyUnsafeHDPath(t *testing.T) { expectedAnswers := []string{ - "cosmospub1addwnpepqd87l8xhcnrrtzxnkql7k55ph8fr9jarf4hn6udwukfprlalu8lgw0urza0", - "cosmospub1addwnpepqfsdqjr68h7wjg5wacksmqaypasnra232fkgu5sxdlnlu8j22ztxvlqvd65", - "cosmospub1addwnpepqw3xwqun6q43vtgw6p4qspq7srvxhcmvq4jrx5j5ma6xy3r7k6dtxmrkh3d", - "cosmospub1addwnpepqvez9lrp09g8w7gkv42y4yr5p6826cu28ydrhrujv862yf4njmqyyjr4pjs", - "cosmospub1addwnpepq06hw3enfrtmq8n67teytcmtnrgcr0yntmyt25kdukfjkerdc7lqg32rcz7", - "cosmospub1addwnpepqg3trf2gd0s2940nckrxherwqhgmm6xd5h4pcnrh4x7y35h6yafmcpk5qns", - "cosmospub1addwnpepqdm6rjpx6wsref8wjn7ym6ntejet430j4szpngfgc20caz83lu545vuv8hp", - "cosmospub1addwnpepqvdhtjzy2wf44dm03jxsketxc07vzqwvt3vawqqtljgsr9s7jvydjmt66ew", - "cosmospub1addwnpepqwystfpyxwcava7v3t7ndps5xzu6s553wxcxzmmnxevlzvwrlqpzz695nw9", - "cosmospub1addwnpepqw970u6gjqkccg9u3rfj99857wupj2z9fqfzy2w7e5dd7xn7kzzgkgqch0r", + "linkpub1addwnpepq27djm9tzq3sftqsayx95refxk8r5jn0kyshhql9mdjhjx829zlvzszgelc", + "linkpub1addwnpepqf258jtwpyujhxmlg94500j9yzqya5ryl835yp3dm6p9up25ufqcsjs2r6s", + "linkpub1addwnpepq2edmckd0zthve9r70err6ctxzqc4vt5648lu4fzqkld8dnaekzjcl9j5ft", + "linkpub1addwnpepqg9xfexl88nvmyyzpg5htz5qz30wgdftf0puz5u3sj6jkk9fxy7vzg7q5xn", + "linkpub1addwnpepqv09egt2l0u72a4h0stkcrx4hyz0z6mnxe5w5d7lzmmzfdj2mykj755jfdt", + "linkpub1addwnpepqfn9d7tew6vlr37sy9crsdud2gufsftm7wz3r2uhze2lfam4a263qsj6a8r", + "linkpub1addwnpepqfaq649vgk3levrsya2wkz8aecjxxd40rdfjhr6aqlld5ql54fds2yg7xpt", + "linkpub1addwnpepqv43zgg5dauwynq4wyqz3c6xtl9wcmc8z8ftgqvj87xs000lld6s63hlzt9", + "linkpub1addwnpepq0kchl479dz7f28hgfn7ve3txkktu9trq2dpmrzjy9awlyuf8w6x7nugtw7", + "linkpub1addwnpepqttsm9aacj9pq3w22xjms6lgyzxhhdjrrajt4hzzfl0melff9w9dq9e2ky7", } const numIters = 10 @@ -105,16 +105,16 @@ func TestPublicKeySafe(t *testing.T) { require.Nil(t, ShowAddress(path, priv.PubKey(), sdk.GetConfig().GetBech32AccountAddrPrefix())) - require.Equal(t, "eb5ae98721034fef9cd7c4c63588d3b03feb5281b9d232cba34d6f3d71aee59211ffbfe1fe87", + require.Equal(t, "eb5ae9872102bcd96cab102304ac10e90c5a0f29358e3a4a6fb1217b83e5db657918ea28bec1", fmt.Sprintf("%x", cdc.Amino.MustMarshalBinaryBare(priv.PubKey())), "Is your device using test mnemonic: %s ?", testutil.TestMnemonic) pubKeyAddr, err := sdk.Bech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, priv.PubKey()) require.NoError(t, err) - require.Equal(t, "cosmospub1addwnpepqd87l8xhcnrrtzxnkql7k55ph8fr9jarf4hn6udwukfprlalu8lgw0urza0", + require.Equal(t, "linkpub1addwnpepq27djm9tzq3sftqsayx95refxk8r5jn0kyshhql9mdjhjx829zlvzszgelc", pubKeyAddr, "Is your device using test mnemonic: %s ?", testutil.TestMnemonic) - require.Equal(t, "cosmos1w34k53py5v5xyluazqpq65agyajavep2rflq6h", + require.Equal(t, "link1tdl7n2acgmec0y5nng0q2fahl9khyct3cgsktn", addr, "Is your device using test mnemonic: %s ?", testutil.TestMnemonic) addr2 := sdk.AccAddress(priv.PubKey().Address()).String() @@ -123,29 +123,29 @@ func TestPublicKeySafe(t *testing.T) { func TestPublicKeyHDPath(t *testing.T) { expectedPubKeys := []string{ - "cosmospub1addwnpepqd87l8xhcnrrtzxnkql7k55ph8fr9jarf4hn6udwukfprlalu8lgw0urza0", - "cosmospub1addwnpepqfsdqjr68h7wjg5wacksmqaypasnra232fkgu5sxdlnlu8j22ztxvlqvd65", - "cosmospub1addwnpepqw3xwqun6q43vtgw6p4qspq7srvxhcmvq4jrx5j5ma6xy3r7k6dtxmrkh3d", - "cosmospub1addwnpepqvez9lrp09g8w7gkv42y4yr5p6826cu28ydrhrujv862yf4njmqyyjr4pjs", - "cosmospub1addwnpepq06hw3enfrtmq8n67teytcmtnrgcr0yntmyt25kdukfjkerdc7lqg32rcz7", - "cosmospub1addwnpepqg3trf2gd0s2940nckrxherwqhgmm6xd5h4pcnrh4x7y35h6yafmcpk5qns", - "cosmospub1addwnpepqdm6rjpx6wsref8wjn7ym6ntejet430j4szpngfgc20caz83lu545vuv8hp", - "cosmospub1addwnpepqvdhtjzy2wf44dm03jxsketxc07vzqwvt3vawqqtljgsr9s7jvydjmt66ew", - "cosmospub1addwnpepqwystfpyxwcava7v3t7ndps5xzu6s553wxcxzmmnxevlzvwrlqpzz695nw9", - "cosmospub1addwnpepqw970u6gjqkccg9u3rfj99857wupj2z9fqfzy2w7e5dd7xn7kzzgkgqch0r", + "linkpub1addwnpepq27djm9tzq3sftqsayx95refxk8r5jn0kyshhql9mdjhjx829zlvzszgelc", + "linkpub1addwnpepqf258jtwpyujhxmlg94500j9yzqya5ryl835yp3dm6p9up25ufqcsjs2r6s", + "linkpub1addwnpepq2edmckd0zthve9r70err6ctxzqc4vt5648lu4fzqkld8dnaekzjcl9j5ft", + "linkpub1addwnpepqg9xfexl88nvmyyzpg5htz5qz30wgdftf0puz5u3sj6jkk9fxy7vzg7q5xn", + "linkpub1addwnpepqv09egt2l0u72a4h0stkcrx4hyz0z6mnxe5w5d7lzmmzfdj2mykj755jfdt", + "linkpub1addwnpepqfn9d7tew6vlr37sy9crsdud2gufsftm7wz3r2uhze2lfam4a263qsj6a8r", + "linkpub1addwnpepqfaq649vgk3levrsya2wkz8aecjxxd40rdfjhr6aqlld5ql54fds2yg7xpt", + "linkpub1addwnpepqv43zgg5dauwynq4wyqz3c6xtl9wcmc8z8ftgqvj87xs000lld6s63hlzt9", + "linkpub1addwnpepq0kchl479dz7f28hgfn7ve3txkktu9trq2dpmrzjy9awlyuf8w6x7nugtw7", + "linkpub1addwnpepqttsm9aacj9pq3w22xjms6lgyzxhhdjrrajt4hzzfl0melff9w9dq9e2ky7", } expectedAddrs := []string{ - "cosmos1w34k53py5v5xyluazqpq65agyajavep2rflq6h", - "cosmos19ewxwemt6uahejvwf44u7dh6tq859tkyvarh2q", - "cosmos1a07dzdjgjsntxpp75zg7cgatgq0udh3pcdcxm3", - "cosmos1qvw52lmn9gpvem8welghrkc52m3zczyhlqjsl7", - "cosmos17m78ka80fqkkw2c4ww0v4xm5nsu2drgrlm8mn2", - "cosmos1ferh9ll9c452d2p8k2v7heq084guygkn43up9e", - "cosmos10vf3sxmjg96rqq36axcphzfsl74dsntuehjlw5", - "cosmos1cq83av8cmnar79h0rg7duh9gnr7wkh228a7fxg", - "cosmos1dszhfrt226jy5rsre7e48vw9tgwe90uerfyefa", - "cosmos1734d7qsylzrdt05muhqqtpd90j8mp4y6rzch8l", + "link1tdl7n2acgmec0y5nng0q2fahl9khyct3cgsktn", + "link1lzmehungm97jh0nme768v9wv28l8jr2dkkv357", + "link1p0yx9c9q4xsnedlcn24gqfry5dcu6e9xkhv9aj", + "link1cjjev0yzp90dxhsyxlxkwvrgl6vdw5p7qpxgfu", + "link1gf58l6wlscadkw2c9dpyd8se4hw37gu0zxx2g6", + "link1n93v9h6slh2e56lfu6vcy302f6ttxv5tt676ej", + "link124w2ltcv7wdhc85g07kta7yc4pwqk9qqsfq3c0", + "link17evhyfgwm70xjy8s3la64ek2x068aqezs24lth", + "link1clgcsmd9gcu4v9ec0qzqpr932aetwrqkxwswdh", + "link1hcttwju93d5m39467gjcq63p5kc4fdcn30dgd8", } const numIters = 10 diff --git a/tests/fixtures/adr-024-coin-metadata_genesis.json b/tests/fixtures/adr-024-coin-metadata_genesis.json index d56ed836fa..e6da5f927a 100644 --- a/tests/fixtures/adr-024-coin-metadata_genesis.json +++ b/tests/fixtures/adr-024-coin-metadata_genesis.json @@ -27,7 +27,7 @@ }, "balances": [ { - "address": "cosmos106vrzv5xkheqhjm023pxcxlqmcjvuhtfyachz4", + "address": "link1wjfgxvmff06nqkzlnuhhdmm5d55lvffn5xym0g", "coins": [ { "denom": "nametoken", diff --git a/types/address.go b/types/address.go index 87d42d9bf6..6b1a11c32f 100644 --- a/types/address.go +++ b/types/address.go @@ -31,14 +31,14 @@ const ( // AddrLen defines a valid address length AddrLen = 20 // Bech32MainPrefix defines the main SDK Bech32 prefix of an account's address - Bech32MainPrefix = "cosmos" + Bech32MainPrefix = "link" - // CoinType is the ATOM coin type as defined in SLIP44 (https://github.com/satoshilabs/slips/blob/master/slip-0044.md) - CoinType = 118 + // CoinType is the LINK coin type as defined in SLIP44 (https://github.com/satoshilabs/slips/blob/master/slip-0044.md) + CoinType = 438 // FullFundraiserPath is the parts of the BIP44 HD path that are fixed by - // what we used during the ATOM fundraiser. - FullFundraiserPath = "m/44'/118'/0'/0/0" + // what we used during the LINK fundraiser. + FullFundraiserPath = "m/44'/438'/0'/0/0" // PrefixAccount is the prefix for account keys PrefixAccount = "acc" diff --git a/types/config.go b/types/config.go index e0de4177bf..6d366dbeae 100644 --- a/types/config.go +++ b/types/config.go @@ -8,7 +8,7 @@ import ( ) // DefaultKeyringServiceName defines a default service name for the keyring. -const DefaultKeyringServiceName = "cosmos" +const DefaultKeyringServiceName = "lbm" // Config is the structure that holds the SDK configuration parameters. // This could be used to initialize certain configuration parameters for the SDK. diff --git a/types/rest/rest_test.go b/types/rest/rest_test.go index 999dfda76d..8ef3c02d46 100644 --- a/types/rest/rest_test.go +++ b/types/rest/rest_test.go @@ -28,20 +28,20 @@ func TestBaseReq_Sanitize(t *testing.T) { t.Parallel() sanitized := rest.BaseReq{ChainID: " test", Memo: "memo ", - From: " cosmos1cq0sxam6x4l0sv9yz3a2vlqhdhvt2k6jtgcse0 ", + From: " link1zp4lzwuwzvhq7xhe8xj688vv00dxv2zyue4xuj ", Gas: " ", GasAdjustment: " 0.3", }.Sanitize() require.Equal(t, rest.BaseReq{ChainID: "test", Memo: "memo", - From: "cosmos1cq0sxam6x4l0sv9yz3a2vlqhdhvt2k6jtgcse0", + From: "link1zp4lzwuwzvhq7xhe8xj688vv00dxv2zyue4xuj", Gas: "", GasAdjustment: "0.3", }, sanitized) } func TestBaseReq_ValidateBasic(t *testing.T) { - fromAddr := "cosmos1cq0sxam6x4l0sv9yz3a2vlqhdhvt2k6jtgcse0" + fromAddr := "link1zp4lzwuwzvhq7xhe8xj688vv00dxv2zyue4xuj" tenstakes, err := types.ParseCoinsNormalized("10stake") require.NoError(t, err) onestake, err := types.ParseDecCoins("1.0stake") diff --git a/x/auth/client/cli/cli_test.go b/x/auth/client/cli/cli_test.go index 0dac6ab1b4..f12effb25f 100644 --- a/x/auth/client/cli/cli_test.go +++ b/x/auth/client/cli/cli_test.go @@ -958,9 +958,9 @@ func TestGetBroadcastCommand_WithoutOfflineFlag(t *testing.T) { // Create new file with tx builder := txCfg.NewTxBuilder() builder.SetGasLimit(200000) - from, err := sdk.AccAddressFromBech32("cosmos1cxlt8kznps92fwu3j6npahx4mjfutydyene2qw") + from, err := sdk.AccAddressFromBech32("link1xpesesq0zddk2ersedyezgtywr0q92a34ddfku") require.NoError(t, err) - to, err := sdk.AccAddressFromBech32("cosmos1cxlt8kznps92fwu3j6npahx4mjfutydyene2qw") + to, err := sdk.AccAddressFromBech32("link1xpesesq0zddk2ersedyezgtywr0q92a34ddfku") require.NoError(t, err) err = builder.SetMsgs(banktypes.NewMsgSend(from, to, sdk.Coins{sdk.NewInt64Coin("stake", 10000)})) require.NoError(t, err) diff --git a/x/auth/legacy/v038/migrate_test.go b/x/auth/legacy/v038/migrate_test.go index 35dfe6fe8b..4c2b94903f 100644 --- a/x/auth/legacy/v038/migrate_test.go +++ b/x/auth/legacy/v038/migrate_test.go @@ -30,13 +30,13 @@ func TestMigrate(t *testing.T) { } acc1 := v036genaccounts.GenesisAccount{ - Address: accAddressFromBech32(t, "cosmos1f9xjhxm0plzrh9cskf4qee4pc2xwp0n0556gh0"), + Address: accAddressFromBech32(t, "link1jvkdku5ckmky57j9vy9mx6ehjn79mxx57d5p08"), Coins: sdk.NewCoins(sdk.NewInt64Coin("stake", 400000)), Sequence: 1, AccountNumber: 1, } acc2 := v036genaccounts.GenesisAccount{ - Address: accAddressFromBech32(t, "cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh"), + Address: accAddressFromBech32(t, "link1fl48vsnmsdzcv85q5d2q4z5ajdha8yu3q4fdzl"), Coins: sdk.NewCoins(sdk.NewInt64Coin("stake", 400000000)), Sequence: 4, AccountNumber: 2, @@ -44,7 +44,7 @@ func TestMigrate(t *testing.T) { ModulePermissions: []string{"burner", "staking"}, } acc3 := v036genaccounts.GenesisAccount{ - Address: accAddressFromBech32(t, "cosmos17n9sztlhx32tfy0tg0zc2ttmkeeth50yyuv9he"), + Address: accAddressFromBech32(t, "link15tgld4dt9xgqhcjwlvs0y2rqyemaa723adtklz"), Coins: sdk.NewCoins(sdk.NewInt64Coin("stake", 10000205)), OriginalVesting: sdk.NewCoins(sdk.NewInt64Coin("stake", 10000205)), StartTime: time.Now().Unix(), @@ -53,7 +53,7 @@ func TestMigrate(t *testing.T) { AccountNumber: 3, } acc4 := v036genaccounts.GenesisAccount{ - Address: accAddressFromBech32(t, "cosmos1fmk5elg4r62mlexd36tqjcwyafs7mek0js5m4d"), + Address: accAddressFromBech32(t, "link13pfh0anamaz4cqhgnk8tz5ctln2g0xmywxnvw6"), Coins: sdk.NewCoins(sdk.NewInt64Coin("stake", 10000205)), OriginalVesting: sdk.NewCoins(sdk.NewInt64Coin("stake", 10000205)), EndTime: time.Now().Add(48 * time.Hour).Unix(), @@ -105,7 +105,7 @@ func TestMigrateInvalid(t *testing.T) { { "module account with invalid name", v036genaccounts.GenesisAccount{ - Address: accAddressFromBech32(t, "cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh"), + Address: accAddressFromBech32(t, "link1fl48vsnmsdzcv85q5d2q4z5ajdha8yu3q4fdzl"), Coins: sdk.NewCoins(sdk.NewInt64Coin("stake", 400000000)), Sequence: 4, AccountNumber: 2, @@ -116,7 +116,7 @@ func TestMigrateInvalid(t *testing.T) { { "module account with invalid permissions", v036genaccounts.GenesisAccount{ - Address: accAddressFromBech32(t, "cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh"), + Address: accAddressFromBech32(t, "link1fl48vsnmsdzcv85q5d2q4z5ajdha8yu3q4fdzl"), Coins: sdk.NewCoins(sdk.NewInt64Coin("stake", 400000000)), Sequence: 4, AccountNumber: 2, @@ -127,7 +127,7 @@ func TestMigrateInvalid(t *testing.T) { { "module account with invalid address", v036genaccounts.GenesisAccount{ - Address: accAddressFromBech32(t, "cosmos17n9sztlhx32tfy0tg0zc2ttmkeeth50yyuv9he"), + Address: accAddressFromBech32(t, "link15tgld4dt9xgqhcjwlvs0y2rqyemaa723adtklz"), Coins: sdk.NewCoins(sdk.NewInt64Coin("stake", 400000000)), Sequence: 4, AccountNumber: 2, diff --git a/x/auth/legacy/v039/migrate_test.go b/x/auth/legacy/v039/migrate_test.go index 70c10955c0..c026db932b 100644 --- a/x/auth/legacy/v039/migrate_test.go +++ b/x/auth/legacy/v039/migrate_test.go @@ -65,7 +65,7 @@ func TestMigrate(t *testing.T) { { "type": "lbm-sdk/Account", "value": { - "address": "cosmos1j7skdhh9raxdmfhmcy2gxz8hgn0jnhfmujjsfe", + "address": "link1j7skdhh9raxdmfhmcy2gxz8hgn0jnhfmfujjj3", "coins": [ { "denom": "stake", @@ -83,7 +83,7 @@ func TestMigrate(t *testing.T) { { "type": "lbm-sdk/Account", "value": { - "address": "cosmos1v57fx2l2rt6ehujuu99u2fw05779m5e2ux4z2h", + "address": "link1v57fx2l2rt6ehujuu99u2fw05779m5e2fg4q3l", "coins": [ { "denom": "stake", diff --git a/x/auth/legacy/v040/migrate_test.go b/x/auth/legacy/v040/migrate_test.go index f11eb2912e..67695b3f90 100644 --- a/x/auth/legacy/v040/migrate_test.go +++ b/x/auth/legacy/v040/migrate_test.go @@ -88,7 +88,7 @@ func TestMigrate(t *testing.T) { { "@type": "/lbm.auth.v1beta1.BaseAccount", "account_number": "1", - "address": "cosmos13syh7de9xndv9wmklccpfvc0d8dcyvay4s6z6l", + "address": "link13syh7de9xndv9wmklccpfvc0d8dcyvayq76qph", "pub_key": { "@type": "/lbm.crypto.secp256k1.PubKey", "key": "A8oWyJkohwy8XZ0Df92jFMBTtTPMvYJplYIrlEHTKPYk" @@ -99,7 +99,7 @@ func TestMigrate(t *testing.T) { "@type": "/lbm.auth.v1beta1.ModuleAccount", "base_account": { "account_number": "1", - "address": "cosmos1v57fx2l2rt6ehujuu99u2fw05779m5e2ux4z2h", + "address": "link1v57fx2l2rt6ehujuu99u2fw05779m5e2fg4q3l", "pub_key": { "@type": "/lbm.crypto.secp256k1.PubKey", "key": "AruDygh5HprMOpHOEato85dLgAsybMJVyxBGUa3KuWCr" @@ -115,7 +115,7 @@ func TestMigrate(t *testing.T) { "@type": "/lbm.vesting.v1beta1.BaseVestingAccount", "base_account": { "account_number": "1", - "address": "cosmos18hnp9fjflrkeeqn4gmhjhzljusxzmjeartdckw", + "address": "link18hnp9fjflrkeeqn4gmhjhzljusxzmjeak9d6dx", "pub_key": { "@type": "/lbm.crypto.secp256k1.PubKey", "key": "A5aEFDIdQHh0OYmNXNv1sHBNURDWWgVkXC2IALcWLLwJ" @@ -147,7 +147,7 @@ func TestMigrate(t *testing.T) { "base_vesting_account": { "base_account": { "account_number": "1", - "address": "cosmos1t9kvvejvk6hjtddx6antck39s206csqduq3ke3", + "address": "link1t9kvvejvk6hjtddx6antck39s206csqdfw35ze", "pub_key": { "@type": "/lbm.crypto.secp256k1.PubKey", "key": "AoXDzxwTnljemHxfnJcwrKqODBP6Q2l3K3U3UhVDzyah" @@ -171,7 +171,7 @@ func TestMigrate(t *testing.T) { "base_vesting_account": { "base_account": { "account_number": "1", - "address": "cosmos1s4ss9zquz7skvguechzlk3na635jdrecl0sgy2", + "address": "link1s4ss9zquz7skvguechzlk3na635jdrec2ps2lz", "pub_key": { "@type": "/lbm.crypto.secp256k1.PubKey", "key": "A2a4P4TQ1OKzpfu0eKnCoEtmTvoiclSx0G9higenUGws" @@ -206,7 +206,7 @@ func TestMigrate(t *testing.T) { "base_vesting_account": { "base_account": { "account_number": "1", - "address": "cosmos1mcc6rwrj4hswf8p9ct82c7lmf77w9tuk07rha4", + "address": "link1mcc6rwrj4hswf8p9ct82c7lmf77w9tuk6sr4xa", "pub_key": { "@type": "/lbm.crypto.secp256k1.PubKey", "key": "A4tuAfmZlhjK5cjp6ImR704miybHnITVNOyJORdDPFu3" @@ -227,7 +227,7 @@ func TestMigrate(t *testing.T) { { "@type": "/lbm.auth.v1beta1.BaseAccount", "account_number": "1", - "address": "cosmos16ydaqh0fcnh4qt7a3jme4mmztm2qel5axcpw00", + "address": "link16ydaqh0fcnh4qt7a3jme4mmztm2qel5ankpv58", "pub_key": null, "sequence": "0" } diff --git a/x/auth/simulation/genesis_test.go b/x/auth/simulation/genesis_test.go index 496ee9329b..fe2590bdb2 100644 --- a/x/auth/simulation/genesis_test.go +++ b/x/auth/simulation/genesis_test.go @@ -49,7 +49,7 @@ func TestRandomizedGenState(t *testing.T) { genAccounts, err := types.UnpackAccounts(authGenesis.Accounts) require.NoError(t, err) require.Len(t, genAccounts, 3) - require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", genAccounts[2].GetAddress().String()) + require.Equal(t, "link1ghekyjucln7y67ntx7cf27m9dpuxxemnqk82wt", genAccounts[2].GetAddress().String()) require.Equal(t, uint64(0), genAccounts[2].GetAccountNumber()) require.Equal(t, uint64(0), genAccounts[2].GetSequence()) } diff --git a/x/auth/types/account_test.go b/x/auth/types/account_test.go index f03b338278..64b2a28c68 100644 --- a/x/auth/types/account_test.go +++ b/x/auth/types/account_test.go @@ -118,7 +118,7 @@ func TestModuleAccountMarshalYAML(t *testing.T) { bs, err := yaml.Marshal(moduleAcc) require.NoError(t, err) - want := "|\n address: cosmos1n7rdpqvgf37ktx30a2sv2kkszk3m7ncmg5drhe\n public_key: \"\"\n account_number: 0\n sequence: 0\n name: test\n permissions:\n - minter\n - burner\n - staking\n" + want := "|\n address: link1n7rdpqvgf37ktx30a2sv2kkszk3m7ncma6dpv3\n public_key: \"\"\n account_number: 0\n sequence: 0\n name: test\n permissions:\n - minter\n - burner\n - staking\n" require.Equal(t, want, string(bs)) } diff --git a/x/bank/keeper/genesis_test.go b/x/bank/keeper/genesis_test.go index b70dd455af..2be96dba1e 100644 --- a/x/bank/keeper/genesis_test.go +++ b/x/bank/keeper/genesis_test.go @@ -34,8 +34,8 @@ func (suite *IntegrationTestSuite) TestExportGenesis() { } func (suite *IntegrationTestSuite) getTestBalances() []types.Balance { - addr2, _ := sdk.AccAddressFromBech32("cosmos1f9xjhxm0plzrh9cskf4qee4pc2xwp0n0556gh0") - addr1, _ := sdk.AccAddressFromBech32("cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh") + addr2, _ := sdk.AccAddressFromBech32("link15klks9yty6rwvnqk47q4cg92r38qj4gsvxdfj8") + addr1, _ := sdk.AccAddressFromBech32("link14uxsrqf2cakphyw9ywwy9a9fv7yjspku4lkrny") return []types.Balance{ {Address: addr2.String(), Coins: sdk.Coins{sdk.NewInt64Coin("testcoin1", 32), sdk.NewInt64Coin("testcoin2", 34)}}, {Address: addr1.String(), Coins: sdk.Coins{sdk.NewInt64Coin("testcoin3", 10)}}, diff --git a/x/bank/legacy/v040/migrate_test.go b/x/bank/legacy/v040/migrate_test.go index 47a625d132..58a5789276 100644 --- a/x/bank/legacy/v040/migrate_test.go +++ b/x/bank/legacy/v040/migrate_test.go @@ -24,10 +24,10 @@ func TestMigrate(t *testing.T) { WithJSONMarshaler(encodingConfig.Marshaler) coins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50)) - addr1, _ := sdk.AccAddressFromBech32("cosmos1xxkueklal9vejv9unqu80w9vptyepfa95pd53u") + addr1, _ := sdk.AccAddressFromBech32("link17dgvcdx0v4mlxfrmfhua7685py3akv3lpnlpce") acc1 := v038auth.NewBaseAccount(addr1, coins, nil, 1, 0) - addr2, _ := sdk.AccAddressFromBech32("cosmos15v50ymp6n5dn73erkqtmq0u8adpl8d3ujv2e74") + addr2, _ := sdk.AccAddressFromBech32("link15lclrh8eqj233lmvxj4kcut2mua03t7u09ff00") vaac := v038auth.NewContinuousVestingAccountRaw( v038auth.NewBaseVestingAccount( v038auth.NewBaseAccount(addr2, coins, nil, 1, 0), coins, nil, nil, 3160620846, @@ -48,7 +48,7 @@ func TestMigrate(t *testing.T) { } migrated := v040bank.Migrate(bankGenState, authGenState, supplyGenState) - expected := `{"params":{"send_enabled":[],"default_send_enabled":true},"balances":[{"address":"cosmos1xxkueklal9vejv9unqu80w9vptyepfa95pd53u","coins":[{"denom":"stake","amount":"50"}]},{"address":"cosmos15v50ymp6n5dn73erkqtmq0u8adpl8d3ujv2e74","coins":[{"denom":"stake","amount":"50"}]}],"supply":[{"denom":"stake","amount":"1000"}],"denom_metadata":[]}` + expected := `{"params":{"send_enabled":[],"default_send_enabled":true},"balances":[{"address":"link17dgvcdx0v4mlxfrmfhua7685py3akv3lpnlpce","coins":[{"denom":"stake","amount":"50"}]},{"address":"link15lclrh8eqj233lmvxj4kcut2mua03t7u09ff00","coins":[{"denom":"stake","amount":"50"}]}],"supply":[{"denom":"stake","amount":"1000"}],"denom_metadata":[]}` bz, err := clientCtx.JSONMarshaler.MarshalJSON(migrated) require.NoError(t, err) diff --git a/x/bank/simulation/genesis_test.go b/x/bank/simulation/genesis_test.go index ea78c48ff3..9b1d094675 100644 --- a/x/bank/simulation/genesis_test.go +++ b/x/bank/simulation/genesis_test.go @@ -41,7 +41,7 @@ func TestRandomizedGenState(t *testing.T) { require.Equal(t, true, bankGenesis.Params.GetDefaultSendEnabled()) require.Len(t, bankGenesis.Params.GetSendEnabled(), 1) require.Len(t, bankGenesis.Balances, 3) - require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", bankGenesis.Balances[2].GetAddress().String()) + require.Equal(t, "link1ghekyjucln7y67ntx7cf27m9dpuxxemnqk82wt", bankGenesis.Balances[2].GetAddress().String()) require.Equal(t, "1000stake", bankGenesis.Balances[2].GetCoins().String()) require.Equal(t, "6000stake", bankGenesis.Supply.String()) } diff --git a/x/bank/simulation/operations_test.go b/x/bank/simulation/operations_test.go index 573a85e664..adf56096fd 100644 --- a/x/bank/simulation/operations_test.go +++ b/x/bank/simulation/operations_test.go @@ -83,8 +83,8 @@ func (suite *SimTestSuite) TestSimulateMsgSend() { suite.Require().True(operationMsg.OK) suite.Require().Equal("65337742stake", msg.Amount.String()) - suite.Require().Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.FromAddress) - suite.Require().Equal("cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.ToAddress) + suite.Require().Equal("link1ghekyjucln7y67ntx7cf27m9dpuxxemnqk82wt", msg.FromAddress) + suite.Require().Equal("link1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7fmx8x8", msg.ToAddress) suite.Require().Equal(types.TypeMsgSend, msg.Type()) suite.Require().Equal(types.ModuleName, msg.Route()) suite.Require().Len(futureOperations, 0) @@ -111,10 +111,10 @@ func (suite *SimTestSuite) TestSimulateMsgMultiSend() { suite.Require().True(operationMsg.OK) suite.Require().Len(msg.Inputs, 3) - suite.Require().Equal("cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.Inputs[1].Address) + suite.Require().Equal("link1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7fmx8x8", msg.Inputs[1].Address) suite.Require().Equal("185121068stake", msg.Inputs[1].Coins.String()) suite.Require().Len(msg.Outputs, 2) - suite.Require().Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Outputs[1].Address) + suite.Require().Equal("link1ghekyjucln7y67ntx7cf27m9dpuxxemnqk82wt", msg.Outputs[1].Address) suite.Require().Equal("260469617stake", msg.Outputs[1].Coins.String()) suite.Require().Equal(types.TypeMsgMultiSend, msg.Type()) suite.Require().Equal(types.ModuleName, msg.Route()) diff --git a/x/bank/types/balance_test.go b/x/bank/types/balance_test.go index e7fa2b7bee..1f76281bc6 100644 --- a/x/bank/types/balance_test.go +++ b/x/bank/types/balance_test.go @@ -20,7 +20,7 @@ func TestBalanceValidate(t *testing.T) { { "valid balance", bank.Balance{ - Address: "cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + Address: "link1mejkku76a2ec35262rdqddggzwrgtrh52t3t0c", Coins: sdk.Coins{sdk.NewInt64Coin("uatom", 1)}, }, false, @@ -29,14 +29,14 @@ func TestBalanceValidate(t *testing.T) { { "nil balance coins", bank.Balance{ - Address: "cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + Address: "link1mejkku76a2ec35262rdqddggzwrgtrh52t3t0c", }, false, }, { "dup coins", bank.Balance{ - Address: "cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + Address: "link1mejkku76a2ec35262rdqddggzwrgtrh52t3t0c", Coins: sdk.Coins{ sdk.NewInt64Coin("uatom", 1), sdk.NewInt64Coin("uatom", 1), @@ -47,7 +47,7 @@ func TestBalanceValidate(t *testing.T) { { "invalid coin denom", bank.Balance{ - Address: "cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + Address: "link1mejkku76a2ec35262rdqddggzwrgtrh52t3t0c", Coins: sdk.Coins{ sdk.Coin{Denom: "", Amount: sdk.OneInt()}, }, @@ -57,7 +57,7 @@ func TestBalanceValidate(t *testing.T) { { "negative coin", bank.Balance{ - Address: "cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + Address: "link1mejkku76a2ec35262rdqddggzwrgtrh52t3t0c", Coins: sdk.Coins{ sdk.Coin{Denom: "uatom", Amount: sdk.NewInt(-1)}, }, @@ -89,7 +89,7 @@ func TestBalance_GetAddress(t *testing.T) { }{ {"empty address", "", true}, {"malformed address", "invalid", true}, - {"valid address", "cosmos1vy0ga0klndqy92ceqehfkvgmn4t94eteq4hmqv", false}, + {"valid address", "link1qz9c0r2jvpkccx67d5svg8kms6eu3k832hdc6p", false}, } for _, tt := range tests { tt := tt diff --git a/x/bank/types/genesis_test.go b/x/bank/types/genesis_test.go index 27b782b076..29dd9fe4c6 100644 --- a/x/bank/types/genesis_test.go +++ b/x/bank/types/genesis_test.go @@ -22,7 +22,7 @@ func TestGenesisStateValidate(t *testing.T) { Params: types.DefaultParams(), Balances: []types.Balance{ { - Address: "cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + Address: "link1mejkku76a2ec35262rdqddggzwrgtrh52t3t0c", Coins: sdk.Coins{sdk.NewInt64Coin("uatom", 1)}, }, }, @@ -59,11 +59,11 @@ func TestGenesisStateValidate(t *testing.T) { types.GenesisState{ Balances: []types.Balance{ { - Address: "cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + Address: "link1mejkku76a2ec35262rdqddggzwrgtrh52t3t0c", Coins: sdk.Coins{sdk.NewInt64Coin("uatom", 1)}, }, { - Address: "cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + Address: "link1mejkku76a2ec35262rdqddggzwrgtrh52t3t0c", Coins: sdk.Coins{sdk.NewInt64Coin("uatom", 1)}, }, }, @@ -75,7 +75,7 @@ func TestGenesisStateValidate(t *testing.T) { types.GenesisState{ Balances: []types.Balance{ { - Address: "cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + Address: "link1mejkku76a2ec35262rdqddggzwrgtrh52t3t0c", }, }, }, diff --git a/x/bank/types/key_test.go b/x/bank/types/key_test.go index 4cde983b9b..6ce95751c9 100644 --- a/x/bank/types/key_test.go +++ b/x/bank/types/key_test.go @@ -17,7 +17,7 @@ func cloneAppend(bz []byte, tail []byte) (res []byte) { } func TestAddressFromBalancesStore(t *testing.T) { - addr, err := sdk.AccAddressFromBech32("cosmos1n88uc38xhjgxzw9nwre4ep2c8ga4fjxcar6mn7") + addr, err := sdk.AccAddressFromBech32("link19tzp7e489drh9qfs9m84k2qe5a5yyknzen48tz") require.NoError(t, err) key := cloneAppend(addr.Bytes(), []byte("stake")) diff --git a/x/bank/types/msgs_test.go b/x/bank/types/msgs_test.go index d3bf366628..479e0249de 100644 --- a/x/bank/types/msgs_test.go +++ b/x/bank/types/msgs_test.go @@ -61,7 +61,7 @@ func TestMsgSendGetSignBytes(t *testing.T) { var msg = NewMsgSend(addr1, addr2, coins) res := msg.GetSignBytes() - expected := `{"type":"lbm-sdk/MsgSend","value":{"amount":[{"amount":"10","denom":"atom"}],"from_address":"cosmos1d9h8qat57ljhcm","to_address":"cosmos1da6hgur4wsmpnjyg"}}` + expected := `{"type":"lbm-sdk/MsgSend","value":{"amount":[{"amount":"10","denom":"atom"}],"from_address":"link1d9h8qat5fnwd3e","to_address":"link1da6hgur4ws537sex"}}` require.Equal(t, expected, string(res)) } @@ -233,7 +233,7 @@ func TestMsgMultiSendGetSignBytes(t *testing.T) { } res := msg.GetSignBytes() - expected := `{"type":"lbm-sdk/MsgMultiSend","value":{"inputs":[{"address":"cosmos1d9h8qat57ljhcm","coins":[{"amount":"10","denom":"atom"}]}],"outputs":[{"address":"cosmos1da6hgur4wsmpnjyg","coins":[{"amount":"10","denom":"atom"}]}]}}` + expected := `{"type":"lbm-sdk/MsgMultiSend","value":{"inputs":[{"address":"link1d9h8qat5fnwd3e","coins":[{"amount":"10","denom":"atom"}]}],"outputs":[{"address":"link1da6hgur4ws537sex","coins":[{"amount":"10","denom":"atom"}]}]}}` require.Equal(t, expected, string(res)) } diff --git a/x/distribution/simulation/operations_test.go b/x/distribution/simulation/operations_test.go index 03bfeeb50f..e6242dc472 100644 --- a/x/distribution/simulation/operations_test.go +++ b/x/distribution/simulation/operations_test.go @@ -75,8 +75,8 @@ func (suite *SimTestSuite) TestSimulateMsgSetWithdrawAddress() { types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) suite.Require().True(operationMsg.OK) - suite.Require().Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.DelegatorAddress) - suite.Require().Equal("cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.WithdrawAddress) + suite.Require().Equal("link1ghekyjucln7y67ntx7cf27m9dpuxxemnqk82wt", msg.DelegatorAddress) + suite.Require().Equal("link1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7fmx8x8", msg.WithdrawAddress) suite.Require().Equal(types.TypeMsgSetWithdrawAddress, msg.Type()) suite.Require().Equal(types.ModuleName, msg.Route()) suite.Require().Len(futureOperations, 0) @@ -116,8 +116,8 @@ func (suite *SimTestSuite) TestSimulateMsgWithdrawDelegatorReward() { types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) suite.Require().True(operationMsg.OK) - suite.Require().Equal("cosmosvaloper1l4s054098kk9hmr5753c6k3m2kw65h686d3mhr", msg.ValidatorAddress) - suite.Require().Equal("cosmos1d6u7zhjwmsucs678d7qn95uqajd4ucl9jcjt26", msg.DelegatorAddress) + suite.Require().Equal("linkvaloper1l4s054098kk9hmr5753c6k3m2kw65h68cr83wt", msg.ValidatorAddress) + suite.Require().Equal("link1d6u7zhjwmsucs678d7qn95uqajd4ucl98kjf3j", msg.DelegatorAddress) suite.Require().Equal(types.TypeMsgWithdrawDelegatorReward, msg.Type()) suite.Require().Equal(types.ModuleName, msg.Route()) suite.Require().Len(futureOperations, 0) @@ -173,7 +173,7 @@ func (suite *SimTestSuite) testSimulateMsgWithdrawValidatorCommission(tokenName types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) suite.Require().True(operationMsg.OK) - suite.Require().Equal("cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) + suite.Require().Equal("linkvaloper1tnh2q55v8wyygtt9srz5safamzdengsn8rx882", msg.ValidatorAddress) suite.Require().Equal(types.TypeMsgWithdrawValidatorCommission, msg.Type()) suite.Require().Equal(types.ModuleName, msg.Route()) suite.Require().Len(futureOperations, 0) @@ -200,7 +200,7 @@ func (suite *SimTestSuite) TestSimulateMsgFundCommunityPool() { suite.Require().True(operationMsg.OK) suite.Require().Equal("4896096stake", msg.Amount.String()) - suite.Require().Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Depositor) + suite.Require().Equal("link1ghekyjucln7y67ntx7cf27m9dpuxxemnqk82wt", msg.Depositor) suite.Require().Equal(types.TypeMsgFundCommunityPool, msg.Type()) suite.Require().Equal(types.ModuleName, msg.Route()) suite.Require().Len(futureOperations, 0) diff --git a/x/evidence/legacy/v040/migrate_test.go b/x/evidence/legacy/v040/migrate_test.go index 481f956c9e..c71f7a2b24 100644 --- a/x/evidence/legacy/v040/migrate_test.go +++ b/x/evidence/legacy/v040/migrate_test.go @@ -20,7 +20,7 @@ func TestMigrate(t *testing.T) { WithLegacyAmino(encodingConfig.Amino). WithJSONMarshaler(encodingConfig.Marshaler) - addr1, _ := sdk.AccAddressFromBech32("cosmos1xxkueklal9vejv9unqu80w9vptyepfa95pd53u") + addr1, _ := sdk.AccAddressFromBech32("link19d880rl0u36uc4yhdjrsp5yculgd4ak7hdt660") evidenceGenState := v038evidence.GenesisState{ Params: v038evidence.Params{MaxEvidenceAge: v038evidence.DefaultMaxEvidenceAge}, @@ -32,7 +32,7 @@ func TestMigrate(t *testing.T) { } migrated := v040evidence.Migrate(evidenceGenState) - expected := `{"evidence":[{"@type":"/lbm.evidence.v1beta1.Equivocation","height":"20","time":"0001-01-01T00:00:00Z","power":"100","consensus_address":"cosmosvalcons1xxkueklal9vejv9unqu80w9vptyepfa99x2a3w"}]}` + expected := `{"evidence":[{"@type":"/lbm.evidence.v1beta1.Equivocation","height":"20","time":"0001-01-01T00:00:00Z","power":"100","consensus_address":"linkvalcons19d880rl0u36uc4yhdjrsp5yculgd4ak7326mca"}]}` bz, err := clientCtx.JSONMarshaler.MarshalJSON(migrated) require.NoError(t, err) diff --git a/x/evidence/types/evidence_test.go b/x/evidence/types/evidence_test.go index 8e3bdfb280..2d49a04b85 100644 --- a/x/evidence/types/evidence_test.go +++ b/x/evidence/types/evidence_test.go @@ -29,8 +29,8 @@ func TestEquivocation_Valid(t *testing.T) { require.Equal(t, e.GetHeight(), e.Height) require.Equal(t, e.Type(), types.TypeEquivocation) require.Equal(t, e.Route(), types.RouteEquivocation) - require.Equal(t, e.Hash().String(), "1E10F9267BEA3A9A4AB5302C2C510CC1AFD7C54E232DA5B2E3360DFAFACF7A76") - require.Equal(t, e.String(), "height: 100\ntime: 2006-01-02T15:04:05Z\npower: 1000000\nconsensus_address: cosmosvalcons1vehk7h6lta047h6lta047h6lta047h6l8m4r53\n") + require.Equal(t, e.Hash().String(), "1EB689FD54073D3FCF1212FB87281324B9ED2B690C32454B403778451F5D817D") + require.Equal(t, e.String(), "height: 100\ntime: 2006-01-02T15:04:05Z\npower: 1000000\nconsensus_address: linkvalcons1vehk7h6lta047h6lta047h6lta047h6l94rfde\n") require.NoError(t, e.ValidateBasic()) } diff --git a/x/genutil/legacy/v036/migrate_test.go b/x/genutil/legacy/v036/migrate_test.go index 9d766074bd..845684e331 100644 --- a/x/genutil/legacy/v036/migrate_test.go +++ b/x/genutil/legacy/v036/migrate_test.go @@ -16,7 +16,7 @@ var basic034Gov = []byte(` { "proposal_id": "1", "deposit": { - "depositor": "cosmos1grgelyng2v6v3t8z87wu3sxgt9m5s03xvslewd", + "depositor": "link1ztzrawp3l86k5d78eqq2jp2ylthxa6rvdf269c", "proposal_id": "1", "amount": [ { @@ -31,7 +31,7 @@ var basic034Gov = []byte(` { "proposal_id": "1", "vote": { - "voter": "cosmos1lktjhnzkpkz3ehrg8psvmwhafg56kfss5597tg", + "voter": "link1stgyyknvcc02rjfmfurmygt59shsnh5hswl7rz", "proposal_id": "1", "option": "Yes" } diff --git a/x/genutil/legacy/v038/migrate_test.go b/x/genutil/legacy/v038/migrate_test.go index bc42120ed5..502e782fe9 100644 --- a/x/genutil/legacy/v038/migrate_test.go +++ b/x/genutil/legacy/v038/migrate_test.go @@ -16,7 +16,7 @@ import ( var genAccountsState = []byte(`[ { "account_number": "0", - "address": "cosmos1q7380u26f7ntke3facjmynajs4umlr329vr4ja", + "address": "link1vu6qhekl7ve5gk5exzy36tauyrk96mkphrf5u8", "coins": [ { "amount": "1000000000", @@ -38,7 +38,7 @@ var genAccountsState = []byte(`[ }, { "account_number": "0", - "address": "cosmos1tygms3xhhs3yv487phx3dw4a95jn7t7lpm470r", + "address": "link1tygms3xhhs3yv487phx3dw4a95jn7t7l544u5t", "coins": [], "delegated_free": [], "delegated_vesting": [], @@ -54,7 +54,7 @@ var genAccountsState = []byte(`[ }, { "account_number": "0", - "address": "cosmos1m3h30wlvsf8llruxtpukdvsy0km2kum8g38c8q", + "address": "link1m3h30wlvsf8llruxtpukdvsy0km2kum8al86ug", "coins": [], "delegated_free": [], "delegated_vesting": [], @@ -82,16 +82,16 @@ var genAuthState = []byte(`{ var genStakingState = []byte(`{ "delegations": [ { - "delegator_address": "cosmos1q7380u26f7ntke3facjmynajs4umlr329vr4ja", + "delegator_address": "link1vu6qhekl7ve5gk5exzy36tauyrk96mkphrf5u8", "shares": "100000000.000000000000000000", - "validator_address": "cosmosvaloper1q7380u26f7ntke3facjmynajs4umlr32qchq7w" + "validator_address": "linkvaloper19ex3qzs2yy73xjfth9dgxxah6pqjdyjtckzx7y" } ], "exported": true, "last_total_power": "400", "last_validator_powers": [ { - "Address": "cosmosvaloper1q7380u26f7ntke3facjmynajs4umlr32qchq7w", + "Address": "linkvaloper1twsfmuj28ndph54k4nw8crwu8h9c8mh33lyrp8", "Power": "100" } ], @@ -113,7 +113,7 @@ var genStakingState = []byte(`{ }, "update_time": "2019-09-24T23:11:22.9692177Z" }, - "consensus_pubkey": "cosmosvalconspub1zcjduepqygqrt0saxf76lhsmp56rx52j0acdxyjvcdkq3tqvwrsmmm0ke28q36kh9h", + "consensus_pubkey": "linkvalconspub1addwnpepqgz0vs85hqfwar8eclrhnd47mmd6dvx0uy6yq3n5emn5dzxjv5vv2vpc22h", "delegator_shares": "100000000.000000000000000000", "description": { "details": "", @@ -123,7 +123,7 @@ var genStakingState = []byte(`{ }, "jailed": false, "min_self_delegation": "1", - "operator_address": "cosmosvaloper1q7380u26f7ntke3facjmynajs4umlr32qchq7w", + "operator_address": "linkvaloper19ex3qzs2yy73xjfth9dgxxah6pqjdyjtckzx7y", "status": 2, "tokens": "100000000", "unbonding_height": "0", diff --git a/x/genutil/legacy/v039/migrate_test.go b/x/genutil/legacy/v039/migrate_test.go index 903fe70301..863edcb6b0 100644 --- a/x/genutil/legacy/v039/migrate_test.go +++ b/x/genutil/legacy/v039/migrate_test.go @@ -24,14 +24,14 @@ var genAuthState = []byte(`{ { "type": "lbm-sdk/Account", "value": { - "address": "cosmos19hz3ee9e3lj9mne4jggj3v8hxjrpre22jukj9y", + "address": "link1fgc3542nakex4w8rl5n77zelpdguppfc3f6wdr", "coins": [ { "denom": "stake", "amount": "400000" } ], - "public_key": "cosmospub1addwnpepqtezq4ajkevh724ls45zp72x70rj8mhszqf5pxcaahazm8trv490swlf404", + "public_key": "linkpub1addwnpepqf2nnrpt3jkwsv6wgs2ndc52y3hyfhwrtldlm80g2hr5z4lzwudgxll3drm", "account_number": 1, "sequence": 1 } @@ -39,7 +39,7 @@ var genAuthState = []byte(`{ { "type": "lbm-sdk/ModuleAccount", "value": { - "address": "cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh", + "address": "link1fl48vsnmsdzcv85q5d2q4z5ajdha8yu3q4fdzl", "coins": [ { "denom": "stake", @@ -59,14 +59,14 @@ var genAuthState = []byte(`{ { "type": "lbm-sdk/ContinuousVestingAccount", "value": { - "address": "cosmos1vtzxzyjv506dvhl9pa527xsugf5gez4fnqxq0n", + "address": "link17kxlwdwmjuzh2y9vnfwyhz2fhfkznzuwt87sc6", "coins": [ { "denom": "stake", "amount": "10000205" } ], - "public_key": "cosmospub1addwnpepqdxrk48q89xlmnzrr5nkssle05tkp73uknevzaavm53c02v26vlyzz6vcdh", + "public_key": "linkpub1addwnpepqw6mp5utlyp85sezqgrvclta80j8zn0p56zvxdexgpgpxh9wvyfeyu683cr", "account_number": 3, "sequence": 5, "original_vesting": [ @@ -84,14 +84,14 @@ var genAuthState = []byte(`{ { "type": "lbm-sdk/DelayedVestingAccount", "value": { - "address": "cosmos1prxkcqclweqa0g28p7vmf6z78ghyeckm4qak30", + "address": "link15q7fcsjxq3j635dk02hqalfu3d2plcp2tw9ngt", "coins": [ { "denom": "stake", "amount": "10000205" } ], - "public_key": "cosmospub1addwnpepqwewcad349e2yw3weatf8lzfyv5cd6am9jkk4ajach3f568k6gg47nls3p8", + "public_key": "linkpub1addwnpepqg7yvmjtly3kn4qwctxghg8zn8mplydedydww904uf33xca8y4zn2temgn4", "account_number": 4, "sequence": 15, "original_vesting": [ @@ -108,7 +108,7 @@ var genAuthState = []byte(`{ ] }`) -var expectedGenAuthState = []byte(`{"params":{"max_memo_characters":"10","tx_sig_limit":"10","tx_size_cost_per_byte":"10","sig_verify_cost_ed25519":"10","sig_verify_cost_secp256k1":"10"},"accounts":[{"type":"lbm-sdk/Account","value":{"address":"cosmos19hz3ee9e3lj9mne4jggj3v8hxjrpre22jukj9y","coins":[{"denom":"stake","amount":"400000"}],"public_key":{"type":"tendermint/PubKeySecp256k1","value":"AvIgV7K2WX8qv4VoIPlG88cj7vAQE0CbHe36LZ1jZUr4"},"account_number":"1","sequence":"1"}},{"type":"lbm-sdk/ModuleAccount","value":{"address":"cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh","coins":[{"denom":"stake","amount":"400000000"}],"public_key":"","account_number":"2","sequence":"4","name":"bonded_tokens_pool","permissions":["burner","staking"]}},{"type":"lbm-sdk/ContinuousVestingAccount","value":{"address":"cosmos1vtzxzyjv506dvhl9pa527xsugf5gez4fnqxq0n","coins":[{"denom":"stake","amount":"10000205"}],"public_key":{"type":"tendermint/PubKeySecp256k1","value":"A0w7VOA5Tf3MQx0naEP5fRdg+jy08sF3rN0jh6mK0z5B"},"account_number":"3","sequence":"5","original_vesting":[{"denom":"stake","amount":"10000205"}],"delegated_free":[],"delegated_vesting":[],"end_time":"1596125048","start_time":"1595952248"}},{"type":"lbm-sdk/DelayedVestingAccount","value":{"address":"cosmos1prxkcqclweqa0g28p7vmf6z78ghyeckm4qak30","coins":[{"denom":"stake","amount":"10000205"}],"public_key":{"type":"tendermint/PubKeySecp256k1","value":"A7LsdbGpcqI6Ls9Wk/xJIymG67ssrWr2XcXimmj20hFf"},"account_number":"4","sequence":"15","original_vesting":[{"denom":"stake","amount":"10000205"}],"delegated_free":[],"delegated_vesting":[],"end_time":"1596125048"}}]}`) +var expectedGenAuthState = []byte(`{"params":{"max_memo_characters":"10","tx_sig_limit":"10","tx_size_cost_per_byte":"10","sig_verify_cost_ed25519":"10","sig_verify_cost_secp256k1":"10"},"accounts":[{"type":"lbm-sdk/Account","value":{"address":"link1fgc3542nakex4w8rl5n77zelpdguppfc3f6wdr","coins":[{"denom":"stake","amount":"400000"}],"public_key":{"type":"tendermint/PubKeySecp256k1","value":"AlU5jCuMrOgzTkQVNuKKJG5E3cNf2/2d6FXHQVfidxqD"},"account_number":"1","sequence":"1"}},{"type":"lbm-sdk/ModuleAccount","value":{"address":"link1fl48vsnmsdzcv85q5d2q4z5ajdha8yu3q4fdzl","coins":[{"denom":"stake","amount":"400000000"}],"public_key":"","account_number":"2","sequence":"4","name":"bonded_tokens_pool","permissions":["burner","staking"]}},{"type":"lbm-sdk/ContinuousVestingAccount","value":{"address":"link17kxlwdwmjuzh2y9vnfwyhz2fhfkznzuwt87sc6","coins":[{"denom":"stake","amount":"10000205"}],"public_key":{"type":"tendermint/PubKeySecp256k1","value":"A7Ww04v5AnpDIgIGzH19O+RxTeGmhMM3JkBQE1yuYROS"},"account_number":"3","sequence":"5","original_vesting":[{"denom":"stake","amount":"10000205"}],"delegated_free":[],"delegated_vesting":[],"end_time":"1596125048","start_time":"1595952248"}},{"type":"lbm-sdk/DelayedVestingAccount","value":{"address":"link15q7fcsjxq3j635dk02hqalfu3d2plcp2tw9ngt","coins":[{"denom":"stake","amount":"10000205"}],"public_key":{"type":"tendermint/PubKeySecp256k1","value":"AjxGbkv5I2nUDsLMi6DimfYfkblpGucV9eJjE2OnJUU1"},"account_number":"4","sequence":"15","original_vesting":[{"denom":"stake","amount":"10000205"}],"delegated_free":[],"delegated_vesting":[],"end_time":"1596125048"}}]}`) func TestMigrate(t *testing.T) { genesis := types.AppMap{ diff --git a/x/genutil/types/genesis_state_test.go b/x/genutil/types/genesis_state_test.go index 21b789aaf1..f81fda3a00 100644 --- a/x/genutil/types/genesis_state_test.go +++ b/x/genutil/types/genesis_state_test.go @@ -85,7 +85,7 @@ func TestGenesisStateFromGenFile(t *testing.T) { require.True(t, bankGenesis.Params.DefaultSendEnabled) require.Equal(t, "1000nametoken,100000000stake", bankGenesis.Balances[0].GetCoins().String()) - require.Equal(t, "cosmos106vrzv5xkheqhjm023pxcxlqmcjvuhtfyachz4", bankGenesis.Balances[0].GetAddress().String()) + require.Equal(t, "link1wjfgxvmff06nqkzlnuhhdmm5d55lvffn5xym0g", bankGenesis.Balances[0].GetAddress().String()) require.Equal(t, "The native staking token of the Cosmos Hub.", bankGenesis.DenomMetadata[0].GetDescription()) require.Equal(t, "uatom", bankGenesis.DenomMetadata[0].GetBase()) require.Equal(t, "matom", bankGenesis.DenomMetadata[0].GetDenomUnits()[1].GetDenom()) diff --git a/x/gov/legacy/v040/migrate_test.go b/x/gov/legacy/v040/migrate_test.go index cc0961866f..b23c8a1175 100644 --- a/x/gov/legacy/v040/migrate_test.go +++ b/x/gov/legacy/v040/migrate_test.go @@ -24,7 +24,7 @@ func TestMigrate(t *testing.T) { WithLegacyAmino(encodingConfig.Amino). WithJSONMarshaler(encodingConfig.Marshaler) - recipient, err := sdk.AccAddressFromBech32("cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh") + recipient, err := sdk.AccAddressFromBech32("link18qzmhd4sdefg79wg2cndsfa7rjp04cydr746k0") require.NoError(t, err) govGenState := v036gov.GenesisState{ Proposals: []v036gov.Proposal{ @@ -131,7 +131,7 @@ func TestMigrate(t *testing.T) { } ], "description": "bar_community", - "recipient": "cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh", + "recipient": "link18qzmhd4sdefg79wg2cndsfa7rjp04cydr746k0", "title": "foo_community" }, "deposit_end_time": "0001-01-01T00:00:00Z", diff --git a/x/gov/simulation/operations_test.go b/x/gov/simulation/operations_test.go index 689953f423..eaa8aa51b7 100644 --- a/x/gov/simulation/operations_test.go +++ b/x/gov/simulation/operations_test.go @@ -115,7 +115,7 @@ func TestSimulateMsgSubmitProposal(t *testing.T) { types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) require.True(t, operationMsg.OK) - require.Equal(t, "cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.Proposer) + require.Equal(t, "link1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7fmx8x8", msg.Proposer) require.Equal(t, "2686011stake", msg.InitialDeposit.String()) require.Equal(t, "title-3: ZBSpYuLyYggwexjxusrBqDOTtGTOWeLrQKjLxzIivHSlcxgdXhhuTSkuxKGLwQvuyNhYFmBZHeAerqyNEUzXPFGkqEGqiQWIXnku", msg.GetContent().GetTitle()) require.Equal(t, "description-3: NJWzHdBNpAXKJPHWQdrGYcAHSctgVlqwqHoLfHsXUdStwfefwzqLuKEhmMyYLdbZrcPgYqjNHxPexsruwEGStAneKbWkQDDIlCWBLSiAASNhZqNFlPtfqPJoxKsgMdzjWqLWdqKQuJqWPMvwPQWZUtVMOTMYKJbfdlZsjdsomuScvDmbDkgRualsxDvRJuCAmPOXitIbcyWsKGSdrEunFAOdmXnsuyFVgJqEjbklvmwrUlsxjRSfKZxGcpayDdgoFcnVSutxjRgOSFzPwidAjubMncNweqpbxhXGchpZUxuFDOtpnhNUycJICRYqsPhPSCjPTWZFLkstHWJxvdPEAyEIxXgLwbNOjrgzmaujiBABBIXvcXpLrbcEWNNQsbjvgJFgJkflpRohHUutvnaUqoopuKjTDaemDeSdqbnOzcfJpcTuAQtZoiLZOoAIlboFDAeGmSNwkvObPRvRWQgWkGkxwtPauYgdkmypLjbqhlHJIQTntgWjXwZdOyYEdQRRLfMSdnxqppqUofqLbLQDUjwKVKfZJUJQPsWIPwIVaSTrmKskoAhvmZyJgeRpkaTfGgrJzAigcxtfshmiDCFkuiluqtMOkidknnTBtumyJYlIsWLnCQclqdVmikUoMOPdPWwYbJxXyqUVicNxFxyqJTenNblyyKSdlCbiXxUiYUiMwXZASYfvMDPFgxniSjWaZTjHkqlJvtBsXqwPpyVxnJVGFWhfSxgOcduoxkiopJvFjMmFabrGYeVtTXLhxVUEiGwYUvndjFGzDVntUvibiyZhfMQdMhgsiuysLMiePBNXifRLMsSmXPkwlPloUbJveCvUlaalhZHuvdkCnkSHbMbmOnrfEGPwQiACiPlnihiaOdbjPqPiTXaHDoJXjSlZmltGqNHHNrcKdlFSCdmVOuvDcBLdSklyGJmcLTbSFtALdGlPkqqecJrpLCXNPWefoTJNgEJlyMEPneVaxxduAAEqQpHWZodWyRkDAxzyMnFMcjSVqeRXLqsNyNtQBbuRvunZflWSbbvXXdkyLikYqutQhLPONXbvhcQZJPSWnOulqQaXmbfFxAkqfYeseSHOQidHwbcsOaMnSrrmGjjRmEMQNuknupMxJiIeVjmgZvbmjPIQTEhQFULQLBMPrxcFPvBinaOPYWGvYGRKxLZdwamfRQQFngcdSlvwjfaPbURasIsGJVHtcEAxnIIrhSriiXLOlbEBLXFElXJFGxHJczRBIxAuPKtBisjKBwfzZFagdNmjdwIRvwzLkFKWRTDPxJCmpzHUcrPiiXXHnOIlqNVoGSXZewdnCRhuxeYGPVTfrNTQNOxZmxInOazUYNTNDgzsxlgiVEHPKMfbesvPHUqpNkUqbzeuzfdrsuLDpKHMUbBMKczKKWOdYoIXoPYtEjfOnlQLoGnbQUCuERdEFaptwnsHzTJDsuZkKtzMpFaZobynZdzNydEeJJHDYaQcwUxcqvwfWwNUsCiLvkZQiSfzAHftYgAmVsXgtmcYgTqJIawstRYJrZdSxlfRiqTufgEQVambeZZmaAyRQbcmdjVUZZCgqDrSeltJGXPMgZnGDZqISrGDOClxXCxMjmKqEPwKHoOfOeyGmqWqihqjINXLqnyTesZePQRqaWDQNqpLgNrAUKulklmckTijUltQKuWQDwpLmDyxLppPVMwsmBIpOwQttYFMjgJQZLYFPmxWFLIeZihkRNnkzoypBICIxgEuYsVWGIGRbbxqVasYnstWomJnHwmtOhAFSpttRYYzBmyEtZXiCthvKvWszTXDbiJbGXMcrYpKAgvUVFtdKUfvdMfhAryctklUCEdjetjuGNfJjajZtvzdYaqInKtFPPLYmRaXPdQzxdSQfmZDEVHlHGEGNSPRFJuIfKLLfUmnHxHnRjmzQPNlqrXgifUdzAGKVabYqvcDeYoTYgPsBUqehrBhmQUgTvDnsdpuhUoxskDdppTsYMcnDIPSwKIqhXDCIxOuXrywahvVavvHkPuaenjLmEbMgrkrQLHEAwrhHkPRNvonNQKqprqOFVZKAtpRSpvQUxMoXCMZLSSbnLEFsjVfANdQNQVwTmGxqVjVqRuxREAhuaDrFgEZpYKhwWPEKBevBfsOIcaZKyykQafzmGPLRAKDtTcJxJVgiiuUkmyMYuDUNEUhBEdoBLJnamtLmMJQgmLiUELIhLpiEvpOXOvXCPUeldLFqkKOwfacqIaRcnnZvERKRMCKUkMABbDHytQqQblrvoxOZkwzosQfDKGtIdfcXRJNqlBNwOCWoQBcEWyqrMlYZIAXYJmLfnjoJepgSFvrgajaBAIksoyeHqgqbGvpAstMIGmIhRYGGNPRIfOQKsGoKgxtsidhTaAePRCBFqZgPDWCIkqOJezGVkjfYUCZTlInbxBXwUAVRsxHTQtJFnnpmMvXDYCVlEmnZBKhmmxQOIQzxFWpJQkQoSAYzTEiDWEOsVLNrbfzeHFRyeYATakQQWmFDLPbVMCJcWjFGJjfqCoVzlbNNEsqxdSmNPjTjHYOkuEMFLkXYGaoJlraLqayMeCsTjWNRDPBywBJLAPVkGQqTwApVVwYAetlwSbzsdHWsTwSIcctkyKDuRWYDQikRqsKTMJchrliONJeaZIzwPQrNbTwxsGdwuduvibtYndRwpdsvyCktRHFalvUuEKMqXbItfGcNGWsGzubdPMYayOUOINjpcFBeESdwpdlTYmrPsLsVDhpTzoMegKrytNVZkfJRPuDCUXxSlSthOohmsuxmIZUedzxKmowKOdXTMcEtdpHaPWgIsIjrViKrQOCONlSuazmLuCUjLltOGXeNgJKedTVrrVCpWYWHyVrdXpKgNaMJVjbXxnVMSChdWKuZdqpisvrkBJPoURDYxWOtpjzZoOpWzyUuYNhCzRoHsMjmmWDcXzQiHIyjwdhPNwiPqFxeUfMVFQGImhykFgMIlQEoZCaRoqSBXTSWAeDumdbsOGtATwEdZlLfoBKiTvodQBGOEcuATWXfiinSjPmJKcWgQrTVYVrwlyMWhxqNbCMpIQNoSMGTiWfPTCezUjYcdWppnsYJihLQCqbNLRGgqrwHuIvsazapTpoPZIyZyeeSueJuTIhpHMEJfJpScshJubJGfkusuVBgfTWQoywSSliQQSfbvaHKiLnyjdSbpMkdBgXepoSsHnCQaYuHQqZsoEOmJCiuQUpJkmfyfbIShzlZpHFmLCsbknEAkKXKfRTRnuwdBeuOGgFbJLbDksHVapaRayWzwoYBEpmrlAxrUxYMUekKbpjPNfjUCjhbdMAnJmYQVZBQZkFVweHDAlaqJjRqoQPoOMLhyvYCzqEuQsAFoxWrzRnTVjStPadhsESlERnKhpEPsfDxNvxqcOyIulaCkmPdambLHvGhTZzysvqFauEgkFRItPfvisehFmoBhQqmkfbHVsgfHXDPJVyhwPllQpuYLRYvGodxKjkarnSNgsXoKEMlaSKxKdcVgvOkuLcfLFfdtXGTclqfPOfeoVLbqcjcXCUEBgAGplrkgsmIEhWRZLlGPGCwKWRaCKMkBHTAcypUrYjWwCLtOPVygMwMANGoQwFnCqFrUGMCRZUGJKTZIGPyldsifauoMnJPLTcDHmilcmahlqOELaAUYDBuzsVywnDQfwRLGIWozYaOAilMBcObErwgTDNGWnwQMUgFFSKtPDMEoEQCTKVREqrXZSGLqwTMcxHfWotDllNkIJPMbXzjDVjPOOjCFuIvTyhXKLyhUScOXvYthRXpPfKwMhptXaxIxgqBoUqzrWbaoLTVpQoottZyPFfNOoMioXHRuFwMRYUiKvcWPkrayyTLOCFJlAyslDameIuqVAuxErqFPEWIScKpBORIuZqoXlZuTvAjEdlEWDODFRregDTqGNoFBIHxvimmIZwLfFyKUfEWAnNBdtdzDmTPXtpHRGdIbuucfTjOygZsTxPjfweXhSUkMhPjMaxKlMIJMOXcnQfyzeOcbWwNbeH", msg.GetContent().GetDescription()) @@ -159,7 +159,7 @@ func TestSimulateMsgDeposit(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, uint64(1), msg.ProposalId) - require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Depositor) + require.Equal(t, "link1ghekyjucln7y67ntx7cf27m9dpuxxemnqk82wt", msg.Depositor) require.Equal(t, "560969stake", msg.Amount.String()) require.Equal(t, "gov", msg.Route()) require.Equal(t, types.TypeMsgDeposit, msg.Type()) @@ -201,7 +201,7 @@ func TestSimulateMsgVote(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, uint64(1), msg.ProposalId) - require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Voter) + require.Equal(t, "link1ghekyjucln7y67ntx7cf27m9dpuxxemnqk82wt", msg.Voter) require.Equal(t, types.OptionYes, msg.Option) require.Equal(t, "gov", msg.Route()) require.Equal(t, types.TypeMsgVote, msg.Type()) diff --git a/x/gov/types/msgs_test.go b/x/gov/types/msgs_test.go index 442bcd81d2..4cafed104e 100644 --- a/x/gov/types/msgs_test.go +++ b/x/gov/types/msgs_test.go @@ -64,7 +64,7 @@ func TestMsgDepositGetSignBytes(t *testing.T) { msg := NewMsgDeposit(addr, 0, coinsPos) res := msg.GetSignBytes() - expected := `{"type":"lbm-sdk/MsgDeposit","value":{"amount":[{"amount":"1000","denom":"stake"}],"depositor":"cosmos1v9jxgu33kfsgr5","proposal_id":"0"}}` + expected := `{"type":"lbm-sdk/MsgDeposit","value":{"amount":[{"amount":"1000","denom":"stake"}],"depositor":"link1v9jxgu33p9vj2k","proposal_id":"0"}}` require.Equal(t, expected, string(res)) } diff --git a/x/ibc/core/03-connection/types/msgs_test.go b/x/ibc/core/03-connection/types/msgs_test.go index 4007740103..0f0692125c 100644 --- a/x/ibc/core/03-connection/types/msgs_test.go +++ b/x/ibc/core/03-connection/types/msgs_test.go @@ -77,7 +77,7 @@ func TestMsgTestSuite(t *testing.T) { func (suite *MsgTestSuite) TestNewMsgConnectionOpenInit() { prefix := commitmenttypes.NewMerklePrefix([]byte("storePrefixKey")) - signer, _ := sdk.AccAddressFromBech32("cosmos1ckgw5d7jfj7wwxjzs9fdrdev9vc8dzcw3n2lht") + signer, _ := sdk.AccAddressFromBech32("link1kerpa33qxdwvrgms5qr7xegfxnewzm6s46ce7t") // empty versions are considered valid, the default compatible versions // will be used in protocol. var version *types.Version @@ -108,7 +108,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenInit() { func (suite *MsgTestSuite) TestNewMsgConnectionOpenTry() { prefix := commitmenttypes.NewMerklePrefix([]byte("storePrefixKey")) - signer, _ := sdk.AccAddressFromBech32("cosmos1ckgw5d7jfj7wwxjzs9fdrdev9vc8dzcw3n2lht") + signer, _ := sdk.AccAddressFromBech32("link10czqumeld9k6dm32ud0xpqs0kn4m6xtrxy024r") clientState := ibctmtypes.NewClientState( chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false, @@ -162,7 +162,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenTry() { } func (suite *MsgTestSuite) TestNewMsgConnectionOpenAck() { - signer, _ := sdk.AccAddressFromBech32("cosmos1ckgw5d7jfj7wwxjzs9fdrdev9vc8dzcw3n2lht") + signer, _ := sdk.AccAddressFromBech32("link1amsfdt72u7ysc8542p0mmafq9ys8c7qxh74wf5") clientState := ibctmtypes.NewClientState( chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false, ) @@ -210,7 +210,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenAck() { } func (suite *MsgTestSuite) TestNewMsgConnectionOpenConfirm() { - signer, _ := sdk.AccAddressFromBech32("cosmos1ckgw5d7jfj7wwxjzs9fdrdev9vc8dzcw3n2lht") + signer, _ := sdk.AccAddressFromBech32("link1ptg03mk43x5qcp9xnankk7cwt4vzrkpxqpcff3") testMsgs := []*types.MsgConnectionOpenConfirm{ types.NewMsgConnectionOpenConfirm("test/conn1", suite.proof, clientHeight, signer), diff --git a/x/slashing/legacy/v040/migrate_test.go b/x/slashing/legacy/v040/migrate_test.go index 0ca8f05cfc..a390678ac4 100644 --- a/x/slashing/legacy/v040/migrate_test.go +++ b/x/slashing/legacy/v040/migrate_test.go @@ -21,21 +21,21 @@ func TestMigrate(t *testing.T) { WithLegacyAmino(encodingConfig.Amino). WithJSONMarshaler(encodingConfig.Marshaler) - addr1, err := sdk.ConsAddressFromBech32("cosmosvalcons104cjmxkrg8y8lmrp25de02e4zf00zle4mzs685") + addr1, err := sdk.ConsAddressFromBech32("linkvalcons1hra8nx79ldurl80ddsrlz04q4y8tuenmhw2dua") require.NoError(t, err) - addr2, err := sdk.ConsAddressFromBech32("cosmosvalcons10e4c5p6qk0sycy9u6u43t7csmlx9fyadr9yxph") + addr2, err := sdk.ConsAddressFromBech32("linkvalcons1twsfmuj28ndph54k4nw8crwu8h9c8mh39vhldx") require.NoError(t, err) gs := v039slashing.GenesisState{ Params: v039slashing.DefaultParams(), SigningInfos: map[string]v039slashing.ValidatorSigningInfo{ - "cosmosvalcons10e4c5p6qk0sycy9u6u43t7csmlx9fyadr9yxph": { + "linkvalcons1twsfmuj28ndph54k4nw8crwu8h9c8mh39vhldx": { Address: addr2, IndexOffset: 615501, MissedBlocksCounter: 1, Tombstoned: false, }, - "cosmosvalcons104cjmxkrg8y8lmrp25de02e4zf00zle4mzs685": { + "linkvalcons1hra8nx79ldurl80ddsrlz04q4y8tuenmhw2dua": { Address: addr1, IndexOffset: 2, MissedBlocksCounter: 2, @@ -43,13 +43,13 @@ func TestMigrate(t *testing.T) { }, }, MissedBlocks: map[string][]v039slashing.MissedBlock{ - "cosmosvalcons10e4c5p6qk0sycy9u6u43t7csmlx9fyadr9yxph": { + "linkvalcons1twsfmuj28ndph54k4nw8crwu8h9c8mh39vhldx": { { Index: 2, Missed: true, }, }, - "cosmosvalcons104cjmxkrg8y8lmrp25de02e4zf00zle4mzs685": { + "linkvalcons1hra8nx79ldurl80ddsrlz04q4y8tuenmhw2dua": { { Index: 3, Missed: true, @@ -64,14 +64,14 @@ func TestMigrate(t *testing.T) { migrated := v040slashing.Migrate(gs) // Check that in `signing_infos` and `missed_blocks`, the address - // cosmosvalcons104cjmxkrg8y8lmrp25de02e4zf00zle4mzs685 + // linkvalcons1hra8nx79ldurl80ddsrlz04q4y8tuenmhw2dua // should always come before the address - // cosmosvalcons10e4c5p6qk0sycy9u6u43t7csmlx9fyadr9yxph + // linkvalcons1twsfmuj28ndph54k4nw8crwu8h9c8mh39vhldx // (in alphabetic order, basically). expected := `{ "missed_blocks": [ { - "address": "cosmosvalcons104cjmxkrg8y8lmrp25de02e4zf00zle4mzs685", + "address": "linkvalcons1hra8nx79ldurl80ddsrlz04q4y8tuenmhw2dua", "missed_blocks": [ { "index": "3", @@ -84,7 +84,7 @@ func TestMigrate(t *testing.T) { ] }, { - "address": "cosmosvalcons10e4c5p6qk0sycy9u6u43t7csmlx9fyadr9yxph", + "address": "linkvalcons1twsfmuj28ndph54k4nw8crwu8h9c8mh39vhldx", "missed_blocks": [ { "index": "2", @@ -102,9 +102,9 @@ func TestMigrate(t *testing.T) { }, "signing_infos": [ { - "address": "cosmosvalcons104cjmxkrg8y8lmrp25de02e4zf00zle4mzs685", + "address": "linkvalcons1hra8nx79ldurl80ddsrlz04q4y8tuenmhw2dua", "validator_signing_info": { - "address": "cosmosvalcons104cjmxkrg8y8lmrp25de02e4zf00zle4mzs685", + "address": "linkvalcons1hra8nx79ldurl80ddsrlz04q4y8tuenmhw2dua", "index_offset": "2", "jailed_until": "0001-01-01T00:00:00Z", "missed_blocks_counter": "2", @@ -113,9 +113,9 @@ func TestMigrate(t *testing.T) { } }, { - "address": "cosmosvalcons10e4c5p6qk0sycy9u6u43t7csmlx9fyadr9yxph", + "address": "linkvalcons1twsfmuj28ndph54k4nw8crwu8h9c8mh39vhldx", "validator_signing_info": { - "address": "cosmosvalcons10e4c5p6qk0sycy9u6u43t7csmlx9fyadr9yxph", + "address": "linkvalcons1twsfmuj28ndph54k4nw8crwu8h9c8mh39vhldx", "index_offset": "615501", "jailed_until": "0001-01-01T00:00:00Z", "missed_blocks_counter": "1", diff --git a/x/slashing/simulation/operations_test.go b/x/slashing/simulation/operations_test.go index 393b362152..9e1a936663 100644 --- a/x/slashing/simulation/operations_test.go +++ b/x/slashing/simulation/operations_test.go @@ -98,7 +98,7 @@ func TestSimulateMsgUnjail(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, types.TypeMsgUnjail, msg.Type()) - require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddr) + require.Equal(t, "linkvaloper1tnh2q55v8wyygtt9srz5safamzdengsn8rx882", msg.ValidatorAddr) require.Len(t, futureOperations, 0) } diff --git a/x/slashing/types/msg_test.go b/x/slashing/types/msg_test.go index 9db2adaf1b..1a5971da99 100644 --- a/x/slashing/types/msg_test.go +++ b/x/slashing/types/msg_test.go @@ -14,7 +14,7 @@ func TestMsgUnjailGetSignBytes(t *testing.T) { bytes := msg.GetSignBytes() require.Equal( t, - `{"type":"lbm-sdk/MsgUnjail","value":{"address":"cosmosvaloper1v93xxeqhg9nn6"}}`, + `{"type":"lbm-sdk/MsgUnjail","value":{"address":"linkvaloper1v93xxeqn4h65f"}}`, string(bytes), ) } diff --git a/x/staking/client/cli/cli_test.go b/x/staking/client/cli/cli_test.go index dd59296388..2d4f85c25e 100644 --- a/x/staking/client/cli/cli_test.go +++ b/x/staking/client/cli/cli_test.go @@ -219,7 +219,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidator() { }, { "with valid and not existing address", - []string{"cosmosvaloper15jkng8hytwt22lllv6mw4k89qkqehtahd84ptu", fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{"linkvaloper1mqn4snc20sxt6lrecjclmdglfdmtql4408kwvl", fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, true, }, { @@ -1142,7 +1142,7 @@ func (s *IntegrationTestSuite) TestNewCmdRedelegate() { { "with wrong source validator address", []string{ - `cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj`, // src-validator-addr + `linkvaloper120yvjfy7m2gnu9mvusrs40cxxhpt8nr3jr36d2`, // src-validator-addr val2.ValAddress.String(), // dst-validator-addr sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(150)).String(), // amount fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), @@ -1156,7 +1156,7 @@ func (s *IntegrationTestSuite) TestNewCmdRedelegate() { "with wrong destination validator address", []string{ val.ValAddress.String(), // dst-validator-addr - `cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj`, // src-validator-addr + `linkvaloper120yvjfy7m2gnu9mvusrs40cxxhpt8nr3jr36d2`, // src-validator-addr sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(150)).String(), // amount fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), diff --git a/x/staking/client/cli/tx_test.go b/x/staking/client/cli/tx_test.go index 11feb0f05a..4bac713723 100644 --- a/x/staking/client/cli/tx_test.go +++ b/x/staking/client/cli/tx_test.go @@ -14,7 +14,7 @@ func TestPrepareConfigForTxCreateValidator(t *testing.T) { chainID := "chainID" ip := "1.1.1.1" nodeID := "nodeID" - valPubKey, _ := sdk.GetPubKeyFromBech32(sdk.Bech32PubKeyTypeConsPub, "cosmosvalconspub1zcjduepq7jsrkl9fgqk0wj3ahmfr8pgxj6vakj2wzn656s8pehh0zhv2w5as5gd80a") + valPubKey, _ := sdk.GetPubKeyFromBech32(sdk.Bech32PubKeyTypeConsPub, "linkvalconspub1addwnpepqv0u6gc09v6d4wjnt3cwpcrpk6m5rr899nsheu9t6z8ghfua2ml96ca4hxs") moniker := "DefaultMoniker" tests := []struct { diff --git a/x/staking/legacy/v036/migrate_test.go b/x/staking/legacy/v036/migrate_test.go index da53d170bc..3cebc68650 100644 --- a/x/staking/legacy/v036/migrate_test.go +++ b/x/staking/legacy/v036/migrate_test.go @@ -45,7 +45,7 @@ func TestMigrate(t *testing.T) { "validators": [ { "operator_address": "", - "consensus_pubkey": "cosmosvalconspub1zcjduepq9ymett3nlv6fytn7lqxzd3q3ckvd79eqlcf3wkhgamcl4rzghesq83ecpx", + "consensus_pubkey": "linkvalconspub1zcjduepq9ymett3nlv6fytn7lqxzd3q3ckvd79eqlcf3wkhgamcl4rzghesqz4j37a", "jailed": false, "status": 0, "tokens": "0", @@ -70,7 +70,7 @@ func TestMigrate(t *testing.T) { }, { "operator_address": "", - "consensus_pubkey": "cosmosvalconspub1addwnpepqwfxk5k5pugwz3quqyzvzupefm3589tw6x9dkzjdkuzn7hgpz33ag84e406", + "consensus_pubkey": "linkvalconspub1addwnpepqwfxk5k5pugwz3quqyzvzupefm3589tw6x9dkzjdkuzn7hgpz33ag3zxexj", "jailed": false, "status": 0, "tokens": "0", diff --git a/x/staking/simulation/genesis_test.go b/x/staking/simulation/genesis_test.go index c0f99f24bd..c750a5a107 100644 --- a/x/staking/simulation/genesis_test.go +++ b/x/staking/simulation/genesis_test.go @@ -50,11 +50,11 @@ func TestRandomizedGenState(t *testing.T) { require.Len(t, stakingGenesis.Delegations, 3) require.Len(t, stakingGenesis.Validators, 3) // check Delegations - require.Equal(t, "cosmos1tnh2q55v8wyygtt9srz5safamzdengsnqeycj3", stakingGenesis.Delegations[0].DelegatorAddress) - require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", stakingGenesis.Delegations[0].ValidatorAddress) + require.Equal(t, "link1tnh2q55v8wyygtt9srz5safamzdengsn4hy6fe", stakingGenesis.Delegations[0].DelegatorAddress) + require.Equal(t, "linkvaloper1tnh2q55v8wyygtt9srz5safamzdengsn8rx882", stakingGenesis.Delegations[0].ValidatorAddress) require.Equal(t, "1000.000000000000000000", stakingGenesis.Delegations[0].Shares.String()) // check validators - require.Equal(t, "cosmosvaloper1ghekyjucln7y67ntx7cf27m9dpuxxemnsvnaes", stakingGenesis.Validators[2].GetOperator().String()) + require.Equal(t, "linkvaloper1ghekyjucln7y67ntx7cf27m9dpuxxemnjz9hqc", stakingGenesis.Validators[2].GetOperator().String()) require.Equal(t, []byte{0xa, 0x20, 0x51, 0xde, 0xbd, 0xe8, 0xfa, 0xdf, 0x4e, 0xfc, 0x33, 0xa5, 0x16, 0x94, 0xf6, 0xee, 0xd3, 0x69, 0x7a, 0x7a, 0x1c, 0x2d, 0x50, 0xb6, 0x2, 0xf7, 0x16, 0x4e, 0x66, 0x9f, 0xff, 0x38, 0x91, 0x9b}, stakingGenesis.Validators[2].ConsensusPubkey.Value) require.Equal(t, false, stakingGenesis.Validators[2].Jailed) require.Equal(t, "BOND_STATUS_UNBONDED", stakingGenesis.Validators[2].Status.String()) diff --git a/x/staking/simulation/operations_test.go b/x/staking/simulation/operations_test.go index cd380c5a00..539f9da96f 100644 --- a/x/staking/simulation/operations_test.go +++ b/x/staking/simulation/operations_test.go @@ -87,8 +87,8 @@ func TestSimulateMsgCreateValidator(t *testing.T) { require.Equal(t, "0.019527679037870745", msg.Commission.Rate.String()) require.Equal(t, types.TypeMsgCreateValidator, msg.Type()) require.Equal(t, []byte{0xa, 0x20, 0x51, 0xde, 0xbd, 0xe8, 0xfa, 0xdf, 0x4e, 0xfc, 0x33, 0xa5, 0x16, 0x94, 0xf6, 0xee, 0xd3, 0x69, 0x7a, 0x7a, 0x1c, 0x2d, 0x50, 0xb6, 0x2, 0xf7, 0x16, 0x4e, 0x66, 0x9f, 0xff, 0x38, 0x91, 0x9b}, msg.Pubkey.Value) - require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.DelegatorAddress) - require.Equal(t, "cosmosvaloper1ghekyjucln7y67ntx7cf27m9dpuxxemnsvnaes", msg.ValidatorAddress) + require.Equal(t, "link1ghekyjucln7y67ntx7cf27m9dpuxxemnqk82wt", msg.DelegatorAddress) + require.Equal(t, "linkvaloper1ghekyjucln7y67ntx7cf27m9dpuxxemnjz9hqc", msg.ValidatorAddress) require.Len(t, futureOperations, 0) } @@ -125,7 +125,7 @@ func TestSimulateMsgEditValidator(t *testing.T) { require.Equal(t, "wNbeHVIkPZ", msg.Description.Website) require.Equal(t, "MOXcnQfyze", msg.Description.SecurityContact) require.Equal(t, types.TypeMsgEditValidator, msg.Type()) - require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) + require.Equal(t, "linkvaloper1tnh2q55v8wyygtt9srz5safamzdengsn8rx882", msg.ValidatorAddress) require.Len(t, futureOperations, 0) } @@ -157,11 +157,11 @@ func TestSimulateMsgDelegate(t *testing.T) { types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) require.True(t, operationMsg.OK) - require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.DelegatorAddress) + require.Equal(t, "link1ghekyjucln7y67ntx7cf27m9dpuxxemnqk82wt", msg.DelegatorAddress) require.Equal(t, "98100858108421259236", msg.Amount.Amount.String()) require.Equal(t, "stake", msg.Amount.Denom) require.Equal(t, types.TypeMsgDelegate, msg.Type()) - require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) + require.Equal(t, "linkvaloper1tnh2q55v8wyygtt9srz5safamzdengsn8rx882", msg.ValidatorAddress) require.Len(t, futureOperations, 0) } @@ -202,11 +202,11 @@ func TestSimulateMsgUndelegate(t *testing.T) { types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) require.True(t, operationMsg.OK) - require.Equal(t, "cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.DelegatorAddress) + require.Equal(t, "link1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7fmx8x8", msg.DelegatorAddress) require.Equal(t, "280623462081924937", msg.Amount.Amount.String()) require.Equal(t, "stake", msg.Amount.Denom) require.Equal(t, types.TypeMsgUndelegate, msg.Type()) - require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) + require.Equal(t, "linkvaloper1tnh2q55v8wyygtt9srz5safamzdengsn8rx882", msg.ValidatorAddress) require.Len(t, futureOperations, 0) } @@ -251,12 +251,12 @@ func TestSimulateMsgBeginRedelegate(t *testing.T) { types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) require.True(t, operationMsg.OK) - require.Equal(t, "cosmos12gwd9jchc69wck8dhstxgwz3z8qs8yv67ps8mu", msg.DelegatorAddress) + require.Equal(t, "link12gwd9jchc69wck8dhstxgwz3z8qs8yv6t0s9q5", msg.DelegatorAddress) require.Equal(t, "489348507626016866", msg.Amount.Amount.String()) require.Equal(t, "stake", msg.Amount.Denom) require.Equal(t, types.TypeMsgBeginRedelegate, msg.Type()) - require.Equal(t, "cosmosvaloper1h6a7shta7jyc72hyznkys683z98z36e0zdk8g9", msg.ValidatorDstAddress) - require.Equal(t, "cosmosvaloper17s94pzwhsn4ah25tec27w70n65h5t2scgxzkv2", msg.ValidatorSrcAddress) + require.Equal(t, "linkvaloper1h6a7shta7jyc72hyznkys683z98z36e0qrqd3d", msg.ValidatorDstAddress) + require.Equal(t, "linkvaloper17s94pzwhsn4ah25tec27w70n65h5t2sc2g5u4z", msg.ValidatorSrcAddress) require.Len(t, futureOperations, 0) }