Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5863c86
naive add of encointer
brenzi Sep 4, 2025
3246bed
fix. tests successful
brenzi Sep 4, 2025
d799e6c
add ksmcc3_encointer
brenzi Nov 24, 2024
cab7698
fix
brenzi Nov 25, 2024
9c71dc0
add ws url
brenzi Nov 25, 2024
e2b4bee
fix the rebase
brenzi Sep 4, 2025
16e97ae
add integritee chains
brenzi Sep 4, 2025
fcac790
add metadata
brenzi Sep 4, 2025
9f1f5a1
fixes
brenzi Sep 4, 2025
47fe54e
add TEER teleports from AH to I
brenzi Sep 8, 2025
2aa142b
fix crash for TEER
brenzi Sep 8, 2025
ad7d9f6
teleport TEER now works between all integritee and ah chains on same …
brenzi Sep 8, 2025
90178b0
port_tokens works
brenzi Sep 8, 2025
d08e3ef
subscribe to PorteerStatus. crashes
brenzi Sep 9, 2025
88b2fe5
subscribe to PorteerStatus. works
brenzi Sep 9, 2025
202ec78
disable teleport if bridge disabled or heartbeat stale
brenzi Sep 9, 2025
22275ba
calculate bridge fees
brenzi Sep 9, 2025
f5f79e8
some cleanup
brenzi Sep 9, 2025
3337279
fixes and preps
brenzi Sep 9, 2025
49f0a00
collet PortedTokens Events into a queue to be watched on other side
brenzi Sep 9, 2025
ca2cd78
successfully detected arrival on ITP
brenzi Sep 10, 2025
90522b7
arrival at destination check works both ways now: IP>IK, IK>IP. but n…
brenzi Sep 10, 2025
ad1ed31
pipelined confirmation works correctly
brenzi Sep 10, 2025
b58dd40
disable unused clients
brenzi Sep 11, 2025
9d464d7
detecting arrival on AH works as well (not unambiguous)
brenzi Sep 11, 2025
d813812
check account exists if teleporting TEER to an asset hub (TEER is not…
brenzi Sep 11, 2025
2ced473
fixes
brenzi Sep 11, 2025
1ce3ab3
make endpoints configurable and add README
brenzi Sep 11, 2025
17e03c2
status cosmetics
brenzi Sep 11, 2025
2521cf6
add missing dep
brenzi Sep 12, 2025
7586f53
UI Improvements
aigents999 Sep 12, 2025
9e2c469
Fix Hydration Error with the button nesting
aigents999 Sep 12, 2025
808a502
Merge branch 'main' into UI-improvements
brenzi Sep 12, 2025
2e7c6ca
fix papi XCMv5 mess
brenzi Sep 13, 2025
406d86a
more fixing
brenzi Sep 13, 2025
fa6223d
Merge branch 'main' into UI-improvements
brenzi Sep 13, 2025
4d8013a
Fix broken Ui because of Bridge Queue info, added favicon, fixed font…
aigents999 Sep 16, 2025
0754a8d
Wrap the bridge tool in the Integritee Website Design
aigents999 Sep 17, 2025
fa88062
Descriptor error fix
aigents999 Sep 18, 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
2 changes: 1 addition & 1 deletion .papi/descriptors/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.0-autogenerated.13566815344429969239",
"version": "0.1.0-autogenerated.1192781978334692013",
"name": "@polkadot-api/descriptors",
"files": [
"dist"
Expand Down
Binary file modified .papi/metadata/dot.scale
Binary file not shown.
Binary file modified .papi/metadata/dotAh.scale
Binary file not shown.
Binary file added .papi/metadata/itk.scale
Binary file not shown.
Binary file added .papi/metadata/itp.scale
Binary file not shown.
Binary file modified .papi/metadata/ksmAh.scale
Binary file not shown.
Binary file added .papi/metadata/ksmEnc.scale
Binary file not shown.
Binary file modified .papi/metadata/pas.scale
Binary file not shown.
Binary file modified .papi/metadata/pasAh.scale
Binary file not shown.
Binary file modified .papi/metadata/passet.scale
Binary file not shown.
Binary file modified .papi/metadata/wndAssethub.scale
Binary file not shown.
29 changes: 24 additions & 5 deletions .papi/polkadot-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,44 @@
"wsUrl": "wss://polkadot-asset-hub-rpc.polkadot.io",
"metadata": ".papi/metadata/dotAh.scale",
"genesis": "0x68d56f15f85d3136970ec16946040bc1752654e906147f7e43e9d539d7c3de2f",
"codeHash": "0x6e20bc52aaaafd1de82ba7d2a3c0fa39193787e240b93608489cf72a4c46a584"
"codeHash": "0x8cada8f706ffc7c9bd0c31985ec4f34520914778edefaa94b624bc6adea48a1c"
},
"ksmAh": {
"wsUrl": "wss://kusama-asset-hub-rpc.polkadot.io",
"wsUrl": "ws://localhost:8000",
"metadata": ".papi/metadata/ksmAh.scale",
"genesis": "0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a",
"codeHash": "0x8356dd03a2a5521b9339ce0c6b2a56d3edf83f0ca7262e9edabb695df770a0f6"
"codeHash": "0xbe293b003ee8173f17e33a8ef2eb2460a2057b9bfa35090261c62eb4072a5a63"
},
"pas": {
"chain": "paseo",
"metadata": ".papi/metadata/pas.scale",
"genesis": "0x77afd6190f1554ad45fd0d31aee62aacc33c6db0ea801129acb813f913e0764f",
"codeHash": "0xcc4b027a0dbb5e0f389dd8418c41012d618290a22f84af8411c8fd20b2738304"
"codeHash": "0x96f6cb4f577e7ecb8c9e648f77724c0c850fe366854f99a29c79275895b4c636"
},
"pasAh": {
"chain": "paseo_asset_hub",
"metadata": ".papi/metadata/pasAh.scale",
"genesis": "0xd6eec26135305a8ad257a20d003357284c8aa03d0bdb2b357ab0a22371e11ef2",
"codeHash": "0xb7f52ff9b4fb5124568a5b8cbfcebba2bc9318bcb5916b69457c10bc6a2d0ac5"
"codeHash": "0x6b99330eb07c2dfd4510609ae8c49d9a2732f9bef8b9c0da544828f4e1a34942"
},
"ksmEnc": {
"chain": "ksmcc3_encointer",
"wsUrl": "wss://kusama.api.encointer.org",
"metadata": ".papi/metadata/ksmEnc.scale",
"genesis": "0x7dd99936c1e9e6d1ce7d90eb6f33bea8393b4bf87677d675aa63c9cb3e8c5b5b",
"codeHash": "0x6a1faad9888624da0ec673c6e992312bf6f7bf40ef95d796ee072a3367f87021"
},
"itp": {
"wsUrl": "wss://polkadot.api.integritee.network",
"metadata": ".papi/metadata/itp.scale",
"genesis": "0xe13e7af377c64e83f95e0d70d5e5c3c01d697a84538776c5b9bbe0e7d7b6034c",
"codeHash": "0xb0af24fed5f16dae6fc97645760ca4371a558b4bccc6b97e85acfea266c919ea"
},
"itk": {
"wsUrl": "wss://kusama.api.integritee.network",
"metadata": ".papi/metadata/itk.scale",
"genesis": "0xcdedc8eadbfa209d3f207bba541e57c3c58a667b05a2e1d1e86353c9000758da",
"codeHash": "0xa2a464ba172642998c46f063260bdab6aeeca2fcb266467494aa948f875f9cae"
},
"passet": {
"wsUrl": "wss://testnet-passet-hub.polkadot.io",
Expand Down
59 changes: 36 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
# Polkadot-API with React Teleporter: Proof of Concept
# TEER CrossChain Tool

This project is a basic proof of concept demonstrating how to use the Polkadot API with React and
the light-client (smoldot) to create a multi-chain decentralized application. The DApp showcases the
ability to teleport (or bridge) assets between different chains.

### Important Notes

- **Not a Best-Practices Example**: This project is not intended to serve as an example of "best practices" for
using PAPI. Instead, it’s an illustration of what can be achieved with the API in a short period of time.

- **Development Context**: This project was developed over a weekend, shortly after the Polkadot <-> Kusama
bridge became operational. At that time, there were no user-friendly interfaces available for testing the bridge,
so this project aimed to fill that gap.

### Missing Features

- **XCM Fee Calculation**: The current version of this project lacks proper XCM fee calculation. This feature
will be added in the coming weeks.

### Future Improvements

We plan to continuously improve this project, gradually turning it into a useful starting template for React
developers interested in working with the Polkadot ecosystem.
Simple helper to transfer TEER accross chains and consensus systems

## Get started

Expand All @@ -48,3 +27,37 @@ pnpm build

pnpm preview
```

## Chopsticks Testing

Beware that chopsticks does not yet emulate the bridge! Therefore, all attempts to bridge will fail (the extrinsic will succeed, but the funds will never arrive on the other side). Run zombienet if you need to test bridging behavior.

prepare chopsticks
```
git clone https://github.com/brenzi/chopsticks.git
cd chopsticks
git checkout ab/xcm-v5-debug
# get dev runtimes
wget https://pub-84166bba27804f48a67cf8cc4f3cd0a6.r2.dev/integritee_kusama_runtime-562-dev-sudo.compact.compressed.wasm
wget https://pub-84166bba27804f48a67cf8cc4f3cd0a6.r2.dev/integritee_polkadot_runtime-562-dev.compact.compressed.wasm
wget https://pub-84166bba27804f48a67cf8cc4f3cd0a6.r2.dev/asset_hub_kusama_runtime_1.7.1_debug.compact.compressed.wasm
wget https://pub-84166bba27804f48a67cf8cc4f3cd0a6.r2.dev/asset_hub_polkadot_runtime_1.7.1_debug.compact.compressed.wasm
```
run chopsticks in two terminals. call the kusama one first:
```
# first terminal, should listen on ports 8000 and 8001
npx @acala-network/chopsticks@latest xcm --p=./configs/kusama-asset-hub.yml --p=./configs/integritee-kusama.yml
# other terminal, should listen on ports 8002 and 8003
npx @acala-network/chopsticks@latest xcm --p=./configs/polkadot-asset-hub.yml --p=./configs/integritee-polkadot.yml
```

then you can point your browser to

* Integritee Network (Kusama) https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8001#
* Integritee Network (Polkadot) https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8003#
* Asset Hub Kusama https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8000#
* Asset Hub Polkadot https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8002#

Alice is now the watchdog account and you'll need to call `porteer.watchdogHeartbeat`
* https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8001#/extrinsics/decode/0x3804
* https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8003#/extrinsics/decode/0x3804
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Polkadot-API Teleporter</title>
<title>TEER CrossChain Tool</title>
</head>

<body>
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@
},
"dependencies": {
"@polkadot-api/descriptors": "file:.papi/descriptors",
"@polkadot-api/substrate-bindings": "^0.16.2",
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-select": "^2.2.5",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-tabs": "^1.1.12",
"@vitejs/plugin-vue": "^6.0.1",
"@vueuse/core": "^13.9.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.525.0",
"polkadot-api": "^1.15.0",
"polkadot-api": "^1.17.1",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-router-dom": "^7.9.1",
"rxjs": "^7.8.2",
"tailwind-merge": "^3.3.1",
"tailwindcss-animate": "^1.0.7"
Expand Down
Loading