-
Notifications
You must be signed in to change notification settings - Fork 308
feat: wormhole receiver contract for stylus #2774
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
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
771f39e
feat(target_chains/stylus): created project structure
ayushboss b91fb10
added wormhole contract, tests working on test addresses but need to …
ayushboss f2bad80
quick linting changes
ayushboss 3d3b87a
Merge branch 'main' into stylus-target-chain-structure
ayushboss f1d6b92
working with actual wormhole transactions
ayushboss e5a8375
Merge branch 'main' into pyth-wormhole-stylus-integration
ayushboss a58beb2
deleting git files
ayushboss ca4c8d6
removing unused files for wormhole
ayushboss 9e1dea3
refactoring VerfiedVM and VM to be VAA instead
ayushboss 87308d6
fixed error messsaging
ayushboss e10090b
removed error strings
ayushboss e852118
fixed parse + verify function names
ayushboss 44fbd54
removing use of 'as' and cleaning byte conversion of parse_vm
ayushboss fca7e05
refactored back from VA to VerifiedVM
ayushboss 9f0c00a
reconfigured names of tests to not have 'real'
ayushboss 587a413
fix: wrap no_mangle attribute with unsafe for compilation
devin-ai-integration[bot] e5dde4b
whitespace
ayushboss ee56a8a
fix: add hmac feature to libsecp256k1 for test guardian functions
devin-ai-integration[bot] c408f63
fix: add PublicKey import back to test module
devin-ai-integration[bot] 12af81b
fixed export abi feature
ayushboss 343b112
Merge branch 'pyth-wormhole-stylus-integration' of https://github.com…
devin-ai-integration[bot] 430211d
feat: optimize Stylus contract size - 92% reduction achieved
devin-ai-integration[bot] a222f0e
chore: update Cargo.lock after size optimization
devin-ai-integration[bot] 44c6687
chore: remove unnecessary main.rs file after optimization verification
devin-ai-integration[bot] 802f063
feat: optimize contract size with dependency cleanup and aggressive c…
devin-ai-integration[bot] a6648d5
feat: shorten error messages and panic strings for size optimization
devin-ai-integration[bot] cbf6e33
feat: optimize contract size under 24KB by removing duplicate public …
devin-ai-integration[bot] 8fbca73
feat: achieve 23.9 KiB target by inlining variables in verify_signature
devin-ai-integration[bot] d13da6d
chore: remove temporary .cargo/config.toml used during cargo-stylus i…
devin-ai-integration[bot] 77b997c
feat: restore test_wormhole_vaa function with original base64 VAA data
devin-ai-integration[bot] 66cf7c6
added main.rs back, but went over size limit again
ayushboss c11221f
fix: restore no_std configuration to reduce contract size from 24.9 K…
devin-ai-integration[bot] 2a58ad8
chore: restore main.rs and clean up Cargo.toml configurations
devin-ai-integration[bot] 5b74700
fix: resolve no_std deployment conflicts while maintaining 23.9 KiB c…
devin-ai-integration[bot] c179693
fixing parse and verify vm incorrect guardian index bug
ayushboss bdb0626
fixed invlaid guardian set index test
ayushboss 18b8a74
fixed current guardian set index and related tests
ayushboss 362c2dc
split unit tets into independent file
ayushboss d19b17d
additional tests
ayushboss e5664ef
fixed struct name
ayushboss ee8778a
separated out types
ayushboss 7ce02c3
added duplicate guardian signature test
ayushboss f5c691f
divided integration and unit tests, deleted extra files
ayushboss 8f013cb
added initial guardian set index flag
ayushboss cfe9532
small fixes
ayushboss 9fdcf99
removed print statement and comments
ayushboss 50e0900
safer gets within the parse_vm_static function
ayushboss File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| [workspace] | ||
| members = [ | ||
| "contracts/wormhole", | ||
| ] | ||
| resolver = "2" | ||
|
|
||
| [workspace.package] | ||
| edition = "2024" | ||
| license = "Apache-2.0" | ||
| repository = "https://github.com/pyth-network/pyth-crosschain" | ||
| version = "0.1.0" | ||
|
|
||
| [workspace.dependencies] | ||
| stylus-sdk = { version = "0.6.0", default-features = false } | ||
| alloy-primitives = { version = "0.7.6", default-features = false } | ||
| mini-alloc = { version = "0.4.2", default-features = false } | ||
| motsu = "0.1.0" | ||
|
|
||
| k256 = { version = "0.13.3", default-features = false, features = ["ecdsa"] } | ||
|
|
||
| [profile.dev] | ||
| panic = "abort" | ||
|
|
||
| [profile.release] | ||
| opt-level = "z" # Optimize for size instead of speed | ||
| lto = "fat" # More aggressive link-time optimization | ||
| strip = "symbols" # Strip all symbols including debug | ||
| panic = "abort" # Smaller panic handling | ||
| codegen-units = 1 # Better optimization (slower build, smaller binary) | ||
| overflow-checks = false # Disable overflow checks for size | ||
| debug-assertions = false # Disable debug assertions | ||
| incremental = false # Disable incremental compilation for better optimization | ||
| rpath = false # Disable rpath for smaller binary | ||
|
|
||
| [profile.release.package."*"] | ||
| opt-level = "z" # Force size optimization for all dependencies | ||
|
|
||
| [profile.release.package.k256] | ||
| opt-level = "z" | ||
| strip = "symbols" | ||
|
|
||
| [profile.release.package.alloy-primitives] | ||
| opt-level = "z" | ||
| strip = "symbols" | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| RPC_URL= | ||
| STYLUS_CONTRACT_ADDRESS= | ||
| PRIV_KEY_PATH= |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to disable overflow-checks? Otherwise, nice work on trimming the fat