Skip to content
OAX Foundation's Layer 2 Exchange (L2X) Protocol
TypeScript JavaScript Shell Nix Makefile Dockerfile
Branch: master
Clone or download
Latest commit b43f9b2 Aug 13, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
bin Problem: Lack of robustness around transactions Jul 19, 2019
ci Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
config Problem: operator needs deployment config to run Jul 19, 2019
demo Problem: operator needs deployment config to run Jul 19, 2019
docs rename protocol spec paper Aug 12, 2019
misc Problem: updating operator involves manual steps Jul 9, 2019
operator Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
src Merge pull request #2 from OAXFoundation/Cli.js-lenght-bug-fix Aug 9, 2019
tests Problem: Client can audit at the wrong round Jul 22, 2019
.contract_build_root Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
.editorconfig Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
.env.example Problem: operator needs deployment config to run Jul 19, 2019
.envrc Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
.gitignore
.gitlab-ci.yml Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
.npmrc Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
.prettierignore Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
.solc-colors Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
.soliumignore Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
.soliumrc.json Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
Dockerfile Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
LICENSE Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
Makefile Problem: chaos testing does not enable to halt the mediator. Jul 18, 2019
NOTICE Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
Procfile Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
README.md close #1 and ignore vscode .history directory Aug 13, 2019
nixpkgs.json Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
package.json Problem: js/ts language server outdated Jul 19, 2019
pnpm-workspace.yaml Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
shell.nix Problem: Lack of robustness around transactions Jul 19, 2019
shrinkwrap.yaml Problem: js/ts language server outdated Jul 19, 2019
tsconfig.json Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
tslint.json Imported from d79b978684a7906467c1f063b1ae064db912122f Jun 28, 2019
typedoc.json Docs: Update the 'pnpm run docs' command to generate docs in place an… Jul 3, 2019

README.md

Version License: MIT

Layer 2 Trustless Exchange (L2X)

This is an implementation of the OAX L2X protocol as a full-stack high-performance, scalable, trustless exchange.

Documentation

Getting Started with the OAX Testnet

This section will walk you through using the client library and CLI to interact with the OAX testnet. If you'd like to learn how to run the server, modify it and deploy it, see the Server related sections in the documentation.

Requirements

  • node.js v10.x or later

Installation

  1. Create a new folder
  2. Create a package.json
npm init
  1. Install the OAX client package
npm install @oax/client --save
  1. Initialize the CLI. This will create a new config.json file with the OAX Testnet config.
npx oax init

Once this is created, please open the config.json file and update the providerUrl by adding in your geth node url or infura url for the rinkeby testnet.

  1. Create a new encrypted wallet.
npx oax createWallet
  1. Fund the wallet with Rinkeby test ether. You can use one of the public Rinkeby faucets to request Ether for the wallet address you just created.

Interacting with the Testnet Exchange

After funding your wallet, you need to purchase OAX tokens. OAX tokens are needed to pay fees. They can be purchased using the buy method. WETH can also be purchased in this way. Once you purchase these tokens you can send them to the exchange using the deposit method. Finally once your tokens show up on the exchange balances, you can start trading.

Launch the CLI in console mode

> npx oax buy OAX 1
Buying 1 OAX...
Bought 1 OAX.

> npx oax fetchWalletBalance OAX
Balance: 1.0

> npx oax deposit OAX 1.0
Depositing 1 OAX...

> fetchBalances
{
    "OAX": {
        "free": "1",
        "locked": "0"
    },
    "WETH": {
        "free": "0",
        "locked": "0"
    }
}

> npx oax createOrder BUY OAX/WETH 5 0.1
Placing order to BUY 5 OAX/WETH @ 0.1...
Order placed successfully.
"0xfd91b90308ccfcaff77ae9cfc7e455b6383320aa981f1cbd273f1ead2732081b"

You can see the full list of commands available in the CLI by typing:

npx oax --help

Building the Client from source

Currently the build script will build everything, client , server , smart-contracts, so you can simply run pnpm run clean-build after modifying some source code.


© 2019 OAX Foundation

You can’t perform that action at this time.