Skip to content

Commit

Permalink
feat: optimise genesis transfer (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
danwt authored Dec 14, 2024
1 parent bbe42d5 commit 66df3f9
Show file tree
Hide file tree
Showing 9 changed files with 1,293 additions and 26 deletions.
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

0 comments on commit 66df3f9

Please sign in to comment.