Skip to content

inkdevhub/dex

Repository files navigation

DEX - UniswapV2

This folder contains the line by line implementation of uniswap-v2 core and uniswap-v2 periphery with its tests.
First version: wasm-showcase-dapps

Purpose

This is an unaudited full dex implementation ready to be used.

Status

  • βœ… contracts
  • βœ… integration tests
  • ⬜ UI (January 2023)
  • ⬜ Audit

Versions

ink! 4.0.0
openbrush 3.0.0

License

Apache 2.0

πŸ—οΈ How to use - Contracts

πŸ’« Build

Use these instructions to set up your ink!/Rust environment
Run this command in the contract folder:

cargo contract build
πŸ’« Run unit test
cargo test
πŸ’« Deploy

First start your local node.
Deploy using polkadot JS. Instructions on Astar docs

πŸ’« Run integration test

First start your local node. Recommended swanky-node v0.13.0

yarn
yarn compile
yarn test:typechain
πŸ’« Deployed contracts
Shibuya

Factory Zuyf2wq2WXknr82Dp7Et46qmRJpWFY7bzdSM87MN5RqzYLv
WNative XaE8oMj2rYFv6SQKGPKxGDLrdZqhduUHrwJU7pDfUke46Kx
Router ZtkfGHXkfcimYf9cXJdjxytw5Pzp3ucnZM51kBms5Eiu2PH
USDC X3aX6HYcKrm3ZZSna7PR45Doh9tKyjaiUBLBWWMRfpQB4u6
USDT YDBTHeQC2d5EuWiKFnvxaUipd67Va7Kx7AuiQaXydExkfPG
USDC/SBY-LP YeoXYLUimoyHmn79FwYknWp89yX265i2Rq8zdAf5DkCiRz8
USDT/SBY-LP Z8q71nvirYBbxzmhcVoeiXZ1oL3b64zjxhVMxbmBvvzxiWs

To interact with contracts on Shibuya, use Add an existing contract in polkadotjs UI and enter contract address and the .contract file


πŸ—οΈ UI

Coming in January