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

Implement a ValidateInbound method in crosschain keeper #2277

Closed
Tracked by #2250
lumtis opened this issue May 28, 2024 · 0 comments · Fixed by #2340
Closed
Tracked by #2250

Implement a ValidateInbound method in crosschain keeper #2277

lumtis opened this issue May 28, 2024 · 0 comments · Fixed by #2340
Assignees

Comments

@lumtis
Copy link
Member

lumtis commented May 28, 2024

Describe the Issue
Depends on #2276

As per the specs, ValidateInbound contains logic to validate an inbound and initialize a new CCTX on ZetaChain.

This must be the only entrypoint in order to create a new CCTX

Considered pseudocode:

ValidateInbound(Inbound) {
	// some checks
	fungible.CheckGasExistForChain(Inbound.ChainID)
		
	// init and store the cctx in the store, eventually other actions
	cctx := NewCCTX(inbound)
	saveCCTX(cctx)
	
	// outbound flow
	outboundParams := cctx.GetOutboundParams()
	initiateOutbound(outboundParams)
}

Then use ValidateInbound in all location where we have NewCCTX

  • VoteInbound for Observers inbounds
  • evm_hook.go for ZEVM inbounds
@lumtis lumtis changed the title Implement a ValidateInbound method Implement a ValidateInbound method in crosschain keeper May 28, 2024
@skosito skosito self-assigned this Jun 6, 2024
@skosito skosito linked a pull request Jun 18, 2024 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants