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

Pendulum Integration with Moonbase #174

Merged
merged 9 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/cuddly-hairs-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@moonbeam-network/xcm-builder': patch
'@moonbeam-network/xcm-config': patch
'@moonbeam-network/xcm-sdk': patch
---

Pendulum integration with Moonbase
2 changes: 1 addition & 1 deletion .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- run: npm ci --ignore-scripts

- name: ✌️ Update versions
run: npx ts-node --esm ./scripts/update-dev-versions.ts
run: npx bun ./scripts/update-dev-versions.ts

- name: 🛠️ Build
run: npm run build
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"editor.formatOnSaveMode": "file",
"typescript.preferences.importModuleSpecifier": "relative",
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.fixAll.eslint": true
"source.organizeImports": "explicit",
"source.fixAll.eslint": "explicit"
}
}
4 changes: 2 additions & 2 deletions examples/sdk-simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "module",
"main": "index.ts",
"scripts": {
"start": "ts-node --esm index.ts"
"start": "bun index.ts"
},
"keywords": [],
"author": "",
Expand All @@ -17,6 +17,6 @@
"@moonbeam-network/xcm-utils": "1.0.3"
},
"devDependencies": {
"ts-node": "^10.9.1"
"bun": "^1.0.20"
}
}
149 changes: 140 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@types/jest": "^29.5.3",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"bun": "^1.0.20",
"dotenv": "^16.3.1",
"eslint": "^8.41.0",
"eslint-config-airbnb-base": "^15.0.0",
Expand All @@ -61,7 +62,6 @@
"lint-staged": "^13.2.3",
"prettier": "^2.8.8",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
"tsup": "^6.7.0",
"turbo": "^1.9.9",
"typescript": "^5.0.4",
Expand Down
8 changes: 4 additions & 4 deletions packages/builder/src/contract/contracts/Xtokens/Xtokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import { decodeAddress } from '@polkadot/util-crypto';
import { ContractConfigBuilder } from '../../ContractBuilder.interfaces';
import { ContractConfig } from '../../ContractConfig';

const U_64_MAX = 18446744073709551615n;

export function Xtokens() {
return {
transfer: (weight = 4_000_000_000): ContractConfigBuilder => ({
transfer: (weight = U_64_MAX): ContractConfigBuilder => ({
mmaurello marked this conversation as resolved.
Show resolved Hide resolved
build: ({ address, amount, asset, destination }) =>
new ContractConfig({
args: [
Expand All @@ -21,9 +23,7 @@ export function Xtokens() {
module: 'Xtokens',
}),
}),
transferMultiCurrencies: (
weight = 4_000_000_000,
): ContractConfigBuilder => ({
transferMultiCurrencies: (weight = U_64_MAX): ContractConfigBuilder => ({
build: ({ address, amount, asset, destination, fee, feeAsset }) =>
new ContractConfig({
args: [
Expand Down
6 changes: 6 additions & 0 deletions packages/config/src/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ export const alan = new Asset({
originSymbol: 'ALAN',
});

export const ampe = new Asset({
key: 'ampe',
originSymbol: 'AMPE',
});

export const astr = new Asset({
key: 'astr',
originSymbol: 'ASTR',
Expand Down Expand Up @@ -308,6 +313,7 @@ export const ztg = new Asset({
export const assetsList: Asset[] = [
aca,
alan,
ampe,
astr,
atom,
auq,
Expand Down
Loading
Loading