Giter Site home page Giter Site logo

dorucioclea / 0x-starter-project Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 0xproject/0x-starter-project

0.0 2.0 0.0 2.03 MB

A project showcasing how to get started with 0x.js

License: Apache License 2.0

Shell 0.02% TypeScript 99.98%

0x-starter-project's Introduction

0x Starter Project

CircleCI

cli

This project will take you through a number of scenarios using the 0x v4 protocol.

Scenarios

This repository contains a bunch of scenarios that you can run from the command-line:

Getting Started

By default this project uses the 0x development mnemonic running against Ganache. This project can be configured to use a different mnenonic and also run against Kovan testnet.

You may choose to update the mnemonic in src/configs.ts or use the one provided (note if many people use this mnemonic on Ropsten then the funds may be drained).

When changing the mnemonic ensure that the first three derived address have test ETH. You can request test ETH from https://faucet.paradigm.xyz/. The first derived address will also need test ZRX, which you can mint by running yarn mint_test_zrx.

Install dependencies:

yarn install

Build this package:

yarn build

Run a scenario in another terminal:

yarn scenario:fill_erc20_limit_order

To run all scenarios:

yarn scenario:all

All the scenarios commands can be found in the package.json's scripts section and begin with scenario:.

Switching to Ropsten

To switch between Ropsten/ganache, change the last line in src/configs.ts and re-build. Ganache is enabled by default.

For Ropsten, you'll also need to provide a value for ROPSTEN_RPC_URL in .env (copy .env.example to create .env). You can obtain an API key from Alchemy.

For Ganache:

export const NETWORK_CONFIGS = GANACHE_CONFIGS;

For Kovan:

export const NETWORK_CONFIGS = ROPSTEN_CONFIGS;

Windows Development Setup

If you're setting up Node.js for the first time on Windows, you may find the following StackOverflow guide useful. There are a few build tools required for Node.js on Windows which are not installed by default (such as Python). Please follow that guide before running through the tutorials.

0x-starter-project's People

Contributors

aj07 avatar akagi201 avatar alexkroeger avatar bmillman19 avatar chriskalani avatar dekz avatar dependabot-preview[bot] avatar dependabot-support avatar dhl avatar fabioberger avatar fragosti avatar jlin27 avatar kimpers avatar logvinovleon avatar scoriiu avatar sotawatanabe avatar zkjet avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.