Skip to content

Add EURC and XLM assets from Pendulum #1

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

Closed
wants to merge 69 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
d85b4ba
Add LBTC
green-jay Apr 8, 2025
c433428
Merge branch 'master' into add-lbtc
green-jay Apr 14, 2025
04f47db
add eurc and xlm, asset and config structure
gianfra-t Apr 16, 2025
2ffdd58
Fix: filter out virtual shares from spot most liquid route calc
nohaapav Apr 17, 2025
5f59bfe
RELEASE: Releasing 1 package(s)
nohaapav Apr 17, 2025
d46f6da
adjust assets and fees
gianfra-t Apr 17, 2025
c6b48c2
reorder assets alphabetically
gianfra-t Apr 17, 2025
e882254
fix aave wrap & unwrap pool validations
nohaapav Apr 18, 2025
0f71099
RELEASE: Releasing 1 package(s)
nohaapav Apr 18, 2025
e3474c8
fix aave buy (flip)
nohaapav Apr 18, 2025
ceb9c08
fix most liquid route calc for aave
nohaapav Apr 19, 2025
87a68ad
RELEASE: Releasing 1 package(s)
nohaapav Apr 19, 2025
091baa4
router sell all & dryrun
nohaapav Apr 25, 2025
c2d439a
RELEASE: Releasing 1 package(s)
nohaapav Apr 28, 2025
ea9ec52
bump sdk version
nohaapav Apr 28, 2025
5442548
RELEASE: Releasing 1 package(s)
nohaapav Apr 28, 2025
5da9f12
fix failing tests
nohaapav Apr 28, 2025
dcc50c1
regenerate lock
nohaapav Apr 28, 2025
df0d2a0
next: share token (MAX) & most liq route update
nohaapav Apr 28, 2025
7a6d48f
bump polkadot-api to latest
nohaapav Apr 28, 2025
f0df5f1
publish new descriptors
nohaapav Apr 28, 2025
d50a0f4
comment out dryRun descriptors (size)
nohaapav Apr 28, 2025
6046dc9
next: fix virtual share meta
nohaapav Apr 28, 2025
14db764
next: fix default pegs
nohaapav Apr 28, 2025
fe279ae
next: whitelist router sell_all
nohaapav Apr 28, 2025
5f2b07f
next: readme WIP
nohaapav Apr 29, 2025
8a1ee6f
Update README.md
nohaapav Apr 29, 2025
59b14b4
Update README.md
nohaapav Apr 29, 2025
213cc10
Merge branch 'master' into add-lbtc
green-jay Apr 29, 2025
684f126
Update README.md
Radovenchyk Apr 29, 2025
3b00a61
chore: update Unique ws endpoint to geo load balancer
Maksandre Apr 30, 2025
5deefe6
Merge pull request #155 from Maksandre/update-unique-ws-endpoint
nohaapav Apr 30, 2025
c5f6e66
next: erc20 balance sub
nohaapav Apr 30, 2025
8e4c921
next: sdk-swapp init
nohaapav Apr 30, 2025
dd3eece
RELEASE: Releasing 1 package(s)
nohaapav Apr 30, 2025
f9d6860
next: add token type
nohaapav May 1, 2025
5900391
next: erc20 pool sub
nohaapav May 1, 2025
c3ec0be
next: fix test data
nohaapav May 1, 2025
0ad243f
next: update generic balance sub
nohaapav May 1, 2025
4e2c314
next: fix asset types
nohaapav May 1, 2025
a8fc761
next: swapp example dapp
nohaapav May 2, 2025
fa65aca
bump deps
nohaapav May 2, 2025
d3d5e10
cleanup
nohaapav May 2, 2025
6a0403d
next: update readme
nohaapav May 2, 2025
696631d
Merge pull request #154 from Radovenchyk/patch-1
nohaapav May 2, 2025
e9a3ce4
Update readme
nohaapav May 2, 2025
2741404
next: descriptor whitelist Router.Executed
nohaapav May 4, 2025
a2bfbdd
next: support aave
nohaapav May 4, 2025
fa617f7
next: pairwise balance subscribe
nohaapav May 4, 2025
57ace04
next: update script section
nohaapav May 4, 2025
30c59bc
Merge branch 'master' into add-lbtc
green-jay May 5, 2025
bd9e15d
Merge pull request #150 from galacticcouncil/add-lbtc
nohaapav May 5, 2025
b08ff34
sdk: 7.x refactor & namespaces cleanup
nohaapav May 4, 2025
e387a5d
sdk: 7.x spec cleanup
nohaapav May 4, 2025
9dbc433
update doc
nohaapav May 5, 2025
b83864c
sdk: h160 & erc20 utils
nohaapav May 6, 2025
1e9d288
sdk: swap supply & withdraw support
nohaapav May 6, 2025
8aa1a4e
sdk: evm client support
nohaapav May 6, 2025
cf57cc3
sdk: buildWithdrawAndSellReserveTx support
nohaapav May 6, 2025
9d35247
update xcm cfg hydration client
nohaapav May 6, 2025
8d0addb
cleanup consts
nohaapav May 6, 2025
6fd2345
RELEASE: Releasing 2 package(s)
nohaapav May 6, 2025
c54e4fd
sdk: fix export api module
nohaapav May 6, 2025
f0cfed8
RELEASE: Releasing 1 package(s)
nohaapav May 6, 2025
f469be2
sdk: substrate transaction
nohaapav May 7, 2025
b148dcc
RELEASE: Releasing 1 package(s)
nohaapav May 7, 2025
54bc3a6
replace balance method
gianfra-t May 7, 2025
2888bf8
Merge remote-tracking branch 'upstream/master' into add-eurc-xlm-support
gianfra-t May 7, 2025
a64015d
add changeset
gianfra-t May 9, 2025
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
5 changes: 5 additions & 0 deletions .changeset/spicy-books-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@galacticcouncil/xcm-cfg': minor
---

Adds EURC and XLM for Pendulum
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ packages/*/build-meta.json
# except math build folders
!packages/math-*/build

# compile folders
# examples compile folders
examples/*/out
examples/*/build-meta.json

# examples public folders (js|wasm)
examples/*/public/**/*.js
examples/*/public/**/*.js.map
examples/*/public/**/*.wasm

# jest test results
integration-tests/*/output.json

Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.formatOnSave": false
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
Expand Down
82 changes: 69 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,80 @@
# Galactic SDK

[![Build SDK](https://github.com/galacticcouncil/sdk/actions/workflows/main.yml/badge.svg)](https://github.com/galacticcouncil/sdk/actions/workflows/main.yml)
[![License](https://img.shields.io/github/license/galacticcouncil/sdk)](https://github.com/galacticcouncil/sdk/blob/master/LICENSE.md)

Collection of SDK(s) crafted to ease Hydration & Basilisk chains integration.

## Project Structure

| Package | Version | Changelog | Description |
| :--------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------- | :------------------------------ |
| [`@galacticcouncil/sdk`](./packages/sdk) | [![version](https://img.shields.io/npm/v/@galacticcouncil/sdk.svg)](https://www.npmjs.com/package/@galacticcouncil/sdk) | [changelog](./packages/sdk/CHANGELOG.md) | Trade router & pool utilities |
| [`@galacticcouncil/xcm-core`](./packages/xcm-core) | [![version](https://img.shields.io/npm/v/@galacticcouncil/xcm-core.svg)](https://www.npmjs.com/package/@galacticcouncil/xcm-core) | [changelog](./packages/xcm-core/CHANGELOG.md) | Cross-chain definitions & types |
| [`@galacticcouncil/xcm-cfg`](./packages/xcm-cfg) | [![version](https://img.shields.io/npm/v/@galacticcouncil/xcm-cfg.svg)](https://www.npmjs.com/package/@galacticcouncil/xcm-cfg) | [changelog](./packages/xcm-cfg/CHANGELOG.md) | Cross-chain route configs |
| [`@galacticcouncil/xcm-sdk`](./packages/xcm-sdk) | [![version](https://img.shields.io/npm/v/@galacticcouncil/xcm-sdk.svg)](https://www.npmjs.com/package/@galacticcouncil/xcm-sdk) | [changelog](./packages/xcm-sdk/CHANGELOG.md) | Cross-chain transfer sdk |
| [`@galacticcouncil/math-ema`](./packages/math-ema) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-ema.svg)](https://www.npmjs.com/package/@galacticcouncil/math-ema) | [changelog](./packages/math-ema/CHANGELOG.md) | EMA math |
| [`@galacticcouncil/math-lbp`](./packages/math-lbp) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-lbp.svg)](https://www.npmjs.com/package/@galacticcouncil/math-lbp) | [changelog](./packages/math-lbp/CHANGELOG.md) | LBP math |
| [`@galacticcouncil/math-liquidity-mining`](./packages/math-liquidity-mining) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-liquidity-mining.svg)](https://www.npmjs.com/package/@galacticcouncil/math-liquidity-mining) | [changelog](./packages/math-liquidity-mining/CHANGELOG.md) | Liquidity mining math |
| [`@galacticcouncil/math-omnipool`](./packages/math-omnipool) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-omnipool.svg)](https://www.npmjs.com/package/@galacticcouncil/math-omnipool) | [changelog](./packages/math-omnipool/CHANGELOG.md) | Omnipool math |
| [`@galacticcouncil/math-stableswap`](./packages/math-stableswap) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-stableswap.svg)](https://www.npmjs.com/package/@galacticcouncil/math-stableswap) | [changelog](./packages/math-stableswap/CHANGELOG.md) | Stableswap math |
| [`@galacticcouncil/math-staking`](./packages/math-staking) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-staking.svg)](https://www.npmjs.com/package/@galacticcouncil/math-staking) | [changelog](./packages/math-staking/CHANGELOG.md) | Staking math |
| [`@galacticcouncil/math-xyk`](./packages/math-xyk) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-xyk.svg)](https://www.npmjs.com/package/@galacticcouncil/math-xyk) | [changelog](./packages/math-xyk/CHANGELOG.md) | XYK math |
[sdk_v]: https://img.shields.io/npm/v/@galacticcouncil/sdk.svg
[sdk_npm]: https://www.npmjs.com/package/@galacticcouncil/sdk
[sdk_log]: ./packages/sdk/CHANGELOG.md
[sdk]: ./packages/sdk

[xcm-core_v]: https://img.shields.io/npm/v/@galacticcouncil/xcm-core.svg
[xcm-core_npm]: https://www.npmjs.com/package/@galacticcouncil/xcm-core
[xcm-core_log]: ./packages/xcm-core/CHANGELOG.md
[xcm-core]: ./packages/xcm-core

[xcm-cfg_v]: https://img.shields.io/npm/v/@galacticcouncil/xcm-cfg.svg
[xcm-cfg_npm]: https://www.npmjs.com/package/@galacticcouncil/xcm-cfg
[xcm-cfg_log]: ./packages/xcm-cfg/CHANGELOG.md
[xcm-cfg]: ./packages/xcm-cfg

[xcm-sdk_v]: https://img.shields.io/npm/v/@galacticcouncil/xcm-sdk.svg
[xcm-sdk_npm]: https://www.npmjs.com/package/@galacticcouncil/xcm-sdk
[xcm-sdk_log]: ./packages/xcm-sdk/CHANGELOG.md
[xcm-sdk]: ./packages/xcm-sdk

[math-ema_v]: https://img.shields.io/npm/v/@galacticcouncil/math-ema.svg
[math-ema_npm]: https://www.npmjs.com/package/@galacticcouncil/math-ema
[math-ema_log]: ./packages/math-ema/CHANGELOG.md
[math-ema]: ./packages/math-ema

[math-lbp_v]: https://img.shields.io/npm/v/@galacticcouncil/math-lbp.svg
[math-lbp_npm]: https://www.npmjs.com/package/@galacticcouncil/math-lbp
[math-lbp_log]: ./packages/math-lbp/CHANGELOG.md
[math-lbp]: ./packages/math-lbp

[math-lm_v]: https://img.shields.io/npm/v/@galacticcouncil/math-liquidity-mining.svg
[math-lm_npm]: https://www.npmjs.com/package/@galacticcouncil/math-liquidity-mining
[math-lm_log]: ./packages/math-liquidity-mining/CHANGELOG.md
[math-lm]: ./packages/math-liquidity-mining

[math-omni_v]: https://img.shields.io/npm/v/@galacticcouncil/math-omnipool.svg
[math-omni_npm]: https://www.npmjs.com/package/@galacticcouncil/math-omnipool
[math-omni_log]: ./packages/math-omnipool/CHANGELOG.md
[math-omni]: ./packages/math-omnipool

[math-stable_v]: https://img.shields.io/npm/v/@galacticcouncil/math-stableswap.svg
[math-stable_npm]: https://www.npmjs.com/package/@galacticcouncil/math-stableswap
[math-stable_log]: ./packages/math-stableswap/CHANGELOG.md
[math-stable]: ./packages/math-stableswap

[math-stake_v]: https://img.shields.io/npm/v/@galacticcouncil/math-staking.svg
[math-stake_npm]: https://www.npmjs.com/package/@galacticcouncil/math-staking
[math-stake_log]: ./packages/math-staking/CHANGELOG.md
[math-stake]: ./packages/math-staking

[math-xyk_v]: https://img.shields.io/npm/v/@galacticcouncil/math-xyk.svg
[math-xyk_npm]: https://www.npmjs.com/package/@galacticcouncil/math-xyk
[math-xyk_log]: ./packages/math-xyk/CHANGELOG.md
[math-xyk]: ./packages/math-xyk

| Package | Version | Changelog | Description |
| :-------------------------------------------------- | :---------------------------------- | :--------------------------- | :------------------------------ |
| [`@galacticcouncil/sdk`][sdk] | [![sdk_v]][sdk_npm] | [changelog][sdk_log] | Trade router & pool utilities |
| [`@galacticcouncil/xcm-core`][xcm-core] | [![xcm-core_v]][xcm-core_npm] | [changelog][xcm-core_log] | Cross-chain definitions & types |
| [`@galacticcouncil/xcm-cfg`][xcm-cfg] | [![xcm-cfg_v]][xcm-cfg_npm] | [changelog][xcm-cfg_log] | Cross-chain route configs |
| [`@galacticcouncil/xcm-sdk`][xcm-sdk] | [![xcm-sdk_v]][xcm-sdk_npm] | [changelog][xcm-sdk_log] | Cross-chain transfer sdk |
| [`@galacticcouncil/math-ema`][math-ema] | [![math-ema_v]][math-ema_npm] | [changelog][math-ema_log] | EMA math |
| [`@galacticcouncil/math-lbp`][math-lbp] | [![math-lbp_v]][math-lbp_npm] | [changelog][math-lbp_log] | LBP math |
| [`@galacticcouncil/math-liquidity-mining`][math-lm] | [![math-lm_v]][math-lm_npm] | [changelog][math-lm_log] | Liquidity mining math |
| [`@galacticcouncil/math-omnipool`][math-omni] | [![math-omni_v]][math-omni_npm] | [changelog][math-omni_log] | Omnipool math |
| [`@galacticcouncil/math-stableswap`][math-stable] | [![math-stable_v]][math-stable_npm] | [changelog][math-stable_log] | Stableswap math |
| [`@galacticcouncil/math-staking`][math-stake] | [![math-stake_v]][math-stake_npm] | [changelog][math-stake_log] | Staking math |
| [`@galacticcouncil/math-xyk`][math-xyk] | [![math-xyk_v]][math-xyk_npm] | [changelog][math-xyk_log] | XYK math |

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions examples/sdk-cjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"node": "^21.6.0"
},
"dependencies": {
"@galacticcouncil/sdk": "^6.1.1",
"@galacticcouncil/sdk": "^7.0.2",
"@galacticcouncil/xcm-sdk": "^9.2.0",
"@galacticcouncil/xcm-cfg": "^9.1.0"
"@galacticcouncil/xcm-cfg": "^9.2.0"
}
}
2 changes: 1 addition & 1 deletion examples/sdk-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"esbuild": "^0.25.0"
},
"dependencies": {
"@galacticcouncil/sdk": "^6.1.1"
"@galacticcouncil/sdk": "^7.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/sdk-next-cjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"node": "^21.6.0"
},
"dependencies": {
"@galacticcouncil/sdk-next": "^1.0.0"
"@galacticcouncil/sdk-next": "^1.0.0-beta.0"
}
}
2 changes: 1 addition & 1 deletion examples/sdk-next-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"esbuild": "^0.25.0"
},
"dependencies": {
"@galacticcouncil/sdk-next": "^1.0.0"
"@galacticcouncil/sdk-next": "^1.0.0-beta.0"
}
}
6 changes: 1 addition & 5 deletions examples/sdk-next-esm/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import { api as papi, pool } from '@galacticcouncil/sdk-next';

const client = await papi.getWs('wss://rpc.hydradx.cloud');
const api = client.getUnsafeApi();

await api.constants.System.Version(); // Removal is fatal
const client = await papi.getWs('wss://hydradx-rpc.dwellir.com');

const ctx = new pool.PoolContextProvider(client)
.withOmnipool()
.withStableswap()
.withXyk();

const pools = await ctx.getPools();

console.log(pools);

setTimeout(() => {
Expand Down
10 changes: 10 additions & 0 deletions examples/sdk-swapp/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": ["../../.eslintrc.json"],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"no-console": "off",
"no-restricted-syntax": "off"
}
}
31 changes: 31 additions & 0 deletions examples/sdk-swapp/esbuild.dev.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import esbuild from 'esbuild';
import { writeFileSync } from 'fs';
import { wasmLoader } from 'esbuild-plugin-wasm';
import { createProxyServer } from '../../esbuild.proxy.mjs';

const plugins = [wasmLoader({ mode: 'deferred' })];

const options = {
entryPoints: ['src/index.ts'],
bundle: true,
format: 'esm',
platform: 'browser',
preserveSymlinks: true,
treeShaking: true,
metafile: true,
minify: true,
splitting: true,
sourcemap: true,
outdir: 'public/',
logLevel: 'info',
};

const ctx = await esbuild.context({ ...options, plugins });
const opts = await ctx.rebuild();
writeFileSync('build-meta.json', JSON.stringify(opts.metafile));
await ctx.watch();
const localServer = await ctx.serve({
servedir: './public',
host: '127.0.0.1',
});
createProxyServer(localServer);
18 changes: 18 additions & 0 deletions examples/sdk-swapp/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "sdk-swapp",
"private": true,
"type": "module",
"main": "out/index.js",
"scripts": {
"clean": "rimraf public/**/*.js && rimraf public/**/*.map && rimraf dist",
"dev": "node ./esbuild.dev.mjs"
},
"keywords": [],
"devDependencies": {
"esbuild": "^0.25.0"
},
"dependencies": {
"@galacticcouncil/sdk-next": "^1.0.0-beta.0",
"@galacticcouncil/ui": "^5.5.0"
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading