Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes in build process to be able to link to projects #382

Merged
merged 10 commits into from
Oct 31, 2024
14 changes: 9 additions & 5 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,24 @@ jobs:

- name: 🚀 Publish types
working-directory: ./packages/types
run: pnpm publish --tag dev
run: pnpm publish --no-git-checks --tag dev

- name: 🚀 Publish utils
working-directory: ./packages/utils
run: pnpm publish --tag dev
run: pnpm publish --no-git-checks --tag dev

- name: 🚀 Publish builder
working-directory: ./packages/builder
run: pnpm publish --tag dev
run: pnpm publish --no-git-checks --tag dev

- name: 🚀 Publish config
working-directory: ./packages/config
run: pnpm publish --tag dev
run: pnpm publish --no-git-checks --tag dev

- name: 🚀 Publish sdk
working-directory: ./packages/sdk
run: pnpm publish --tag dev
run: pnpm publish --no-git-checks --tag dev

- name: 🚀 Publish mrl
working-directory: ./packages/mrl
run: pnpm publish --no-git-checks --tag dev
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"neuroweb",
"nodl",
"nodle",
"npmjs",
"onfinality",
"parachain",
"parachains",
Expand All @@ -61,6 +62,7 @@
"pendulumchain",
"phala",
"polkadot",
"postbuild",
"precompile",
"preinstall",
"rmrk",
Expand Down
2 changes: 1 addition & 1 deletion examples/mrl-simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"@moonbeam-network/xcm-utils": "workspace:*"
},
"devDependencies": {
"bun": "^1.1.25"
"bun": "^1.1.31"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"scripts": {
"preinstall": "npx only-allow pnpm",
"build": "turbo run build",
"postbuild": "npx bun scripts/copy-dts.ts",
"dev": "turbo run dev",
"link": "turbo run link",
"lint": "pnpm biome check .",
Expand Down Expand Up @@ -57,7 +58,6 @@
"dotenv": "^16.4.5",
"glob": "^11.0.0",
"lefthook": "^1.7.15",
"prettier": "^3.3.3",
"syncpack": "^13.0.0",
"tsup": "^8.3.0",
"turbo": "^2.1.3",
Expand Down
12 changes: 6 additions & 6 deletions packages/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"description": "Moonbeam XCM builder",
"scripts": {
"build": "tsup",
"dev": "pnpm run build -- --watch",
"dev": "tsup --watch",
"link": "pnpm ln --global",
"typecheck": "tsc --noEmit",
"test": "vitest --run",
"test:watch": "vitest",
"test:update": "vitest -u",
"prepack": "prettier --write build/index.d.ts"
"test:update": "vitest -u"
},
"repository": {
"directory": "packages/builder",
Expand Down Expand Up @@ -39,8 +39,8 @@
"@polkadot/types": "^12.4.2",
"@polkadot/util": "^13.1.1",
"@polkadot/util-crypto": "^13.1.1",
"@wormhole-foundation/sdk-connect": "^0.8.2",
"@wormhole-foundation/sdk-evm": "^0.8.2",
"viem": "^2.20.0"
"@wormhole-foundation/sdk-connect": "^0.10.7",
"@wormhole-foundation/sdk-evm": "^0.10.7",
"viem": "^2.21.7"
}
}
6 changes: 3 additions & 3 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"description": "All necessary configuration to transfer assets from Moonbeam, Moonriver, Moonbase to other parachains and back",
"scripts": {
"build": "tsup",
"dev": "pnpm run build -- --watch",
"dev": "tsup --watch",
"link": "pnpm ln --global",
"typecheck": "tsc --noEmit",
"test": "vitest --run",
"test:watch": "vitest",
"test:update": "vitest -u",
"prepack": "prettier --write build/index.d.ts"
"test:update": "vitest -u"
},
"repository": {
"directory": "packages/config",
Expand Down
14 changes: 7 additions & 7 deletions packages/mrl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "Moonbeam Routed Liquidity",
"scripts": {
"build": "tsup",
"dev": "pnpm run build -- --watch",
"typecheck": "tsc --noEmit",
"prepack": "prettier --write build/index.d.ts"
"dev": "tsup --watch",
"link": "pnpm ln --global",
"typecheck": "tsc --noEmit"
},
"repository": {
"directory": "packages/mrl",
Expand All @@ -30,16 +30,16 @@
"@moonbeam-network/xcm-config": "workspace:*",
"@moonbeam-network/xcm-sdk": "workspace:*",
"@moonbeam-network/xcm-types": "workspace:*",
"@moonbeam-network/xcm-utils": "workspace:^",
"@moonbeam-network/xcm-utils": "workspace:*",
"big.js": "^6.2.1"
},
"peerDependencies": {
"@polkadot/api": "^12.4.2",
"@polkadot/api-augment": "^12.4.2",
"@polkadot/types": "^12.4.2",
"@polkadot/util": "^13.0.2",
"@wormhole-foundation/sdk-connect": "^0.8.2",
"@wormhole-foundation/sdk-evm": "^0.8.2",
"viem": "^2.20.0"
"@wormhole-foundation/sdk-connect": "^0.10.7",
"@wormhole-foundation/sdk-evm": "^0.10.7",
"viem": "^2.21.7"
}
}
5 changes: 5 additions & 0 deletions packages/mrl/src/getTransferData/getRedeemData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ export async function getRedeemData({ txId, chain }: WormholeRedeemParams) {
const wh = WormholeService.create(chain);

const vaa = await wh.getVaa(txId);
if (!vaa) {
// TODO handle softly when retrieving
throw new Error(`VAA not found for WormholeId ${txId}`);
}

const tokenTransfer = await wh.getTokenTransfer(vaa, txId);

const isXcm = vaa.payloadName === 'TransferWithPayload';
Expand Down
8 changes: 4 additions & 4 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "The Moonbeam XCM SDK enables developers to easily deposit and withdraw assets to Moonbeam/Moonriver from the relay chain and other parachains in the Polkadot/Kusama ecosystem",
"scripts": {
"build": "tsup",
"dev": "pnpm run build -- --watch",
"dev": "tsup --watch",
"link": "pnpm ln --global",
"typecheck": "tsc --noEmit",
"test:acc": "vitest --run --testTimeout 300000 ./tests/acceptance",
"prepack": "prettier --write build/index.d.ts"
"test:acc": "vitest --run --testTimeout 300000 ./tests/acceptance"
},
"author": "moonbeam-foundation",
"license": "MIT",
Expand Down Expand Up @@ -46,7 +46,7 @@
"@polkadot/api-augment": "^12.4.2",
"@polkadot/types": "^12.4.2",
"@polkadot/util": "^13.1.1",
"viem": "^2.20.0"
"viem": "^2.21.7"
},
"devDependencies": {
"@types/big.js": "^6.2.2"
Expand Down
10 changes: 5 additions & 5 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"description": "Moonbeam XCM Types",
"scripts": {
"build": "tsup",
"dev": "pnpm run build -- --watch",
"dev": "tsup --watch",
"link": "pnpm ln --global",
"test": "vitest --run",
"test:watch": "vitest",
"test:update": "vitest -u",
"prepack": "prettier --write build/index.d.ts"
"test:update": "vitest -u"
},
"repository": {
"directory": "packages/types",
Expand All @@ -33,9 +33,9 @@
},
"devDependencies": {
"@types/big.js": "^6.2.2",
"@wormhole-foundation/sdk-connect": "^0.8.2"
"@wormhole-foundation/sdk-connect": "^0.10.7"
},
"peerDependencies": {
"viem": "^2.20.0"
"viem": "^2.21.7"
}
}
8 changes: 4 additions & 4 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"description": "Moonbeam XCM utilities",
"scripts": {
"build": "tsup",
"dev": "pnpm run build -- --watch",
"dev": "tsup --watch",
"link": "pnpm ln --global",
"typecheck": "tsc --noEmit",
"test": "vitest --run",
"test:watch": "vitest",
"test:update": "vitest -u",
"prepack": "prettier --write build/index.d.ts"
"test:update": "vitest -u"
},
"author": "moonbeam-foundation",
"license": "MIT",
Expand Down Expand Up @@ -39,6 +39,6 @@
"@polkadot/api": "^12.4.2",
"@polkadot/apps-config": "^0.143.2",
"@polkadot/util": "^13.1.1",
"@polkadot/util-crypto": "^13.0.2"
"@polkadot/util-crypto": "^13.1.1"
}
}
Loading