Skip to content

Commit

Permalink
going to use a transfers enabled field
Browse files Browse the repository at this point in the history
  • Loading branch information
danwt committed Jun 4, 2024
1 parent aa4bce6 commit 87b6857
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 6 additions & 2 deletions proto/dymension/rollapp/rollapp.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ import "cosmos/base/v1beta1/coin.proto";
// RollappGenesisState is a partial repr of the state the hub can expect the rollapp to be in upon genesis
message RollappGenesisState {
reserved 1;
// did the genesis event already get triggered?
bool genesis_event_happened = 2;
// If true, then full usage of the canonical ibc transfer channel is enabled.
// Note: in v3.1.0 and prior this field marked the completion of the 'genesis event'
// Keeping and renaming the field enables a seamless upgrade https://www.notion.so/dymension/ADR-x-Genesis-Bridge-Phase-2-89769aa551b5440b9ed403a101775ce1?pvs=4#89698384d815435b87393dbe45bc5a74
// to the new genesis transfer protocol
// Note: if this field is false, ibc transfers may still be allowed in one or either direction.
bool transfers_enabled = 2;
}

// Rollapp defines a rollapp object. First the RollApp is created and then
Expand Down
4 changes: 4 additions & 0 deletions x/rollapp/transfergenesis/ibc_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ func (im IBCMiddleware) OnRecvPacket(
type genesisTransferDenomMemo struct {
Data struct {
Denom banktypes.Metadata `json:"denom"`
// How many transfers in total will be sent in the transfer genesis period
TotalNumTransfers int `json:"total_num_transfers"`
// Which transfer is this? If there are 5 transfers total, they will be numbered 0,1,2,3,4.
ThisTransferIx int `json:"this_transfer_ix"`
} `json:"genesis_transfer"`
}

Expand Down

0 comments on commit 87b6857

Please sign in to comment.