Skip to content

Commit

Permalink
Add initial SVM-Spoke MVP from closed repo (#611)
Browse files Browse the repository at this point in the history
* WIP

Signed-off-by: chrismaree <[email protected]>

* WIP

Signed-off-by: chrismaree <[email protected]>

* WIP

Signed-off-by: chrismaree <[email protected]>

* WIP

Signed-off-by: chrismaree <[email protected]>

* WIP

Signed-off-by: chrismaree <[email protected]>

* WIP

Signed-off-by: chrismaree <[email protected]>

* WIP

Signed-off-by: chrismaree <[email protected]>

* WIP

Signed-off-by: chrismaree <[email protected]>

* Update Anchor.toml

Co-authored-by: Reinis Martinsons <[email protected]>

* Update scripts/svm/closeRelayerPdas.ts

Co-authored-by: Reinis Martinsons <[email protected]>

* Update scripts/svm/remotePauseDeposits.ts

Co-authored-by: Reinis Martinsons <[email protected]>

* Update scripts/svm/initialize.ts

Co-authored-by: Reinis Martinsons <[email protected]>

* Update scripts/svm/enableRoute.ts

Co-authored-by: Reinis Martinsons <[email protected]>

* Update scripts/svm/queryState.ts

Co-authored-by: Reinis Martinsons <[email protected]>

* Update scripts/svm/queryDeposits.ts

Co-authored-by: Reinis Martinsons <[email protected]>

* Update scripts/svm/remotePauseDeposits.ts

Co-authored-by: Reinis Martinsons <[email protected]>

* Update scripts/svm/queryFills.ts

Co-authored-by: Reinis Martinsons <[email protected]>

* Update scripts/svm/simpleDeposit.ts

Co-authored-by: Reinis Martinsons <[email protected]>

* Update scripts/svm/simpleFill.ts

Co-authored-by: Reinis Martinsons <[email protected]>

* Update scripts/svm/queryRoute.ts

Co-authored-by: Reinis Martinsons <[email protected]>

* Update scripts/svm/remotePauseDeposits.ts

Co-authored-by: Reinis Martinsons <[email protected]>

---------

Signed-off-by: chrismaree <[email protected]>
Co-authored-by: Reinis Martinsons <[email protected]>
  • Loading branch information
chrismaree and Reinis-FRP authored Sep 20, 2024
1 parent bf55da0 commit 9f48b42
Show file tree
Hide file tree
Showing 64 changed files with 7,700 additions and 137 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Test evm-hardhat
shell: bash
run: yarn test-evm
- name: Test svm
- name: Test svm-anchor
shell: bash
run: yarn test-svm
forge:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ storage-layouts/proposed*
target
**/*.rs.bk
test-ledger
idls
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ dist
artifacts-zk
cache-zk
lib
target
target
idls
52 changes: 48 additions & 4 deletions Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,58 @@ resolution = true
skip-lint = false

[programs.localnet]
testacross = "E4dpZS9P24pscXvPngpeUhrR98uZYMfi3VMLnLaYDA6b"
svm_spoke = "E5USYAs9DUzn6ykrWZXuEkbCnY3kzNMPGNFH2okvUvqe"
test = "GZp7L6MZ93G7TpAyxmaJ3GYgXnxH8x5oxSDmnEoob1Zu"

[programs.devnet]
svm_spoke = "CUnrs9pnNFDw6xAybcJfLftcutevE1f63ZJn6xt6A8f6"

[registry]
url = "https://api.apr.dev"

[provider]
cluster = "Localnet"
wallet = "~/.config/solana/id.json"
cluster = "localnet"
wallet = "test/svm/keys/localnet-wallet.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 test/svm/**/*.ts"
test = "anchor run generateExternalTypes && yarn run ts-mocha -p ./tsconfig.json -t 1000000 test/svm/**/*.ts"
initialize = "NODE_NO_WARNINGS=1 yarn run ts-node ./scripts/svm/initialize.ts"
queryState = "NODE_NO_WARNINGS=1 yarn run ts-node ./scripts/svm/queryState.ts"
enableRoute = "NODE_NO_WARNINGS=1 yarn run ts-node ./scripts/svm/enableRoute.ts"
queryRoute = "NODE_NO_WARNINGS=1 yarn run ts-node ./scripts/svm/queryRoute.ts"
simpleDeposit = "NODE_NO_WARNINGS=1 yarn run ts-node ./scripts/svm/simpleDeposit.ts"
queryDeposits = "NODE_NO_WARNINGS=1 yarn run ts-node ./scripts/svm/queryDeposits.ts"
queryFills = "NODE_NO_WARNINGS=1 yarn run ts-node ./scripts/svm/queryFills.ts"
simpleFill = "NODE_NO_WARNINGS=1 yarn run ts-node ./scripts/svm/simpleFill.ts"
closeRelayerPdas = "NODE_NO_WARNINGS=1 yarn run ts-node ./scripts/svm/closeRelayerPdas.ts"
remotePauseDeposits = "NODE_NO_WARNINGS=1 yarn run ts-node ./scripts/svm/remotePauseDeposits.ts"
generateExternalTypes = "NODE_NO_WARNINGS=1 yarn run ts-node ./scripts/svm/generateExternalTypes.ts"

[test.validator]
url = "https://api.devnet.solana.com"

### Forked Circle Message Transmitter Program
[[test.validator.clone]]
address = "CCTPmbSD7gX1bxKPAmg77w8oFzNFpaQiQUWD43TKaecd"

### Forked Circle Token Messenger Minter Program
[[test.validator.clone]]
address = "CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3"

### Circle Message Transmitter PDA -- Message Transmitter Config (Modified to have 0 attesters)
[[test.validator.account]]
address = "BWrwSWjbikT3H7qHAkUEbLmwDQoB4ZDJ4wcSEhSPTZCu"
filename = "test/svm/accounts/message_transmitter.json"

### Circle Token Messenger Minter PDA -- Token Minter (Modified with token_controller set to test wallet)
[[test.validator.account]]
address = "DBD8hAwLDRQkTsu6EqviaYNGKPnsAMmQonxf7AH8ZcFY"
filename = "test/svm/accounts/token_minter.json"

### Circle Token Messenger Minter PDA -- Token Messenger
[[test.validator.clone]]
address = "Afgq3BHEfCE7d78D2XE9Bfyu2ieDqvE24xX8KDwreBms"

### Circle Token Messenger Minter PDA -- Ethereum Remote Token Messenger
[[test.validator.clone]]
address = "Hazwi3jFQtLKc2ughi7HFXPkpDeso7DQaMR9Ks4afh3j"
Loading

0 comments on commit 9f48b42

Please sign in to comment.