From 2c16cdd73ec97546b3df0626556466728b3c2857 Mon Sep 17 00:00:00 2001 From: Lockwarr Date: Wed, 16 Oct 2024 10:00:45 +0300 Subject: [PATCH] wip --- app/keepers/keepers.go | 28 ++-- proto/buf.lock | 4 +- proto/buf.yaml | 5 +- proto/nolus/contractmanager/failure.proto | 21 +++ proto/nolus/contractmanager/genesis.proto | 17 ++ proto/nolus/contractmanager/params.proto | 12 ++ proto/nolus/contractmanager/query.proto | 62 +++++++ proto/nolus/contractmanager/tx.proto | 45 +++++ proto/nolus/contractmanager/v1/failure.proto | 18 ++ proto/nolus/feerefunder/fee.proto | 35 ++++ proto/nolus/feerefunder/genesis.proto | 22 +++ proto/nolus/feerefunder/params.proto | 14 ++ proto/nolus/feerefunder/query.proto | 44 +++++ proto/nolus/feerefunder/tx.proto | 45 +++++ proto/nolus/interchainqueries/genesis.proto | 64 +++++++ proto/nolus/interchainqueries/params.proto | 26 +++ proto/nolus/interchainqueries/query.proto | 87 ++++++++++ proto/nolus/interchainqueries/tx.proto | 158 ++++++++++++++++++ proto/nolus/interchaintxs/v1/genesis.proto | 12 ++ proto/nolus/interchaintxs/v1/params.proto | 16 ++ proto/nolus/interchaintxs/v1/query.proto | 52 ++++++ proto/nolus/interchaintxs/v1/tx.proto | 102 +++++++++++ proto/nolus/transfer/v1/query.proto | 31 ++++ proto/nolus/transfer/v1/tx.proto | 81 +++++++++ testutil/contractmanager/network/network.go | 2 +- testutil/interchainqueries/network/network.go | 2 +- testutil/interchaintxs/network/network.go | 4 +- .../contractmanager/types/expected_keepers.go | 132 +++++++++++++++ .../mocks/interchainqueries/keeper/verify.go | 13 +- .../mocks/interchainqueries/types/verify.go | 107 ------------ .../interchaintxs/types/expected_keepers.go | 53 +++--- testutil/mocks/tax/types/expected_keepers.go | 5 +- .../mocks/transfer/types/expected_keepers.go | 35 ++-- testutil/test_helpers.go | 2 +- wasmbinding/message_plugin.go | 14 +- wasmbinding/query_plugin.go | 8 +- .../wasm/wasm/exclusive.lock | 3 + .../wasm/wasm/exclusive.lock | 3 + wasmbinding/wasm.go | 10 +- x/contractmanager/client/cli/query_failure.go | 2 +- x/contractmanager/ibc_middleware_test.go | 2 +- x/contractmanager/keeper/failure_test.go | 2 +- .../keeper/grpc_query_failure_test.go | 2 +- x/contractmanager/types/codec.go | 2 +- x/feerefunder/client/cli/query_test.go | 2 +- x/feerefunder/genesis_test.go | 4 +- x/feerefunder/types/codec.go | 2 +- x/feerefunder/types/genesis_test.go | 18 +- x/interchainqueries/genesis_test.go | 2 +- x/interchainqueries/keeper/grpc_query_test.go | 18 +- x/interchainqueries/keeper/keeper_test.go | 58 +++---- x/interchainqueries/keeper/msg_server.go | 4 +- .../keeper/process_block_results_test.go | 8 +- x/interchainqueries/types/types.go | 4 +- x/interchainqueries/types/types_test.go | 28 ++-- .../grpc_query_interchainaccount_test.go | 4 +- x/interchaintxs/keeper/ibc_handlers_test.go | 4 +- x/interchaintxs/keeper/msg_server_test.go | 2 +- x/interchaintxs/types/codec.go | 6 +- x/interchaintxs/types/tx.go | 2 +- x/interchaintxs/types/tx_test.go | 2 +- x/transfer/ibc_handlers_test.go | 4 +- x/transfer/keeper/keeper_test.go | 4 +- x/transfer/module.go | 16 +- x/transfer/types/codec.go | 2 +- x/transfer/types/tx.go | 6 +- 66 files changed, 1298 insertions(+), 306 deletions(-) create mode 100644 proto/nolus/contractmanager/failure.proto create mode 100644 proto/nolus/contractmanager/genesis.proto create mode 100644 proto/nolus/contractmanager/params.proto create mode 100644 proto/nolus/contractmanager/query.proto create mode 100644 proto/nolus/contractmanager/tx.proto create mode 100644 proto/nolus/contractmanager/v1/failure.proto create mode 100644 proto/nolus/feerefunder/fee.proto create mode 100644 proto/nolus/feerefunder/genesis.proto create mode 100644 proto/nolus/feerefunder/params.proto create mode 100644 proto/nolus/feerefunder/query.proto create mode 100644 proto/nolus/feerefunder/tx.proto create mode 100644 proto/nolus/interchainqueries/genesis.proto create mode 100644 proto/nolus/interchainqueries/params.proto create mode 100644 proto/nolus/interchainqueries/query.proto create mode 100644 proto/nolus/interchainqueries/tx.proto create mode 100644 proto/nolus/interchaintxs/v1/genesis.proto create mode 100644 proto/nolus/interchaintxs/v1/params.proto create mode 100644 proto/nolus/interchaintxs/v1/query.proto create mode 100644 proto/nolus/interchaintxs/v1/tx.proto create mode 100644 proto/nolus/transfer/v1/query.proto create mode 100644 proto/nolus/transfer/v1/tx.proto create mode 100644 testutil/mocks/contractmanager/types/expected_keepers.go delete mode 100644 testutil/mocks/interchainqueries/types/verify.go create mode 100644 wasmbinding/test/3803288148803275527/wasm/wasm/exclusive.lock create mode 100644 wasmbinding/test/5279269210049319441/wasm/wasm/exclusive.lock diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index a4940fb8..4b3ce9c1 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -75,20 +75,20 @@ import ( vestingskeeper "github.com/Nolus-Protocol/nolus-core/x/vestings/keeper" vestingstypes "github.com/Nolus-Protocol/nolus-core/x/vestings/types" - "github.com/neutron-org/neutron/v4/x/contractmanager" - contractmanagermodulekeeper "github.com/neutron-org/neutron/v4/x/contractmanager/keeper" - contractmanagermoduletypes "github.com/neutron-org/neutron/v4/x/contractmanager/types" - "github.com/neutron-org/neutron/v4/x/feerefunder" - feerefunderkeeper "github.com/neutron-org/neutron/v4/x/feerefunder/keeper" - feetypes "github.com/neutron-org/neutron/v4/x/feerefunder/types" - "github.com/neutron-org/neutron/v4/x/interchainqueries" - interchainquerieskeeper "github.com/neutron-org/neutron/v4/x/interchainqueries/keeper" - interchainqueriestypes "github.com/neutron-org/neutron/v4/x/interchainqueries/types" - "github.com/neutron-org/neutron/v4/x/interchaintxs" - interchaintxskeeper "github.com/neutron-org/neutron/v4/x/interchaintxs/keeper" - interchaintxstypes "github.com/neutron-org/neutron/v4/x/interchaintxs/types" - transferSudo "github.com/neutron-org/neutron/v4/x/transfer" - wrapkeeper "github.com/neutron-org/neutron/v4/x/transfer/keeper" + "github.com/Nolus-Protocol/nolus-core/x/contractmanager" + contractmanagermodulekeeper "github.com/Nolus-Protocol/nolus-core/x/contractmanager/keeper" + contractmanagermoduletypes "github.com/Nolus-Protocol/nolus-core/x/contractmanager/types" + "github.com/Nolus-Protocol/nolus-core/x/feerefunder" + feerefunderkeeper "github.com/Nolus-Protocol/nolus-core/x/feerefunder/keeper" + feetypes "github.com/Nolus-Protocol/nolus-core/x/feerefunder/types" + "github.com/Nolus-Protocol/nolus-core/x/interchainqueries" + interchainquerieskeeper "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/keeper" + interchainqueriestypes "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/types" + "github.com/Nolus-Protocol/nolus-core/x/interchaintxs" + interchaintxskeeper "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/keeper" + interchaintxstypes "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/types" + transferSudo "github.com/Nolus-Protocol/nolus-core/x/transfer" + wrapkeeper "github.com/Nolus-Protocol/nolus-core/x/transfer/keeper" ) type AppKeepers struct { diff --git a/proto/buf.lock b/proto/buf.lock index a73568a0..e5dfcc47 100644 --- a/proto/buf.lock +++ b/proto/buf.lock @@ -9,8 +9,8 @@ deps: - remote: buf.build owner: cosmos repository: cosmos-sdk - commit: 954f7b05f38440fc8250134b15adec47 - digest: shake256:2ab4404fd04a7d1d52df0e2d0f2d477a3d83ffd88d876957bf3fedfd702c8e52833d65b3ce1d89a3c5adf2aab512616b0e4f51d8463f07eda9a8a3317ee3ac54 + commit: 5a6ab7bc14314acaa912d5e53aef1c2f + digest: shake256:02c00c73493720055f9b57553a35b5550023a3c1914123b247956288a78fb913aff70e66552777ae14d759467e119079d484af081264a5dd607a94d9fbc8116b - remote: buf.build owner: cosmos repository: gogo-proto diff --git a/proto/buf.yaml b/proto/buf.yaml index 0fca49bd..c4aefe5d 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -1,10 +1,10 @@ -# cosmos-sdk pinned to v0.47.0 required for cosmos/gogoproto - https://github.com/cosmos/cosmos-sdk/blob/main/proto/README.md +# cosmos-sdk pinned to v0.50.0 required for cosmos/gogoproto - https://github.com/cosmos/cosmos-sdk/blob/main/proto/README.md version: v1 name: buf.build/Nolus-Protocol/nolus-core deps: - buf.build/cosmos/cosmos-proto - buf.build/cosmos/gogo-proto - - buf.build/cosmos/cosmos-sdk:v0.47.0 + - buf.build/cosmos/cosmos-sdk:v0.50.0 - buf.build/googleapis/googleapis - buf.build/cosmos/ibc breaking: @@ -21,6 +21,7 @@ lint: - SERVICE_SUFFIX - PACKAGE_VERSION_SUFFIX - RPC_REQUEST_STANDARD_NAME + - PACKAGE_DIRECTORY_MATCH ignore: - tendermint diff --git a/proto/nolus/contractmanager/failure.proto b/proto/nolus/contractmanager/failure.proto new file mode 100644 index 00000000..867ae5ec --- /dev/null +++ b/proto/nolus/contractmanager/failure.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package nolus.contractmanager; + +import "ibc/core/channel/v1/channel.proto"; + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/contractmanager/types"; + +// Failure message contains information about ACK failures and can be used to +// replay ACK in case of requirement. +// Note that Failure means that sudo handler to cosmwasm contract failed for +// some reason +message Failure { + // Address of the failed contract + string address = 1; + // Id of the failure under specific address + uint64 id = 2; + // Serialized MessageSudoCallback with Packet and Ack(if exists) + bytes sudo_payload = 3; + // Redacted error response of the sudo call. Full error is emitted as an event + string error = 4; +} diff --git a/proto/nolus/contractmanager/genesis.proto b/proto/nolus/contractmanager/genesis.proto new file mode 100644 index 00000000..aa96672c --- /dev/null +++ b/proto/nolus/contractmanager/genesis.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package nolus.contractmanager; + +import "gogoproto/gogo.proto"; +import "nolus/contractmanager/failure.proto"; +import "nolus/contractmanager/params.proto"; +// this line is used by starport scaffolding # genesis/proto/import + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/contractmanager/types"; + +// GenesisState defines the contractmanager module's genesis state. +message GenesisState { + Params params = 1 [(gogoproto.nullable) = false]; + // List of the contract failures + repeated Failure failures_list = 2 [(gogoproto.nullable) = false]; + // this line is used by starport scaffolding # genesis/proto/state +} diff --git a/proto/nolus/contractmanager/params.proto b/proto/nolus/contractmanager/params.proto new file mode 100644 index 00000000..5140d7ec --- /dev/null +++ b/proto/nolus/contractmanager/params.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package nolus.contractmanager; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/contractmanager/types"; + +// Params defines the parameters for the module. +message Params { + option (gogoproto.goproto_stringer) = false; + uint64 sudo_call_gas_limit = 1; +} diff --git a/proto/nolus/contractmanager/query.proto b/proto/nolus/contractmanager/query.proto new file mode 100644 index 00000000..c858cec2 --- /dev/null +++ b/proto/nolus/contractmanager/query.proto @@ -0,0 +1,62 @@ +syntax = "proto3"; +package nolus.contractmanager; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "nolus/contractmanager/failure.proto"; +import "nolus/contractmanager/params.proto"; +// this line is used by starport scaffolding # 1 + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/contractmanager/types"; + +// Query defines the gRPC querier service. +service Query { + // Parameters queries the parameters of the module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/nolus/contractmanager/params"; + } + + // Queries a Failure by contract address and failure ID. + rpc AddressFailure(QueryFailuresRequest) returns (QueryFailuresResponse) { + option (google.api.http).get = "/nolus/contractmanager/failures/{address}/{failure_id}"; + } + + // Queries Failures by contract address. + rpc AddressFailures(QueryFailuresRequest) returns (QueryFailuresResponse) { + option (google.api.http).get = "/nolus/contractmanager/failures/{address}"; + } + + // Queries a list of Failures occurred on the network. + rpc Failures(QueryFailuresRequest) returns (QueryFailuresResponse) { + option (google.api.http).get = "/nolus/contractmanager/failures"; + } + + // this line is used by starport scaffolding # 2 +} + +// QueryParamsRequest is request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // params holds all the parameters of this module. + Params params = 1 [(gogoproto.nullable) = false]; +} + +// QueryFailuresRequest is request type for the Query/Failures RPC method. +message QueryFailuresRequest { + // address of the contract which Sudo call failed. + string address = 1; + // ID of the failure for the given contract. + uint64 failure_id = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 3; +} + +// QueryFailuresResponse is response type for the Query/Failures RPC method. +message QueryFailuresResponse { + repeated Failure failures = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// this line is used by starport scaffolding # 3 diff --git a/proto/nolus/contractmanager/tx.proto b/proto/nolus/contractmanager/tx.proto new file mode 100644 index 00000000..78102ed2 --- /dev/null +++ b/proto/nolus/contractmanager/tx.proto @@ -0,0 +1,45 @@ +syntax = "proto3"; +package nolus.contractmanager; + +import "amino/amino.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "nolus/contractmanager/params.proto"; + +// this line is used by starport scaffolding # proto/tx/import + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/contractmanager/types"; + +// Msg defines the Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); + // this line is used by starport scaffolding # proto/tx/rpc +} + +// MsgUpdateParams is the MsgUpdateParams request type. +// +// Since: 0.47 +message MsgUpdateParams { + option (amino.name) = "contractmanager/MsgUpdateParams"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the x/contractmanager parameters to update. + // + // NOTE: All parameters must be supplied. + contractmanager.Params params = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: 0.47 +message MsgUpdateParamsResponse {} diff --git a/proto/nolus/contractmanager/v1/failure.proto b/proto/nolus/contractmanager/v1/failure.proto new file mode 100644 index 00000000..5b30723c --- /dev/null +++ b/proto/nolus/contractmanager/v1/failure.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +package nolus.contractmanager.v1; + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/contractmanager/types/v1"; + +// Deprecated. Used only for migration purposes. +message Failure { + // ChannelId + string channel_id = 1; + // Address of the failed contract + string address = 2; + // id of the failure under specific address + uint64 id = 3; + // ACK id to restore + uint64 ack_id = 4; + // Acknowledgement type + string ack_type = 5; +} diff --git a/proto/nolus/feerefunder/fee.proto b/proto/nolus/feerefunder/fee.proto new file mode 100644 index 00000000..adc6b1c9 --- /dev/null +++ b/proto/nolus/feerefunder/fee.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; +package nolus.feerefunder; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/feerefunder/types"; + +// Fee defines the ICS29 receive, acknowledgement and timeout fees +message Fee { + // the packet receive fee + repeated cosmos.base.v1beta1.Coin recv_fee = 1 [ + (gogoproto.moretags) = "yaml:\"recv_fee\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // the packet acknowledgement fee + repeated cosmos.base.v1beta1.Coin ack_fee = 2 [ + (gogoproto.moretags) = "yaml:\"ack_fee\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // the packet timeout fee + repeated cosmos.base.v1beta1.Coin timeout_fee = 3 [ + (gogoproto.moretags) = "yaml:\"timeout_fee\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +message PacketID { + string channel_id = 1; + string port_id = 2; + uint64 sequence = 3; +} diff --git a/proto/nolus/feerefunder/genesis.proto b/proto/nolus/feerefunder/genesis.proto new file mode 100644 index 00000000..f5f94265 --- /dev/null +++ b/proto/nolus/feerefunder/genesis.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package neutron.feerefunder; + +import "gogoproto/gogo.proto"; +import "neutron/feerefunder/fee.proto"; +import "neutron/feerefunder/params.proto"; +// this line is used by starport scaffolding # genesis/proto/import + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/feerefunder/types"; + +// GenesisState defines the fee module's genesis state. +message GenesisState { + Params params = 1 [(gogoproto.nullable) = false]; + repeated FeeInfo fee_infos = 2 [(gogoproto.nullable) = false]; + // this line is used by starport scaffolding # genesis/proto/state +} + +message FeeInfo { + string payer = 1; + PacketID packet_id = 2 [(gogoproto.nullable) = false]; + Fee fee = 3 [(gogoproto.nullable) = false]; +} diff --git a/proto/nolus/feerefunder/params.proto b/proto/nolus/feerefunder/params.proto new file mode 100644 index 00000000..fdf1d023 --- /dev/null +++ b/proto/nolus/feerefunder/params.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +package neutron.feerefunder; + +import "gogoproto/gogo.proto"; +import "neutron/feerefunder/fee.proto"; + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/feerefunder/types"; + +// Params defines the parameters for the module. +message Params { + option (gogoproto.goproto_stringer) = false; + + Fee min_fee = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/nolus/feerefunder/query.proto b/proto/nolus/feerefunder/query.proto new file mode 100644 index 00000000..1754b833 --- /dev/null +++ b/proto/nolus/feerefunder/query.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; +package nolus.feerefunder; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "nolus/feerefunder/genesis.proto"; +import "nolus/feerefunder/params.proto"; +// this line is used by starport scaffolding # 1 + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/feerefunder/types"; + +// Query defines the gRPC querier service. +service Query { + // Parameters queries the parameters of the module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/nolus/feerefunder/params"; + } + rpc FeeInfo(FeeInfoRequest) returns (FeeInfoResponse) { + option (google.api.http).get = "/nolus/feerefunder/info"; + } + // this line is used by starport scaffolding # 2 +} + +// QueryParamsRequest is request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // params holds all the parameters of this module. + Params params = 1 [(gogoproto.nullable) = false]; +} + +message FeeInfoRequest { + string channel_id = 1; + string port_id = 2; + uint64 sequence = 3; +} + +message FeeInfoResponse { + FeeInfo fee_info = 1; +} + +// this line is used by starport scaffolding # 3 diff --git a/proto/nolus/feerefunder/tx.proto b/proto/nolus/feerefunder/tx.proto new file mode 100644 index 00000000..8df9ab1f --- /dev/null +++ b/proto/nolus/feerefunder/tx.proto @@ -0,0 +1,45 @@ +syntax = "proto3"; +package nolus.feerefunder; + +import "amino/amino.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "nolus/feerefunder/params.proto"; + +// this line is used by starport scaffolding # proto/tx/import + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/feerefunder/types"; + +// Msg defines the Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); + // this line is used by starport scaffolding # proto/tx/rpc +} + +// MsgUpdateParams is the MsgUpdateParams request type. +// +// Since: 0.47 +message MsgUpdateParams { + option (amino.name) = "feerefunder/MsgUpdateParams"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the x/feerefunder parameters to update. + // + // NOTE: All parameters must be supplied. + feerefunder.Params params = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: 0.47 +message MsgUpdateParamsResponse {} diff --git a/proto/nolus/interchainqueries/genesis.proto b/proto/nolus/interchainqueries/genesis.proto new file mode 100644 index 00000000..554cc534 --- /dev/null +++ b/proto/nolus/interchainqueries/genesis.proto @@ -0,0 +1,64 @@ +syntax = "proto3"; +package nolus.interchainqueries; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "ibc/core/client/v1/client.proto"; +import "nolus/interchainqueries/params.proto"; + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/types"; + +message RegisteredQuery { + // The unique id of the registered query. + uint64 id = 1; + + // The address that registered the query. + string owner = 2; + + // The query type identifier: `kv` or `tx` now + string query_type = 3; + + // The KV-storage keys for which we want to get values from remote chain + repeated KVKey keys = 4; + + // The filter for transaction search ICQ + string transactions_filter = 5; + + // The IBC connection ID for getting ConsensusState to verify proofs + string connection_id = 6; + + // Parameter that defines how often the query must be updated. + uint64 update_period = 7; + + // The local chain last block height when the query result was updated. + uint64 last_submitted_result_local_height = 8; + + // The remote chain last block height when the query result was updated. + ibc.core.client.v1.Height last_submitted_result_remote_height = 9; + + // Amount of coins deposited for the query. + repeated cosmos.base.v1beta1.Coin deposit = 10 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; + + // Timeout before query becomes available for everybody to remove. + uint64 submit_timeout = 11; + + // The local chain height when the query was registered. + uint64 registered_at_height = 12; +} + +message KVKey { + // Path (storage prefix) to the storage where you want to read value by key + // (usually name of cosmos-sdk module: 'staking', 'bank', etc.) + string path = 1; + // Key you want to read from the storage + bytes key = 2; +} + +// GenesisState defines the interchainqueries module's genesis state. +message GenesisState { + Params params = 1 [(gogoproto.nullable) = false]; + repeated RegisteredQuery registered_queries = 2; +} diff --git a/proto/nolus/interchainqueries/params.proto b/proto/nolus/interchainqueries/params.proto new file mode 100644 index 00000000..de20ebd5 --- /dev/null +++ b/proto/nolus/interchainqueries/params.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package nolus.interchainqueries; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/types"; + +// Params defines the parameters for the module. +message Params { + option (gogoproto.goproto_stringer) = false; + // Defines amount of blocks required before query becomes available for + // removal by anybody + uint64 query_submit_timeout = 1; + + // Amount of coins deposited for the query. + repeated cosmos.base.v1beta1.Coin query_deposit = 2 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; + + // Amount of tx hashes to be removed during a single EndBlock. Can vary to + // balance between network cleaning speed and EndBlock duration. A zero value + // means no limit. + uint64 tx_query_removal_limit = 3; +} diff --git a/proto/nolus/interchainqueries/query.proto b/proto/nolus/interchainqueries/query.proto new file mode 100644 index 00000000..d3b4f581 --- /dev/null +++ b/proto/nolus/interchainqueries/query.proto @@ -0,0 +1,87 @@ +syntax = "proto3"; +package nolus.interchainqueries; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "nolus/interchainqueries/genesis.proto"; +import "nolus/interchainqueries/params.proto"; +import "nolus/interchainqueries/tx.proto"; + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/types"; + +// Query defines the gRPC querier service. +service Query { + // Parameters queries the parameters of the module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/nolus/interchainqueries/params"; + } + + rpc RegisteredQueries(QueryRegisteredQueriesRequest) returns (QueryRegisteredQueriesResponse) { + option (google.api.http).get = "/nolus/interchainqueries/registered_queries"; + } + + rpc RegisteredQuery(QueryRegisteredQueryRequest) returns (QueryRegisteredQueryResponse) { + option (google.api.http).get = "/nolus/interchainqueries/registered_query"; + } + + rpc QueryResult(QueryRegisteredQueryResultRequest) returns (QueryRegisteredQueryResultResponse) { + option (google.api.http).get = "/nolus/interchainqueries/query_result"; + } + + rpc LastRemoteHeight(QueryLastRemoteHeight) returns (QueryLastRemoteHeightResponse) { + option (google.api.http).get = "/nolus/interchainqueries/remote_height"; + } +} + +// QueryParamsRequest is request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // params holds all the parameters of this module. + Params params = 1 [(gogoproto.nullable) = false]; +} + +message QueryRegisteredQueriesRequest { + repeated string owners = 1; + string connection_id = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 3; +} + +message QueryRegisteredQueriesResponse { + repeated RegisteredQuery registered_queries = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryRegisteredQueryRequest { + uint64 query_id = 1; +} + +message QueryRegisteredQueryResponse { + RegisteredQuery registered_query = 1; +} + +message QueryRegisteredQueryResultRequest { + uint64 query_id = 1; +} + +message QueryRegisteredQueryResultResponse { + QueryResult result = 1; +} + +message Transaction { + uint64 id = 1; + uint64 height = 2; + bytes data = 3; +} + +message QueryLastRemoteHeight { + string connection_id = 1; +} + +message QueryLastRemoteHeightResponse { + uint64 height = 1; +} diff --git a/proto/nolus/interchainqueries/tx.proto b/proto/nolus/interchainqueries/tx.proto new file mode 100644 index 00000000..c2036178 --- /dev/null +++ b/proto/nolus/interchainqueries/tx.proto @@ -0,0 +1,158 @@ +syntax = "proto3"; +package nolus.interchainqueries; + +import "amino/amino.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "nolus/interchainqueries/genesis.proto"; +import "nolus/interchainqueries/params.proto"; +import "tendermint/abci/types.proto"; +import "tendermint/crypto/proof.proto"; + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/types"; + +// Msg defines the Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + rpc RegisterInterchainQuery(MsgRegisterInterchainQuery) returns (MsgRegisterInterchainQueryResponse); + rpc SubmitQueryResult(MsgSubmitQueryResult) returns (MsgSubmitQueryResultResponse); + rpc RemoveInterchainQuery(MsgRemoveInterchainQueryRequest) returns (MsgRemoveInterchainQueryResponse); + rpc UpdateInterchainQuery(MsgUpdateInterchainQueryRequest) returns (MsgUpdateInterchainQueryResponse); + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); +} + +message MsgRegisterInterchainQuery { + option (cosmos.msg.v1.signer) = "sender"; + + // defines a query type: `kv` or `tx` now + string query_type = 1; + + // is used to define KV-storage keys for which we want to get values from + // remote chain + repeated KVKey keys = 2; + + // is used to define a filter for transaction search ICQ + string transactions_filter = 3; + + // is IBC connection ID for getting ConsensusState to verify proofs + string connection_id = 4; + + // is used to specify how often (in nolus blocks) the query must be updated + uint64 update_period = 5; + + // is the signer of the message + string sender = 6; +} + +message MsgRegisterInterchainQueryResponse { + uint64 id = 1; +} + +message MsgSubmitQueryResult { + option (cosmos.msg.v1.signer) = "sender"; + + uint64 query_id = 1; + string sender = 2; + + // is the IBC client ID for an IBC connection between nolus chain and target + // chain (where the result was obtained from) + string client_id = 3; + QueryResult result = 4; +} + +message QueryResult { + repeated StorageValue kv_results = 1; + Block block = 2; + uint64 height = 3; + uint64 revision = 4; + bool allow_kv_callbacks = 5; +} + +message StorageValue { + // is the substore name (acc, staking, etc.) + string storage_prefix = 1; + + // is the key in IAVL store + bytes key = 2; + + // is the value in IAVL store + bytes value = 3; + + // is the Merkle Proof which proves existence of key-value pair in IAVL + // storage + tendermint.crypto.ProofOps Proof = 4; +} + +message Block { + // We need to know block X+1 to verify response of transaction for block X + // since LastResultsHash is root hash of all results from the txs from the + // previous block + google.protobuf.Any next_block_header = 1; + + // We need to know block X to verify inclusion of transaction for block X + google.protobuf.Any header = 2; + + TxValue tx = 3; +} + +message TxValue { + tendermint.abci.ExecTxResult response = 1; + + // is the Merkle Proof which proves existence of response in block with height + // next_block_header.Height + tendermint.crypto.Proof delivery_proof = 2; + + // is the Merkle Proof which proves existence of data in block with height + // header.Height + tendermint.crypto.Proof inclusion_proof = 3; + + // is body of the transaction + bytes data = 4; +} + +message MsgSubmitQueryResultResponse {} + +message MsgRemoveInterchainQueryRequest { + option (cosmos.msg.v1.signer) = "sender"; + uint64 query_id = 1; + string sender = 2; // is the signer of the message +} +message MsgRemoveInterchainQueryResponse {} + +message MsgUpdateInterchainQueryRequest { + option (cosmos.msg.v1.signer) = "sender"; + uint64 query_id = 1; + repeated KVKey new_keys = 2; + uint64 new_update_period = 3; + string new_transactions_filter = 4; + string sender = 5; // is the signer of the message +} +message MsgUpdateInterchainQueryResponse {} + +// MsgUpdateParams is the MsgUpdateParams request type. +// +// Since: 0.47 +message MsgUpdateParams { + option (amino.name) = "interchainqueries/MsgUpdateParams"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the x/interchainqueries parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: 0.47 +message MsgUpdateParamsResponse {} diff --git a/proto/nolus/interchaintxs/v1/genesis.proto b/proto/nolus/interchaintxs/v1/genesis.proto new file mode 100644 index 00000000..4d0910ea --- /dev/null +++ b/proto/nolus/interchaintxs/v1/genesis.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package nolus.interchaintxs.v1; + +import "gogoproto/gogo.proto"; +import "nolus/interchaintxs/v1/params.proto"; + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/types"; + +// GenesisState defines the interchaintxs module's genesis state. +message GenesisState { + Params params = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/nolus/interchaintxs/v1/params.proto b/proto/nolus/interchaintxs/v1/params.proto new file mode 100644 index 00000000..f87cdfc5 --- /dev/null +++ b/proto/nolus/interchaintxs/v1/params.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package nolus.interchaintxs.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/types"; + +// Params defines the parameters for the module. +message Params { + option (gogoproto.goproto_stringer) = false; + // Defines maximum amount of messages to be passed in MsgSubmitTx + uint64 msg_submit_tx_max_messages = 1; + // Defines a minimum fee required to register interchain account + repeated cosmos.base.v1beta1.Coin register_fee = 2 [(gogoproto.nullable) = false]; +} diff --git a/proto/nolus/interchaintxs/v1/query.proto b/proto/nolus/interchaintxs/v1/query.proto new file mode 100644 index 00000000..f2218ed8 --- /dev/null +++ b/proto/nolus/interchaintxs/v1/query.proto @@ -0,0 +1,52 @@ +syntax = "proto3"; +package nolus.interchaintxs.v1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "nolus/interchaintxs/v1/params.proto"; + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/types"; + +// Query defines the gRPC querier service. +service Query { + // Parameters queries the parameters of the module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/nolus/interchaintxs/params"; + } + rpc InterchainAccountAddress(QueryInterchainAccountAddressRequest) returns (QueryInterchainAccountAddressResponse) { + option (google.api.http).get = + "/nolus/interchaintxs/{owner_address}/{interchain_account_id}/" + "{connection_id}/interchain_account_address"; + } +} + +// QueryParamsRequest is request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // params holds all the parameters of this module. + Params params = 1 [(gogoproto.nullable) = false]; +} + +message QueryInterchainAccountAddressRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // owner_address is the owner of the interchain account on the controller + // chain + string owner_address = 1; + // interchain_account_id is an identifier of your interchain account from + // which you want to execute msgs + string interchain_account_id = 2; + // connection_id is an IBC connection identifier between nolus and remote + // chain + string connection_id = 3; +} + +// Query response for an interchain account address +message QueryInterchainAccountAddressResponse { + // The corresponding interchain account address on the host chain + string interchain_account_address = 1; +} diff --git a/proto/nolus/interchaintxs/v1/tx.proto b/proto/nolus/interchaintxs/v1/tx.proto new file mode 100644 index 00000000..a79e14b3 --- /dev/null +++ b/proto/nolus/interchaintxs/v1/tx.proto @@ -0,0 +1,102 @@ +syntax = "proto3"; +package nolus.interchaintxs.v1; + +import "amino/amino.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "google/api/http.proto"; +import "google/protobuf/any.proto"; +import "nolus/feerefunder/fee.proto"; +import "nolus/interchaintxs/v1/params.proto"; + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/types"; + +// Msg defines the Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + rpc RegisterInterchainAccount(MsgRegisterInterchainAccount) returns (MsgRegisterInterchainAccountResponse) {} + rpc SubmitTx(MsgSubmitTx) returns (MsgSubmitTxResponse) {} + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); +} + +// MsgRegisterInterchainAccount is used to register an account on a remote zone. +message MsgRegisterInterchainAccount { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "from_address"; + + string from_address = 1; + string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + string interchain_account_id = 3 [(gogoproto.moretags) = "yaml:\"interchain_account_id\""]; + repeated cosmos.base.v1beta1.Coin register_fee = 4 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// MsgRegisterInterchainAccountResponse is the response type for +// MsgRegisterInterchainAccount. +message MsgRegisterInterchainAccountResponse { + option (gogoproto.goproto_getters) = false; + + string channel_id = 1; + string port_id = 2; +} + +// MsgSubmitTx defines the payload for Msg/SubmitTx +message MsgSubmitTx { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "from_address"; + + string from_address = 1; + // interchain_account_id is supposed to be the unique identifier, e.g., + // lido/kava. This allows contracts to have more than one interchain accounts + // on remote zone This identifier will be a part of the portID that we'll + // claim our capability for. + string interchain_account_id = 2; + string connection_id = 3; + repeated google.protobuf.Any msgs = 4; + string memo = 5; + // timeout in seconds after which the packet times out + uint64 timeout = 6; + + nolus.feerefunder.Fee fee = 7 [(gogoproto.nullable) = false]; +} + +// MsgSubmitTxResponse defines the response for Msg/SubmitTx +message MsgSubmitTxResponse { + // channel's sequence_id for outgoing ibc packet. Unique per a channel. + uint64 sequence_id = 1; + // channel src channel on nolus side transaction was submitted from + string channel = 2; +} + +// MsgUpdateParams is the MsgUpdateParams request type. +// +// Since: 0.47 +message MsgUpdateParams { + option (amino.name) = "interchaintxs/MsgUpdateParams"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the x/interchaintxs parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: 0.47 +message MsgUpdateParamsResponse {} diff --git a/proto/nolus/transfer/v1/query.proto b/proto/nolus/transfer/v1/query.proto new file mode 100644 index 00000000..f4386281 --- /dev/null +++ b/proto/nolus/transfer/v1/query.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package nolus.transfer; + +import "google/api/annotations.proto"; +import "ibc/applications/transfer/v1/query.proto"; + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/transfer/types"; + +// Query provides defines the gRPC querier service. +service Query { + // DenomTrace queries a denomination trace information. + rpc DenomTrace(ibc.applications.transfer.v1.QueryDenomTraceRequest) returns (ibc.applications.transfer.v1.QueryDenomTraceResponse) { + option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces/{hash}"; + } + + // DenomTraces queries all denomination traces. + rpc DenomTraces(ibc.applications.transfer.v1.QueryDenomTracesRequest) returns (ibc.applications.transfer.v1.QueryDenomTracesResponse) { + option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces"; + } + + // Params queries all parameters of the ibc-transfer module. + rpc Params(ibc.applications.transfer.v1.QueryParamsRequest) returns (ibc.applications.transfer.v1.QueryParamsResponse) { + option (google.api.http).get = "/ibc/apps/transfer/v1/params"; + } + + // DenomHash queries a denomination hash information. + rpc DenomHash(ibc.applications.transfer.v1.QueryDenomHashRequest) returns (ibc.applications.transfer.v1.QueryDenomHashResponse) { + option (google.api.http).get = "/ibc/apps/transfer/v1/denom_hashes/{trace}"; + } +} diff --git a/proto/nolus/transfer/v1/tx.proto b/proto/nolus/transfer/v1/tx.proto new file mode 100644 index 00000000..1cd84a96 --- /dev/null +++ b/proto/nolus/transfer/v1/tx.proto @@ -0,0 +1,81 @@ +syntax = "proto3"; + +package nolus.transfer; + +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/msg/v1/msg.proto"; +import "gogoproto/gogo.proto"; +import "ibc/applications/transfer/v1/transfer.proto"; +import "ibc/core/client/v1/client.proto"; +import "nolus/feerefunder/fee.proto"; + +option go_package = "github.com/Nolus-Protocol/nolus-core/x/transfer/types"; + +// Msg defines the ibc/transfer Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + // Transfer defines a rpc handler method for MsgTransfer. + rpc Transfer(MsgTransfer) returns (MsgTransferResponse); + + // UpdateParams defines a rpc handler for MsgUpdateParams. + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); +} + +message MsgTransfer { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "sender"; + + // the port on which the packet will be sent + string source_port = 1 [(gogoproto.moretags) = "yaml:\"source_port\""]; + // the channel by which the packet will be sent + string source_channel = 2 [(gogoproto.moretags) = "yaml:\"source_channel\""]; + // the tokens to be transferred + cosmos.base.v1beta1.Coin token = 3 [(gogoproto.nullable) = false]; + // the sender address + string sender = 4; + // the recipient address on the destination chain + string receiver = 5; + // Timeout height relative to the current block height. + // The timeout is disabled when set to 0. + ibc.core.client.v1.Height timeout_height = 6 [ + (gogoproto.moretags) = "yaml:\"timeout_height\"", + (gogoproto.nullable) = false + ]; + // Timeout timestamp in absolute nanoseconds since unix epoch. + // The timeout is disabled when set to 0. + uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; + + string memo = 8; + + nolus.feerefunder.Fee fee = 9 [(gogoproto.nullable) = false]; +} + +// MsgTransferResponse is the modified response type for +// ibc-go MsgTransfer. +message MsgTransferResponse { + // channel's sequence_id for outgoing ibc packet. Unique per a channel. + uint64 sequence_id = 1; + // channel src channel on nolus side transaction was submitted from + string channel = 2; +} + +// MsgUpdateParams is the Msg/UpdateParams request type. +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "signer"; + + option (gogoproto.goproto_getters) = false; + + // signer address + string signer = 1; + + // params defines the transfer parameters to update. + // + // NOTE: All parameters must be supplied. + ibc.applications.transfer.v1.Params params = 2 [(gogoproto.nullable) = false]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +message MsgUpdateParamsResponse {} diff --git a/testutil/contractmanager/network/network.go b/testutil/contractmanager/network/network.go index 006d6991..9d256b6a 100644 --- a/testutil/contractmanager/network/network.go +++ b/testutil/contractmanager/network/network.go @@ -80,7 +80,7 @@ func DefaultConfig() network.Config { GenesisState: app.ModuleBasics.DefaultGenesis(encoding.Marshaler), TimeoutCommit: 2 * time.Second, ChainID: chainID, - // Some changes are introduced to make the tests run as if neutron is a standalone chain. + // Some changes are introduced to make the tests run as if nolus is a standalone chain. // This will only work if NumValidators is set to 1. NumValidators: 1, BondDenom: params.DefaultBondDenom, diff --git a/testutil/interchainqueries/network/network.go b/testutil/interchainqueries/network/network.go index 29f3b738..92bac3b3 100644 --- a/testutil/interchainqueries/network/network.go +++ b/testutil/interchainqueries/network/network.go @@ -80,7 +80,7 @@ func DefaultConfig() network.Config { GenesisState: app.ModuleBasics.DefaultGenesis(encoding.Marshaler), TimeoutCommit: 2 * time.Second, ChainID: chainID, - // Some changes are introduced to make the tests run as if neutron is a standalone chain. + // Some changes are introduced to make the tests run as if nolus is a standalone chain. // This will only work if NumValidators is set to 1. NumValidators: 1, BondDenom: params.DefaultBondDenom, diff --git a/testutil/interchaintxs/network/network.go b/testutil/interchaintxs/network/network.go index 29f3b738..31510e78 100644 --- a/testutil/interchaintxs/network/network.go +++ b/testutil/interchaintxs/network/network.go @@ -58,7 +58,7 @@ func DefaultConfig() network.Config { app.ModuleBasics[genutiltypes.ModuleName] = genutil.AppModuleBasic{} app.ModuleBasics[stakingtypes.ModuleName] = staking.AppModuleBasic{} - encoding := app.MakeEncodingConfig() + encoding := app.MakeEncodingConfig(app.ModuleBasics) chainID := "chain-" + tmrand.NewRand().Str(6) return network.Config{ Codec: encoding.Marshaler, @@ -80,7 +80,7 @@ func DefaultConfig() network.Config { GenesisState: app.ModuleBasics.DefaultGenesis(encoding.Marshaler), TimeoutCommit: 2 * time.Second, ChainID: chainID, - // Some changes are introduced to make the tests run as if neutron is a standalone chain. + // Some changes are introduced to make the tests run as if nolus is a standalone chain. // This will only work if NumValidators is set to 1. NumValidators: 1, BondDenom: params.DefaultBondDenom, diff --git a/testutil/mocks/contractmanager/types/expected_keepers.go b/testutil/mocks/contractmanager/types/expected_keepers.go new file mode 100644 index 00000000..7c0491ea --- /dev/null +++ b/testutil/mocks/contractmanager/types/expected_keepers.go @@ -0,0 +1,132 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: ./../../x/contractmanager/types/expected_keepers.go + +// Package mock_types is a generated GoMock package. +package mock_types + +import ( + context "context" + reflect "reflect" + + types "github.com/CosmWasm/wasmd/x/wasm/types" + types0 "github.com/Nolus-Protocol/nolus-core/x/contractmanager/types" + types1 "github.com/cosmos/cosmos-sdk/types" + gomock "github.com/golang/mock/gomock" +) + +// MockWasmKeeper is a mock of WasmKeeper interface. +type MockWasmKeeper struct { + ctrl *gomock.Controller + recorder *MockWasmKeeperMockRecorder +} + +// MockWasmKeeperMockRecorder is the mock recorder for MockWasmKeeper. +type MockWasmKeeperMockRecorder struct { + mock *MockWasmKeeper +} + +// NewMockWasmKeeper creates a new mock instance. +func NewMockWasmKeeper(ctrl *gomock.Controller) *MockWasmKeeper { + mock := &MockWasmKeeper{ctrl: ctrl} + mock.recorder = &MockWasmKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockWasmKeeper) EXPECT() *MockWasmKeeperMockRecorder { + return m.recorder +} + +// GetContractInfo mocks base method. +func (m *MockWasmKeeper) GetContractInfo(ctx context.Context, contractAddress types1.AccAddress) *types.ContractInfo { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetContractInfo", ctx, contractAddress) + ret0, _ := ret[0].(*types.ContractInfo) + return ret0 +} + +// GetContractInfo indicates an expected call of GetContractInfo. +func (mr *MockWasmKeeperMockRecorder) GetContractInfo(ctx, contractAddress interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContractInfo", reflect.TypeOf((*MockWasmKeeper)(nil).GetContractInfo), ctx, contractAddress) +} + +// HasContractInfo mocks base method. +func (m *MockWasmKeeper) HasContractInfo(ctx context.Context, contractAddress types1.AccAddress) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "HasContractInfo", ctx, contractAddress) + ret0, _ := ret[0].(bool) + return ret0 +} + +// HasContractInfo indicates an expected call of HasContractInfo. +func (mr *MockWasmKeeperMockRecorder) HasContractInfo(ctx, contractAddress interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasContractInfo", reflect.TypeOf((*MockWasmKeeper)(nil).HasContractInfo), ctx, contractAddress) +} + +// Sudo mocks base method. +func (m *MockWasmKeeper) Sudo(ctx context.Context, contractAddress types1.AccAddress, msg []byte) ([]byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Sudo", ctx, contractAddress, msg) + ret0, _ := ret[0].([]byte) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Sudo indicates an expected call of Sudo. +func (mr *MockWasmKeeperMockRecorder) Sudo(ctx, contractAddress, msg interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sudo", reflect.TypeOf((*MockWasmKeeper)(nil).Sudo), ctx, contractAddress, msg) +} + +// MockContractManagerKeeper is a mock of ContractManagerKeeper interface. +type MockContractManagerKeeper struct { + ctrl *gomock.Controller + recorder *MockContractManagerKeeperMockRecorder +} + +// MockContractManagerKeeperMockRecorder is the mock recorder for MockContractManagerKeeper. +type MockContractManagerKeeperMockRecorder struct { + mock *MockContractManagerKeeper +} + +// NewMockContractManagerKeeper creates a new mock instance. +func NewMockContractManagerKeeper(ctrl *gomock.Controller) *MockContractManagerKeeper { + mock := &MockContractManagerKeeper{ctrl: ctrl} + mock.recorder = &MockContractManagerKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockContractManagerKeeper) EXPECT() *MockContractManagerKeeperMockRecorder { + return m.recorder +} + +// AddContractFailure mocks base method. +func (m *MockContractManagerKeeper) AddContractFailure(ctx context.Context, address string, sudoPayload []byte, errMsg string) types0.Failure { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AddContractFailure", ctx, address, sudoPayload, errMsg) + ret0, _ := ret[0].(types0.Failure) + return ret0 +} + +// AddContractFailure indicates an expected call of AddContractFailure. +func (mr *MockContractManagerKeeperMockRecorder) AddContractFailure(ctx, address, sudoPayload, errMsg interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddContractFailure", reflect.TypeOf((*MockContractManagerKeeper)(nil).AddContractFailure), ctx, address, sudoPayload, errMsg) +} + +// GetParams mocks base method. +func (m *MockContractManagerKeeper) GetParams(ctx context.Context) types0.Params { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetParams", ctx) + ret0, _ := ret[0].(types0.Params) + return ret0 +} + +// GetParams indicates an expected call of GetParams. +func (mr *MockContractManagerKeeperMockRecorder) GetParams(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetParams", reflect.TypeOf((*MockContractManagerKeeper)(nil).GetParams), ctx) +} diff --git a/testutil/mocks/interchainqueries/keeper/verify.go b/testutil/mocks/interchainqueries/keeper/verify.go index e5f90ace..571f0026 100644 --- a/testutil/mocks/interchainqueries/keeper/verify.go +++ b/testutil/mocks/interchainqueries/keeper/verify.go @@ -7,14 +7,13 @@ package mock_types import ( reflect "reflect" - types "github.com/cosmos/cosmos-sdk/codec/types" - types0 "github.com/cosmos/cosmos-sdk/types" + types "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/types" + types0 "github.com/cosmos/cosmos-sdk/codec/types" + types1 "github.com/cosmos/cosmos-sdk/types" keeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" exported "github.com/cosmos/ibc-go/v8/modules/core/exported" tendermint "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" gomock "github.com/golang/mock/gomock" - - types1 "github.com/neutron-org/neutron/v4/x/interchainqueries/types" ) // MockHeaderVerifier is a mock of HeaderVerifier interface. @@ -41,7 +40,7 @@ func (m *MockHeaderVerifier) EXPECT() *MockHeaderVerifierMockRecorder { } // UnpackHeader mocks base method. -func (m *MockHeaderVerifier) UnpackHeader(any *types.Any) (exported.ClientMessage, error) { +func (m *MockHeaderVerifier) UnpackHeader(any *types0.Any) (exported.ClientMessage, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UnpackHeader", any) ret0, _ := ret[0].(exported.ClientMessage) @@ -56,7 +55,7 @@ func (mr *MockHeaderVerifierMockRecorder) UnpackHeader(any interface{}) *gomock. } // VerifyHeaders mocks base method. -func (m *MockHeaderVerifier) VerifyHeaders(ctx types0.Context, cleintkeeper keeper.Keeper, clientID string, header, nextHeader exported.ClientMessage) error { +func (m *MockHeaderVerifier) VerifyHeaders(ctx types1.Context, cleintkeeper keeper.Keeper, clientID string, header, nextHeader exported.ClientMessage) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "VerifyHeaders", ctx, cleintkeeper, clientID, header, nextHeader) ret0, _ := ret[0].(error) @@ -93,7 +92,7 @@ func (m *MockTransactionVerifier) EXPECT() *MockTransactionVerifierMockRecorder } // VerifyTransaction mocks base method. -func (m *MockTransactionVerifier) VerifyTransaction(header, nextHeader *tendermint.Header, tx *types1.TxValue) error { +func (m *MockTransactionVerifier) VerifyTransaction(header, nextHeader *tendermint.Header, tx *types.TxValue) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "VerifyTransaction", header, nextHeader, tx) ret0, _ := ret[0].(error) diff --git a/testutil/mocks/interchainqueries/types/verify.go b/testutil/mocks/interchainqueries/types/verify.go deleted file mode 100644 index 7289f3c0..00000000 --- a/testutil/mocks/interchainqueries/types/verify.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: x/interchainqueries/types/verify.go - -// Package mock_types is a generated GoMock package. -package mock_types - -import ( - reflect "reflect" - - types "github.com/cosmos/cosmos-sdk/codec/types" - types0 "github.com/cosmos/cosmos-sdk/types" - keeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" - exported "github.com/cosmos/ibc-go/v8/modules/core/exported" - types1 "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" - gomock "github.com/golang/mock/gomock" - - types2 "github.com/neutron-org/neutron/v4/x/interchainqueries/types" -) - -// MockHeaderVerifier is a mock of HeaderVerifier interface. -type MockHeaderVerifier struct { - ctrl *gomock.Controller - recorder *MockHeaderVerifierMockRecorder -} - -// MockHeaderVerifierMockRecorder is the mock recorder for MockHeaderVerifier. -type MockHeaderVerifierMockRecorder struct { - mock *MockHeaderVerifier -} - -// NewMockHeaderVerifier creates a new mock instance. -func NewMockHeaderVerifier(ctrl *gomock.Controller) *MockHeaderVerifier { - mock := &MockHeaderVerifier{ctrl: ctrl} - mock.recorder = &MockHeaderVerifierMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockHeaderVerifier) EXPECT() *MockHeaderVerifierMockRecorder { - return m.recorder -} - -// UnpackHeader mocks base method. -func (m *MockHeaderVerifier) UnpackHeader(any *types.Any) (exported.ClientMessage, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UnpackHeader", any) - ret0, _ := ret[0].(exported.ClientMessage) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// UnpackHeader indicates an expected call of UnpackHeader. -func (mr *MockHeaderVerifierMockRecorder) UnpackHeader(any interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpackHeader", reflect.TypeOf((*MockHeaderVerifier)(nil).UnpackHeader), any) -} - -// VerifyHeaders mocks base method. -func (m *MockHeaderVerifier) VerifyHeaders(ctx types0.Context, cleintkeeper keeper.Keeper, clientID string, header, nextHeader exported.ClientMessage) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "VerifyHeaders", ctx, cleintkeeper, clientID, header, nextHeader) - ret0, _ := ret[0].(error) - return ret0 -} - -// VerifyHeaders indicates an expected call of VerifyHeaders. -func (mr *MockHeaderVerifierMockRecorder) VerifyHeaders(ctx, cleintkeeper, clientID, header, nextHeader interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyHeaders", reflect.TypeOf((*MockHeaderVerifier)(nil).VerifyHeaders), ctx, cleintkeeper, clientID, header, nextHeader) -} - -// MockTransactionVerifier is a mock of TransactionVerifier interface. -type MockTransactionVerifier struct { - ctrl *gomock.Controller - recorder *MockTransactionVerifierMockRecorder -} - -// MockTransactionVerifierMockRecorder is the mock recorder for MockTransactionVerifier. -type MockTransactionVerifierMockRecorder struct { - mock *MockTransactionVerifier -} - -// NewMockTransactionVerifier creates a new mock instance. -func NewMockTransactionVerifier(ctrl *gomock.Controller) *MockTransactionVerifier { - mock := &MockTransactionVerifier{ctrl: ctrl} - mock.recorder = &MockTransactionVerifierMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockTransactionVerifier) EXPECT() *MockTransactionVerifierMockRecorder { - return m.recorder -} - -// VerifyTransaction mocks base method. -func (m *MockTransactionVerifier) VerifyTransaction(header, nextHeader *types1.Header, tx *types2.TxValue) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "VerifyTransaction", header, nextHeader, tx) - ret0, _ := ret[0].(error) - return ret0 -} - -// VerifyTransaction indicates an expected call of VerifyTransaction. -func (mr *MockTransactionVerifierMockRecorder) VerifyTransaction(header, nextHeader, tx interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyTransaction", reflect.TypeOf((*MockTransactionVerifier)(nil).VerifyTransaction), header, nextHeader, tx) -} diff --git a/testutil/mocks/interchaintxs/types/expected_keepers.go b/testutil/mocks/interchaintxs/types/expected_keepers.go index 68866d0b..4956f462 100644 --- a/testutil/mocks/interchaintxs/types/expected_keepers.go +++ b/testutil/mocks/interchaintxs/types/expected_keepers.go @@ -9,13 +9,12 @@ import ( reflect "reflect" types "github.com/CosmWasm/wasmd/x/wasm/types" - types0 "github.com/cosmos/cosmos-sdk/types" - types1 "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" - types2 "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" + types0 "github.com/Nolus-Protocol/nolus-core/x/feerefunder/types" + types1 "github.com/cosmos/cosmos-sdk/types" + types2 "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" + types3 "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" exported "github.com/cosmos/ibc-go/v8/modules/core/exported" gomock "github.com/golang/mock/gomock" - - types3 "github.com/neutron-org/neutron/v4/x/feerefunder/types" ) // MockAccountKeeper is a mock of AccountKeeper interface. @@ -42,10 +41,10 @@ func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { } // GetAccount mocks base method. -func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types0.AccAddress) types0.AccountI { +func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types1.AccAddress) types1.AccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAccount", ctx, addr) - ret0, _ := ret[0].(types0.AccountI) + ret0, _ := ret[0].(types1.AccountI) return ret0 } @@ -79,7 +78,7 @@ func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { } // SendCoins mocks base method. -func (m *MockBankKeeper) SendCoins(ctx context.Context, fromAddr, toAddr types0.AccAddress, amt types0.Coins) error { +func (m *MockBankKeeper) SendCoins(ctx context.Context, fromAddr, toAddr types1.AccAddress, amt types1.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendCoins", ctx, fromAddr, toAddr, amt) ret0, _ := ret[0].(error) @@ -93,10 +92,10 @@ func (mr *MockBankKeeperMockRecorder) SendCoins(ctx, fromAddr, toAddr, amt inter } // SpendableCoins mocks base method. -func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types0.AccAddress) types0.Coins { +func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types1.AccAddress) types1.Coins { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SpendableCoins", ctx, addr) - ret0, _ := ret[0].(types0.Coins) + ret0, _ := ret[0].(types1.Coins) return ret0 } @@ -130,7 +129,7 @@ func (m *MockWasmKeeper) EXPECT() *MockWasmKeeperMockRecorder { } // GetContractInfo mocks base method. -func (m *MockWasmKeeper) GetContractInfo(ctx context.Context, contractAddress types0.AccAddress) *types.ContractInfo { +func (m *MockWasmKeeper) GetContractInfo(ctx context.Context, contractAddress types1.AccAddress) *types.ContractInfo { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetContractInfo", ctx, contractAddress) ret0, _ := ret[0].(*types.ContractInfo) @@ -144,7 +143,7 @@ func (mr *MockWasmKeeperMockRecorder) GetContractInfo(ctx, contractAddress inter } // HasContractInfo mocks base method. -func (m *MockWasmKeeper) HasContractInfo(ctx context.Context, contractAddress types0.AccAddress) bool { +func (m *MockWasmKeeper) HasContractInfo(ctx context.Context, contractAddress types1.AccAddress) bool { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "HasContractInfo", ctx, contractAddress) ret0, _ := ret[0].(bool) @@ -158,7 +157,7 @@ func (mr *MockWasmKeeperMockRecorder) HasContractInfo(ctx, contractAddress inter } // Sudo mocks base method. -func (m *MockWasmKeeper) Sudo(ctx context.Context, contractAddress types0.AccAddress, msg []byte) ([]byte, error) { +func (m *MockWasmKeeper) Sudo(ctx context.Context, contractAddress types1.AccAddress, msg []byte) ([]byte, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Sudo", ctx, contractAddress, msg) ret0, _ := ret[0].([]byte) @@ -196,7 +195,7 @@ func (m *MockICAControllerKeeper) EXPECT() *MockICAControllerKeeperMockRecorder } // GetActiveChannelID mocks base method. -func (m *MockICAControllerKeeper) GetActiveChannelID(ctx types0.Context, connectionID, portID string) (string, bool) { +func (m *MockICAControllerKeeper) GetActiveChannelID(ctx types1.Context, connectionID, portID string) (string, bool) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetActiveChannelID", ctx, connectionID, portID) ret0, _ := ret[0].(string) @@ -211,7 +210,7 @@ func (mr *MockICAControllerKeeperMockRecorder) GetActiveChannelID(ctx, connectio } // GetInterchainAccountAddress mocks base method. -func (m *MockICAControllerKeeper) GetInterchainAccountAddress(ctx types0.Context, connectionID, portID string) (string, bool) { +func (m *MockICAControllerKeeper) GetInterchainAccountAddress(ctx types1.Context, connectionID, portID string) (string, bool) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetInterchainAccountAddress", ctx, connectionID, portID) ret0, _ := ret[0].(string) @@ -226,7 +225,7 @@ func (mr *MockICAControllerKeeperMockRecorder) GetInterchainAccountAddress(ctx, } // SetMiddlewareEnabled mocks base method. -func (m *MockICAControllerKeeper) SetMiddlewareEnabled(ctx types0.Context, portID, connectionID string) { +func (m *MockICAControllerKeeper) SetMiddlewareEnabled(ctx types1.Context, portID, connectionID string) { m.ctrl.T.Helper() m.ctrl.Call(m, "SetMiddlewareEnabled", ctx, portID, connectionID) } @@ -261,10 +260,10 @@ func (m *MockICAControllerMsgServer) EXPECT() *MockICAControllerMsgServerMockRec } // RegisterInterchainAccount mocks base method. -func (m *MockICAControllerMsgServer) RegisterInterchainAccount(arg0 context.Context, arg1 *types1.MsgRegisterInterchainAccount) (*types1.MsgRegisterInterchainAccountResponse, error) { +func (m *MockICAControllerMsgServer) RegisterInterchainAccount(arg0 context.Context, arg1 *types2.MsgRegisterInterchainAccount) (*types2.MsgRegisterInterchainAccountResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RegisterInterchainAccount", arg0, arg1) - ret0, _ := ret[0].(*types1.MsgRegisterInterchainAccountResponse) + ret0, _ := ret[0].(*types2.MsgRegisterInterchainAccountResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -276,10 +275,10 @@ func (mr *MockICAControllerMsgServerMockRecorder) RegisterInterchainAccount(arg0 } // SendTx mocks base method. -func (m *MockICAControllerMsgServer) SendTx(arg0 context.Context, arg1 *types1.MsgSendTx) (*types1.MsgSendTxResponse, error) { +func (m *MockICAControllerMsgServer) SendTx(arg0 context.Context, arg1 *types2.MsgSendTx) (*types2.MsgSendTxResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendTx", arg0, arg1) - ret0, _ := ret[0].(*types1.MsgSendTxResponse) + ret0, _ := ret[0].(*types2.MsgSendTxResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -314,7 +313,7 @@ func (m *MockFeeRefunderKeeper) EXPECT() *MockFeeRefunderKeeperMockRecorder { } // DistributeAcknowledgementFee mocks base method. -func (m *MockFeeRefunderKeeper) DistributeAcknowledgementFee(ctx context.Context, receiver types0.AccAddress, packetID types3.PacketID) { +func (m *MockFeeRefunderKeeper) DistributeAcknowledgementFee(ctx context.Context, receiver types1.AccAddress, packetID types0.PacketID) { m.ctrl.T.Helper() m.ctrl.Call(m, "DistributeAcknowledgementFee", ctx, receiver, packetID) } @@ -326,7 +325,7 @@ func (mr *MockFeeRefunderKeeperMockRecorder) DistributeAcknowledgementFee(ctx, r } // DistributeTimeoutFee mocks base method. -func (m *MockFeeRefunderKeeper) DistributeTimeoutFee(ctx context.Context, receiver types0.AccAddress, packetID types3.PacketID) { +func (m *MockFeeRefunderKeeper) DistributeTimeoutFee(ctx context.Context, receiver types1.AccAddress, packetID types0.PacketID) { m.ctrl.T.Helper() m.ctrl.Call(m, "DistributeTimeoutFee", ctx, receiver, packetID) } @@ -338,7 +337,7 @@ func (mr *MockFeeRefunderKeeperMockRecorder) DistributeTimeoutFee(ctx, receiver, } // LockFees mocks base method. -func (m *MockFeeRefunderKeeper) LockFees(ctx context.Context, payer types0.AccAddress, packetID types3.PacketID, fee types3.Fee) error { +func (m *MockFeeRefunderKeeper) LockFees(ctx context.Context, payer types1.AccAddress, packetID types0.PacketID, fee types0.Fee) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "LockFees", ctx, payer, packetID, fee) ret0, _ := ret[0].(error) @@ -375,10 +374,10 @@ func (m *MockChannelKeeper) EXPECT() *MockChannelKeeperMockRecorder { } // GetChannel mocks base method. -func (m *MockChannelKeeper) GetChannel(ctx types0.Context, srcPort, srcChan string) (types2.Channel, bool) { +func (m *MockChannelKeeper) GetChannel(ctx types1.Context, srcPort, srcChan string) (types3.Channel, bool) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetChannel", ctx, srcPort, srcChan) - ret0, _ := ret[0].(types2.Channel) + ret0, _ := ret[0].(types3.Channel) ret1, _ := ret[1].(bool) return ret0, ret1 } @@ -390,7 +389,7 @@ func (mr *MockChannelKeeperMockRecorder) GetChannel(ctx, srcPort, srcChan interf } // GetConnection mocks base method. -func (m *MockChannelKeeper) GetConnection(ctx types0.Context, connectionID string) (exported.ConnectionI, error) { +func (m *MockChannelKeeper) GetConnection(ctx types1.Context, connectionID string) (exported.ConnectionI, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetConnection", ctx, connectionID) ret0, _ := ret[0].(exported.ConnectionI) @@ -405,7 +404,7 @@ func (mr *MockChannelKeeperMockRecorder) GetConnection(ctx, connectionID interfa } // GetNextSequenceSend mocks base method. -func (m *MockChannelKeeper) GetNextSequenceSend(ctx types0.Context, portID, channelID string) (uint64, bool) { +func (m *MockChannelKeeper) GetNextSequenceSend(ctx types1.Context, portID, channelID string) (uint64, bool) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetNextSequenceSend", ctx, portID, channelID) ret0, _ := ret[0].(uint64) diff --git a/testutil/mocks/tax/types/expected_keepers.go b/testutil/mocks/tax/types/expected_keepers.go index 659b3615..f9775f3c 100644 --- a/testutil/mocks/tax/types/expected_keepers.go +++ b/testutil/mocks/tax/types/expected_keepers.go @@ -9,7 +9,6 @@ import ( reflect "reflect" types "github.com/cosmos/cosmos-sdk/types" - types0 "github.com/cosmos/cosmos-sdk/x/auth/types" gomock "github.com/golang/mock/gomock" ) @@ -37,10 +36,10 @@ func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { } // GetAccount mocks base method. -func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddress) types0.AccountI { +func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddress) types.AccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAccount", ctx, addr) - ret0, _ := ret[0].(types0.AccountI) + ret0, _ := ret[0].(types.AccountI) return ret0 } diff --git a/testutil/mocks/transfer/types/expected_keepers.go b/testutil/mocks/transfer/types/expected_keepers.go index b1cc375e..ee55d169 100644 --- a/testutil/mocks/transfer/types/expected_keepers.go +++ b/testutil/mocks/transfer/types/expected_keepers.go @@ -8,11 +8,10 @@ import ( context "context" reflect "reflect" - types "github.com/cosmos/cosmos-sdk/types" - types0 "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" + types "github.com/Nolus-Protocol/nolus-core/x/feerefunder/types" + types0 "github.com/cosmos/cosmos-sdk/types" + types1 "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" gomock "github.com/golang/mock/gomock" - - types1 "github.com/neutron-org/neutron/v4/x/feerefunder/types" ) // MockWasmKeeper is a mock of WasmKeeper interface. @@ -39,7 +38,7 @@ func (m *MockWasmKeeper) EXPECT() *MockWasmKeeperMockRecorder { } // HasContractInfo mocks base method. -func (m *MockWasmKeeper) HasContractInfo(ctx context.Context, contractAddress types.AccAddress) bool { +func (m *MockWasmKeeper) HasContractInfo(ctx context.Context, contractAddress types0.AccAddress) bool { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "HasContractInfo", ctx, contractAddress) ret0, _ := ret[0].(bool) @@ -53,7 +52,7 @@ func (mr *MockWasmKeeperMockRecorder) HasContractInfo(ctx, contractAddress inter } // Sudo mocks base method. -func (m *MockWasmKeeper) Sudo(ctx context.Context, contractAddress types.AccAddress, msg []byte) ([]byte, error) { +func (m *MockWasmKeeper) Sudo(ctx context.Context, contractAddress types0.AccAddress, msg []byte) ([]byte, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Sudo", ctx, contractAddress, msg) ret0, _ := ret[0].([]byte) @@ -91,7 +90,7 @@ func (m *MockFeeRefunderKeeper) EXPECT() *MockFeeRefunderKeeperMockRecorder { } // DistributeAcknowledgementFee mocks base method. -func (m *MockFeeRefunderKeeper) DistributeAcknowledgementFee(ctx context.Context, receiver types.AccAddress, packetID types1.PacketID) { +func (m *MockFeeRefunderKeeper) DistributeAcknowledgementFee(ctx context.Context, receiver types0.AccAddress, packetID types.PacketID) { m.ctrl.T.Helper() m.ctrl.Call(m, "DistributeAcknowledgementFee", ctx, receiver, packetID) } @@ -103,7 +102,7 @@ func (mr *MockFeeRefunderKeeperMockRecorder) DistributeAcknowledgementFee(ctx, r } // DistributeTimeoutFee mocks base method. -func (m *MockFeeRefunderKeeper) DistributeTimeoutFee(ctx context.Context, receiver types.AccAddress, packetID types1.PacketID) { +func (m *MockFeeRefunderKeeper) DistributeTimeoutFee(ctx context.Context, receiver types0.AccAddress, packetID types.PacketID) { m.ctrl.T.Helper() m.ctrl.Call(m, "DistributeTimeoutFee", ctx, receiver, packetID) } @@ -115,7 +114,7 @@ func (mr *MockFeeRefunderKeeperMockRecorder) DistributeTimeoutFee(ctx, receiver, } // LockFees mocks base method. -func (m *MockFeeRefunderKeeper) LockFees(ctx context.Context, payer types.AccAddress, packetID types1.PacketID, fee types1.Fee) error { +func (m *MockFeeRefunderKeeper) LockFees(ctx context.Context, payer types0.AccAddress, packetID types.PacketID, fee types.Fee) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "LockFees", ctx, payer, packetID, fee) ret0, _ := ret[0].(error) @@ -152,10 +151,10 @@ func (m *MockChannelKeeper) EXPECT() *MockChannelKeeperMockRecorder { } // GetAllChannelsWithPortPrefix mocks base method. -func (m *MockChannelKeeper) GetAllChannelsWithPortPrefix(ctx types.Context, portPrefix string) []types0.IdentifiedChannel { +func (m *MockChannelKeeper) GetAllChannelsWithPortPrefix(ctx types0.Context, portPrefix string) []types1.IdentifiedChannel { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAllChannelsWithPortPrefix", ctx, portPrefix) - ret0, _ := ret[0].([]types0.IdentifiedChannel) + ret0, _ := ret[0].([]types1.IdentifiedChannel) return ret0 } @@ -166,10 +165,10 @@ func (mr *MockChannelKeeperMockRecorder) GetAllChannelsWithPortPrefix(ctx, portP } // GetChannel mocks base method. -func (m *MockChannelKeeper) GetChannel(ctx types.Context, srcPort, srcChan string) (types0.Channel, bool) { +func (m *MockChannelKeeper) GetChannel(ctx types0.Context, srcPort, srcChan string) (types1.Channel, bool) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetChannel", ctx, srcPort, srcChan) - ret0, _ := ret[0].(types0.Channel) + ret0, _ := ret[0].(types1.Channel) ret1, _ := ret[1].(bool) return ret0, ret1 } @@ -181,7 +180,7 @@ func (mr *MockChannelKeeperMockRecorder) GetChannel(ctx, srcPort, srcChan interf } // GetNextSequenceSend mocks base method. -func (m *MockChannelKeeper) GetNextSequenceSend(ctx types.Context, portID, channelID string) (uint64, bool) { +func (m *MockChannelKeeper) GetNextSequenceSend(ctx types0.Context, portID, channelID string) (uint64, bool) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetNextSequenceSend", ctx, portID, channelID) ret0, _ := ret[0].(uint64) @@ -219,10 +218,10 @@ func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { } // GetModuleAccount mocks base method. -func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, name string) types.ModuleAccountI { +func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, name string) types0.ModuleAccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAccount", ctx, name) - ret0, _ := ret[0].(types.ModuleAccountI) + ret0, _ := ret[0].(types0.ModuleAccountI) return ret0 } @@ -233,10 +232,10 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, name interface{}) } // GetModuleAddress mocks base method. -func (m *MockAccountKeeper) GetModuleAddress(name string) types.AccAddress { +func (m *MockAccountKeeper) GetModuleAddress(name string) types0.AccAddress { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAddress", name) - ret0, _ := ret[0].(types.AccAddress) + ret0, _ := ret[0].(types0.AccAddress) return ret0 } diff --git a/testutil/test_helpers.go b/testutil/test_helpers.go index 2617a1e0..ce222792 100644 --- a/testutil/test_helpers.go +++ b/testutil/test_helpers.go @@ -31,7 +31,7 @@ import ( tmos "github.com/cometbft/cometbft/libs/os" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - ictxstypes "github.com/neutron-org/neutron/v4/x/interchaintxs/types" + ictxstypes "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/types" ) var ( diff --git a/wasmbinding/message_plugin.go b/wasmbinding/message_plugin.go index ed511b51..44560fcf 100644 --- a/wasmbinding/message_plugin.go +++ b/wasmbinding/message_plugin.go @@ -12,13 +12,13 @@ import ( "github.com/Nolus-Protocol/nolus-core/wasmbinding/bindings" - contractmanagerkeeper "github.com/neutron-org/neutron/v4/x/contractmanager/keeper" - icqkeeper "github.com/neutron-org/neutron/v4/x/interchainqueries/keeper" - icqtypes "github.com/neutron-org/neutron/v4/x/interchainqueries/types" - ictxkeeper "github.com/neutron-org/neutron/v4/x/interchaintxs/keeper" - ictxtypes "github.com/neutron-org/neutron/v4/x/interchaintxs/types" - transferwrapperkeeper "github.com/neutron-org/neutron/v4/x/transfer/keeper" - transferwrappertypes "github.com/neutron-org/neutron/v4/x/transfer/types" + contractmanagerkeeper "github.com/Nolus-Protocol/nolus-core/x/contractmanager/keeper" + icqkeeper "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/keeper" + icqtypes "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/types" + ictxkeeper "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/keeper" + ictxtypes "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/types" + transferwrapperkeeper "github.com/Nolus-Protocol/nolus-core/x/transfer/keeper" + transferwrappertypes "github.com/Nolus-Protocol/nolus-core/x/transfer/types" ) func CustomMessageDecorator( diff --git a/wasmbinding/query_plugin.go b/wasmbinding/query_plugin.go index 5aa0d72c..d232f499 100644 --- a/wasmbinding/query_plugin.go +++ b/wasmbinding/query_plugin.go @@ -1,10 +1,10 @@ package wasmbinding import ( - contractmanagerkeeper "github.com/neutron-org/neutron/v4/x/contractmanager/keeper" - feerefunderkeeper "github.com/neutron-org/neutron/v4/x/feerefunder/keeper" - icqkeeper "github.com/neutron-org/neutron/v4/x/interchainqueries/keeper" - icacontrollerkeeper "github.com/neutron-org/neutron/v4/x/interchaintxs/keeper" + contractmanagerkeeper "github.com/Nolus-Protocol/nolus-core/x/contractmanager/keeper" + feerefunderkeeper "github.com/Nolus-Protocol/nolus-core/x/feerefunder/keeper" + icqkeeper "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/keeper" + icacontrollerkeeper "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/keeper" ) type QueryPlugin struct { diff --git a/wasmbinding/test/3803288148803275527/wasm/wasm/exclusive.lock b/wasmbinding/test/3803288148803275527/wasm/wasm/exclusive.lock new file mode 100644 index 00000000..695be567 --- /dev/null +++ b/wasmbinding/test/3803288148803275527/wasm/wasm/exclusive.lock @@ -0,0 +1,3 @@ +This is a lockfile that prevent two VM instances to operate on the same directory in parallel. +See codebase at github.com/CosmWasm/wasmvm for more information. +Safety first – brought to you by Confio ❤️ diff --git a/wasmbinding/test/5279269210049319441/wasm/wasm/exclusive.lock b/wasmbinding/test/5279269210049319441/wasm/wasm/exclusive.lock new file mode 100644 index 00000000..695be567 --- /dev/null +++ b/wasmbinding/test/5279269210049319441/wasm/wasm/exclusive.lock @@ -0,0 +1,3 @@ +This is a lockfile that prevent two VM instances to operate on the same directory in parallel. +See codebase at github.com/CosmWasm/wasmvm for more information. +Safety first – brought to you by Confio ❤️ diff --git a/wasmbinding/wasm.go b/wasmbinding/wasm.go index a5004f9d..94dc0959 100644 --- a/wasmbinding/wasm.go +++ b/wasmbinding/wasm.go @@ -3,11 +3,11 @@ package wasmbinding import ( wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - contractmanagerkeeper "github.com/neutron-org/neutron/v4/x/contractmanager/keeper" - feerefunderkeeper "github.com/neutron-org/neutron/v4/x/feerefunder/keeper" - interchainqueriesmodulekeeper "github.com/neutron-org/neutron/v4/x/interchainqueries/keeper" - interchaintransactionsmodulekeeper "github.com/neutron-org/neutron/v4/x/interchaintxs/keeper" - transfer "github.com/neutron-org/neutron/v4/x/transfer/keeper" + contractmanagerkeeper "github.com/Nolus-Protocol/nolus-core/x/contractmanager/keeper" + feerefunderkeeper "github.com/Nolus-Protocol/nolus-core/x/feerefunder/keeper" + interchainqueriesmodulekeeper "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/keeper" + interchaintransactionsmodulekeeper "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/keeper" + transfer "github.com/Nolus-Protocol/nolus-core/x/transfer/keeper" ) // RegisterCustomPlugins returns wasmkeeper.Option that we can use to connect handlers for implemented custom queries and messages to the App. diff --git a/x/contractmanager/client/cli/query_failure.go b/x/contractmanager/client/cli/query_failure.go index f19ca2f9..ba9ce120 100644 --- a/x/contractmanager/client/cli/query_failure.go +++ b/x/contractmanager/client/cli/query_failure.go @@ -62,7 +62,7 @@ func CmdFailureDetails() *cobra.Command { Short: "Query the detailed error related to a contract's sudo call failure", Long: "Query the detailed error related to a contract's sudo call failure based on contract's address and failure ID", Args: cobra.ExactArgs(2), - Example: fmt.Sprintf("%s query failure-details neutron1m0z0kk0qqug74n9u9ul23e28x5fszr628h20xwt6jywjpp64xn4qatgvm0 0", version.AppName), + Example: fmt.Sprintf("%s query failure-details nolus1m0z0kk0qqug74n9u9ul23e28x5fszr628h20xwt6jywjpp64xn4qatgvm0 0", version.AppName), RunE: func(cmd *cobra.Command, args []string) error { address := args[0] failureID, err := strconv.ParseUint(args[1], 10, 64) diff --git a/x/contractmanager/ibc_middleware_test.go b/x/contractmanager/ibc_middleware_test.go index 3a95c0e3..ee18102a 100644 --- a/x/contractmanager/ibc_middleware_test.go +++ b/x/contractmanager/ibc_middleware_test.go @@ -19,7 +19,7 @@ var ( ShouldNotBeWrittenKey = []byte("shouldnotkey") ShouldNotBeWritten = []byte("should not be written") ShouldBeWritten = []byte("should be written") - TestOwnerAddress = "neutron17dtl0mjt3t77kpuhg2edqzjpszulwhgzcdvagh" + TestOwnerAddress = "nolus17dtl0mjt3t77kpuhg2edqzjpszulwhgzcdvagh" ) func ShouldBeWrittenKey(suffix string) []byte { diff --git a/x/contractmanager/keeper/failure_test.go b/x/contractmanager/keeper/failure_test.go index da56f0dd..48f18729 100644 --- a/x/contractmanager/keeper/failure_test.go +++ b/x/contractmanager/keeper/failure_test.go @@ -102,7 +102,7 @@ func TestAddGetFailure(t *testing.T) { require.Error(t, err) // non-existent contract address - _, err = k.GetFailure(ctx, sdk.MustAccAddressFromBech32("neutron1nseacn2aqezhj3ssatfg778ctcfjuknm8ucc0l"), failureID) + _, err = k.GetFailure(ctx, sdk.MustAccAddressFromBech32("nolus1nseacn2aqezhj3ssatfg778ctcfjuknm8ucc0l"), failureID) require.Error(t, err) } diff --git a/x/contractmanager/keeper/grpc_query_failure_test.go b/x/contractmanager/keeper/grpc_query_failure_test.go index e665a069..75241233 100644 --- a/x/contractmanager/keeper/grpc_query_failure_test.go +++ b/x/contractmanager/keeper/grpc_query_failure_test.go @@ -45,7 +45,7 @@ func TestFailureQuerySingle(t *testing.T) { { desc: "KeyIsAbsent", request: &types.QueryFailuresRequest{ - Address: "neutron17dtl0mjt3t77kpuhg2edqzjpszulwhgzcdvagh", + Address: "nolus17dtl0mjt3t77kpuhg2edqzjpszulwhgzcdvagh", }, response: &types.QueryFailuresResponse{Failures: []types.Failure{}, Pagination: &query.PageResponse{Total: 0}}, }, diff --git a/x/contractmanager/types/codec.go b/x/contractmanager/types/codec.go index 14f5aff7..4a697205 100644 --- a/x/contractmanager/types/codec.go +++ b/x/contractmanager/types/codec.go @@ -8,7 +8,7 @@ import ( ) func RegisterCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&MsgUpdateParams{}, "neutron.contractmanager.v1.MsgUpdateParams", nil) + cdc.RegisterConcrete(&MsgUpdateParams{}, "nolus.contractmanager.v1.MsgUpdateParams", nil) } func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { diff --git a/x/feerefunder/client/cli/query_test.go b/x/feerefunder/client/cli/query_test.go index 3665b142..96f5aa8e 100644 --- a/x/feerefunder/client/cli/query_test.go +++ b/x/feerefunder/client/cli/query_test.go @@ -22,7 +22,7 @@ func feeRefunderNetwork(t *testing.T, feeInfo types.Fee) *network.Network { state := types.DefaultGenesis() require.NoError(t, cfg.Codec.UnmarshalJSON(cfg.GenesisState[types.ModuleName], state)) state.FeeInfos = []types.FeeInfo{{ - Payer: "neutron17dtl0mjt3t77kpuhg2edqzjpszulwhgzcdvagh", + Payer: "nolus17dtl0mjt3t77kpuhg2edqzjpszulwhgzcdvagh", PacketId: types.PacketID{ ChannelId: "channel-0", PortId: "transfer", diff --git a/x/feerefunder/genesis_test.go b/x/feerefunder/genesis_test.go index 6b811099..429b6d0f 100644 --- a/x/feerefunder/genesis_test.go +++ b/x/feerefunder/genesis_test.go @@ -16,13 +16,13 @@ import ( "github.com/Nolus-Protocol/nolus-core/x/feerefunder/types" ) -const TestContractAddressNeutron = "neutron14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s5c2epq" +const TestContractAddressNolus = "nolus14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s5c2epq" func TestGenesis(t *testing.T) { genesisState := types.GenesisState{ Params: types.DefaultParams(), FeeInfos: []types.FeeInfo{{ - Payer: TestContractAddressNeutron, + Payer: TestContractAddressNolus, PacketId: types.NewPacketID("port", "channel-1", 64), Fee: types.Fee{ RecvFee: sdk.NewCoins(sdk.NewCoin(params.DefaultBondDenom, math.NewInt(0))), diff --git a/x/feerefunder/types/codec.go b/x/feerefunder/types/codec.go index 81d2f74b..03b748f2 100644 --- a/x/feerefunder/types/codec.go +++ b/x/feerefunder/types/codec.go @@ -8,7 +8,7 @@ import ( ) func RegisterCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&MsgUpdateParams{}, "neutron.feerefunder.MsgUpdateParams", nil) + cdc.RegisterConcrete(&MsgUpdateParams{}, "nolus.feerefunder.MsgUpdateParams", nil) } func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { diff --git a/x/feerefunder/types/genesis_test.go b/x/feerefunder/types/genesis_test.go index d6b15631..8ca126d6 100644 --- a/x/feerefunder/types/genesis_test.go +++ b/x/feerefunder/types/genesis_test.go @@ -14,9 +14,9 @@ import ( ) const ( - TestAddressNeutron = "neutron13xvjxhkkxxhztcugr6weyt76eedj5ucpt4xluv" - TestContractAddressJuno = "juno10h0hc64jv006rr8qy0zhlu4jsxct8qwa0vtaleayh0ujz0zynf2s2r7v8q" - TestContractAddressNeutron = "neutron14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s5c2epq" + TestAddressNolus = "nolus13xvjxhkkxxhztcugr6weyt76eedj5ucpt4xluv" + TestContractAddressJuno = "juno10h0hc64jv006rr8qy0zhlu4jsxct8qwa0vtaleayh0ujz0zynf2s2r7v8q" + TestContractAddressNolus = "nolus14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s5c2epq" ) func TestGenesisState_Validate(t *testing.T) { @@ -48,7 +48,7 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ Params: types.DefaultParams(), FeeInfos: []types.FeeInfo{{ - Payer: TestContractAddressNeutron, + Payer: TestContractAddressNolus, PacketId: validPacketID, Fee: types.Fee{ RecvFee: validRecvFee, @@ -82,7 +82,7 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ Params: types.DefaultParams(), FeeInfos: []types.FeeInfo{{ - Payer: TestAddressNeutron, + Payer: TestAddressNolus, PacketId: validPacketID, Fee: types.Fee{ RecvFee: validRecvFee, @@ -116,7 +116,7 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ Params: types.DefaultParams(), FeeInfos: []types.FeeInfo{{ - Payer: TestContractAddressNeutron, + Payer: TestContractAddressNolus, PacketId: types.NewPacketID("*", "channel", 64), Fee: types.Fee{ RecvFee: validRecvFee, @@ -133,7 +133,7 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ Params: types.DefaultParams(), FeeInfos: []types.FeeInfo{{ - Payer: TestContractAddressNeutron, + Payer: TestContractAddressNolus, PacketId: types.NewPacketID("port", "*", 64), Fee: types.Fee{ RecvFee: validRecvFee, @@ -150,7 +150,7 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ Params: types.DefaultParams(), FeeInfos: []types.FeeInfo{{ - Payer: TestContractAddressNeutron, + Payer: TestContractAddressNolus, PacketId: validPacketID, Fee: types.Fee{ RecvFee: invalidRecvFee, @@ -167,7 +167,7 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ Params: types.DefaultParams(), FeeInfos: []types.FeeInfo{{ - Payer: TestContractAddressNeutron, + Payer: TestContractAddressNolus, PacketId: validPacketID, Fee: types.Fee{ RecvFee: nil, diff --git a/x/interchainqueries/genesis_test.go b/x/interchainqueries/genesis_test.go index 6d330af1..23391b0a 100644 --- a/x/interchainqueries/genesis_test.go +++ b/x/interchainqueries/genesis_test.go @@ -255,7 +255,7 @@ func TestGenesisMalformedQueriesInvalidPrefix(t *testing.T) { { Id: 4, QueryType: "kv", - Owner: "neutron18g0avxazu3dkgd5n5ea8h8rtl78de0hytsj9vm", + Owner: "nolus18g0avxazu3dkgd5n5ea8h8rtl78de0hytsj9vm", Keys: []*types.KVKey{ { Path: "newpath", diff --git a/x/interchainqueries/keeper/grpc_query_test.go b/x/interchainqueries/keeper/grpc_query_test.go index fb2550ce..5bdcae45 100644 --- a/x/interchainqueries/keeper/grpc_query_test.go +++ b/x/interchainqueries/keeper/grpc_query_test.go @@ -25,7 +25,7 @@ func (suite *KeeperTestSuite) TestRemoteLastHeight() { "wrong connection id", func() { ctx := suite.ChainA.GetContext() - _, err := keeper.Keeper.LastRemoteHeight(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper, ctx, &iqtypes.QueryLastRemoteHeight{ConnectionId: "test"}) + _, err := keeper.Keeper.LastRemoteHeight(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper, ctx, &iqtypes.QueryLastRemoteHeight{ConnectionId: "test"}) suite.Require().Error(err) }, }, @@ -34,7 +34,7 @@ func (suite *KeeperTestSuite) TestRemoteLastHeight() { func() { ctx := suite.ChainA.GetContext() - oldHeight, err := keeper.Keeper.LastRemoteHeight(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper, ctx, &iqtypes.QueryLastRemoteHeight{ConnectionId: suite.Path.EndpointA.ConnectionID}) + oldHeight, err := keeper.Keeper.LastRemoteHeight(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper, ctx, &iqtypes.QueryLastRemoteHeight{ConnectionId: suite.Path.EndpointA.ConnectionID}) suite.Require().NoError(err) suite.Require().Greater(oldHeight.Height, uint64(0)) @@ -44,7 +44,7 @@ func (suite *KeeperTestSuite) TestRemoteLastHeight() { suite.NoError(suite.Path.EndpointA.UpdateClient()) } - updatedHeight, err := keeper.Keeper.LastRemoteHeight(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper, ctx, &iqtypes.QueryLastRemoteHeight{ConnectionId: suite.Path.EndpointA.ConnectionID}) + updatedHeight, err := keeper.Keeper.LastRemoteHeight(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper, ctx, &iqtypes.QueryLastRemoteHeight{ConnectionId: suite.Path.EndpointA.ConnectionID}) suite.Require().Equal(updatedHeight.Height, oldHeight.Height+N) // check that last remote height really equals oldHeight+N suite.Require().NoError(err) }, @@ -461,10 +461,10 @@ func (suite *KeeperTestSuite) TestRegisteredQueries() { for _, q := range tt.registeredQueries { q := q - suite.NoError(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper.SaveQuery(suite.ChainA.GetContext(), &q)) + suite.NoError(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper.SaveQuery(suite.ChainA.GetContext(), &q)) } - resp, err := suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper.RegisteredQueries(suite.ChainA.GetContext(), tt.req) + resp, err := suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper.RegisteredQueries(suite.ChainA.GetContext(), tt.req) suite.NoError(err) suite.Equal(tt.expectedQueryResponse, resp.RegisteredQueries) @@ -491,7 +491,7 @@ func (suite *KeeperTestSuite) TestQueryResult() { senderAddress := suite.ChainA.SenderAccounts[0].SenderAccount.GetAddress() suite.TopUpWallet(ctx, senderAddress, contractAddress) - msgSrv := keeper.NewMsgServerImpl(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper) + msgSrv := keeper.NewMsgServerImpl(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper) regQuery1, err := msgSrv.RegisterInterchainQuery(ctx, ®isterMsg) suite.Require().NoError(err) @@ -530,7 +530,7 @@ func (suite *KeeperTestSuite) TestQueryResult() { _, err = msgSrv.SubmitQueryResult(ctx, &msg) suite.NoError(err) - queryResultResponse, err := suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper.QueryResult(ctx, &iqtypes.QueryRegisteredQueryResultRequest{ + queryResultResponse, err := suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper.QueryResult(ctx, &iqtypes.QueryRegisteredQueryResultRequest{ QueryId: regQuery1.Id, }) suite.NoError(err) @@ -547,12 +547,12 @@ func (suite *KeeperTestSuite) TestQueryResult() { } suite.Equal(len(expectKvResults), len(queryKvResult)) - _, err = suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper.QueryResult(ctx, &iqtypes.QueryRegisteredQueryResultRequest{ + _, err = suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper.QueryResult(ctx, &iqtypes.QueryRegisteredQueryResultRequest{ QueryId: regQuery2.Id, }) suite.ErrorContains(err, "no query result") - _, err = suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper.QueryResult(ctx, &iqtypes.QueryRegisteredQueryResultRequest{ + _, err = suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper.QueryResult(ctx, &iqtypes.QueryRegisteredQueryResultRequest{ QueryId: regQuery2.Id + 1, }) suite.ErrorContains(err, "invalid query id") diff --git a/x/interchainqueries/keeper/keeper_test.go b/x/interchainqueries/keeper/keeper_test.go index f259cb1f..8861cd50 100644 --- a/x/interchainqueries/keeper/keeper_test.go +++ b/x/interchainqueries/keeper/keeper_test.go @@ -142,7 +142,7 @@ func (suite *KeeperTestSuite) TestRegisterInterchainQuery() { suite.TopUpWallet(ctx, senderAddress, contractAddress) } - msgSrv := keeper.NewMsgServerImpl(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper) + msgSrv := keeper.NewMsgServerImpl(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper) res, err := msgSrv.RegisterInterchainQuery(ctx, &msg) @@ -151,7 +151,7 @@ func (suite *KeeperTestSuite) TestRegisterInterchainQuery() { suite.Require().Nil(res) } else { query, _ := keeper.Keeper.RegisteredQuery( - suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper, ctx, + suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper, ctx, &iqtypes.QueryRegisteredQueryRequest{QueryId: 1}) suite.Require().Equal(iqtypes.DefaultQueryDeposit, query.RegisteredQuery.Deposit) @@ -419,7 +419,7 @@ func (suite *KeeperTestSuite) TestUpdateInterchainQuery() { tt.malleate(contractAddress.String()) - iqkeeper := suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper + iqkeeper := suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper msgSrv := keeper.NewMsgServerImpl(iqkeeper) @@ -586,12 +586,12 @@ func (suite *KeeperTestSuite) TestRemoveInterchainQuery() { suite.Require().NoError(err) // Top up contract address with native coins for deposit - bankKeeper := suite.GetNeutronZoneApp(suite.ChainA).BankKeeper + bankKeeper := suite.GetNolusZoneApp(suite.ChainA).BankKeeper senderAddress := suite.ChainA.SenderAccounts[0].SenderAccount.GetAddress() suite.TopUpWallet(ctx, senderAddress, contractAddress) tt.malleate(contractAddress.String()) - iqkeeper := suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper + iqkeeper := suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper msgSrv := keeper.NewMsgServerImpl(iqkeeper) query.Sender = contractAddress.String() @@ -734,7 +734,7 @@ func (suite *KeeperTestSuite) TestGetAllRegisteredQueries() { ctx := suite.ChainA.GetContext() - iqkeeper := suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper + iqkeeper := suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper for _, query := range tt.queries { err := iqkeeper.SaveQuery(ctx, query) suite.Require().NoError(err) @@ -802,7 +802,7 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { Sender: sender, } - msgSrv := keeper.NewMsgServerImpl(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper) + msgSrv := keeper.NewMsgServerImpl(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper) res, err := msgSrv.RegisterInterchainQuery(ctx, ®isterMsg) suite.Require().NoError(err) @@ -853,7 +853,7 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { Sender: sender, } - msgSrv := keeper.NewMsgServerImpl(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper) + msgSrv := keeper.NewMsgServerImpl(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper) res, err := msgSrv.RegisterInterchainQuery(ctx, ®isterMsg) suite.Require().NoError(err) @@ -908,7 +908,7 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { Sender: sender, } - msgSrv := keeper.NewMsgServerImpl(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper) + msgSrv := keeper.NewMsgServerImpl(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper) res, err := msgSrv.RegisterInterchainQuery(ctx, ®isterMsg) suite.Require().NoError(err) @@ -959,7 +959,7 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { Sender: sender, } - msgSrv := keeper.NewMsgServerImpl(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper) + msgSrv := keeper.NewMsgServerImpl(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper) res, err := msgSrv.RegisterInterchainQuery(ctx, ®isterMsg) suite.Require().NoError(err) @@ -1011,7 +1011,7 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { Sender: sender, } - msgSrv := keeper.NewMsgServerImpl(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper) + msgSrv := keeper.NewMsgServerImpl(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper) res, err := msgSrv.RegisterInterchainQuery(ctx, ®isterMsg) suite.Require().NoError(err) @@ -1061,7 +1061,7 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { Sender: sender, } - msgSrv := keeper.NewMsgServerImpl(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper) + msgSrv := keeper.NewMsgServerImpl(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper) res, err := msgSrv.RegisterInterchainQuery(ctx, ®isterMsg) suite.Require().NoError(err) @@ -1113,7 +1113,7 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { Sender: sender, } - msgSrv := keeper.NewMsgServerImpl(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper) + msgSrv := keeper.NewMsgServerImpl(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper) res, err := msgSrv.RegisterInterchainQuery(ctx, ®isterMsg) suite.Require().NoError(err) @@ -1165,7 +1165,7 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { Sender: sender, } - msgSrv := keeper.NewMsgServerImpl(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper) + msgSrv := keeper.NewMsgServerImpl(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper) res, err := msgSrv.RegisterInterchainQuery(ctx, ®isterMsg) suite.Require().NoError(err) @@ -1215,7 +1215,7 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { Sender: sender, } - msgSrv := keeper.NewMsgServerImpl(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper) + msgSrv := keeper.NewMsgServerImpl(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper) res, err := msgSrv.RegisterInterchainQuery(ctx, ®isterMsg) suite.Require().NoError(err) @@ -1266,7 +1266,7 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { Sender: sender, } - msgSrv := keeper.NewMsgServerImpl(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper) + msgSrv := keeper.NewMsgServerImpl(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper) res, err := msgSrv.RegisterInterchainQuery(ctx, ®isterMsg) suite.Require().NoError(err) @@ -1275,7 +1275,7 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { suite.NoError(suite.Path.EndpointA.UpdateClient()) // pretend like we have a very new query result - suite.NoError(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper.UpdateLastRemoteHeight(ctx, res.Id, ibcclienttypes.NewHeight(suite.ChainA.LastHeader.GetHeight().GetRevisionNumber(), 9999))) + suite.NoError(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper.UpdateLastRemoteHeight(ctx, res.Id, ibcclienttypes.NewHeight(suite.ChainA.LastHeader.GetHeight().GetRevisionNumber(), 9999))) resp, err := suite.ChainB.App.Query(ctx, &abci.RequestQuery{ Path: fmt.Sprintf("store/%s/key", ibchost.StoreKey), @@ -1320,7 +1320,7 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { Sender: sender, } - msgSrv := keeper.NewMsgServerImpl(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper) + msgSrv := keeper.NewMsgServerImpl(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper) res, err := msgSrv.RegisterInterchainQuery(ctx, ®isterMsg) suite.Require().NoError(err) @@ -1329,10 +1329,10 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { suite.NoError(suite.Path.EndpointA.UpdateClient()) // pretend like we have a very new query result - suite.NoError(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper.UpdateLastRemoteHeight(ctx, res.Id, ibcclienttypes.NewHeight(suite.ChainA.LastHeader.GetHeight().GetRevisionNumber(), 9999))) + suite.NoError(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper.UpdateLastRemoteHeight(ctx, res.Id, ibcclienttypes.NewHeight(suite.ChainA.LastHeader.GetHeight().GetRevisionNumber(), 9999))) // pretend like we have a very new query result with updated revision height - suite.NoError(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper.UpdateLastRemoteHeight(ctx, res.Id, ibcclienttypes.NewHeight(suite.ChainA.LastHeader.GetHeight().GetRevisionNumber()+1, 1))) + suite.NoError(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper.UpdateLastRemoteHeight(ctx, res.Id, ibcclienttypes.NewHeight(suite.ChainA.LastHeader.GetHeight().GetRevisionNumber()+1, 1))) resp, err := suite.ChainB.App.Query(ctx, &abci.RequestQuery{ Path: fmt.Sprintf("store/%s/key", ibchost.StoreKey), @@ -1380,7 +1380,7 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { Sender: sender, } - msgSrv := keeper.NewMsgServerImpl(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper) + msgSrv := keeper.NewMsgServerImpl(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper) res, err := msgSrv.RegisterInterchainQuery(ctx, ®isterMsg) suite.Require().NoError(err) @@ -1444,7 +1444,7 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { tt.malleate(contractAddress.String(), ctx) - msgSrv := keeper.NewMsgServerImpl(suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper) + msgSrv := keeper.NewMsgServerImpl(suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper) res, err := msgSrv.SubmitQueryResult(ctx, &msg) @@ -1462,7 +1462,7 @@ func (suite *KeeperTestSuite) TestSubmitInterchainQueryResult() { func (suite *KeeperTestSuite) TestTxQueriesCleanup() { suite.Run("SingleIterSingleQuery", func() { suite.SetupTest() - iqkeeper := suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper + iqkeeper := suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper ctx := suite.ChainA.GetContext() // create a query and add results for it @@ -1493,7 +1493,7 @@ func (suite *KeeperTestSuite) TestTxQueriesCleanup() { suite.Run("SingleIterMultipeQueries", func() { suite.SetupTest() - iqkeeper := suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper + iqkeeper := suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper ctx := suite.ChainA.GetContext() txHashes := suite.buildTxHashes(100) @@ -1543,7 +1543,7 @@ func (suite *KeeperTestSuite) TestTxQueriesCleanup() { suite.Run("MultipleIterSingleQuery", func() { suite.SetupTest() - iqkeeper := suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper + iqkeeper := suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper ctx := suite.ChainA.GetContext() // set TxQueryRemovalLimit to a low value @@ -1591,7 +1591,7 @@ func (suite *KeeperTestSuite) TestTxQueriesCleanup() { suite.Run("MultipleIterMultipeQueries", func() { suite.SetupTest() - iqkeeper := suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper + iqkeeper := suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper ctx := suite.ChainA.GetContext() // set TxQueryRemovalLimit to a low value @@ -1655,7 +1655,7 @@ func (suite *KeeperTestSuite) TestTxQueriesCleanup() { suite.Run("Unlimited", func() { suite.SetupTest() - iqkeeper := suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper + iqkeeper := suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper ctx := suite.ChainA.GetContext() // set TxQueryRemovalLimit to a low value @@ -1709,7 +1709,7 @@ func (suite *KeeperTestSuite) TestRemoveFreshlyCreatedICQ() { senderAddress := suite.ChainA.SenderAccounts[0].SenderAccount.GetAddress() suite.TopUpWallet(ctx, senderAddress, contractAddress) - iqkeeper := suite.GetNeutronZoneApp(suite.ChainA).InterchainQueriesKeeper + iqkeeper := suite.GetNolusZoneApp(suite.ChainA).InterchainQueriesKeeper params := iqkeeper.GetParams(ctx) params.QuerySubmitTimeout = 5 err := iqkeeper.SetParams(ctx, params) @@ -1746,7 +1746,7 @@ func (suite *KeeperTestSuite) TestRemoveFreshlyCreatedICQ() { func (suite *KeeperTestSuite) TopUpWallet(ctx sdk.Context, sender, contractAddress sdk.AccAddress) { coinsAmnt := sdk.NewCoins(sdk.NewCoin(params.DefaultBondDenom, math.NewInt(int64(1_000_000)))) - bankKeeper := suite.GetNeutronZoneApp(suite.ChainA).BankKeeper + bankKeeper := suite.GetNolusZoneApp(suite.ChainA).BankKeeper err := bankKeeper.SendCoins(ctx, sender, contractAddress, coinsAmnt) suite.Require().NoError(err) } diff --git a/x/interchainqueries/keeper/msg_server.go b/x/interchainqueries/keeper/msg_server.go index 31340ebc..94ab7b55 100644 --- a/x/interchainqueries/keeper/msg_server.go +++ b/x/interchainqueries/keeper/msg_server.go @@ -349,7 +349,7 @@ func (k Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) func getEventsQueryUpdated(query *types.RegisteredQuery) sdk.Events { return sdk.Events{ sdk.NewEvent( - types.EventTypeNeutronMessage, + types.EventTypeNolusMessage, sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), sdk.NewAttribute(sdk.AttributeKeyAction, types.AttributeValueQueryUpdated), sdk.NewAttribute(types.AttributeKeyQueryID, strconv.FormatUint(query.Id, 10)), @@ -365,7 +365,7 @@ func getEventsQueryUpdated(query *types.RegisteredQuery) sdk.Events { func getEventsQueryRemoved(query *types.RegisteredQuery) sdk.Events { return sdk.Events{ sdk.NewEvent( - types.EventTypeNeutronMessage, + types.EventTypeNolusMessage, sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), sdk.NewAttribute(sdk.AttributeKeyAction, types.AttributeValueQueryRemoved), sdk.NewAttribute(types.AttributeKeyQueryID, strconv.FormatUint(query.Id, 10)), diff --git a/x/interchainqueries/keeper/process_block_results_test.go b/x/interchainqueries/keeper/process_block_results_test.go index 7d17d051..d414d988 100644 --- a/x/interchainqueries/keeper/process_block_results_test.go +++ b/x/interchainqueries/keeper/process_block_results_test.go @@ -189,7 +189,7 @@ func (suite *KeeperTestSuite) TestUnpackAndVerifyHeaders() { nextHeader, err := suite.Path.EndpointA.Chain.ConstructUpdateTMClientHeader(suite.Path.EndpointA.Counterparty.Chain, suite.Path.EndpointB.ClientID) suite.Require().NoError(err) - return iqkeeper.Verifier{}.VerifyHeaders(suite.ChainA.GetContext(), suite.GetNeutronZoneApp(suite.ChainA).IBCKeeper.ClientKeeper, clientID, header, nextHeader) + return iqkeeper.Verifier{}.VerifyHeaders(suite.ChainA.GetContext(), suite.GetNolusZoneApp(suite.ChainA).IBCKeeper.ClientKeeper, clientID, header, nextHeader) }, "", }, @@ -211,7 +211,7 @@ func (suite *KeeperTestSuite) TestUnpackAndVerifyHeaders() { nextHeader, err := suite.Path.EndpointA.Chain.ConstructUpdateTMClientHeader(suite.Path.EndpointA.Counterparty.Chain, suite.Path.EndpointB.ClientID) suite.Require().NoError(err) - return iqkeeper.Verifier{}.VerifyHeaders(suite.ChainA.GetContext(), suite.GetNeutronZoneApp(suite.ChainA).IBCKeeper.ClientKeeper, clientID, header, nextHeader) + return iqkeeper.Verifier{}.VerifyHeaders(suite.ChainA.GetContext(), suite.GetNolusZoneApp(suite.ChainA).IBCKeeper.ClientKeeper, clientID, header, nextHeader) }, "block.NextBlockHeader is not next for the block.Header", }, @@ -234,7 +234,7 @@ func (suite *KeeperTestSuite) TestUnpackAndVerifyHeaders() { nextHeader, err := suite.Path.EndpointA.Chain.ConstructUpdateTMClientHeader(suite.Path.EndpointA.Counterparty.Chain, suite.Path.EndpointB.ClientID) suite.Require().NoError(err) - return iqkeeper.Verifier{}.VerifyHeaders(suite.ChainA.GetContext(), suite.GetNeutronZoneApp(suite.ChainA).IBCKeeper.ClientKeeper, clientID, header, nextHeader) + return iqkeeper.Verifier{}.VerifyHeaders(suite.ChainA.GetContext(), suite.GetNolusZoneApp(suite.ChainA).IBCKeeper.ClientKeeper, clientID, header, nextHeader) }, "invalid header: untrustedHeader.ValidateBasic failed: commit signs block", }, @@ -265,7 +265,7 @@ func (suite *KeeperTestSuite) TestUnpackAndVerifyHeaders() { oldNextHeader.TrustedHeight = headerWithTrustedHeight.TrustedHeight oldNextHeader.TrustedValidators = headerWithTrustedHeight.TrustedValidators - return iqkeeper.Verifier{}.VerifyHeaders(suite.ChainA.GetContext(), suite.GetNeutronZoneApp(suite.ChainA).IBCKeeper.ClientKeeper, clientID, &oldHeader, &oldNextHeader) + return iqkeeper.Verifier{}.VerifyHeaders(suite.ChainA.GetContext(), suite.GetNolusZoneApp(suite.ChainA).IBCKeeper.ClientKeeper, clientID, &oldHeader, &oldNextHeader) }, "", }, diff --git a/x/interchainqueries/types/types.go b/x/interchainqueries/types/types.go index dafa661f..2591704d 100644 --- a/x/interchainqueries/types/types.go +++ b/x/interchainqueries/types/types.go @@ -8,8 +8,8 @@ import ( ) const ( - // EventTypeNeutronMessage defines the event type used by the Interchain Queries module events. - EventTypeNeutronMessage = "neutron" + // EventTypeNolusMessage defines the event type used by the Interchain Queries module events. + EventTypeNolusMessage = "nolus" // AttributeKeyQueryID represents the key for event attribute delivering the query ID of a // registered interchain query. diff --git a/x/interchainqueries/types/types_test.go b/x/interchainqueries/types/types_test.go index 202c8c53..588be9fc 100644 --- a/x/interchainqueries/types/types_test.go +++ b/x/interchainqueries/types/types_test.go @@ -10,7 +10,7 @@ import ( func TestTransactionFilterValidation(t *testing.T) { t.Run("Valid", func(t *testing.T) { // several conditions - assert.NoError(t, ValidateTransactionsFilter(`[{"field":"transfer.recipient","op":"Eq","value":"neutron1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"},{"field":"tx.height","op":"Gte","value":100}]`)) + assert.NoError(t, ValidateTransactionsFilter(`[{"field":"transfer.recipient","op":"Eq","value":"nolus1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"},{"field":"tx.height","op":"Gte","value":100}]`)) // all supported operations with a whole operand assert.NoError(t, ValidateTransactionsFilter(`[{"field":"tx.height","op":"Eq","value":1000}]`)) assert.NoError(t, ValidateTransactionsFilter(`[{"field":"tx.height","op":"Gt","value":1000}]`)) @@ -22,22 +22,22 @@ func TestTransactionFilterValidation(t *testing.T) { // invalid json assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.recipient","op":"Eq","value":`), "unexpected end of JSON input") // empty operation - assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.recipient","op":"","value":"neutron1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), "op '' is expected to be one of: eq, gt, gte, lt, lte") + assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.recipient","op":"","value":"nolus1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), "op '' is expected to be one of: eq, gt, gte, lt, lte") // empty field - assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"","op":"Eq","value":"neutron1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), "field couldn't be empty") + assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"","op":"Eq","value":"nolus1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), "field couldn't be empty") // field with forbidden symbols const specialSymbolsAreNotAllowed = "special symbols \t\n\r\\()\"'=>< are not allowed" - assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.\t","op":"Eq","value":"neutron1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) - assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.\n","op":"Eq","value":"neutron1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) - assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.\r","op":"Eq","value":"neutron1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) - assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.\\","op":"Eq","value":"neutron1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) - assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.(","op":"Eq","value":"neutron1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) - assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.)","op":"Eq","value":"neutron1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) - assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.\"","op":"Eq","value":"neutron1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) - assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.'","op":"Eq","value":"neutron1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) - assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.=","op":"Eq","value":"neutron1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) - assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.>","op":"Eq","value":"neutron1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) - assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.<","op":"Eq","value":"neutron1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) + assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.\t","op":"Eq","value":"nolus1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) + assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.\n","op":"Eq","value":"nolus1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) + assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.\r","op":"Eq","value":"nolus1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) + assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.\\","op":"Eq","value":"nolus1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) + assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.(","op":"Eq","value":"nolus1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) + assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.)","op":"Eq","value":"nolus1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) + assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.\"","op":"Eq","value":"nolus1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) + assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.'","op":"Eq","value":"nolus1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) + assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.=","op":"Eq","value":"nolus1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) + assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.>","op":"Eq","value":"nolus1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) + assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"transfer.<","op":"Eq","value":"nolus1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u"}]`), specialSymbolsAreNotAllowed) // decimal number assert.ErrorContains(t, ValidateTransactionsFilter(`[{"field":"tx.height","op":"Gte","value":15.5}]`), "can't be a decimal number") assert.ErrorContains(t, ValidateTransactionsFilter(lotsOfTxFilters(t, 40)), "too many transactions filters") diff --git a/x/interchaintxs/keeper/grpc_query_interchainaccount_test.go b/x/interchaintxs/keeper/grpc_query_interchainaccount_test.go index bb270be6..b39dcef9 100644 --- a/x/interchaintxs/keeper/grpc_query_interchainaccount_test.go +++ b/x/interchaintxs/keeper/grpc_query_interchainaccount_test.go @@ -44,12 +44,12 @@ func TestKeeper_InterchainAccountAddress(t *testing.T) { require.Nil(t, resp) portID = fmt.Sprintf("%s%s.%s", types2.ControllerPortPrefix, testutil.TestOwnerAddress, "test1") - icaKeeper.EXPECT().GetInterchainAccountAddress(ctx, "connection-0", portID).Return("neutron1interchainaccountaddress", true) + icaKeeper.EXPECT().GetInterchainAccountAddress(ctx, "connection-0", portID).Return("nolus1interchainaccountaddress", true) resp, err = keeper.InterchainAccountAddress(ctx, &types.QueryInterchainAccountAddressRequest{ OwnerAddress: testutil.TestOwnerAddress, InterchainAccountId: "test1", ConnectionId: "connection-0", }) require.NoError(t, err) - require.Equal(t, &types.QueryInterchainAccountAddressResponse{InterchainAccountAddress: "neutron1interchainaccountaddress"}, resp) + require.Equal(t, &types.QueryInterchainAccountAddressResponse{InterchainAccountAddress: "nolus1interchainaccountaddress"}, resp) } diff --git a/x/interchaintxs/keeper/ibc_handlers_test.go b/x/interchaintxs/keeper/ibc_handlers_test.go index 41168a68..094720d1 100644 --- a/x/interchaintxs/keeper/ibc_handlers_test.go +++ b/x/interchaintxs/keeper/ibc_handlers_test.go @@ -45,7 +45,7 @@ func TestHandleAcknowledgement(t *testing.T) { SourceChannel: "channel-0", } contractAddress := sdk.MustAccAddressFromBech32(testutil.TestOwnerAddress) - relayerBech32 := "neutron1fxudpred77a0grgh69u0j7y84yks5ev4n5050z45kecz792jnd6scqu98z" + relayerBech32 := "nolus1fxudpred77a0grgh69u0j7y84yks5ev4n5050z45kecz792jnd6scqu98z" relayerAddress := sdk.MustAccAddressFromBech32(relayerBech32) err = icak.HandleAcknowledgement(ctx, channeltypes.Packet{}, nil, relayerAddress) @@ -83,7 +83,7 @@ func TestHandleTimeout(t *testing.T) { }) ctx := infCtx.WithGasMeter(types2.NewGasMeter(1_000_000_000_000)) contractAddress := sdk.MustAccAddressFromBech32(testutil.TestOwnerAddress) - relayerBech32 := "neutron1fxudpred77a0grgh69u0j7y84yks5ev4n5050z45kecz792jnd6scqu98z" + relayerBech32 := "nolus1fxudpred77a0grgh69u0j7y84yks5ev4n5050z45kecz792jnd6scqu98z" relayerAddress := sdk.MustAccAddressFromBech32(relayerBech32) p := channeltypes.Packet{ Sequence: 100, diff --git a/x/interchaintxs/keeper/msg_server_test.go b/x/interchaintxs/keeper/msg_server_test.go index 54c6d506..a0889b5f 100644 --- a/x/interchaintxs/keeper/msg_server_test.go +++ b/x/interchaintxs/keeper/msg_server_test.go @@ -30,7 +30,7 @@ import ( "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/types" ) -const TestFeeCollectorAddr = "neutron1dua3d89szsmd3vwg0y5a2689ah0g4x68ps8vew" +const TestFeeCollectorAddr = "nolus1dua3d89szsmd3vwg0y5a2689ah0g4x68ps8vew" func TestMsgRegisterInterchainAccountValidate(t *testing.T) { icak, ctx := testkeeper.InterchainTxsKeeper(t, nil, nil, nil, nil, nil, nil, func(_ sdk.Context) string { diff --git a/x/interchaintxs/types/codec.go b/x/interchaintxs/types/codec.go index e780becc..429f2474 100644 --- a/x/interchaintxs/types/codec.go +++ b/x/interchaintxs/types/codec.go @@ -12,9 +12,9 @@ import ( ) func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&MsgRegisterInterchainAccount{}, "/neutron.interchaintxs.v1.MsgRegisterInterchainAccount", nil) - cdc.RegisterConcrete(&MsgSubmitTx{}, "/neutron.interchaintxs.v1.MsgSubmitTx", nil) - cdc.RegisterConcrete(&MsgUpdateParams{}, "/neutron.interchaintxs.v1.MsgUpdateParams", nil) + cdc.RegisterConcrete(&MsgRegisterInterchainAccount{}, "/nolus.interchaintxs.v1.MsgRegisterInterchainAccount", nil) + cdc.RegisterConcrete(&MsgSubmitTx{}, "/nolus.interchaintxs.v1.MsgSubmitTx", nil) + cdc.RegisterConcrete(&MsgUpdateParams{}, "/nolus.interchaintxs.v1.MsgUpdateParams", nil) } func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { diff --git a/x/interchaintxs/types/tx.go b/x/interchaintxs/types/tx.go index 26f31e4b..c5ce237a 100644 --- a/x/interchaintxs/types/tx.go +++ b/x/interchaintxs/types/tx.go @@ -15,7 +15,7 @@ import ( // const interchainAccountIDLimit = 47 const interchainAccountIDLimit = 128 - len("icacontroller-") - - len("neutron1unyuj8qnmygvzuex3dwmg9yzt9alhvyeat0uu0jedg2wj33efl5qmysp02") - // just a random contract address + len("nolus1unyuj8qnmygvzuex3dwmg9yzt9alhvyeat0uu0jedg2wj33efl5qmysp02") - // just a random contract address len(".") var _ codectypes.UnpackInterfacesMessage = &MsgSubmitTx{} diff --git a/x/interchaintxs/types/tx_test.go b/x/interchaintxs/types/tx_test.go index 062fe332..8beb70bf 100644 --- a/x/interchaintxs/types/tx_test.go +++ b/x/interchaintxs/types/tx_test.go @@ -10,7 +10,7 @@ import ( "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/types" ) -const TestAddress = "neutron1m9l358xunhhwds0568za49mzhvuxx9ux8xafx2" +const TestAddress = "nolusn1m9l358xunhhwds0568za49mzhvuxx9ux8xafx2" func TestMsgRegisterInterchainAccountGetSigners(t *testing.T) { tests := []struct { diff --git a/x/transfer/ibc_handlers_test.go b/x/transfer/ibc_handlers_test.go index 18a12371..9413a909 100644 --- a/x/transfer/ibc_handlers_test.go +++ b/x/transfer/ibc_handlers_test.go @@ -49,7 +49,7 @@ func TestHandleAcknowledgement(t *testing.T) { } contractAddress := sdk.MustAccAddressFromBech32(testutil.TestOwnerAddress) - relayerBech32 := "neutron1fxudpred77a0grgh69u0j7y84yks5ev4n5050z45kecz792jnd6scqu98z" + relayerBech32 := "nolus1fxudpred77a0grgh69u0j7y84yks5ev4n5050z45kecz792jnd6scqu98z" relayerAddress := sdk.MustAccAddressFromBech32(relayerBech32) err = txModule.HandleAcknowledgement(ctx, channeltypes.Packet{}, nil, relayerAddress) @@ -120,7 +120,7 @@ func TestHandleTimeout(t *testing.T) { txModule := transfer.NewIBCModule(*txKeeper, wmKeeper) ctx := infCtx.WithGasMeter(types2.NewGasMeter(1_000_000_000_000)) contractAddress := sdk.MustAccAddressFromBech32(testutil.TestOwnerAddress) - relayerBech32 := "neutron1fxudpred77a0grgh69u0j7y84yks5ev4n5050z45kecz792jnd6scqu98z" + relayerBech32 := "nolus1fxudpred77a0grgh69u0j7y84yks5ev4n5050z45kecz792jnd6scqu98z" relayerAddress := sdk.MustAccAddressFromBech32(relayerBech32) p := channeltypes.Packet{ Sequence: 100, diff --git a/x/transfer/keeper/keeper_test.go b/x/transfer/keeper/keeper_test.go index 15caca54..2a615889 100644 --- a/x/transfer/keeper/keeper_test.go +++ b/x/transfer/keeper/keeper_test.go @@ -36,7 +36,7 @@ type KeeperTestSuite struct { func (suite KeeperTestSuite) TestTransfer() { //nolint:govet // it's a test so it's okay to copy locks suite.ConfigureTransferChannel() - msgSrv := suite.GetNeutronZoneApp(suite.ChainA).TransferKeeper + msgSrv := suite.GetNolusZoneApp(suite.ChainA).TransferKeeper ctx := suite.ChainA.GetContext() resp, err := msgSrv.Transfer(ctx, &types.MsgTransfer{ @@ -166,7 +166,7 @@ func (suite KeeperTestSuite) TestTransfer() { //nolint:govet // it's a test so i func (suite *KeeperTestSuite) TopUpWallet(ctx sdktypes.Context, sender, contractAddress sdktypes.AccAddress) { coinsAmnt := sdktypes.NewCoins(sdktypes.NewCoin(params.DefaultBondDenom, math.NewInt(int64(1_000_000)))) - bankKeeper := suite.GetNeutronZoneApp(suite.ChainA).BankKeeper + bankKeeper := suite.GetNolusZoneApp(suite.ChainA).BankKeeper err := bankKeeper.SendCoins(ctx, sender, contractAddress, coinsAmnt) suite.Require().NoError(err) } diff --git a/x/transfer/module.go b/x/transfer/module.go index 615ef8b0..8e81e0e1 100644 --- a/x/transfer/module.go +++ b/x/transfer/module.go @@ -16,7 +16,7 @@ import ( channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" wrapkeeper "github.com/Nolus-Protocol/nolus-core/x/transfer/keeper" - neutrontypes "github.com/Nolus-Protocol/nolus-core/x/transfer/types" + transfertypes "github.com/Nolus-Protocol/nolus-core/x/transfer/types" ) /* @@ -27,12 +27,12 @@ import ( type IBCModule struct { wrappedKeeper wrapkeeper.KeeperTransferWrapper keeper keeper.Keeper - sudoKeeper neutrontypes.WasmKeeper + sudoKeeper transfertypes.WasmKeeper transfer.IBCModule } // NewIBCModule creates a new IBCModule given the keeper -func NewIBCModule(k wrapkeeper.KeeperTransferWrapper, sudoKeeper neutrontypes.WasmKeeper) IBCModule { +func NewIBCModule(k wrapkeeper.KeeperTransferWrapper, sudoKeeper transfertypes.WasmKeeper) IBCModule { return IBCModule{ wrappedKeeper: k, keeper: k.Keeper, @@ -95,9 +95,9 @@ func (am AppModule) IsAppModule() { // marker // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), am.keeper) - neutrontypes.RegisterMsgServer(cfg.MsgServer(), am.keeper) + transfertypes.RegisterMsgServer(cfg.MsgServer(), am.keeper) - cfg.MsgServer().RegisterService(&neutrontypes.MsgServiceDescOrig, am.keeper) + cfg.MsgServer().RegisterService(&transfertypes.MsgServiceDescOrig, am.keeper) m := keeper.NewMigrator(am.keeper.Keeper) if err := cfg.RegisterMigration(types.ModuleName, 1, m.MigrateTraces); err != nil { @@ -126,17 +126,17 @@ func NewAppModuleBasic() AppModuleBasic { } func (AppModuleBasic) RegisterCodec(cdc *codec.LegacyAmino) { - neutrontypes.RegisterLegacyAminoCodec(cdc) + transfertypes.RegisterLegacyAminoCodec(cdc) } func (am AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - neutrontypes.RegisterLegacyAminoCodec(cdc) + transfertypes.RegisterLegacyAminoCodec(cdc) am.AppModuleBasic.RegisterLegacyAminoCodec(cdc) } // RegisterInterfaces registers the module's interface types func (am AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { - neutrontypes.RegisterInterfaces(reg) + transfertypes.RegisterInterfaces(reg) am.AppModuleBasic.RegisterInterfaces(reg) } diff --git a/x/transfer/types/codec.go b/x/transfer/types/codec.go index 3e9e7a6f..6bc77f7e 100644 --- a/x/transfer/types/codec.go +++ b/x/transfer/types/codec.go @@ -13,7 +13,7 @@ var ( ) func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&MsgTransfer{}, "/neutron.transfer.v1.Transfer", nil) + cdc.RegisterConcrete(&MsgTransfer{}, "/nolus.transfer.v1.Transfer", nil) } func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { diff --git a/x/transfer/types/tx.go b/x/transfer/types/tx.go index 98f88ad8..d99835d3 100644 --- a/x/transfer/types/tx.go +++ b/x/transfer/types/tx.go @@ -27,8 +27,8 @@ func (msg *MsgTransfer) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{fromAddress} } -// MsgOrigTransferHandler - 1) helps to bind `/neutron.transfer.Msg/Transfer` as a handler for `ibc.applications.transfer.v1.MsgTransfer` -// 2) converts `ibc.applications.transfer.v1.MsgTransfer` into neutron.transfer.MsgTransfer` before processing. +// MsgOrigTransferHandler - 1) helps to bind `/nolus.transfer.Msg/Transfer` as a handler for `ibc.applications.transfer.v1.MsgTransfer` +// 2) converts `ibc.applications.transfer.v1.MsgTransfer` into nolus.transfer.MsgTransfer` before processing. // //nolint:revive // we cant rearrange arguments since we need to meet the type requirement func MsgOrigTransferHandler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -52,7 +52,7 @@ func MsgOrigTransferHandler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/neutron.transfer.Msg/Transfer", + FullMethod: "/nolus.transfer.Msg/Transfer", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { reqT := req.(*types.MsgTransfer)