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

Svm/adapter #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .cspell/custom-dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ Devnet
Ruleset
Rulesets
Solana
Pubkey
struct
5 changes: 5 additions & 0 deletions .github/workflows/svm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,21 @@ jobs:
working-directory: svm
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Get solana version
id: solana
run: |
SOLANA_VERSION="$(awk '/solana_version =/ { print substr($3, 2, length($3)-2) }' Anchor.toml)"
echo "::set-output name=version::${SOLANA_VERSION}"

- name: Get anchor version
id: anchor
run: |
ANCHOR_VERSION="$(awk '/anchor_version =/ { print substr($3, 2, length($3)-2) }' Anchor.toml)"
echo "::set-output name=version::${ANCHOR_VERSION}"

- uses: evan-gray/anchor-test@06370fbca011ee48b176211b8f858789d6c33282
with:
anchor-version: "${{steps.anchor.outputs.version}}"
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "evm/lib/example-messaging-endpoint"]
path = evm/lib/example-messaging-endpoint
url = https://github.com/wormholelabs-xyz/example-messaging-endpoint
[submodule "svm/lib/example-messaging-endpoint"]
path = svm/lib/example-messaging-endpoint
url = https://github.com/wormholelabs-xyz/example-messaging-endpoint
37 changes: 35 additions & 2 deletions svm/Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resolution = true
skip-lint = false

[programs.localnet]
svm = "Gfo1Jn4zHvc8BBGWNPQpNDZob5DsG2bhmS4wEA2GKFx6"
wormhole_guardian_adapter = "gWFRjvvXvUnNy64MsywLjXbKoWg1pb4DMLbRZnHuE1m"

[registry]
url = "https://api.apr.dev"
Expand All @@ -16,5 +16,38 @@ url = "https://api.apr.dev"
cluster = "Localnet"
wallet = "~/.config/solana/id.json"

[test.validator]
# Deactivate the "bpf_account_data_direct_mapping" feature for testing
deactivate_feature = ["EenyoWx9UMXYKpR8mW5Jmfmy2fRjzUtM7NduYMY8bx33"]

[[test.genesis]]
address = "FMPF1RnXz1vvZ6eovoEQqMPXYRUgYqFKFMXzTJkbWWVD"
program = "tests/artifacts/endpoint.so"

[[test.genesis]]
address = "661Ly6gSCDiGWzC4tKJhS8tqXNWJU6yfbhxNKC4gPF5t"
program = "tests/artifacts/mock_integrator.so"

## CORE BRIDGE MAINNET (Solana mainnet)
### Wormhole Core Bridge Program (Mainnet)
[[test.genesis]]
address = "worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth"
program = "tests/artifacts/mainnet_core_bridge.so"

### Wormhole Core Bridge (Mainnet) -- Config
[[test.validator.account]]
address = "2yVjuQwpsvdsrywzsJJVs9Ueh4zayyo5DYJbBNc3DDpn"
filename = "tests/accounts/mainnet/core_bridge_config.json"

### Wormhole Core Bridge (Mainnet) -- Fee Collector
[[test.validator.account]]
address = "9bFNrXNb2WTx8fMHXCheaZqkLZ3YCCaiqTftHxeintHy"
filename = "tests/accounts/mainnet/core_bridge_fee_collector.json"

### Wormhole Core Bridge (Mainnet) -- Guardian Set 0
[[test.validator.account]]
address = "DS7qfSAgYsonPpKoAjcGhX9VFjXdGkiHjEDkTidf8H2P"
filename = "tests/accounts/mainnet/guardian_set_0.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/svm.ts"
Loading
Loading