Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert: recover transaction msg proto definition #692

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/stretchr/testify/assert"

"github.com/functionx/fx-core/v8/testutil/helpers"
"github.com/functionx/fx-core/v8/types/legacy"
crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types"
govlegacy "github.com/functionx/fx-core/v8/x/gov/legacy"
)

func Test_MsgServiceRouter(t *testing.T) {
Expand All @@ -18,7 +18,7 @@ func Test_MsgServiceRouter(t *testing.T) {
deprecated := map[string]struct{}{
sdk.MsgTypeURL(&crosschaintypes.MsgSetOrchestratorAddress{}): {},
sdk.MsgTypeURL(&crosschaintypes.MsgAddOracleDeposit{}): {},
sdk.MsgTypeURL(&govlegacy.MsgUpdateParams{}): {},
sdk.MsgTypeURL(&legacy.MsgUpdateParams{}): {},
}
for _, msg := range myApp.InterfaceRegistry().ListImplementations(sdk.MsgInterfaceProtoName) {
if _, ok := deprecated[msg]; ok {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ethermint.evm.v1;

import "gogoproto/gogo.proto";

option go_package = "github.com/functionx/fx-core/x/evm/legacy";
option go_package = "github.com/functionx/fx-core/types/legacy";

// Deprecated: Do not use.
message InitEvmParamsProposal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "google/protobuf/duration.proto";

option go_package = "github.com/functionx/fx-core/x/gov/legacy";
option go_package = "github.com/functionx/fx-core/types/legacy";

// Deprecated: Do not use.
message MsgUpdateParams {
Expand Down
110 changes: 110 additions & 0 deletions proto/fx/gravity/v1/gravity_legacy.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
syntax = "proto3";
package fx.gravity.v1;

import "cosmos/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/functionx/fx-core/types/legacy";

// Deprecated: after upgrade v3
message MsgValsetConfirm {
uint64 nonce = 1;
string orchestrator = 2;
string eth_address = 3;
string signature = 4;
}

// Deprecated: after upgrade v3
message MsgSendToEth {
string sender = 1;
string eth_dest = 2;
cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ];
cosmos.base.v1beta1.Coin bridge_fee = 4 [ (gogoproto.nullable) = false ];
}

// Deprecated: after upgrade v3
message MsgRequestBatch {
string sender = 1;
string denom = 2;
string minimum_fee = 3 [
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
string feeReceive = 4;
string base_fee = 5 [
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
}

// Deprecated: after upgrade v3
message MsgConfirmBatch {
uint64 nonce = 1;
string token_contract = 2;
string eth_signer = 3;
string orchestrator = 4;
string signature = 5;
}

// Deprecated: after upgrade v3
message MsgDepositClaim {
uint64 event_nonce = 1;
uint64 block_height = 2;
string token_contract = 3;
string amount = 4 [
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
string eth_sender = 5;
string fx_receiver = 6;
string target_ibc = 7;
string orchestrator = 8;
}

// Deprecated: after upgrade v3
message MsgWithdrawClaim {
uint64 event_nonce = 1;
uint64 block_height = 2;
uint64 batch_nonce = 3;
string token_contract = 4;
string orchestrator = 5;
}

// Deprecated: after upgrade v3
message MsgCancelSendToEth {
uint64 transaction_id = 1;
string sender = 2;
}

// Deprecated: after upgrade v3
message MsgValsetUpdatedClaim {
uint64 event_nonce = 1;
uint64 block_height = 2;
uint64 valset_nonce = 3;
repeated BridgeValidator members = 4;
string orchestrator = 6;
}

// Deprecated: after upgrade v3
message BridgeValidator {
uint64 power = 1;
string eth_address = 2;
}

// Deprecated: after upgrade v3
message MsgSetOrchestratorAddress {
string validator = 1;
string orchestrator = 2;
string eth_address = 3;
}

// Deprecated: after upgrade v3
message MsgFxOriginatedTokenClaim {
uint64 event_nonce = 1;
uint64 block_height = 2;
string token_contract = 3;
string name = 4;
string symbol = 5;
uint64 decimals = 6;
string orchestrator = 7;
}
45 changes: 45 additions & 0 deletions proto/fx/ibc/applications/transfer/v1/ibc_legacy.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
syntax = "proto3";
package fx.ibc.applications.transfer.v1;

import "cosmos/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";
import "ibc/applications/transfer/v1/tx.proto";
import "ibc/core/client/v1/client.proto";

option go_package = "github.com/functionx/fx-core/types/legacy";

// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between
// ICS20 enabled chains. See ICS Spec here:
// https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures
message MsgTransfer {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

// 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 nanoseconds) relative to the current block timestamp.
// The timeout is disabled when set to 0.
uint64 timeout_timestamp = 7
[ (gogoproto.moretags) = "yaml:\"timeout_timestamp\"" ];
// the router is hook destination chain
string router = 8;
// the tokens to be destination fee
cosmos.base.v1beta1.Coin fee = 9 [ (gogoproto.nullable) = false ];
// optional memo
string memo = 10;
}
23 changes: 23 additions & 0 deletions proto/fx/staking/v1/staking_legacy.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
syntax = "proto3";
package fx.staking.v1;

import "cosmos_proto/cosmos.proto";
import "google/protobuf/any.proto";

option go_package = "github.com/functionx/fx-core/types/legacy";

message MsgGrantPrivilege {
string validator_address = 1; // validator address
string from_address = 2; // from address
google.protobuf.Any to_pubkey = 3
[ (cosmos_proto.accepts_interface) =
"cosmos.crypto.PubKey" ]; // to pub_key
string signature = 4; // signature
}

message MsgEditConsensusPubKey {
string validator_address = 1;
string from = 2;
google.protobuf.Any pubkey = 3
[ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey" ];
}
2 changes: 1 addition & 1 deletion scripts/protoc-swagger-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -eo pipefail

mkdir -p ./tmp-swagger-gen ./third_party ./build
trap 'rm -rf ./tmp-swagger-gen ./third_party ./build' EXIT
trap 'rm -rf ./tmp-swagger-gen ./third_party' EXIT

commit_hash=$(go list -m -f '{{.Replace.Version}}' github.com/evmos/ethermint | awk -F '-' '{print $NF}')
if [[ ! -f "./build/$commit_hash.zip" ]]; then
Expand Down
File renamed without changes.
Loading