diff --git a/ignite/pkg/cosmosclient/cosmosclient_test.go b/ignite/pkg/cosmosclient/cosmosclient_test.go index dd4e5bc37f..3db293b6e1 100644 --- a/ignite/pkg/cosmosclient/cosmosclient_test.go +++ b/ignite/pkg/cosmosclient/cosmosclient_test.go @@ -430,13 +430,13 @@ func TestClientCreateTx(t *testing.T) { { name: "ok: with default values", msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectPrepareFactory(sdkaddr) }, @@ -447,13 +447,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithUseFaucet("localhost:1234", "", 0), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectMakeSureAccountHasToken(sdkaddr.String(), defaultFaucetMinAmount) @@ -466,13 +466,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithUseFaucet("localhost:1234", "", 0), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectMakeSureAccountHasToken(sdkaddr.String(), defaultFaucetMinAmount-1) s.expectPrepareFactory(sdkaddr) @@ -484,13 +484,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithFees("10token"), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[{"denom":"token","amount":"10"}],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[{"denom":"token","amount":"10"}],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectPrepareFactory(sdkaddr) }, @@ -502,13 +502,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithGasPrices("3token"), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[{"denom":"token","amount":"900000"}],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[{"denom":"token","amount":"900000"}],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectPrepareFactory(sdkaddr) }, @@ -521,8 +521,8 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithGasAdjustment(2.1), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), @@ -538,13 +538,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithGas(""), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"20042","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"20042","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectPrepareFactory(sdkaddr) s.gasometer.EXPECT(). @@ -558,13 +558,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithGas("auto"), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"20042","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"20042","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectPrepareFactory(sdkaddr) s.gasometer.EXPECT(). @@ -578,13 +578,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithGasAdjustment(2.4), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectPrepareFactory(sdkaddr) }, @@ -596,13 +596,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithGasAdjustment(0), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"20042","payer":"","granter":""},"tip":null},"signatures":[]} + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"20042","payer":"","granter":""},"tip":null},"signatures":[]} `, setup: func(s suite) { s.expectPrepareFactory(sdkaddr)