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

chore: update readme #63

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
78 changes: 41 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,70 @@
# OraiSwap

Uniswap-inspired automated market-maker (AMM) protocol powered by Smart Contracts on the [Orai](https://orai.io) blockchain.
Uniswap-inspired automated market-maker (AMM) protocol powered by Smart Contracts on the [Oraichain](https://orai.io) mainnet.

## Contracts

| Name | Description |
| ---------------------------------------------------- | -------------------------------------------------------- |
| [`oraiswap_factory`](contracts/oraiswap_factory) | Proxy contract to create oraiswap_pair instance |
| [`oraiswap_oracle`](contracts/oraiswap_oracle) | Global parameters updated by multisig wallet |
| [`oraiswap_pair`](contracts/oraiswap_pair) | Logic for building liquidity pool and trade between pair |
| [`oraiswap_router`](contracts/oraiswap_router) | Facilitate multi-hop swap operations |
| [`oraiswap_orderbook`](contracts/oraiswap_orderbook) | Orderbook implementation |
| [`oraiswap_staking`](contracts/oraiswap_staking) | Stake LPs to get ORAIX reward |
| [`oraiswap_token`](contracts/oraiswap_token) | (ERC20 equivalent) token implementation, AIRI, ORAIX |
| [`oraiswap_mixed_router`](contracts/oraiswap_mixedrouter) | Facilitate multi-hop swap operations between v2 & v3 |
| Name | Description |
| --------------------------------------------------------- | -------------------------------------------------------- |
| [`oraiswap_factory`](contracts/oraiswap_factory) | Proxy contract to create oraiswap_pair instance |
| [`oraiswap_oracle`](contracts/oraiswap_oracle) | Global parameters updated by multisig wallet |
| [`oraiswap_pair`](contracts/oraiswap_pair) | Logic for building liquidity pool and trade between pair |
| [`oraiswap_router`](contracts/oraiswap_router) | Facilitate multi-hop swap operations |
| [`oraiswap_orderbook`](contracts/oraiswap_orderbook) | Orderbook implementation |
| [`oraiswap_staking`](contracts/oraiswap_staking) | Stake LPs to get ORAIX reward |
| [`oraiswap_token`](contracts/oraiswap_token) | (ERC20 equivalent) token implementation, AIRI, ORAIX |
| [`oraiswap_mixed_router`](contracts/oraiswap_mixedrouter) | Facilitate multi-hop swap operations between v2 & v3 |

- oraiswap_factory

Mainnet: [`orai167r4ut7avvgpp3rlzksz6vw5spmykluzagvmj3ht845fjschwugqjsqhst`](https://scan.orai.io/smart-contract/orai167r4ut7avvgpp3rlzksz6vw5spmykluzagvmj3ht845fjschwugqjsqhst)

- oraiswap_oracle

Mainnet: [`orai18rgtdvlrev60plvucw2rz8nmj8pau9gst4q07m`](https://scan.orai.io/smart-contract/orai18rgtdvlrev60plvucw2rz8nmj8pau9gst4q07m)
## Running this contract

- oraiswap_pair
You will need Rust 1.44.1+ with wasm32-unknown-unknown target installed.

Mainnet (CodeID): 1502
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-unknown-unknown
```

- oraiswap_route
You can run unit tests on this on each contracts directory via :

Mainnet: [`orai1j0r67r9k8t34pnhy00x3ftuxuwg0r6r4p8p6rrc8az0ednzr8y9s3sj2sf`](https://scan.orai.io/smart-contract/orai1j0r67r9k8t34pnhy00x3ftuxuwg0r6r4p8p6rrc8az0ednzr8y9s3sj2sf)
```bash
cargo test
```

- oraiswap_orderbook
## Build the contracts

Mainnet: [`orai1nt58gcu4e63v7k55phnr3gaym9tvk3q4apqzqccjuwppgjuyjy6sxk8yzp`](https://scan.orai.io/smart-contract/orai1nt58gcu4e63v7k55phnr3gaym9tvk3q4apqzqccjuwppgjuyjy6sxk8yzp)
### Prerequisites

- oraiswap_staking
- [CosmWasm tools](https://docs.orai.io/developer-guides/cosmwasm-contract/compile-contract#install-cosmwasm-tools)

Mainnet: [`orai19p43y0tqnr5qlhfwnxft2u5unph5yn60y7tuvu`](https://scan.orai.io/smart-contract/orai19p43y0tqnr5qlhfwnxft2u5unph5yn60y7tuvu)
### Build commands

- oraiswap_token
Build contracts:

Mainnet (CodeID): 582
```bash
cwtools build contracts/*

- oraiswap_mixed_router
# specify the build destination
cwtools build contracts/* -o contract-builds/

Mainnet: [`orai1cy2pc5czxm5qlacp6j0hfq7qj9wh8zuhxgpdartcfrdljknq0arsuc4znj`](https://scan.orai.io/smart-contract/orai1cy2pc5czxm5qlacp6j0hfq7qj9wh8zuhxgpdartcfrdljknq0arsuc4znj)
# hot-reload auto build after modifying the code
cwtools build contracts/* -w

## Running this contract
# build schema. -s is for schema
cwtools build ../tonbridge-cw-contracts/contracts/* -s
# gen typescript codes. -o here is the output directory
cwtools gents ../tonbridge-cw-contracts/contracts/* -o packages/contracts-sdk/src
```

You will need Rust 1.44.1+ with wasm32-unknown-unknown target installed.
Build schemas:

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-unknown-unknown
cwtools build contracts/* -s
```

You can run unit tests on this on each contracts directory via :
Build typescript gen:

```bash
cargo unit-test
cargo integration-test
cwtools gents contracts/* -o contract-typescript-gen/
```

## Gen proto definitions
Expand Down