forked from cosmos/relayer
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Revert "feat(hub-genesis): Relayer triggered genesis transfer…
…"" (#61)
- Loading branch information
Showing
20 changed files
with
1,688 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Here are our instructions: | ||
|
||
We want you to play the role of an expert software developer, who has particular expertise in Golang and all its nuances, as well as the Cosmos SDK, IBC protocol, Tendermint/CometBFT algorithms and light clients, and also knowledge of the wider blockchain technology space. | ||
|
||
Please be terse, and follow all the coding guidelines. Pay particular attention to importing packages correctly, and the visibility of methods, functions, types and fields. Do not write lines longer than 80 characters wide, you should split them according to golang formatting rules. If writing code, try to reuse existing code, and suggest refactors for how to keep the code DRY. | ||
|
||
Also pay particular attention to security, and to make sure that the code is deterministic. Make sure to look at the context of the code to use the right library versions and import aliases, and to follow typical Cosmos SDK practices like using the SDK math, coin and error handling libraries. Remember that Cosmos SDK blockchains have a single logical thread of execution and execute transactions in sequence, there are no 'race' conditions, and failed transactions have no effect. Be wary of any paths that can lead to a panic from BeginBlocker or EndBlocker. Don't worry about what ifs or improbably scenarios based on future code changes. Just evaluate the code as it is, and find bugs that definitely exist. | ||
|
||
These additional resources are useful | ||
- https://github.com/dymensionxyz/dymension/blob/main/Contributing.md (also at ../Contributing.md) | ||
- https://github.com/cosmos/ibc/tree/main/spec/core | ||
- https://github.com/cosmos/ibc-go/tree/v7.5.1/modules/core | ||
- https://github.com/cosmos/ibc-go/tree/v7.5.1/modules/light-clients/07-tendermint | ||
- https://github.com/cosmos/cosmos-sdk/tree/v0.47.13/docs | ||
- https://github.com/dymensionxyz/dymint | ||
- https://github.com/dymensionxyz/rollapp-evm | ||
- https://github.com/dymensionxyz/rollapp-wasm | ||
- https://github.com/dymensionxyz/go-relayer |
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,28 @@ | ||
syntax = "proto3"; | ||
package dymensionxyz.dymension.lightclient; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "google/api/annotations.proto"; | ||
import "google/protobuf/any.proto"; | ||
|
||
option go_package = "github.com/cosmos/relayer/relayer/chains/cosmos/dym/lightclient/types"; | ||
|
||
|
||
|
||
// Query defines the gRPC querier service. | ||
service Query { | ||
rpc RollappCanonChannel(QueryRollappCanonChannelRequest) returns (QueryRollappCanonChannelResponse) { | ||
option (google.api.http).get = "/dymensionxyz/dymension/lightclient/canon_channel/{rollappId}"; | ||
} | ||
} | ||
|
||
message QueryRollappCanonChannelRequest { | ||
string rollappId = 1; | ||
} | ||
|
||
message QueryRollappCanonChannelResponse { | ||
// hub side | ||
string hub_channel_id = 1; | ||
// rollapp side ('counterparty') | ||
string rollapp_channel_id = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
syntax = "proto3"; | ||
package rollapp.hub_genesis; | ||
|
||
import "cosmos/msg/v1/msg.proto"; | ||
import "google/protobuf/any.proto"; | ||
|
||
option go_package = "github.com/cosmos/relayer/relayer/chains/cosmos/rollapp/rdk/hub-genesis/types"; | ||
|
||
|
||
service Msg { | ||
rpc SendTransfer(MsgSendTransfer) returns (MsgSendTransferResponse); | ||
} | ||
|
||
// Try to send the genesis transfer | ||
// Must be whitelisted relayer, and channel must be open | ||
// Must have tokens available to send | ||
message MsgSendTransfer { | ||
option (cosmos.msg.v1.signer) = "signer"; | ||
string signer = 1; | ||
// ID of the canonical channel, as queried from the hub | ||
string channel_id = 2; | ||
} | ||
|
||
message MsgSendTransferResponse {} |
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.