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

feat: optimise genesis transfer #63

Merged
merged 4 commits into from
Dec 14, 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: 3 additions & 1 deletion proto/dymensionxyz/dymension/lightclient/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ message QueryRollappCanonChannelResponse {
string hub_channel_id = 1;
// rollapp side ('counterparty')
string rollapp_channel_id = 2;
}
}


48 changes: 48 additions & 0 deletions proto/rollapp/hub_genesis/query.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
syntax = "proto3";
package rollapp.hub_genesis;

import "cosmos/msg/v1/msg.proto";
import "google/protobuf/any.proto";
import "google/api/annotations.proto";
import "gogoproto/gogo.proto";


option go_package = "github.com/cosmos/relayer/relayer/chains/cosmos/rollapp/rdk/hub-genesis/types";

service Query {
// State returns the state of the genesis event.
rpc State(QueryStateRequest) returns (QueryStateResponse) {
option (google.api.http).get =
"/dymensionxyz/dymension-rdk/hub-genesis/state";
}
}

// QueryStateRequest is the request type for the Query/State RPC method.
message QueryStateRequest {}

// QueryStateResponse is the response type for the Query/State RPC method.
message QueryStateResponse {
// state holds the state of the genesis event
State state = 1 [(gogoproto.nullable) = false];
}

// State holds the state of the genesis event
message State {
reserved 1 to 5;

// are outboundTransfersEnabled? This is only true if the genesis protocol has
// finished
bool outbound_transfers_enabled = 6;
// the canonical transfer port and channel for the hub
PortAndChannel hub_port_and_channel = 7;

// are we awaiting a timeout or ack for the sent genesis transfer?
bool in_flight = 8;
}

message PortAndChannel {
// port
string port = 1;
// channel
string channel = 2;
}
4 changes: 1 addition & 3 deletions relayer/chains/cosmos/rollapp/rdk/hub-genesis/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import (
"github.com/dymensionxyz/gerr-cosmos/gerrc"
)

var (
_ sdk.Msg = (*MsgSendTransfer)(nil)
)
var _ sdk.Msg = (*MsgSendTransfer)(nil)

func (m *MsgSendTransfer) GetSigners() []sdk.AccAddress {
return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Signer)}
Expand Down
Loading
Loading