Skip to content
Merged
Show file tree
Hide file tree
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 Jun 2, 2025
b91fb10
added wormhole contract, tests working on test addresses but need to …
ayushboss Jun 9, 2025
f2bad80
quick linting changes
ayushboss Jun 9, 2025
3d3b87a
Merge branch 'main' into stylus-target-chain-structure
ayushboss Jun 9, 2025
f1d6b92
working with actual wormhole transactions
ayushboss Jun 10, 2025
e5a8375
Merge branch 'main' into pyth-wormhole-stylus-integration
ayushboss Jun 11, 2025
a58beb2
deleting git files
ayushboss Jun 11, 2025
ca4c8d6
removing unused files for wormhole
ayushboss Jun 12, 2025
9e1dea3
refactoring VerfiedVM and VM to be VAA instead
ayushboss Jun 12, 2025
87308d6
fixed error messsaging
ayushboss Jun 12, 2025
e10090b
removed error strings
ayushboss Jun 12, 2025
e852118
fixed parse + verify function names
ayushboss Jun 12, 2025
44fbd54
removing use of 'as' and cleaning byte conversion of parse_vm
ayushboss Jun 12, 2025
fca7e05
refactored back from VA to VerifiedVM
ayushboss Jun 12, 2025
9f0c00a
reconfigured names of tests to not have 'real'
ayushboss Jun 13, 2025
587a413
fix: wrap no_mangle attribute with unsafe for compilation
devin-ai-integration[bot] Jun 13, 2025
e5dde4b
whitespace
ayushboss Jun 13, 2025
ee56a8a
fix: add hmac feature to libsecp256k1 for test guardian functions
devin-ai-integration[bot] Jun 16, 2025
c408f63
fix: add PublicKey import back to test module
devin-ai-integration[bot] Jun 16, 2025
12af81b
fixed export abi feature
ayushboss Jun 16, 2025
343b112
Merge branch 'pyth-wormhole-stylus-integration' of https://github.com…
devin-ai-integration[bot] Jun 16, 2025
430211d
feat: optimize Stylus contract size - 92% reduction achieved
devin-ai-integration[bot] Jun 16, 2025
a222f0e
chore: update Cargo.lock after size optimization
devin-ai-integration[bot] Jun 16, 2025
44c6687
chore: remove unnecessary main.rs file after optimization verification
devin-ai-integration[bot] Jun 16, 2025
802f063
feat: optimize contract size with dependency cleanup and aggressive c…
devin-ai-integration[bot] Jun 16, 2025
a6648d5
feat: shorten error messages and panic strings for size optimization
devin-ai-integration[bot] Jun 16, 2025
cbf6e33
feat: optimize contract size under 24KB by removing duplicate public …
devin-ai-integration[bot] Jun 16, 2025
8fbca73
feat: achieve 23.9 KiB target by inlining variables in verify_signature
devin-ai-integration[bot] Jun 16, 2025
d13da6d
chore: remove temporary .cargo/config.toml used during cargo-stylus i…
devin-ai-integration[bot] Jun 16, 2025
77b997c
feat: restore test_wormhole_vaa function with original base64 VAA data
devin-ai-integration[bot] Jun 16, 2025
66cf7c6
added main.rs back, but went over size limit again
ayushboss Jun 16, 2025
c11221f
fix: restore no_std configuration to reduce contract size from 24.9 K…
devin-ai-integration[bot] Jun 16, 2025
2a58ad8
chore: restore main.rs and clean up Cargo.toml configurations
devin-ai-integration[bot] Jun 16, 2025
5b74700
fix: resolve no_std deployment conflicts while maintaining 23.9 KiB c…
devin-ai-integration[bot] Jun 16, 2025
c179693
fixing parse and verify vm incorrect guardian index bug
ayushboss Jun 17, 2025
bdb0626
fixed invlaid guardian set index test
ayushboss Jun 17, 2025
18b8a74
fixed current guardian set index and related tests
ayushboss Jun 17, 2025
362c2dc
split unit tets into independent file
ayushboss Jun 17, 2025
d19b17d
additional tests
ayushboss Jun 17, 2025
e5664ef
fixed struct name
ayushboss Jun 17, 2025
ee8778a
separated out types
ayushboss Jun 17, 2025
7ce02c3
added duplicate guardian signature test
ayushboss Jun 23, 2025
f5c691f
divided integration and unit tests, deleted extra files
ayushboss Jun 25, 2025
8f013cb
added initial guardian set index flag
ayushboss Jun 25, 2025
cfe9532
small fixes
ayushboss Jun 25, 2025
9fdcf99
removed print statement and comments
ayushboss Jun 25, 2025
50e0900
safer gets within the parse_vm_static function
ayushboss Jun 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
937 changes: 937 additions & 0 deletions target_chains/stylus/Cargo.lock

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions target_chains/stylus/Cargo.toml
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
Copy link
Contributor

@tejasbadadare tejasbadadare Jun 20, 2025

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

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"
3 changes: 3 additions & 0 deletions target_chains/stylus/contracts/wormhole/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
RPC_URL=
STYLUS_CONTRACT_ADDRESS=
PRIV_KEY_PATH=
Loading