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

Refactor genesis #1149

Closed
wants to merge 14 commits into from
Closed

Refactor genesis #1149

wants to merge 14 commits into from

Conversation

aaronbuchwald
Copy link
Collaborator

This PR refactors the shared genesis/rules code between the MorpheusVM and TokenVM into the genesis/ package.

Both genesis packages implement the chain.Rules interface, which duplicates the code even though every chain is required to implement it.

This PR separates the required genesis/rules data from the functionality. It defines the genesis struct once in the genesis/ package, which can be imported and embedded into the actual genesis used by MorpheusVM and TokenVM.

The New, Load, and Rules functions are defined by the VM specific genesis, so that they can override whichever functions they want.

Base automatically changed from tx-indexer to main July 18, 2024 20:47
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.

None yet

1 participant