-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(genesis_bridge): revised genesis bridge impl (#565)
- Loading branch information
Showing
37 changed files
with
2,730 additions
and
1,019 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
syntax = "proto3"; | ||
package rollapp.hub_genesis; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "cosmos/bank/v1beta1/bank.proto"; | ||
import "ibc/applications/transfer/v2/packet.proto"; | ||
import "hub-genesis/genesis_info.proto"; | ||
|
||
option go_package = "github.com/dymensionxyz/dymension-rdk/x/hub-genesis/types"; | ||
|
||
// GenesisBridgeData is the data struct that is passed to the hub for the | ||
// genesis bridge flow | ||
message GenesisBridgeData { | ||
// genesis_info is the genesis info of the rollapp. used for hub validation | ||
GenesisInfo genesis_info = 1 [ (gogoproto.nullable) = false ]; | ||
// native_denom is the native denom of the rollapp. registered on the hub | ||
cosmos.bank.v1beta1.Metadata native_denom = 2 | ||
[ (gogoproto.nullable) = false ]; | ||
// optional genesis transfer packet data | ||
ibc.applications.transfer.v2.FungibleTokenPacketData genesis_transfer = 3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
syntax = "proto3"; | ||
package rollapp.hub_genesis; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "cosmos/bank/v1beta1/bank.proto"; | ||
import "hub-genesis/state.proto"; | ||
|
||
option go_package = "github.com/dymensionxyz/dymension-rdk/x/hub-genesis/types"; | ||
|
||
// The genesis info of the rollapp, that is passed to the hub for validation. | ||
// it's populated on the InitGenesis of the rollapp | ||
message GenesisInfo { | ||
// checksum used to verify integrity of the genesis file. currently unused | ||
string genesis_checksum = 1; | ||
// unique bech32 prefix | ||
string bech32_prefix = 2; | ||
// native_denom is the base denom for the native token | ||
DenomMetadata native_denom = 3; | ||
// initial_supply is the initial supply of the native token | ||
string initial_supply = 4 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", | ||
(gogoproto.nullable) = false | ||
]; | ||
// accounts on the Hub to fund with some bootstrapping transfers | ||
repeated GenesisAccount genesis_accounts = 5 [ (gogoproto.nullable) = false ]; | ||
} | ||
|
||
message DenomMetadata { | ||
string display = 1; | ||
string base = 2; | ||
uint32 exponent = 3; | ||
} | ||
|
||
|
||
// GenesisAccount is a struct for the genesis account for the rollapp | ||
message GenesisAccount { | ||
// amount of coins to be sent to the genesis address | ||
string amount = 1 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", | ||
(gogoproto.nullable) = false | ||
]; | ||
// address is a bech-32 address of the genesis account | ||
string address = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.