Open
Conversation
b7a63b2 to
fb4afc8
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the CosmWasm Gringotts vesting contract to Solidity for deployment on Sei's EVM. Uses native SEI tokens and integrates directly with Sei's staking and distribution precompiles.
Key Features
msg.valueduring deployment0x1005) and distribution (0x1007) precompilesChanges
New Files:
solidity/contracts/Gringotts.sol- Main upgradeable vesting contractsolidity/contracts/GringottsFactory.sol- Factory for deploying proxy instancessolidity/interfaces/IStaking.sol- Sei staking precompile interfacesolidity/interfaces/IDistribution.sol- Sei distribution precompile interfacesolidity/contracts/mocks/- Mock contracts for testingsolidity/scripts/migration/- Migration scripts for CosmWasm → Soliditysolidity/test/Gringotts.test.js- Test suite (15 passing)Configuration:
solidity/package.json- Hardhat project with dependenciessolidity/hardhat.config.js- Compiler settings (0.8.24, viaIR, Sei networks).gitignore- Addednode_modules/and**/cacheUpgrade Process
Contract upgrades require multi-sig admin approval:
proposeUpgrade(newImplementation)voteProposal(proposalId)processProposal(proposalId)Migration from CosmWasm
Export existing contract state
node scripts/migration/export-cosmwasm.js sei1contract... --output export.json
Convert addresses (sei1... → 0x...)
seid q evm sei-addr sei1admin...
Deploy to Sei EVM
EXPORT_FILE=export.json npx hardhat run scripts/migration/deploy-from-export.js --network sei