-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add chain processor implementation (#924)
* feat: add chain processor implementation * fix: go-schnorrkel version fix * fix: go mod update dockertest
- Loading branch information
Showing
5 changed files
with
446 additions
and
10 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
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,29 @@ | ||
package substrate | ||
|
||
import ( | ||
rpcclienttypes "github.com/ComposableFi/go-substrate-rpc-client/v4/types" | ||
clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" | ||
"github.com/cosmos/relayer/v2/relayer/processor" | ||
"github.com/cosmos/relayer/v2/relayer/provider" | ||
) | ||
|
||
// ibcMessagesFromTransaction parses all events within a transaction to find IBC messages | ||
func (scp *SubstrateChainProcessor) handleIBCMessagesFromEvents(ibcEvents rpcclienttypes.IBCEventsQueryResult, height uint64, c processor.IBCMessagesCache) error { | ||
//TODO implement me | ||
panic("implement me") | ||
} | ||
|
||
// client info attributes and methods | ||
type clientInfo struct { | ||
Height clienttypes.Height `json:"height"` | ||
ClientID string `json:"client_id"` | ||
ClientType uint32 `json:"client_type"` | ||
ConsensusHeight clienttypes.Height `json:"consensus_height"` | ||
} | ||
|
||
func (c clientInfo) ClientState() provider.ClientState { | ||
return provider.ClientState{ | ||
ClientID: c.ClientID, | ||
ConsensusHeight: c.ConsensusHeight, | ||
} | ||
} |
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.