From 68a59b00ac59234c40e9c56fa3761b36f791d24e Mon Sep 17 00:00:00 2001 From: A5 Pickle Date: Thu, 10 Oct 2024 12:57:36 -0500 Subject: [PATCH 01/10] update submodule --- .gitmodules | 2 +- lib/example-liquidity-layer | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 75007f0..974255c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "lib/example-liquidity-layer"] path = lib/example-liquidity-layer url = https://github.com/wormhole-foundation/example-liquidity-layer.git - rev = dcaf657f1efd2805a26efbe9710609d9480c5bd9 + branch = v0.3.2 diff --git a/lib/example-liquidity-layer b/lib/example-liquidity-layer index dcaf657..b505422 160000 --- a/lib/example-liquidity-layer +++ b/lib/example-liquidity-layer @@ -1 +1 @@ -Subproject commit dcaf657f1efd2805a26efbe9710609d9480c5bd9 +Subproject commit b505422d4e92558cc2759f1373974d27b4ee43a7 From 2ef4171a271bb74de20e6520184e51078a012a91 Mon Sep 17 00:00:00 2001 From: A5 Pickle Date: Tue, 22 Oct 2024 11:53:58 -0500 Subject: [PATCH 02/10] fix Makefile e2e: update deps evm: update deps solana: update deps --- Makefile | 3 +- e2e/package.json | 9 +- evm/Makefile | 2 +- evm/ts-sdk/package.json | 8 +- package-lock.json | 1274 +++++++++++++++++++------- package.json | 10 +- solana/package.json | 14 +- solana/ts/scripts/getCctpAccounts.ts | 51 ++ solana/ts/src/swapLayer/index.ts | 17 +- solana/ts/tests/01__transfer.ts | 12 +- solana/ts/tests/10__swap.ts | 59 +- 11 files changed, 1092 insertions(+), 367 deletions(-) create mode 100644 solana/ts/scripts/getCctpAccounts.ts diff --git a/Makefile b/Makefile index 9cd3fb1..05cb06f 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,9 @@ build: node_modules .PHONY: clean clean: fast-transfer-clean + rm -rf e2e/node_modules cd evm && $(MAKE) clean - cd solana && $(MAKE) clean + cd solana && $(MAKE) clean npm run clean rm -rf node_modules diff --git a/e2e/package.json b/e2e/package.json index 7870d2c..eeaf958 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -14,10 +14,10 @@ "@wormhole-foundation/example-liquidity-layer-definitions": "file:../lib/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-definitions-0.0.1.tgz", "@wormhole-foundation/example-liquidity-layer-evm": "file:../lib/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-evm-0.0.1.tgz", "@wormhole-foundation/example-liquidity-layer-solana": "file:../lib/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-solana-0.0.1.tgz", - "@wormhole-foundation/sdk-base": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-definitions": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-evm": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-solana": "^0.7.0-beta.6", + "@wormhole-foundation/sdk-base": "^0.10.9", + "@wormhole-foundation/sdk-definitions": "^0.10.9", + "@wormhole-foundation/sdk-evm": "^0.10.9", + "@wormhole-foundation/sdk-solana": "^0.10.9", "chai": "^4.3.4", "dotenv": "^16.4.5", "mocha": "^9.0.3", @@ -25,7 +25,6 @@ "ts-mocha": "^10.0.0" }, "devDependencies": { - "@typechain/ethers-v5": "^11.1.2", "envfile": "^7.1.0", "ethers": "^5.7.2", "typechain": "^8.3.2" diff --git a/evm/Makefile b/evm/Makefile index 9df8e01..6b98b51 100644 --- a/evm/Makefile +++ b/evm/Makefile @@ -33,7 +33,7 @@ LIB_DEPS = foundry-rs/forge-std LIB_DEPS += openzeppelin/openzeppelin-contracts@dc44c9f #4.9.6 LIB_DEPS += Uniswap/permit2@cc56ad0 #latest commit as per 22/04/2024 LIB_DEPS += wormhole-foundation/wormhole-solidity-sdk@60fb760 #post-merged branch -LIB_DEPS += wormhole-foundation/example-liquidity-layer@f57444f #main branch +LIB_DEPS += wormhole-foundation/example-liquidity-layer@v0.3.2 #latest build tag # dynamically generate install rule for each lib dependency and add to depdenencies $(foreach dep,$(LIB_DEPS), $(eval $(call install_lib,$(dep)))) diff --git a/evm/ts-sdk/package.json b/evm/ts-sdk/package.json index 3b4d0cb..b7a7cd6 100644 --- a/evm/ts-sdk/package.json +++ b/evm/ts-sdk/package.json @@ -6,14 +6,14 @@ "module": "lib/esm/index.js", "scripts": { "build": "tsc -p tsconfig.json && tsc -p tsconfig-cjs.json", - "clean":"rm -rf dist" + "clean": "rm -rf dist" }, "author": "", "license": "ISC", "dependencies": { - "@wormhole-foundation/sdk-base": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-definitions": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-evm": "^0.7.0-beta.6", + "@wormhole-foundation/sdk-base": "^0.10.9", + "@wormhole-foundation/sdk-definitions": "^0.10.9", + "@wormhole-foundation/sdk-evm": "^0.10.9", "typescript": "^5.4.5" } } diff --git a/package-lock.json b/package-lock.json index a1e58f2..8dbf898 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,10 +36,10 @@ "@wormhole-foundation/example-liquidity-layer-definitions": "file:../lib/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-definitions-0.0.1.tgz", "@wormhole-foundation/example-liquidity-layer-evm": "file:../lib/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-evm-0.0.1.tgz", "@wormhole-foundation/example-liquidity-layer-solana": "file:../lib/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-solana-0.0.1.tgz", - "@wormhole-foundation/sdk-base": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-definitions": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-evm": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-solana": "^0.7.0-beta.6", + "@wormhole-foundation/sdk-base": "^0.10.9", + "@wormhole-foundation/sdk-definitions": "^0.10.9", + "@wormhole-foundation/sdk-evm": "^0.10.9", + "@wormhole-foundation/sdk-solana": "^0.10.9", "chai": "^4.3.4", "dotenv": "^16.4.5", "mocha": "^9.0.3", @@ -47,34 +47,11 @@ "ts-mocha": "^10.0.0" }, "devDependencies": { - "@typechain/ethers-v5": "^11.1.2", "envfile": "^7.1.0", "ethers": "^5.7.2", "typechain": "^8.3.2" } }, - "e2e/node_modules/@solana/web3.js": { - "version": "1.91.7", - "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.91.7.tgz", - "integrity": "sha512-HqljZKDwk6Z4TajKRGhGLlRsbGK4S8EY27DA7v1z6yakewiUY3J7ZKDZRxcqz2MYV/ZXRrJ6wnnpiHFkPdv0WA==", - "dependencies": { - "@babel/runtime": "^7.23.4", - "@noble/curves": "^1.4.0", - "@noble/hashes": "^1.3.3", - "@solana/buffer-layout": "^4.0.1", - "agentkeepalive": "^4.5.0", - "bigint-buffer": "^1.1.5", - "bn.js": "^5.2.1", - "borsh": "^0.7.0", - "bs58": "^4.0.1", - "buffer": "6.0.3", - "fast-stable-stringify": "^1.0.0", - "jayson": "^4.1.0", - "node-fetch": "^2.7.0", - "rpc-websockets": "^7.5.1", - "superstruct": "^0.14.2" - } - }, "e2e/node_modules/@types/mocha": { "version": "10.0.6", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", @@ -182,6 +159,54 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "e2e/node_modules/ethers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", + "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.2", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" + } + }, "e2e/node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -326,11 +351,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "e2e/node_modules/superstruct": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz", - "integrity": "sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==" - }, "e2e/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -380,9 +400,9 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@wormhole-foundation/sdk-base": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-definitions": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-evm": "^0.7.0-beta.6", + "@wormhole-foundation/sdk-base": "^0.10.9", + "@wormhole-foundation/sdk-definitions": "^0.10.9", + "@wormhole-foundation/sdk-evm": "^0.10.9", "typescript": "^5.4.5" } }, @@ -945,9 +965,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.5.tgz", - "integrity": "sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.7.tgz", + "integrity": "sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -2799,6 +2819,54 @@ "form-data": "^4.0.0" } }, + "node_modules/@injectivelabs/sdk-ts/node_modules/ethers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", + "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "optional": true, + "dependencies": { + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.2", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" + } + }, "node_modules/@injectivelabs/test-utils": { "version": "1.14.4", "resolved": "https://registry.npmjs.org/@injectivelabs/test-utils/-/test-utils-1.14.4.tgz", @@ -3581,67 +3649,83 @@ } }, "node_modules/@solana/codecs": { - "version": "2.0.0-preview.2", - "resolved": "https://registry.npmjs.org/@solana/codecs/-/codecs-2.0.0-preview.2.tgz", - "integrity": "sha512-4HHzCD5+pOSmSB71X6w9ptweV48Zj1Vqhe732+pcAQ2cMNnN0gMPMdDq7j3YwaZDZ7yrILVV/3+HTnfT77t2yA==", + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/codecs/-/codecs-2.0.0-rc.1.tgz", + "integrity": "sha512-qxoR7VybNJixV51L0G1RD2boZTcxmwUWnKCaJJExQ5qNKwbpSyDdWfFJfM5JhGyKe9DnPVOZB+JHWXnpbZBqrQ==", "dependencies": { - "@solana/codecs-core": "2.0.0-preview.2", - "@solana/codecs-data-structures": "2.0.0-preview.2", - "@solana/codecs-numbers": "2.0.0-preview.2", - "@solana/codecs-strings": "2.0.0-preview.2", - "@solana/options": "2.0.0-preview.2" + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-data-structures": "2.0.0-rc.1", + "@solana/codecs-numbers": "2.0.0-rc.1", + "@solana/codecs-strings": "2.0.0-rc.1", + "@solana/options": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" } }, "node_modules/@solana/codecs-core": { - "version": "2.0.0-preview.2", - "resolved": "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-preview.2.tgz", - "integrity": "sha512-gLhCJXieSCrAU7acUJjbXl+IbGnqovvxQLlimztPoGgfLQ1wFYu+XJswrEVQqknZYK1pgxpxH3rZ+OKFs0ndQg==", + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-rc.1.tgz", + "integrity": "sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ==", "dependencies": { - "@solana/errors": "2.0.0-preview.2" + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" } }, "node_modules/@solana/codecs-data-structures": { - "version": "2.0.0-preview.2", - "resolved": "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-preview.2.tgz", - "integrity": "sha512-Xf5vIfromOZo94Q8HbR04TbgTwzigqrKII0GjYr21K7rb3nba4hUW2ir8kguY7HWFBcjHGlU5x3MevKBOLp3Zg==", + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-rc.1.tgz", + "integrity": "sha512-rinCv0RrAVJ9rE/rmaibWJQxMwC5lSaORSZuwjopSUE6T0nb/MVg6Z1siNCXhh/HFTOg0l8bNvZHgBcN/yvXog==", "dependencies": { - "@solana/codecs-core": "2.0.0-preview.2", - "@solana/codecs-numbers": "2.0.0-preview.2", - "@solana/errors": "2.0.0-preview.2" + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-numbers": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" } }, "node_modules/@solana/codecs-numbers": { - "version": "2.0.0-preview.2", - "resolved": "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-preview.2.tgz", - "integrity": "sha512-aLZnDTf43z4qOnpTcDsUVy1Ci9im1Md8thWipSWbE+WM9ojZAx528oAql+Cv8M8N+6ALKwgVRhPZkto6E59ARw==", + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.1.tgz", + "integrity": "sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ==", "dependencies": { - "@solana/codecs-core": "2.0.0-preview.2", - "@solana/errors": "2.0.0-preview.2" + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" } }, "node_modules/@solana/codecs-strings": { - "version": "2.0.0-preview.2", - "resolved": "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-preview.2.tgz", - "integrity": "sha512-EgBwY+lIaHHgMJIqVOGHfIfpdmmUDNoNO/GAUGeFPf+q0dF+DtwhJPEMShhzh64X2MeCZcmSO6Kinx0Bvmmz2g==", + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.1.tgz", + "integrity": "sha512-9/wPhw8TbGRTt6mHC4Zz1RqOnuPTqq1Nb4EyuvpZ39GW6O2t2Q7Q0XxiB3+BdoEjwA2XgPw6e2iRfvYgqty44g==", "dependencies": { - "@solana/codecs-core": "2.0.0-preview.2", - "@solana/codecs-numbers": "2.0.0-preview.2", - "@solana/errors": "2.0.0-preview.2" + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-numbers": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { - "fastestsmallesttextencoderdecoder": "^1.0.22" + "fastestsmallesttextencoderdecoder": "^1.0.22", + "typescript": ">=5" } }, "node_modules/@solana/errors": { - "version": "2.0.0-preview.2", - "resolved": "https://registry.npmjs.org/@solana/errors/-/errors-2.0.0-preview.2.tgz", - "integrity": "sha512-H2DZ1l3iYF5Rp5pPbJpmmtCauWeQXRJapkDg8epQ8BJ7cA2Ut/QEtC3CMmw/iMTcuS6uemFNLcWvlOfoQhvQuA==", + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/errors/-/errors-2.0.0-rc.1.tgz", + "integrity": "sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ==", "dependencies": { "chalk": "^5.3.0", - "commander": "^12.0.0" + "commander": "^12.1.0" }, "bin": { - "errors": "bin/cli.js" + "errors": "bin/cli.mjs" + }, + "peerDependencies": { + "typescript": ">=5" } }, "node_modules/@solana/errors/node_modules/chalk": { @@ -3656,60 +3740,187 @@ } }, "node_modules/@solana/options": { - "version": "2.0.0-preview.2", - "resolved": "https://registry.npmjs.org/@solana/options/-/options-2.0.0-preview.2.tgz", - "integrity": "sha512-FAHqEeH0cVsUOTzjl5OfUBw2cyT8d5Oekx4xcn5hn+NyPAfQJgM3CEThzgRD6Q/4mM5pVUnND3oK/Mt1RzSE/w==", + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/options/-/options-2.0.0-rc.1.tgz", + "integrity": "sha512-mLUcR9mZ3qfHlmMnREdIFPf9dpMc/Bl66tLSOOWxw4ml5xMT2ohFn7WGqoKcu/UHkT9CrC6+amEdqCNvUqI7AA==", "dependencies": { - "@solana/codecs-core": "2.0.0-preview.2", - "@solana/codecs-numbers": "2.0.0-preview.2" + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-data-structures": "2.0.0-rc.1", + "@solana/codecs-numbers": "2.0.0-rc.1", + "@solana/codecs-strings": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" } }, "node_modules/@solana/spl-token": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.4.6.tgz", - "integrity": "sha512-1nCnUqfHVtdguFciVWaY/RKcQz1IF4b31jnKgAmjU9QVN1q7dRUkTEWJZgTYIEtsULjVnC9jRqlhgGN39WbKKA==", + "version": "0.4.8", + "resolved": "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.4.8.tgz", + "integrity": "sha512-RO0JD9vPRi4LsAbMUdNbDJ5/cv2z11MGhtAvFeRzT4+hAGE/FUzRi0tkkWtuCfSIU3twC6CtmAihRp/+XXjWsA==", "dependencies": { "@solana/buffer-layout": "^4.0.0", "@solana/buffer-layout-utils": "^0.2.0", - "@solana/spl-token-group": "^0.0.4", - "@solana/spl-token-metadata": "^0.1.4", + "@solana/spl-token-group": "^0.0.5", + "@solana/spl-token-metadata": "^0.1.3", "buffer": "^6.0.3" }, "engines": { "node": ">=16" }, "peerDependencies": { - "@solana/web3.js": "^1.91.6" + "@solana/web3.js": "^1.94.0" } }, "node_modules/@solana/spl-token-group": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@solana/spl-token-group/-/spl-token-group-0.0.4.tgz", - "integrity": "sha512-7+80nrEMdUKlK37V6kOe024+T7J4nNss0F8LQ9OOPYdWCCfJmsGUzVx2W3oeizZR4IHM6N4yC9v1Xqwc3BTPWw==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@solana/spl-token-group/-/spl-token-group-0.0.6.tgz", + "integrity": "sha512-a9prKEvyUH4MLFTjY3ZdrLmhZYtADBPsiYJFsq3jBlaBIYwWUgVyXHG8fPsxTNwtVamVIzVKdrZY7ywivCwNwA==", "dependencies": { - "@solana/codecs": "2.0.0-preview.2", + "@solana/codecs": "2.0.0-rc.1", "@solana/spl-type-length-value": "0.1.0" }, "engines": { "node": ">=16" }, "peerDependencies": { - "@solana/web3.js": "^1.91.6" + "@solana/web3.js": "^1.95.3" } }, "node_modules/@solana/spl-token-metadata": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@solana/spl-token-metadata/-/spl-token-metadata-0.1.4.tgz", - "integrity": "sha512-N3gZ8DlW6NWDV28+vCCDJoTqaCZiF/jDUnk3o8GRkAFzHObiR60Bs1gXHBa8zCPdvOwiG6Z3dg5pg7+RW6XNsQ==", + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@solana/spl-token-metadata/-/spl-token-metadata-0.1.5.tgz", + "integrity": "sha512-DSBlo7vjuLe/xvNn75OKKndDBkFxlqjLdWlq6rf40StnrhRn7TDntHGLZpry1cf3uzQFShqeLROGNPAJwvkPnA==", "dependencies": { - "@solana/codecs": "2.0.0-preview.2", + "@solana/codecs": "2.0.0-rc.1", "@solana/spl-type-length-value": "0.1.0" }, "engines": { "node": ">=16" }, "peerDependencies": { - "@solana/web3.js": "^1.91.6" + "@solana/web3.js": "^1.95.3" + } + }, + "node_modules/@solana/spl-token/node_modules/@solana/codecs": { + "version": "2.0.0-preview.4", + "resolved": "https://registry.npmjs.org/@solana/codecs/-/codecs-2.0.0-preview.4.tgz", + "integrity": "sha512-gLMupqI4i+G4uPi2SGF/Tc1aXcviZF2ybC81x7Q/fARamNSgNOCUUoSCg9nWu1Gid6+UhA7LH80sWI8XjKaRog==", + "dependencies": { + "@solana/codecs-core": "2.0.0-preview.4", + "@solana/codecs-data-structures": "2.0.0-preview.4", + "@solana/codecs-numbers": "2.0.0-preview.4", + "@solana/codecs-strings": "2.0.0-preview.4", + "@solana/options": "2.0.0-preview.4" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/spl-token/node_modules/@solana/codecs-core": { + "version": "2.0.0-preview.4", + "resolved": "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-preview.4.tgz", + "integrity": "sha512-A0VVuDDA5kNKZUinOqHxJQK32aKTucaVbvn31YenGzHX1gPqq+SOnFwgaEY6pq4XEopSmaK16w938ZQS8IvCnw==", + "dependencies": { + "@solana/errors": "2.0.0-preview.4" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/spl-token/node_modules/@solana/codecs-data-structures": { + "version": "2.0.0-preview.4", + "resolved": "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-preview.4.tgz", + "integrity": "sha512-nt2k2eTeyzlI/ccutPcG36M/J8NAYfxBPI9h/nQjgJ+M+IgOKi31JV8StDDlG/1XvY0zyqugV3I0r3KAbZRJpA==", + "dependencies": { + "@solana/codecs-core": "2.0.0-preview.4", + "@solana/codecs-numbers": "2.0.0-preview.4", + "@solana/errors": "2.0.0-preview.4" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/spl-token/node_modules/@solana/codecs-numbers": { + "version": "2.0.0-preview.4", + "resolved": "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-preview.4.tgz", + "integrity": "sha512-Q061rLtMadsO7uxpguT+Z7G4UHnjQ6moVIxAQxR58nLxDPCC7MB1Pk106/Z7NDhDLHTcd18uO6DZ7ajHZEn2XQ==", + "dependencies": { + "@solana/codecs-core": "2.0.0-preview.4", + "@solana/errors": "2.0.0-preview.4" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/spl-token/node_modules/@solana/codecs-strings": { + "version": "2.0.0-preview.4", + "resolved": "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-preview.4.tgz", + "integrity": "sha512-YDbsQePRWm+xnrfS64losSGRg8Wb76cjK1K6qfR8LPmdwIC3787x9uW5/E4icl/k+9nwgbIRXZ65lpF+ucZUnw==", + "dependencies": { + "@solana/codecs-core": "2.0.0-preview.4", + "@solana/codecs-numbers": "2.0.0-preview.4", + "@solana/errors": "2.0.0-preview.4" + }, + "peerDependencies": { + "fastestsmallesttextencoderdecoder": "^1.0.22", + "typescript": ">=5" + } + }, + "node_modules/@solana/spl-token/node_modules/@solana/errors": { + "version": "2.0.0-preview.4", + "resolved": "https://registry.npmjs.org/@solana/errors/-/errors-2.0.0-preview.4.tgz", + "integrity": "sha512-kadtlbRv2LCWr8A9V22On15Us7Nn8BvqNaOB4hXsTB3O0fU40D1ru2l+cReqLcRPij4znqlRzW9Xi0m6J5DIhA==", + "dependencies": { + "chalk": "^5.3.0", + "commander": "^12.1.0" + }, + "bin": { + "errors": "bin/cli.mjs" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/spl-token/node_modules/@solana/options": { + "version": "2.0.0-preview.4", + "resolved": "https://registry.npmjs.org/@solana/options/-/options-2.0.0-preview.4.tgz", + "integrity": "sha512-tv2O/Frxql/wSe3jbzi5nVicIWIus/BftH+5ZR+r9r3FO0/htEllZS5Q9XdbmSboHu+St87584JXeDx3xm4jaA==", + "dependencies": { + "@solana/codecs-core": "2.0.0-preview.4", + "@solana/codecs-data-structures": "2.0.0-preview.4", + "@solana/codecs-numbers": "2.0.0-preview.4", + "@solana/codecs-strings": "2.0.0-preview.4", + "@solana/errors": "2.0.0-preview.4" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/spl-token/node_modules/@solana/spl-token-group": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/@solana/spl-token-group/-/spl-token-group-0.0.5.tgz", + "integrity": "sha512-CLJnWEcdoUBpQJfx9WEbX3h6nTdNiUzswfFdkABUik7HVwSNA98u5AYvBVK2H93d9PGMOHAak2lHW9xr+zAJGQ==", + "dependencies": { + "@solana/codecs": "2.0.0-preview.4", + "@solana/spl-type-length-value": "0.1.0" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.94.0" + } + }, + "node_modules/@solana/spl-token/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/@solana/spl-type-length-value": { @@ -3724,12 +3935,12 @@ } }, "node_modules/@solana/web3.js": { - "version": "1.91.8", - "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.91.8.tgz", - "integrity": "sha512-USa6OS1jbh8zOapRJ/CBZImZ8Xb7AJjROZl5adql9TpOoBN9BUzyyouS5oPuZHft7S7eB8uJPuXWYjMi6BHgOw==", + "version": "1.95.3", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.95.3.tgz", + "integrity": "sha512-O6rPUN0w2fkNqx/Z3QJMB9L225Ex10PRDH8bTaIUPZXMPV0QP8ZpPvjQnXK+upUczlRgzHzd6SjKIha1p+I6og==", "dependencies": { - "@babel/runtime": "^7.24.5", - "@noble/curves": "^1.4.0", + "@babel/runtime": "^7.25.0", + "@noble/curves": "^1.4.2", "@noble/hashes": "^1.4.0", "@solana/buffer-layout": "^4.0.1", "agentkeepalive": "^4.5.0", @@ -3739,22 +3950,113 @@ "bs58": "^4.0.1", "buffer": "6.0.3", "fast-stable-stringify": "^1.0.0", - "jayson": "^4.1.0", + "jayson": "^4.1.1", "node-fetch": "^2.7.0", - "rpc-websockets": "^7.11.0", - "superstruct": "^0.14.2" + "rpc-websockets": "^9.0.2", + "superstruct": "^2.0.2" + } + }, + "node_modules/@solana/web3.js/node_modules/@noble/curves": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", + "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", + "dependencies": { + "@noble/hashes": "1.5.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@solana/web3.js/node_modules/@noble/hashes": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@solana/web3.js/node_modules/@types/ws": { + "version": "8.5.12", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", + "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@solana/web3.js/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + }, + "node_modules/@solana/web3.js/node_modules/rpc-websockets": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-9.0.4.tgz", + "integrity": "sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ==", + "dependencies": { + "@swc/helpers": "^0.5.11", + "@types/uuid": "^8.3.4", + "@types/ws": "^8.2.2", + "buffer": "^6.0.3", + "eventemitter3": "^5.0.1", + "uuid": "^8.3.2", + "ws": "^8.5.0" + }, + "funding": { + "type": "paypal", + "url": "https://paypal.me/kozjak" + }, + "optionalDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" } }, "node_modules/@solana/web3.js/node_modules/superstruct": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz", - "integrity": "sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz", + "integrity": "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@solana/web3.js/node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } }, "node_modules/@suchipi/femver": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@suchipi/femver/-/femver-1.0.0.tgz", "integrity": "sha512-bprE8+K5V+DPX7q2e2K57ImqNBdfGHDIWaGI5xHxZoxbKOuQZn4wzPiUxOAHnsUr3w3xHrWXwN7gnG/iIuEMIg==" }, + "node_modules/@swc/helpers": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.13.tgz", + "integrity": "sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==", + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@terra-money/legacy.proto": { "name": "@terra-money/terra.proto", "version": "0.1.7", @@ -3895,23 +4197,6 @@ "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", "dev": true }, - "node_modules/@typechain/ethers-v5": { - "version": "11.1.2", - "resolved": "https://registry.npmjs.org/@typechain/ethers-v5/-/ethers-v5-11.1.2.tgz", - "integrity": "sha512-ID6pqWkao54EuUQa0P5RgjvfA3MYqxUQKpbGKERbsjBW5Ra7EIXvbMlPp2pcP5IAdUkyMCFYsP2SN5q7mPdLDQ==", - "dev": true, - "dependencies": { - "lodash": "^4.17.15", - "ts-essentials": "^7.0.1" - }, - "peerDependencies": { - "@ethersproject/abi": "^5.0.0", - "@ethersproject/providers": "^5.0.0", - "ethers": "^5.1.3", - "typechain": "^8.3.2", - "typescript": ">=4.3.0" - } - }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -4099,6 +4384,11 @@ "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==" }, + "node_modules/@types/uuid": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", + "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" + }, "node_modules/@types/ws": { "version": "7.4.7", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", @@ -4130,213 +4420,335 @@ "node_modules/@wormhole-foundation/example-liquidity-layer-definitions": { "version": "0.0.1", "resolved": "file:lib/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-definitions-0.0.1.tgz", - "integrity": "sha512-pIbKViWguC+Hnsf+I6ZdBVEVTt4naxCo2+P398Cb2IEMYi0w4ZfYhY49QLPuJnD1qywZW00Czr5o9ZoghZu1tA==", + "integrity": "sha512-hGwQm8a1YfbvcqJOubvzduzYfl59GkTkI9dKaeI0YdqPoExFHghSmzkghzJvwAhOyT0hjGa+37ayDRygXipoSA==", + "dependencies": { + "@wormhole-foundation/sdk-base": "^0.10.9", + "@wormhole-foundation/sdk-definitions": "^0.10.9" + } + }, + "node_modules/@wormhole-foundation/example-liquidity-layer-definitions/node_modules/@wormhole-foundation/sdk-base": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-base/-/sdk-base-0.10.11.tgz", + "integrity": "sha512-Km1OBJQiUZUrmiZAo42bkWe832WHFyvNdUPBEBOWXDKP5FCBF1CN8dN+ePZYz97qIc+rSM+WGLVFAbtzrvoxNw==", "dependencies": { - "@wormhole-foundation/sdk-base": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-definitions": "^0.7.0-beta.6" + "@scure/base": "^1.1.3" + } + }, + "node_modules/@wormhole-foundation/example-liquidity-layer-definitions/node_modules/@wormhole-foundation/sdk-definitions": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-definitions/-/sdk-definitions-0.10.11.tgz", + "integrity": "sha512-qrZacC4IyiX52K7yEqyJy3RBnuEEgPpV/4BiyBlfcC/VtsPerEmr2d/2U/uBuVF0DbtTwbQB7otkCemzuErcqQ==", + "dependencies": { + "@noble/curves": "^1.4.0", + "@noble/hashes": "^1.3.1", + "@wormhole-foundation/sdk-base": "0.10.11" } }, "node_modules/@wormhole-foundation/example-liquidity-layer-evm": { "version": "0.0.1", "resolved": "file:lib/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-evm-0.0.1.tgz", - "integrity": "sha512-B6sAU/vRbxoayT3NIlwtaIOGMQN2ZyNcGvxiE7iK0saqZzv/6b7kcpA5S6OwF4PHykXlTt6RIAN08QZFJl4B6Q==", + "integrity": "sha512-fc6k10EFHZ1OQa5Qw3lkLZAuRXHqZeAy3s+xcJ2krJmLlXiqd7pAkkm9F0Io3E9i6mTxab+YehwdqUHZoSZ91A==", "dependencies": { "@wormhole-foundation/example-liquidity-layer-definitions": "0.0.1", - "@wormhole-foundation/sdk-base": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-definitions": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-evm": "^0.7.0-beta.6", - "ethers": "^5.7.2" + "@wormhole-foundation/sdk-base": "^0.10.9", + "@wormhole-foundation/sdk-definitions": "^0.10.9", + "@wormhole-foundation/sdk-evm": "^0.10.9", + "ethers-v5": "npm:ethers@^5.7.2" + } + }, + "node_modules/@wormhole-foundation/example-liquidity-layer-evm/node_modules/@wormhole-foundation/sdk-base": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-base/-/sdk-base-0.10.11.tgz", + "integrity": "sha512-Km1OBJQiUZUrmiZAo42bkWe832WHFyvNdUPBEBOWXDKP5FCBF1CN8dN+ePZYz97qIc+rSM+WGLVFAbtzrvoxNw==", + "dependencies": { + "@scure/base": "^1.1.3" + } + }, + "node_modules/@wormhole-foundation/example-liquidity-layer-evm/node_modules/@wormhole-foundation/sdk-connect": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-connect/-/sdk-connect-0.10.11.tgz", + "integrity": "sha512-S+2jh32Nf/vDwfLTty2FdcdZr/fd9tdXq0TpOlE7LkvUp5LiWoktjPvicw8/Xndp1AZYbNMMg+PMHCMOhu1cFA==", + "dependencies": { + "@wormhole-foundation/sdk-base": "0.10.11", + "@wormhole-foundation/sdk-definitions": "0.10.11", + "axios": "^1.4.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@wormhole-foundation/example-liquidity-layer-evm/node_modules/@wormhole-foundation/sdk-definitions": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-definitions/-/sdk-definitions-0.10.11.tgz", + "integrity": "sha512-qrZacC4IyiX52K7yEqyJy3RBnuEEgPpV/4BiyBlfcC/VtsPerEmr2d/2U/uBuVF0DbtTwbQB7otkCemzuErcqQ==", + "dependencies": { + "@noble/curves": "^1.4.0", + "@noble/hashes": "^1.3.1", + "@wormhole-foundation/sdk-base": "0.10.11" + } + }, + "node_modules/@wormhole-foundation/example-liquidity-layer-evm/node_modules/@wormhole-foundation/sdk-evm": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm/-/sdk-evm-0.10.11.tgz", + "integrity": "sha512-R9ETNK/vtBWTBrJo2pmxJ+XDgPhB8cH8WIM7m9vcsij8jlpPi/vmSBboytlsgdPtCqxV9iif6JW0+s14mUK8QA==", + "dependencies": { + "@wormhole-foundation/sdk-connect": "0.10.11", + "ethers": "^6.5.1" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@wormhole-foundation/example-liquidity-layer-evm/node_modules/axios": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "node_modules/@wormhole-foundation/example-liquidity-layer-solana": { "version": "0.0.1", "resolved": "file:lib/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-solana-0.0.1.tgz", - "integrity": "sha512-rLxZKgL27MWBunz4x7z80cNkVzbxXzkkQHpowr05kojFOZCYYuAEOZr3U9hDchGV0RsV2NHuCEKpfVkUXGa1eg==", + "integrity": "sha512-yAcH25KeBLqoKVUPoBqsi0MwbaCkXWnd4ONWHrnYZGe+8Hy/o/SAPrMwokRtot5GHsXtnHmKs8DhZ0+F0BAvYA==", "dependencies": { "@certusone/wormhole-spydk": "^0.0.1", "@coral-xyz/anchor": "^0.30.1", - "@solana/spl-token": "^0.4.6", - "@solana/spl-token-group": "^0.0.4", - "@solana/spl-token-metadata": "^0.1.4", - "@solana/web3.js": "^1.91.7", + "@solana/spl-token": "^0.4.8", + "@solana/spl-token-group": "^0.0.6", + "@solana/spl-token-metadata": "^0.1.5", + "@solana/web3.js": "^1.95.3", "@types/node-fetch": "^2.6.11", "@wormhole-foundation/example-liquidity-layer-definitions": "0.0.1", - "@wormhole-foundation/sdk-base": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-definitions": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-evm": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-solana": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-solana-core": "^0.7.0-beta.6", + "@wormhole-foundation/sdk-base": "^0.10.9", + "@wormhole-foundation/sdk-definitions": "^0.10.9", + "@wormhole-foundation/sdk-evm": "^0.10.9", + "@wormhole-foundation/sdk-solana": "^0.10.9", + "@wormhole-foundation/sdk-solana-core": "^0.10.9", "anchor-0.29.0": "npm:@coral-xyz/anchor@^0.29.0", "bn.js": "^5.2.1", "dotenv": "^16.4.1", - "ethers": "^5.7.2", "sha3": "^2.1.4", "winston": "^3.13.0", "yargs": "^17.7.2" } }, - "node_modules/@wormhole-foundation/sdk-base": { - "version": "0.7.0-beta.6", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-base/-/sdk-base-0.7.0-beta.6.tgz", - "integrity": "sha512-4kaGW9URQspd6uhMOYo18p8pmUD7cQglXcEFq9lhNlurRr/UV09SFVcH12+HXONRZFGxIt3TH73iEPnwKP0eBQ==", + "node_modules/@wormhole-foundation/example-liquidity-layer-solana/node_modules/@coral-xyz/borsh": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.29.0.tgz", + "integrity": "sha512-s7VFVa3a0oqpkuRloWVPdCK7hMbAMY270geZOGfCnaqexrP5dTIpbEHL33req6IYPPJ0hYa71cdvJ1h6V55/oQ==", + "dependencies": { + "bn.js": "^5.1.2", + "buffer-layout": "^1.2.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@solana/web3.js": "^1.68.0" + } + }, + "node_modules/@wormhole-foundation/example-liquidity-layer-solana/node_modules/@wormhole-foundation/sdk-base": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-base/-/sdk-base-0.10.11.tgz", + "integrity": "sha512-Km1OBJQiUZUrmiZAo42bkWe832WHFyvNdUPBEBOWXDKP5FCBF1CN8dN+ePZYz97qIc+rSM+WGLVFAbtzrvoxNw==", "dependencies": { "@scure/base": "^1.1.3" } }, - "node_modules/@wormhole-foundation/sdk-connect": { - "version": "0.7.0-beta.6", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-connect/-/sdk-connect-0.7.0-beta.6.tgz", - "integrity": "sha512-ydoUboOJn8F+PhCCC8ZPzlMolBthjwG6orsyvGzkOj+c4gxCXgh/7DghognUkMTjTIUBwkZLURibbgaCvYwFBg==", + "node_modules/@wormhole-foundation/example-liquidity-layer-solana/node_modules/@wormhole-foundation/sdk-connect": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-connect/-/sdk-connect-0.10.11.tgz", + "integrity": "sha512-S+2jh32Nf/vDwfLTty2FdcdZr/fd9tdXq0TpOlE7LkvUp5LiWoktjPvicw8/Xndp1AZYbNMMg+PMHCMOhu1cFA==", "dependencies": { - "@wormhole-foundation/sdk-base": "0.7.0-beta.6", - "@wormhole-foundation/sdk-definitions": "0.7.0-beta.6", + "@wormhole-foundation/sdk-base": "0.10.11", + "@wormhole-foundation/sdk-definitions": "0.10.11", "axios": "^1.4.0" }, "engines": { "node": ">=16" } }, - "node_modules/@wormhole-foundation/sdk-connect/node_modules/axios": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", - "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/@wormhole-foundation/sdk-definitions": { - "version": "0.7.0-beta.6", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-definitions/-/sdk-definitions-0.7.0-beta.6.tgz", - "integrity": "sha512-Wpy3OHvuq5QMxP+vfcdWvIcVc7iXTnb1MS/RroCdYZ2XdikBp4Qv+iFk8AwO7wKdJiXeTWtW2etS9vcvaz9g6g==", + "node_modules/@wormhole-foundation/example-liquidity-layer-solana/node_modules/@wormhole-foundation/sdk-definitions": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-definitions/-/sdk-definitions-0.10.11.tgz", + "integrity": "sha512-qrZacC4IyiX52K7yEqyJy3RBnuEEgPpV/4BiyBlfcC/VtsPerEmr2d/2U/uBuVF0DbtTwbQB7otkCemzuErcqQ==", "dependencies": { "@noble/curves": "^1.4.0", "@noble/hashes": "^1.3.1", - "@wormhole-foundation/sdk-base": "0.7.0-beta.6" + "@wormhole-foundation/sdk-base": "0.10.11" } }, - "node_modules/@wormhole-foundation/sdk-evm": { - "version": "0.7.0-beta.6", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm/-/sdk-evm-0.7.0-beta.6.tgz", - "integrity": "sha512-JXUvnWjngVtBCwFC41fTo4xO7vHb39KSsIUgE/UAcPFscoVv9DmktGR8jDm0jLXri4pUqaXLFEDO6K7AABjB6A==", + "node_modules/@wormhole-foundation/example-liquidity-layer-solana/node_modules/@wormhole-foundation/sdk-evm": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm/-/sdk-evm-0.10.11.tgz", + "integrity": "sha512-R9ETNK/vtBWTBrJo2pmxJ+XDgPhB8cH8WIM7m9vcsij8jlpPi/vmSBboytlsgdPtCqxV9iif6JW0+s14mUK8QA==", "dependencies": { - "@wormhole-foundation/sdk-connect": "0.7.0-beta.6", + "@wormhole-foundation/sdk-connect": "0.10.11", "ethers": "^6.5.1" }, "engines": { "node": ">=16" } }, - "node_modules/@wormhole-foundation/sdk-evm/node_modules/@noble/curves": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", - "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "node_modules/@wormhole-foundation/example-liquidity-layer-solana/node_modules/@wormhole-foundation/sdk-solana": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana/-/sdk-solana-0.10.11.tgz", + "integrity": "sha512-4GCgABnk/D0hw31AcrKSAX/w+wG38HEsTO7e00sPBgAEFoC/G8hayhKz544+B2TAi3fHcfVXa4QwvnDhWtbQdg==", "dependencies": { - "@noble/hashes": "1.3.2" + "@coral-xyz/anchor": "0.29.0", + "@coral-xyz/borsh": "0.29.0", + "@solana/spl-token": "0.3.9", + "@solana/web3.js": "^1.95.2", + "@wormhole-foundation/sdk-connect": "0.10.11", + "rpc-websockets": "^7.10.0" }, - "funding": { - "url": "https://paulmillr.com/funding/" + "engines": { + "node": ">=16" } }, - "node_modules/@wormhole-foundation/sdk-evm/node_modules/@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", - "engines": { - "node": ">= 16" + "node_modules/@wormhole-foundation/example-liquidity-layer-solana/node_modules/@wormhole-foundation/sdk-solana/node_modules/@coral-xyz/anchor": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@coral-xyz/anchor/-/anchor-0.29.0.tgz", + "integrity": "sha512-eny6QNG0WOwqV0zQ7cs/b1tIuzZGmP7U7EcH+ogt4Gdbl8HDmIYVMh/9aTmYZPaFWjtUaI8qSn73uYEXWfATdA==", + "dependencies": { + "@coral-xyz/borsh": "^0.29.0", + "@noble/hashes": "^1.3.1", + "@solana/web3.js": "^1.68.0", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.2", + "camelcase": "^6.3.0", + "cross-fetch": "^3.1.5", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "superstruct": "^0.15.4", + "toml": "^3.0.0" }, - "funding": { - "url": "https://paulmillr.com/funding/" + "engines": { + "node": ">=11" } }, - "node_modules/@wormhole-foundation/sdk-evm/node_modules/@types/node": { - "version": "18.15.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", - "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" - }, - "node_modules/@wormhole-foundation/sdk-evm/node_modules/aes-js": { - "version": "4.0.0-beta.5", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", - "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" - }, - "node_modules/@wormhole-foundation/sdk-evm/node_modules/ethers": { - "version": "6.12.1", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.12.1.tgz", - "integrity": "sha512-j6wcVoZf06nqEcBbDWkKg8Fp895SS96dSnTCjiXT+8vt2o02raTn4Lo9ERUuIVU5bAjoPYeA+7ytQFexFmLuVw==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/ethers-io/" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], + "node_modules/@wormhole-foundation/example-liquidity-layer-solana/node_modules/@wormhole-foundation/sdk-solana/node_modules/@solana/spl-token": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.3.9.tgz", + "integrity": "sha512-1EXHxKICMnab35MvvY/5DBc/K/uQAOJCYnDZXw83McCAYUAfi+rwq6qfd6MmITmSTEhcfBcl/zYxmW/OSN0RmA==", "dependencies": { - "@adraffy/ens-normalize": "1.10.1", - "@noble/curves": "1.2.0", - "@noble/hashes": "1.3.2", - "@types/node": "18.15.13", - "aes-js": "4.0.0-beta.5", - "tslib": "2.4.0", - "ws": "8.5.0" + "@solana/buffer-layout": "^4.0.0", + "@solana/buffer-layout-utils": "^0.2.0", + "buffer": "^6.0.3" }, "engines": { - "node": ">=14.0.0" + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.47.4" } }, - "node_modules/@wormhole-foundation/sdk-evm/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "node_modules/@wormhole-foundation/example-liquidity-layer-solana/node_modules/axios": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } }, - "node_modules/@wormhole-foundation/sdk-evm/node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "node_modules/@wormhole-foundation/example-liquidity-layer-solana/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "engines": { - "node": ">=10.0.0" + "node": ">=10" }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@wormhole-foundation/sdk-base": { + "version": "0.10.9", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-base/-/sdk-base-0.10.9.tgz", + "integrity": "sha512-E56Z7FK1swrHvBvDOgWZBLDcyijpGB27dw10ZAZgesHksTBCIS4ehJY9b2qulo19R3fxRW/reKYzAmjxkpI+sg==", + "dependencies": { + "@scure/base": "^1.1.3" + } + }, + "node_modules/@wormhole-foundation/sdk-connect": { + "version": "0.10.9", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-connect/-/sdk-connect-0.10.9.tgz", + "integrity": "sha512-UCneSFMDho3p3rUFoxpDV+9zutJWcQJJ78RLLpjya0EivNy2AMTFWbP0sQdx+3kHw0MIJM/JtsUoUhPZZKeD/w==", + "dependencies": { + "@wormhole-foundation/sdk-base": "0.10.9", + "@wormhole-foundation/sdk-definitions": "0.10.9", + "axios": "^1.4.0" }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "engines": { + "node": ">=16" + } + }, + "node_modules/@wormhole-foundation/sdk-connect/node_modules/axios": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/@wormhole-foundation/sdk-definitions": { + "version": "0.10.9", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-definitions/-/sdk-definitions-0.10.9.tgz", + "integrity": "sha512-9lbMpvcaBL9a2eoyfJ5gauFREO0hqYw+Nplc3L6qzckB/2Sc0nE0vYDRyL+OwaRT4BUffmWOaUukBEDqbc1sGQ==", + "dependencies": { + "@noble/curves": "^1.4.0", + "@noble/hashes": "^1.3.1", + "@wormhole-foundation/sdk-base": "0.10.9" + } + }, + "node_modules/@wormhole-foundation/sdk-evm": { + "version": "0.10.9", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm/-/sdk-evm-0.10.9.tgz", + "integrity": "sha512-AM66hZHMAvggv9GwOdyep5AOT0M6JTJ415c+ksmdSw7egyVGwAXWl0khfJE1BHQDDAIsmJaTtPINQwdaki+4Yw==", + "dependencies": { + "@wormhole-foundation/sdk-connect": "0.10.9", + "ethers": "^6.5.1" + }, + "engines": { + "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-solana": { - "version": "0.7.0-beta.6", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana/-/sdk-solana-0.7.0-beta.6.tgz", - "integrity": "sha512-4+jpskWL6NLQ2d/qwD6k5BFi2dDrLM4V+GJD5/ZYUL4OZDubxS3jImIjfXK/Y/26OquytPpl/cfpahxNdo8pOg==", + "version": "0.10.9", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana/-/sdk-solana-0.10.9.tgz", + "integrity": "sha512-+dW7jBhTb8sgEcJF7Y2BkfM2QR7OaiL/6m25ungkDt7wFuPIIVGi4NM0Szngg+YyMs910PYdR1lcXd3Ijl/Nrw==", "dependencies": { "@coral-xyz/anchor": "0.29.0", "@coral-xyz/borsh": "0.29.0", "@solana/spl-token": "0.3.9", - "@solana/web3.js": "1.91.7", - "@wormhole-foundation/sdk-connect": "0.7.0-beta.6" + "@solana/web3.js": "^1.95.2", + "@wormhole-foundation/sdk-connect": "0.10.9", + "rpc-websockets": "^7.10.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-solana-core": { - "version": "0.7.0-beta.6", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-core/-/sdk-solana-core-0.7.0-beta.6.tgz", - "integrity": "sha512-XtMWuuZXMDZdBKar352bB7C6j6Ua6Ltr5TDEUDElHlK37D+oD4Ss8Z2GXvVOLg4BbC9NWlYWCKrVQVbeQ3SeJw==", + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-core/-/sdk-solana-core-0.10.11.tgz", + "integrity": "sha512-Aw6ARqchUwLtwxmcPzH4xkH6MZm9FwcKSraVPfyvVrHMevducj8b4bH17zvpy5BN36qHPfLlqbSKJrQpkHd9GQ==", "dependencies": { "@coral-xyz/anchor": "0.29.0", "@coral-xyz/borsh": "0.29.0", - "@solana/web3.js": "1.91.7", - "@wormhole-foundation/sdk-connect": "0.7.0-beta.6", - "@wormhole-foundation/sdk-solana": "0.7.0-beta.6" + "@solana/web3.js": "^1.95.2", + "@wormhole-foundation/sdk-connect": "0.10.11", + "@wormhole-foundation/sdk-solana": "0.10.11" }, "engines": { "node": ">=16" @@ -4381,32 +4793,78 @@ "@solana/web3.js": "^1.68.0" } }, - "node_modules/@wormhole-foundation/sdk-solana-core/node_modules/@solana/web3.js": { - "version": "1.91.7", - "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.91.7.tgz", - "integrity": "sha512-HqljZKDwk6Z4TajKRGhGLlRsbGK4S8EY27DA7v1z6yakewiUY3J7ZKDZRxcqz2MYV/ZXRrJ6wnnpiHFkPdv0WA==", + "node_modules/@wormhole-foundation/sdk-solana-core/node_modules/@solana/spl-token": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.3.9.tgz", + "integrity": "sha512-1EXHxKICMnab35MvvY/5DBc/K/uQAOJCYnDZXw83McCAYUAfi+rwq6qfd6MmITmSTEhcfBcl/zYxmW/OSN0RmA==", + "dependencies": { + "@solana/buffer-layout": "^4.0.0", + "@solana/buffer-layout-utils": "^0.2.0", + "buffer": "^6.0.3" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.47.4" + } + }, + "node_modules/@wormhole-foundation/sdk-solana-core/node_modules/@wormhole-foundation/sdk-base": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-base/-/sdk-base-0.10.11.tgz", + "integrity": "sha512-Km1OBJQiUZUrmiZAo42bkWe832WHFyvNdUPBEBOWXDKP5FCBF1CN8dN+ePZYz97qIc+rSM+WGLVFAbtzrvoxNw==", + "dependencies": { + "@scure/base": "^1.1.3" + } + }, + "node_modules/@wormhole-foundation/sdk-solana-core/node_modules/@wormhole-foundation/sdk-connect": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-connect/-/sdk-connect-0.10.11.tgz", + "integrity": "sha512-S+2jh32Nf/vDwfLTty2FdcdZr/fd9tdXq0TpOlE7LkvUp5LiWoktjPvicw8/Xndp1AZYbNMMg+PMHCMOhu1cFA==", + "dependencies": { + "@wormhole-foundation/sdk-base": "0.10.11", + "@wormhole-foundation/sdk-definitions": "0.10.11", + "axios": "^1.4.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@wormhole-foundation/sdk-solana-core/node_modules/@wormhole-foundation/sdk-definitions": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-definitions/-/sdk-definitions-0.10.11.tgz", + "integrity": "sha512-qrZacC4IyiX52K7yEqyJy3RBnuEEgPpV/4BiyBlfcC/VtsPerEmr2d/2U/uBuVF0DbtTwbQB7otkCemzuErcqQ==", "dependencies": { - "@babel/runtime": "^7.23.4", "@noble/curves": "^1.4.0", - "@noble/hashes": "^1.3.3", - "@solana/buffer-layout": "^4.0.1", - "agentkeepalive": "^4.5.0", - "bigint-buffer": "^1.1.5", - "bn.js": "^5.2.1", - "borsh": "^0.7.0", - "bs58": "^4.0.1", - "buffer": "6.0.3", - "fast-stable-stringify": "^1.0.0", - "jayson": "^4.1.0", - "node-fetch": "^2.7.0", - "rpc-websockets": "^7.5.1", - "superstruct": "^0.14.2" + "@noble/hashes": "^1.3.1", + "@wormhole-foundation/sdk-base": "0.10.11" + } + }, + "node_modules/@wormhole-foundation/sdk-solana-core/node_modules/@wormhole-foundation/sdk-solana": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana/-/sdk-solana-0.10.11.tgz", + "integrity": "sha512-4GCgABnk/D0hw31AcrKSAX/w+wG38HEsTO7e00sPBgAEFoC/G8hayhKz544+B2TAi3fHcfVXa4QwvnDhWtbQdg==", + "dependencies": { + "@coral-xyz/anchor": "0.29.0", + "@coral-xyz/borsh": "0.29.0", + "@solana/spl-token": "0.3.9", + "@solana/web3.js": "^1.95.2", + "@wormhole-foundation/sdk-connect": "0.10.11", + "rpc-websockets": "^7.10.0" + }, + "engines": { + "node": ">=16" } }, - "node_modules/@wormhole-foundation/sdk-solana-core/node_modules/@solana/web3.js/node_modules/superstruct": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz", - "integrity": "sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==" + "node_modules/@wormhole-foundation/sdk-solana-core/node_modules/axios": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } }, "node_modules/@wormhole-foundation/sdk-solana-core/node_modules/camelcase": { "version": "6.3.0", @@ -4474,33 +4932,6 @@ "@solana/web3.js": "^1.47.4" } }, - "node_modules/@wormhole-foundation/sdk-solana/node_modules/@solana/web3.js": { - "version": "1.91.7", - "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.91.7.tgz", - "integrity": "sha512-HqljZKDwk6Z4TajKRGhGLlRsbGK4S8EY27DA7v1z6yakewiUY3J7ZKDZRxcqz2MYV/ZXRrJ6wnnpiHFkPdv0WA==", - "dependencies": { - "@babel/runtime": "^7.23.4", - "@noble/curves": "^1.4.0", - "@noble/hashes": "^1.3.3", - "@solana/buffer-layout": "^4.0.1", - "agentkeepalive": "^4.5.0", - "bigint-buffer": "^1.1.5", - "bn.js": "^5.2.1", - "borsh": "^0.7.0", - "bs58": "^4.0.1", - "buffer": "6.0.3", - "fast-stable-stringify": "^1.0.0", - "jayson": "^4.1.0", - "node-fetch": "^2.7.0", - "rpc-websockets": "^7.5.1", - "superstruct": "^0.14.2" - } - }, - "node_modules/@wormhole-foundation/sdk-solana/node_modules/@solana/web3.js/node_modules/superstruct": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz", - "integrity": "sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==" - }, "node_modules/@wormhole-foundation/sdk-solana/node_modules/camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", @@ -6410,6 +6841,54 @@ "@types/node": "*" } }, + "node_modules/eth-crypto/node_modules/ethers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", + "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "optional": true, + "dependencies": { + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.2", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" + } + }, "node_modules/eth-crypto/node_modules/node-addon-api": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", @@ -6515,6 +6994,34 @@ } }, "node_modules/ethers": { + "version": "6.13.4", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.13.4.tgz", + "integrity": "sha512-21YtnZVg4/zKkCQPjrDj38B1r4nQvTZLopUGMLQ1ePU2zV/joCfDC3t3iKQjWRzjjjbzR+mdAIoikeBRNkdllA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "22.7.5", + "aes-js": "4.0.0-beta.5", + "tslib": "2.7.0", + "ws": "8.17.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/ethers-v5": { + "name": "ethers", "version": "5.7.2", "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", @@ -6561,6 +7068,66 @@ "@ethersproject/wordlists": "5.7.0" } }, + "node_modules/ethers/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ethers/node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ethers/node_modules/@types/node": { + "version": "22.7.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", + "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/ethers/node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" + }, + "node_modules/ethers/node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + }, + "node_modules/ethers/node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/ethjs-util": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", @@ -7440,9 +8007,9 @@ } }, "node_modules/jayson": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.0.tgz", - "integrity": "sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.2.tgz", + "integrity": "sha512-5nzMWDHy6f+koZOuYsArh2AXs73NfWYVlFyJJuCedr93GpY+Ku8qq10ropSXVfHK+H0T6paA88ww+/dV+1fBNA==", "dependencies": { "@types/connect": "^3.4.33", "@types/node": "^12.12.54", @@ -7455,7 +8022,7 @@ "json-stringify-safe": "^5.0.1", "JSONStream": "^1.3.5", "uuid": "^8.3.2", - "ws": "^7.4.5" + "ws": "^7.5.10" }, "bin": { "jayson": "bin/jayson.js" @@ -7474,6 +8041,26 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, + "node_modules/jayson/node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", @@ -10439,9 +11026,9 @@ } }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" }, "node_modules/tsx": { "version": "4.10.5", @@ -11028,17 +11615,17 @@ "@certusone/wormhole-sdk": "^0.10.10", "@coral-xyz/anchor": "^0.30.0", "@jup-ag/api": "^6.0.20-test", - "@solana/spl-token": "^0.4.3", - "@solana/web3.js": "^1.91.6", + "@solana/spl-token": "^0.4.8", + "@solana/web3.js": "^1.95.3", "@types/node-fetch": "^2.6.11", "@wormhole-foundation/example-liquidity-layer-definitions": "file:../lib/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-definitions-0.0.1.tgz", "@wormhole-foundation/example-liquidity-layer-evm": "file:../lib/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-evm-0.0.1.tgz", "@wormhole-foundation/example-liquidity-layer-solana": "file:../lib/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-solana-0.0.1.tgz", - "@wormhole-foundation/sdk-base": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-definitions": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-evm": "0.7.0-beta.6", - "@wormhole-foundation/sdk-solana": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-solana-core": "^0.7.0-beta.6", + "@wormhole-foundation/sdk-base": "^0.10.9", + "@wormhole-foundation/sdk-definitions": "^0.10.9", + "@wormhole-foundation/sdk-evm": "^0.10.9", + "@wormhole-foundation/sdk-solana": "^0.10.9", + "@wormhole-foundation/sdk-solana-core": "^0.10.9", "anchor-0.29.0": "npm:@coral-xyz/anchor@^0.29.0", "chai-as-promised": "^7.1.1", "ts-results": "^3.3.0", @@ -11058,6 +11645,71 @@ "tsx": "^4.7.2" } }, + "solana/node_modules/@coral-xyz/borsh": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.29.0.tgz", + "integrity": "sha512-s7VFVa3a0oqpkuRloWVPdCK7hMbAMY270geZOGfCnaqexrP5dTIpbEHL33req6IYPPJ0hYa71cdvJ1h6V55/oQ==", + "dependencies": { + "bn.js": "^5.1.2", + "buffer-layout": "^1.2.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@solana/web3.js": "^1.68.0" + } + }, + "solana/node_modules/@wormhole-foundation/sdk-solana-core": { + "version": "0.10.9", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-core/-/sdk-solana-core-0.10.9.tgz", + "integrity": "sha512-M+ZZpiZRwTTlm+bn1ZPYecUlcDI+OUwgX8bgwmgcQSADxXJkYtOFPsAB2R8eOcAmQirhkMK4Mjv//+IHrfaTBw==", + "dependencies": { + "@coral-xyz/anchor": "0.29.0", + "@coral-xyz/borsh": "0.29.0", + "@solana/web3.js": "^1.95.2", + "@wormhole-foundation/sdk-connect": "0.10.9", + "@wormhole-foundation/sdk-solana": "0.10.9" + }, + "engines": { + "node": ">=16" + } + }, + "solana/node_modules/@wormhole-foundation/sdk-solana-core/node_modules/@coral-xyz/anchor": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@coral-xyz/anchor/-/anchor-0.29.0.tgz", + "integrity": "sha512-eny6QNG0WOwqV0zQ7cs/b1tIuzZGmP7U7EcH+ogt4Gdbl8HDmIYVMh/9aTmYZPaFWjtUaI8qSn73uYEXWfATdA==", + "dependencies": { + "@coral-xyz/borsh": "^0.29.0", + "@noble/hashes": "^1.3.1", + "@solana/web3.js": "^1.68.0", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.2", + "camelcase": "^6.3.0", + "cross-fetch": "^3.1.5", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "superstruct": "^0.15.4", + "toml": "^3.0.0" + }, + "engines": { + "node": ">=11" + } + }, + "solana/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "solana/node_modules/prettier": { "version": "2.8.8", "dev": true, diff --git a/package.json b/package.json index caaf99b..3082819 100644 --- a/package.json +++ b/package.json @@ -11,16 +11,16 @@ "test": "npm run test --workspaces --if-present" }, "devDependencies": { - "typescript": "5.4.5", "@types/chai": "^4.3.5", "@types/jest": "^29.5.12", "@types/node": "^20.4.1", - "prettier": "^3.0.3", + "chai": "^4.3.7", + "chai-as-promised": "^7.1.1", "jest": "^29.7.0", + "prettier": "^3.0.3", "ts-jest": "^29.1.2", "ts-node": "^10.9.1", - "chai": "^4.3.7", - "chai-as-promised": "^7.1.1" + "typescript": "5.4.5" }, "keywords": [ "wormhole" @@ -30,4 +30,4 @@ "evm/ts-sdk", "solana" ] -} \ No newline at end of file +} diff --git a/solana/package.json b/solana/package.json index 580e0ac..fc5e060 100644 --- a/solana/package.json +++ b/solana/package.json @@ -21,17 +21,17 @@ "@certusone/wormhole-sdk": "^0.10.10", "@coral-xyz/anchor": "^0.30.0", "@jup-ag/api": "^6.0.20-test", - "@solana/spl-token": "^0.4.3", - "@solana/web3.js": "^1.91.6", + "@solana/spl-token": "^0.4.8", + "@solana/web3.js": "^1.95.3", "@types/node-fetch": "^2.6.11", "@wormhole-foundation/example-liquidity-layer-definitions": "file:../lib/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-definitions-0.0.1.tgz", "@wormhole-foundation/example-liquidity-layer-evm": "file:../lib/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-evm-0.0.1.tgz", "@wormhole-foundation/example-liquidity-layer-solana": "file:../lib/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-solana-0.0.1.tgz", - "@wormhole-foundation/sdk-base": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-definitions": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-evm": "0.7.0-beta.6", - "@wormhole-foundation/sdk-solana": "^0.7.0-beta.6", - "@wormhole-foundation/sdk-solana-core": "^0.7.0-beta.6", + "@wormhole-foundation/sdk-base": "^0.10.9", + "@wormhole-foundation/sdk-definitions": "^0.10.9", + "@wormhole-foundation/sdk-evm": "^0.10.9", + "@wormhole-foundation/sdk-solana": "^0.10.9", + "@wormhole-foundation/sdk-solana-core": "^0.10.9", "anchor-0.29.0": "npm:@coral-xyz/anchor@^0.29.0", "chai-as-promised": "^7.1.1", "ts-results": "^3.3.0", diff --git a/solana/ts/scripts/getCctpAccounts.ts b/solana/ts/scripts/getCctpAccounts.ts new file mode 100644 index 0000000..20e30db --- /dev/null +++ b/solana/ts/scripts/getCctpAccounts.ts @@ -0,0 +1,51 @@ +import { Connection } from "@solana/web3.js"; +import { USDC_MINT_ADDRESS } from "@wormhole-foundation/example-liquidity-layer-solana/testing"; +import { TokenRouterProgram } from "@wormhole-foundation/example-liquidity-layer-solana/tokenRouter"; +import { toUniversal } from "@wormhole-foundation/sdk-definitions"; + +const domainToChain = { + 0: { chain: "Ethereum", usdc: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" }, + 1: { chain: "Avalanche", usdc: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E" }, + 2: { chain: "Optimism", usdc: "0x0b2c639c533813f4aa9d7837caf62653d097ff85" }, + 3: { chain: "Arbitrum", usdc: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831" }, + 6: { chain: "Base", usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" }, + 7: { chain: "Polygon", usdc: "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359" }, +} as const; + +main(); + +async function main() { + const connection = new Connection("https://api.mainnet-beta.solana.com", "confirmed"); + + const tokenMessenger = new TokenRouterProgram( + connection, + "tD8RmtdcV7bzBeuFgyrFc8wvayj988ChccEzRQzo6md", + USDC_MINT_ADDRESS, + ).tokenMessengerMinterProgram(); + + for (const [domain, cfg] of Object.entries(domainToChain)) { + const usdcAddress = Array.from(toUniversal(cfg.chain, cfg.usdc).toUint8Array()); + + const remoteTokenMessenger = tokenMessenger.remoteTokenMessengerAddress(Number(domain)); + { + const accInfo = await connection.getAccountInfo(remoteTokenMessenger); + if (accInfo === null) { + continue; + } + } + + const tokenPair = tokenMessenger.tokenPairAddress(Number(domain), usdcAddress); + { + const accInfo = await connection.getAccountInfo(tokenPair); + if (accInfo === null) { + continue; + } + } + + console.log({ + domain, + remoteTokenMessenger: remoteTokenMessenger.toString(), + tokenPair: tokenPair.toString(), + }); + } +} diff --git a/solana/ts/src/swapLayer/index.ts b/solana/ts/src/swapLayer/index.ts index 6711897..008cc30 100644 --- a/solana/ts/src/swapLayer/index.ts +++ b/solana/ts/src/swapLayer/index.ts @@ -3,7 +3,6 @@ export * from "./messages"; export * from "./relayerFees"; export * from "./state"; -import * as wormholeSdk from "@certusone/wormhole-sdk"; import { BN, Program } from "@coral-xyz/anchor"; import * as splToken from "@solana/spl-token"; import { Connection, PublicKey, SystemProgram, TransactionInstruction } from "@solana/web3.js"; @@ -26,7 +25,7 @@ export const PROGRAM_IDS = ["SwapLayer1111111111111111111111111111111111"] as co export type ProgramId = (typeof PROGRAM_IDS)[number]; export type AddPeerArgs = { - chain: wormholeSdk.ChainId; + chain: ChainId; address: Array; relayParams: RelayParams; }; @@ -46,7 +45,7 @@ export type InitiateTransferArgs = { }; export type UpdateRelayParametersArgs = { - chain: wormholeSdk.ChainId; + chain: ChainId; relayParams: RelayParams; }; @@ -89,7 +88,7 @@ export class SwapLayerProgram { return PublicKey.findProgramAddressSync([Buffer.from("custodian")], this.ID)[0]; } - peerAddress(chain: wormholeSdk.ChainId): PublicKey { + peerAddress(chain: ChainId): PublicKey { return Peer.address(this.ID, chain); } @@ -159,7 +158,7 @@ export class SwapLayerProgram { beneficiary: PublicKey; sourcePeer?: PublicKey; }, - opts: { sourceChain?: wormholeSdk.ChainId } = {}, + opts: { sourceChain?: ChainId } = {}, ): Promise<{ custodian: CheckedCustodianComposite; fill: PublicKey; @@ -271,7 +270,7 @@ export class SwapLayerProgram { return this.program.account.custodian.fetch(addr); } - async fetchPeer(input: wormholeSdk.ChainId | { address: PublicKey }): Promise { + async fetchPeer(input: ChainId | { address: PublicKey }): Promise { const addr = typeof input == "object" && "address" in input ? input.address @@ -819,7 +818,7 @@ export class SwapLayerProgram { recipientTokenAccount?: PublicKey; feeRecipientToken?: PublicKey; }, - sourceChain?: wormholeSdk.ChainId, + sourceChain?: ChainId, ) { const { payer, preparedFill, recipient } = accounts; @@ -869,7 +868,7 @@ export class SwapLayerProgram { beneficiary?: PublicKey; recipientTokenAccount?: PublicKey; }, - sourceChain?: wormholeSdk.ChainId, + sourceChain?: ChainId, ) { const { payer, preparedFill, recipient } = accounts; @@ -906,7 +905,7 @@ export class SwapLayerProgram { peer?: PublicKey; beneficiary?: PublicKey; }, - sourceChain?: wormholeSdk.ChainId, + sourceChain?: ChainId, ) { const { payer, preparedFill } = accounts; let { redeemer, peer, beneficiary } = accounts; diff --git a/solana/ts/tests/01__transfer.ts b/solana/ts/tests/01__transfer.ts index ee0c1a1..3a40df2 100644 --- a/solana/ts/tests/01__transfer.ts +++ b/solana/ts/tests/01__transfer.ts @@ -230,6 +230,8 @@ describe("Swap Layer -- Admin and USDC Transfer", () => { [ await createAddPeerIx({ args: { + // @ts-ignore: Override with zero even though this is not a + // valid type. chain: 0, address: foreignSwapLayerAddress, relayParams: startParams, @@ -3518,7 +3520,7 @@ describe("Swap Layer -- Admin and USDC Transfer", () => { redeemMode: { mode: "Payload", sender: toUniversal("Solana", payer.publicKey.toBytes()), - buf: payload, + buf: Uint8Array.from(payload), }, outputToken, }), @@ -3545,7 +3547,7 @@ describe("Swap Layer -- Admin and USDC Transfer", () => { "Ethereum", "0x000000000000000000000000000000000000d00d", ), - buf: payload, + buf: Uint8Array.from(payload), }, outputToken: { type: "Usdc" }, }); @@ -3571,7 +3573,7 @@ describe("Swap Layer -- Admin and USDC Transfer", () => { "Ethereum", "0x000000000000000000000000000000000000d00d", ), - buf: Buffer.from("Insert payload here"), + buf: Uint8Array.from(Buffer.from("Insert payload here")), }, outputToken: { type: "Gas", @@ -3628,7 +3630,7 @@ describe("Swap Layer -- Admin and USDC Transfer", () => { "Ethereum", "0x000000000000000000000000000000000000d00d", ), - buf: Buffer.from("Insert payload here"), + buf: Uint8Array.from(Buffer.from("Insert payload here")), }, outputToken: { type: "Gas", @@ -3992,7 +3994,7 @@ describe("Swap Layer -- Admin and USDC Transfer", () => { sourceChain: toChain(foreignChain), orderSender: toUniversalAddress(orderSender), redeemer: toUniversalAddress(redeemer.toBuffer()), - redeemerMessage: Buffer.from(redeemerMessage), + redeemerMessage: Uint8Array.from(redeemerMessage), }, }), }); diff --git a/solana/ts/tests/10__swap.ts b/solana/ts/tests/10__swap.ts index a05979e..d860fe6 100644 --- a/solana/ts/tests/10__swap.ts +++ b/solana/ts/tests/10__swap.ts @@ -850,8 +850,15 @@ describe("Swap Layer -- Jupiter V6", () => { let listenerId: number | null; before("Start Event Listener", async function () { - listenerId = matchingEngine.onFilledLocalFastOrder((event, slot, signature) => { - emittedEvents.push({ event, slot, signature }); + listenerId = matchingEngine.onEventCpi((event, slot, signature) => { + const { localFastOrderFilled } = event; + if (localFastOrderFilled !== undefined) { + emittedEvents.push({ + event: localFastOrderFilled, + slot, + signature, + }); + } }); }); @@ -2158,8 +2165,15 @@ describe("Swap Layer -- Jupiter V6", () => { let listenerId: number | null; before("Start Event Listener", async function () { - listenerId = matchingEngine.onFilledLocalFastOrder((event, slot, signature) => { - emittedEvents.push({ event, slot, signature }); + listenerId = matchingEngine.onEventCpi((event, slot, signature) => { + const { localFastOrderFilled } = event; + if (localFastOrderFilled !== undefined) { + emittedEvents.push({ + event: localFastOrderFilled, + slot, + signature, + }); + } }); }); @@ -2231,7 +2245,7 @@ describe("Swap Layer -- Jupiter V6", () => { "Ethereum", "0x000000000000000000000000000000000000d00d", ), - buf: Buffer.from("All your base are belong to us."), + buf: Uint8Array.from(Buffer.from("All your base are belong to us.")), }, amountIn, }, @@ -2300,7 +2314,7 @@ describe("Swap Layer -- Jupiter V6", () => { const redeemMode: RedeemMode = { mode: "Payload", sender: toUniversal("Ethereum", "0x000000000000000000000000000000000000d00d"), - buf: Buffer.from("All your base are belong to us."), + buf: Uint8Array.from(Buffer.from("All your base are belong to us.")), }; const amountIn = 200_000_000n; @@ -2318,7 +2332,7 @@ describe("Swap Layer -- Jupiter V6", () => { ); // Fetch amount from prepared fill. - const preparedData = await tokenRouter.preparedCustodyTokenAddress(preparedFill); + const preparedData = tokenRouter.preparedCustodyTokenAddress(preparedFill); const { amount: custodyAmount } = await splToken.getAccount( connection, preparedData, @@ -2702,8 +2716,15 @@ describe("Swap Layer -- Jupiter V6", () => { let listenerId: number | null; before("Start Event Listener", async function () { - listenerId = matchingEngine.onFilledLocalFastOrder((event, slot, signature) => { - emittedEvents.push({ event, slot, signature }); + listenerId = matchingEngine.onEventCpi((event, slot, signature) => { + const { localFastOrderFilled } = event; + if (localFastOrderFilled !== undefined) { + emittedEvents.push({ + event: localFastOrderFilled, + slot, + signature, + }); + } }); }); @@ -2733,7 +2754,7 @@ describe("Swap Layer -- Jupiter V6", () => { "Ethereum", "0x000000000000000000000000000000000000d00d", ), - buf: Buffer.from("All your base are belong to us."), + buf: Uint8Array.from(Buffer.from("All your base are belong to us.")), }, outputToken, amountIn, @@ -2773,7 +2794,7 @@ describe("Swap Layer -- Jupiter V6", () => { "Ethereum", "0x000000000000000000000000000000000000d00d", ), - buf: Buffer.from("All your base are belong to us."), + buf: Uint8Array.from(Buffer.from("All your base are belong to us."),) }, outputToken, amountIn, @@ -2811,7 +2832,7 @@ describe("Swap Layer -- Jupiter V6", () => { "Ethereum", "0x000000000000000000000000000000000000d00d", ), - buf: Buffer.from("All your base are belong to us."), + buf: Uint8Array.from(Buffer.from("All your base are belong to us."),) }, amountIn, }, @@ -2849,7 +2870,7 @@ describe("Swap Layer -- Jupiter V6", () => { "Ethereum", "0x000000000000000000000000000000000000d00d", ), - buf: Buffer.from("All your base are belong to us."), + buf: Uint8Array.from(Buffer.from("All your base are belong to us."),) }, outputToken, amountIn, @@ -2975,7 +2996,7 @@ describe("Swap Layer -- Jupiter V6", () => { } const { redeemerMessage } = await tokenRouter.fetchPreparedFill(accounts.preparedFill); - const outputToken = decodeSwapLayerMessage(redeemerMessage).outputToken; + const outputToken = decodeSwapLayerMessage(Uint8Array.from(redeemerMessage)).outputToken; if (outputToken.type === "Gas" || outputTokenOverride === "Gas") { const balanceBefore = await connection.getBalance(accounts.recipient).then(BigInt); @@ -3076,7 +3097,7 @@ describe("Swap Layer -- Jupiter V6", () => { } const { redeemerMessage } = await tokenRouter.fetchPreparedFill(accounts.preparedFill); - const swapMsg = decodeSwapLayerMessage(redeemerMessage); + const swapMsg = decodeSwapLayerMessage(Uint8Array.from(redeemerMessage)); const selfRedeem = accounts.payer == accounts.recipient; // Fetch the balance of the fee recipient before the swap. @@ -3219,7 +3240,7 @@ describe("Swap Layer -- Jupiter V6", () => { addressLookupTableAccounts, }); - const { recipient, redeemMode, outputToken } = decodeSwapLayerMessage(redeemerMessage); + const { recipient, redeemMode, outputToken } = decodeSwapLayerMessage(Uint8Array.from(redeemerMessage)); if (redeemMode.mode !== "Payload") { assert.fail("Not in payload mode"); } @@ -3335,7 +3356,7 @@ describe("Swap Layer -- Jupiter V6", () => { const preparedFill = tokenRouter.preparedFillAddress(fastFill); const { redeemerMessage } = await tokenRouter.fetchPreparedFill(preparedFill); - assert.deepEqual(decodeSwapLayerMessage(redeemerMessage), msg); + assert.deepEqual(decodeSwapLayerMessage(Uint8Array.from(redeemerMessage)), msg); return { preparedFill, recipient }; } @@ -3668,7 +3689,7 @@ describe("Swap Layer -- Jupiter V6", () => { maxFee: maxFee ?? 42069n, initAuctionFee: initAuctionFee ?? 1_250_000n, deadline: deadline ?? 0, - redeemerMessage: Buffer.from(redeemerMessage ?? Uint8Array.from([4, 20, 69])), + redeemerMessage: redeemerMessage ?? Uint8Array.from([4, 20, 69]), }; } @@ -3983,7 +4004,7 @@ describe("Swap Layer -- Jupiter V6", () => { return { mode: "Payload", sender: toUniversal("Solana", sender.toBytes()), - buf: redeemOption.payload, + buf: Uint8Array.from(redeemOption.payload), }; } else { throw new Error("Invalid redeem option"); From 1575d6780b1e3a053ca4ca5bc30d370f1183b0f3 Mon Sep 17 00:00:00 2001 From: A5 Pickle Date: Tue, 22 Oct 2024 16:40:18 -0500 Subject: [PATCH 03/10] e2e: return anchor test exit code --- e2e/sh/run_test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/e2e/sh/run_test.sh b/e2e/sh/run_test.sh index 85a4cbf..001d2f9 100644 --- a/e2e/sh/run_test.sh +++ b/e2e/sh/run_test.sh @@ -25,4 +25,8 @@ cd $ROOT/e2e anchor test --skip-build +EXIT_CODE=$? + pkill anvil + +exit $EXIT_CODE From 9ec8361e637cfa62d7ee9b54be6176b3d7eb6212 Mon Sep 17 00:00:00 2001 From: A5 Pickle Date: Tue, 22 Oct 2024 16:40:35 -0500 Subject: [PATCH 04/10] evm: fix clean --- evm/Makefile | 4 ++-- evm/ts-sdk/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/evm/Makefile b/evm/Makefile index 6b98b51..fa843a9 100644 --- a/evm/Makefile +++ b/evm/Makefile @@ -41,5 +41,5 @@ $(foreach dep,$(LIB_DEPS), $(eval $(call install_lib,$(dep)))) clean: forge clean rm -rf lib - rm -rf node_modules - @$(MAKE) -C env clean + cd ts-sdk && npm run clean + @$(MAKE) -C env clean \ No newline at end of file diff --git a/evm/ts-sdk/package.json b/evm/ts-sdk/package.json index b7a7cd6..367abfa 100644 --- a/evm/ts-sdk/package.json +++ b/evm/ts-sdk/package.json @@ -6,7 +6,7 @@ "module": "lib/esm/index.js", "scripts": { "build": "tsc -p tsconfig.json && tsc -p tsconfig-cjs.json", - "clean": "rm -rf dist" + "clean": "rm -rf dist lib node_modules" }, "author": "", "license": "ISC", From 96287b168d06223859ce91ec3be3b0dc0b697f5b Mon Sep 17 00:00:00 2001 From: A5 Pickle Date: Tue, 22 Oct 2024 12:46:08 -0500 Subject: [PATCH 05/10] workflows: yolo --- .github/workflows/e2e.yml | 25 +++++++++++++++++-------- .github/workflows/solana.yml | 18 ++++++++++++++---- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9687905..26e351a 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -6,13 +6,14 @@ on: pull_request: env: + ANCHOR_VERSION: 0.30.1 + NODE_VERSION: 20.11.0 RUSTC_VERSION: 1.75.0 + SOLANA_VERSION: 1.18.15 jobs: test: name: bash sh/run_test.sh runs-on: ubuntu-latest - # Anchor Docker image: https://www.anchor-lang.com/docs/verifiable-builds#images - # container: backpackapp/build:v0.30.1 steps: - uses: actions/checkout@v4 with: @@ -21,18 +22,26 @@ jobs: uses: foundry-rs/foundry-toolchain@v1 with: version: nightly - - uses: metadaoproject/setup-anchor@v2 + - uses: actions/setup-node@v4 with: - node-version: "20.11.0" - solana-cli-version: "1.18.15" - anchor-version: "0.30.1" - - name: Set default Rust toolchain - run: rustup default stable + node-version: ${{ env.NODE_VERSION }} + - name: Install Solana CLI tools + run: sh -c "$(curl -sSfL https://release.anza.xyz/v${{ env.SOLANA_VERSION }}/install)" + shell: bash + - name: Update PATH + run: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH + shell: bash + - name: Install Anchor + run: npm i -g @coral-xyz/anchor-cli@${{ env.ANCHOR_VERSION }} + shell: bash - name: make node_modules run: make node_modules - name: make build run: make build working-directory: ./evm + - name: npm run build + run: npm run build + working-directory: ./evm/ts-sdk - name: bash sh/run_test.sh run: bash sh/run_test.sh working-directory: ./e2e diff --git a/.github/workflows/solana.yml b/.github/workflows/solana.yml index 7dae5a6..7036e4a 100644 --- a/.github/workflows/solana.yml +++ b/.github/workflows/solana.yml @@ -6,7 +6,10 @@ on: pull_request: env: + ANCHOR_VERSION: 0.30.1 + NODE_VERSION: 20.11.0 RUSTC_VERSION: 1.75.0 + SOLANA_VERSION: 1.18.15 jobs: make-cargo-test-all: name: make cargo-test-all @@ -51,11 +54,18 @@ jobs: uses: foundry-rs/foundry-toolchain@v1 with: version: nightly - - uses: metadaoproject/setup-anchor@v2 + - uses: actions/setup-node@v4 with: - node-version: "20.11.0" - solana-cli-version: "1.18.15" - anchor-version: "0.30.1" + node-version: ${{ env.NODE_VERSION }} + - name: Install Solana CLI tools + run: sh -c "$(curl -sSfL https://release.anza.xyz/v${{ env.SOLANA_VERSION }}/install)" + shell: bash + - name: Update PATH + run: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH + shell: bash + - name: Install Anchor + run: npm i -g @coral-xyz/anchor-cli@${{ env.ANCHOR_VERSION }} + shell: bash - name: Set default Rust toolchain run: rustup default stable working-directory: ./solana From 939934529e8f86ad357c8c45d3cb22cb3bcb94d6 Mon Sep 17 00:00:00 2001 From: A5 Pickle Date: Tue, 22 Oct 2024 16:51:01 -0500 Subject: [PATCH 06/10] e2e: fix swap test --- e2e/tests/02__swapLayer.ts | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/e2e/tests/02__swapLayer.ts b/e2e/tests/02__swapLayer.ts index 94a0bea..237d221 100644 --- a/e2e/tests/02__swapLayer.ts +++ b/e2e/tests/02__swapLayer.ts @@ -88,8 +88,8 @@ describe("Swap Layer", () => { const amountIn = 20_000_000_000; // 20k USDC const output: InitiateArgs = { - transferMode: { - mode: "LiquidityLayer", + fastTransferMode: { + mode: "Disabled", }, redeemMode: { mode: "Direct", @@ -171,8 +171,8 @@ describe("Swap Layer", () => { .then((encodedFee) => Number(encodedFee)); const output: InitiateArgs = { - transferMode: { - mode: "LiquidityLayer", + fastTransferMode: { + mode: "Disabled", }, redeemMode: { mode: "Relay", @@ -270,8 +270,8 @@ describe("Swap Layer", () => { .then((b) => b.timestamp); const output: InitiateArgs = { - transferMode: { - mode: "LiquidityLayer", + fastTransferMode: { + mode: "Disabled", }, redeemMode: { mode: "Direct", @@ -377,8 +377,8 @@ describe("Swap Layer", () => { .then((encodedFee) => BigInt(encodedFee)); const output: InitiateArgs = { - transferMode: { - mode: "LiquidityLayer", + fastTransferMode: { + mode: "Disabled", }, redeemMode: { mode: "Relay", @@ -1045,8 +1045,8 @@ describe("Swap Layer", () => { const amountIn = 20_000_000_000; // 20k USDC const output: InitiateArgs = { - transferMode: { - mode: "LiquidityLayer", + fastTransferMode: { + mode: "Disabled", }, redeemMode: { mode: "Direct", @@ -1152,8 +1152,8 @@ describe("Swap Layer", () => { .then((encodedFee) => Number(encodedFee)); const output: InitiateArgs = { - transferMode: { - mode: "LiquidityLayer", + fastTransferMode: { + mode: "Disabled", }, redeemMode: { mode: "Relay", @@ -1277,8 +1277,8 @@ describe("Swap Layer", () => { .then((b) => b.timestamp); const output: InitiateArgs = { - transferMode: { - mode: "LiquidityLayer", + fastTransferMode: { + mode: "Disabled", }, redeemMode: { mode: "Direct", @@ -1406,8 +1406,8 @@ describe("Swap Layer", () => { .then((encodedFee) => BigInt(encodedFee)); const output: InitiateArgs = { - transferMode: { - mode: "LiquidityLayer", + fastTransferMode: { + mode: "Disabled", }, redeemMode: { mode: "Relay", @@ -1542,8 +1542,8 @@ describe("Swap Layer", () => { .then((b) => b.timestamp); const output: InitiateArgs = { - transferMode: { - mode: "LiquidityLayer", + fastTransferMode: { + mode: "Disabled", }, redeemMode: { mode: "Direct", @@ -1682,8 +1682,8 @@ describe("Swap Layer", () => { const amountOut = amountIn - relayingFee - 500_000n; const output: InitiateArgs = { - transferMode: { - mode: "LiquidityLayer", + fastTransferMode: { + mode: "Disabled", }, redeemMode: { mode: "Relay", From 3a8bff6d5ca3aaf5222e716106ea72890218447b Mon Sep 17 00:00:00 2001 From: A5 Pickle Date: Wed, 23 Oct 2024 14:22:41 -0500 Subject: [PATCH 07/10] evm: fix Makefile --- evm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evm/Makefile b/evm/Makefile index fa843a9..658c8f7 100644 --- a/evm/Makefile +++ b/evm/Makefile @@ -23,7 +23,7 @@ endef .PHONY: build test clean dependencies build: dependencies - forge build + forge build --skip test test: dependencies forge test --fork-url $$TEST_RPC -vvv From 68db60071a419228bab4f86eb7d78a66f388ab44 Mon Sep 17 00:00:00 2001 From: A5 Pickle Date: Wed, 23 Oct 2024 10:47:55 -0500 Subject: [PATCH 08/10] e2e: cp -r solana/target e2e --- .github/workflows/e2e.yml | 34 +++++++++++++++++++--------------- .github/workflows/solana.yml | 14 ++++++++------ e2e/sh/run_test.sh | 8 ++------ evm/test/script/start_anvil.sh | 4 ++++ 4 files changed, 33 insertions(+), 27 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 26e351a..e6fd567 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -13,7 +13,8 @@ env: jobs: test: name: bash sh/run_test.sh - runs-on: ubuntu-latest + runs-on: + labels: ubuntu-latest-m steps: - uses: actions/checkout@v4 with: @@ -22,26 +23,29 @@ jobs: uses: foundry-rs/foundry-toolchain@v1 with: version: nightly - - uses: actions/setup-node@v4 + - uses: evan-gray/setup-anchor@c748c7e331768b0158e558152de4053e0fde5dc9 with: node-version: ${{ env.NODE_VERSION }} - - name: Install Solana CLI tools - run: sh -c "$(curl -sSfL https://release.anza.xyz/v${{ env.SOLANA_VERSION }}/install)" - shell: bash - - name: Update PATH - run: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - shell: bash - - name: Install Anchor - run: npm i -g @coral-xyz/anchor-cli@${{ env.ANCHOR_VERSION }} - shell: bash + solana-cli-version: ${{ env.SOLANA_VERSION }} + anchor-version: ${{ env.ANCHOR_VERSION }} - name: make node_modules run: make node_modules - - name: make build + - name: cd evm && make build run: make build working-directory: ./evm - - name: npm run build + - name: cd evm/ts-sdk && npm run build run: npm run build working-directory: ./evm/ts-sdk - - name: bash sh/run_test.sh + - name: cd solana && make anchor-test-setup + run: make anchor-test-setup + working-directory: ./solana + - name: cd solana && anchor build -- --features integration-test + run: anchor build -- --features integration-test + working-directory: ./solana + - name: Install toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUSTC_VERSION }} + - name: cd e2e && bash sh/run_test.sh run: bash sh/run_test.sh - working-directory: ./e2e + working-directory: ./e2e \ No newline at end of file diff --git a/.github/workflows/solana.yml b/.github/workflows/solana.yml index 7036e4a..edba04e 100644 --- a/.github/workflows/solana.yml +++ b/.github/workflows/solana.yml @@ -66,9 +66,10 @@ jobs: - name: Install Anchor run: npm i -g @coral-xyz/anchor-cli@${{ env.ANCHOR_VERSION }} shell: bash - - name: Set default Rust toolchain - run: rustup default stable - working-directory: ./solana + - name: Install toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUSTC_VERSION }} - name: make anchor-test run: make anchor-test working-directory: ./solana @@ -89,9 +90,10 @@ jobs: node-version: "20.11.0" solana-cli-version: "1.18.15" anchor-version: "0.30.1" - - name: Set default Rust toolchain - run: rustup default stable - working-directory: ./solana + - name: Install toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUSTC_VERSION }} - name: make check-build run: make check-build working-directory: ./solana diff --git a/e2e/sh/run_test.sh b/e2e/sh/run_test.sh index 001d2f9..4c91d33 100644 --- a/e2e/sh/run_test.sh +++ b/e2e/sh/run_test.sh @@ -8,7 +8,8 @@ sed 's/\= "ts\//\= "..\/solana\/ts\//' $ROOT/solana/Anchor.toml > Anchor.toml sed -E -i 's/"programs\/swap-layer"/"..\/solana\/programs\/swap-layer"/' Anchor.toml sed -E -i 's/^test \= ".+"/test = "npx ts-mocha -p .\/tsconfig.anchor-test.json -t 1000000 --bail --exit tests\/[0-9]*.ts"/' Anchor.toml -mkdir -p target/deploy +rm -rf target +cp -r $ROOT/solana/target $ROOT/e2e # start anvil in the evm directory cd $ROOT/evm @@ -16,11 +17,6 @@ bash test/script/start_anvil.sh echo "Anvil instances started successfully." -cd $ROOT/solana -make anchor-test-setup -anchor build -- --features integration-test -cp target/deploy/swap_layer.so $ROOT/e2e/target/deploy - cd $ROOT/e2e anchor test --skip-build diff --git a/evm/test/script/start_anvil.sh b/evm/test/script/start_anvil.sh index 2e8a0f0..f4898f2 100644 --- a/evm/test/script/start_anvil.sh +++ b/evm/test/script/start_anvil.sh @@ -13,6 +13,8 @@ OWNER_PRIVATE_KEY=0x646f1ce2fdad0e6deeeb5c7e8e5543bdde65e86029e2fd9fc169899c440a . $ENV/Ethereum.env +echo $RELEASE_RPC + # Ethereum (CCTP). anvil --port 8548 \ -m "myth like bonus scare over problem client lizard pioneer submit female collect" \ @@ -29,6 +31,8 @@ forge script $ROOT/DeploySwapLayerForTest.s.sol \ . $ENV/Base.env +echo $RELEASE_RPC + # Base (CCTP). anvil --port 8549 \ -m "myth like bonus scare over problem client lizard pioneer submit female collect" \ From 7f272859473223c3ea9cff0e5be49a176510f373 Mon Sep 17 00:00:00 2001 From: A5 Pickle Date: Wed, 23 Oct 2024 20:45:16 -0500 Subject: [PATCH 09/10] cmon man --- .github/workflows/e2e.yml | 2 +- e2e/tests/helpers/consts.ts | 4 ++-- evm/test/script/start_anvil.sh | 8 ++++---- evm/ts-scripts/config/localTestnet/chains.json | 2 +- evm/ts-scripts/config/localTestnet/temp.json | 4 ++-- evm/ts-scripts/config/testnet/temp.json | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index e6fd567..7a1ea5d 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -14,7 +14,7 @@ jobs: test: name: bash sh/run_test.sh runs-on: - labels: ubuntu-latest-m + labels: ubuntu-latest-l steps: - uses: actions/checkout@v4 with: diff --git a/e2e/tests/helpers/consts.ts b/e2e/tests/helpers/consts.ts index 85d397a..39c9721 100644 --- a/e2e/tests/helpers/consts.ts +++ b/e2e/tests/helpers/consts.ts @@ -21,8 +21,8 @@ export const ONE_SOL = 1000000000; // Avalanche Mainnet Fork export const EVM_LOCALHOSTS = { - Ethereum: "http://127.0.0.1:8548", - Base: "http://127.0.0.1:8549", + Ethereum: "http://127.0.0.1:8545", + Base: "http://127.0.0.1:8546", }; // USDT tokens on Ethereum. diff --git a/evm/test/script/start_anvil.sh b/evm/test/script/start_anvil.sh index f4898f2..2e16ce5 100644 --- a/evm/test/script/start_anvil.sh +++ b/evm/test/script/start_anvil.sh @@ -16,7 +16,7 @@ OWNER_PRIVATE_KEY=0x646f1ce2fdad0e6deeeb5c7e8e5543bdde65e86029e2fd9fc169899c440a echo $RELEASE_RPC # Ethereum (CCTP). -anvil --port 8548 \ +anvil --port 8545 \ -m "myth like bonus scare over problem client lizard pioneer submit female collect" \ --fork-url $RELEASE_RPC \ --fork-block-number 20034932 \ @@ -25,7 +25,7 @@ anvil --port 8548 \ sleep 2 forge script $ROOT/DeploySwapLayerForTest.s.sol \ - --rpc-url http://localhost:8548 \ + --rpc-url http://localhost:8545 \ --broadcast \ --private-key $OWNER_PRIVATE_KEY @@ -34,7 +34,7 @@ forge script $ROOT/DeploySwapLayerForTest.s.sol \ echo $RELEASE_RPC # Base (CCTP). -anvil --port 8549 \ +anvil --port 8546 \ -m "myth like bonus scare over problem client lizard pioneer submit female collect" \ --fork-url $RELEASE_RPC \ --fork-block-number 15456753 \ @@ -43,7 +43,7 @@ anvil --port 8549 \ sleep 2 forge script $ROOT/DeploySwapLayerForTest.s.sol \ - --rpc-url http://localhost:8549 \ + --rpc-url http://localhost:8546 \ --broadcast \ --private-key $OWNER_PRIVATE_KEY diff --git a/evm/ts-scripts/config/localTestnet/chains.json b/evm/ts-scripts/config/localTestnet/chains.json index 16b6c1c..e75f878 100644 --- a/evm/ts-scripts/config/localTestnet/chains.json +++ b/evm/ts-scripts/config/localTestnet/chains.json @@ -7,7 +7,7 @@ "description": "Fuji", "evmNetworkId": 43113, "chainId": 6, - "rpc": "http://localhost:8548", + "rpc": "http://localhost:8545", "rpcWs": "wss://avalanche-fuji-c-chain.publicnode.com", "wormholeAddress": "0x7bbcE28e64B3F8b84d876Ab298393c38ad7aac4C", "liquidityLayerAddress": "0x7353B29FDc79435dcC7ECc9Ac9F9b61d83B4E0F4", diff --git a/evm/ts-scripts/config/localTestnet/temp.json b/evm/ts-scripts/config/localTestnet/temp.json index 2bd216d..45d008a 100644 --- a/evm/ts-scripts/config/localTestnet/temp.json +++ b/evm/ts-scripts/config/localTestnet/temp.json @@ -3,7 +3,7 @@ "description": "Arbitrum goerli", "evmNetworkId": 421613, "chainId": 23, - "rpc": "http://127.0.0.1:8548", + "rpc": "http://127.0.0.1:8545", "rpcWs": "wss://arbitrum-goerli.publicnode.com", "wormholeAddress": "0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e", "liquidityLayerAddress": "0xe26BDB27d199DD757e28B4F2Ae032b62aF7687d2", @@ -31,7 +31,7 @@ "description": "Optimism goerli", "evmNetworkId": 420, "chainId": 24, - "rpc": "http://127.0.0.1:8549", + "rpc": "http://127.0.0.1:8546", "rpcWs": "wss://optimism-goerli.publicnode.com", "wormholeAddress": "0x6b9C8671cdDC8dEab9c719bB87cBd3e782bA6a35", "liquidityLayerAddress": "0xe26BDB27d199DD757e28B4F2Ae032b62aF7687d2", diff --git a/evm/ts-scripts/config/testnet/temp.json b/evm/ts-scripts/config/testnet/temp.json index 2bd216d..45d008a 100644 --- a/evm/ts-scripts/config/testnet/temp.json +++ b/evm/ts-scripts/config/testnet/temp.json @@ -3,7 +3,7 @@ "description": "Arbitrum goerli", "evmNetworkId": 421613, "chainId": 23, - "rpc": "http://127.0.0.1:8548", + "rpc": "http://127.0.0.1:8545", "rpcWs": "wss://arbitrum-goerli.publicnode.com", "wormholeAddress": "0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e", "liquidityLayerAddress": "0xe26BDB27d199DD757e28B4F2Ae032b62aF7687d2", @@ -31,7 +31,7 @@ "description": "Optimism goerli", "evmNetworkId": 420, "chainId": 24, - "rpc": "http://127.0.0.1:8549", + "rpc": "http://127.0.0.1:8546", "rpcWs": "wss://optimism-goerli.publicnode.com", "wormholeAddress": "0x6b9C8671cdDC8dEab9c719bB87cBd3e782bA6a35", "liquidityLayerAddress": "0xe26BDB27d199DD757e28B4F2Ae032b62aF7687d2", From aadf8fa06d19f29547e23a9e522daf524896fcc3 Mon Sep 17 00:00:00 2001 From: A5 Pickle Date: Thu, 24 Oct 2024 09:42:49 -0500 Subject: [PATCH 10/10] workflow: make consistent --- .github/workflows/e2e.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 7a1ea5d..af94c22 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -23,11 +23,18 @@ jobs: uses: foundry-rs/foundry-toolchain@v1 with: version: nightly - - uses: evan-gray/setup-anchor@c748c7e331768b0158e558152de4053e0fde5dc9 + - uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - solana-cli-version: ${{ env.SOLANA_VERSION }} - anchor-version: ${{ env.ANCHOR_VERSION }} + - name: Install Solana CLI tools + run: sh -c "$(curl -sSfL https://release.anza.xyz/v${{ env.SOLANA_VERSION }}/install)" + shell: bash + - name: Update PATH + run: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH + shell: bash + - name: Install Anchor + run: npm i -g @coral-xyz/anchor-cli@${{ env.ANCHOR_VERSION }} + shell: bash - name: make node_modules run: make node_modules - name: cd evm && make build