Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement cross-chain mechanism between op and greenfield #413

Merged
merged 3 commits into from
Aug 14, 2023

Conversation

yutianwu
Copy link
Collaborator

Description

This pr implements the cross-chain mechanism between op and greenfield.

Rationale

Implement cross-chain mechanism between op and greenfield.

Example

n/a

Changes

Notable changes:

  • implement the cross-chain mechanism between op and greenfield

@unclezoro
Copy link
Collaborator

LGTM

@@ -734,7 +734,7 @@ func (app *App) initModules(ctx sdk.Context) {

func (app *App) initCrossChain() {
app.CrossChainKeeper.SetSrcChainID(sdk.ChainID(app.appConfig.CrossChain.SrcChainId))
app.CrossChainKeeper.SetDestChainID(sdk.ChainID(app.appConfig.CrossChain.DestBscChainId))
app.CrossChainKeeper.SetDestBscChainID(sdk.ChainID(app.appConfig.CrossChain.DestBscChainId))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is DestOpChainID needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need a hardfork to register the DestOpChainID

CreateRawIBCPackageWithFee(ctx sdk.Context, chainID sdk.ChainID, channelID sdk.ChannelID, packageType sdk.CrossChainPackageType,
packageLoad []byte, relayerFee *big.Int, ackRelayerFee *big.Int,
) (uint64, error)

IsDestChainSupported(chainID sdk.ChainID) bool

RegisterChannel(name string, id sdk.ChannelID, app sdk.CrossChainApplication) error
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to specify the dest chain id ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, the app is bind to the channel, all the dest chains use the same app

@yutianwu yutianwu added this pull request to the merge queue Aug 14, 2023
Merged via the queue into bnb-chain:develop with commit 7869d8e Aug 14, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants