Git Product home page Git Product logo

0x-launch-kit-backend's Introduction

⚠️ Deprecation Warning ️️⚠️

This project is no longer being actively maintained. To fork or run a Standard Relayer API instance, you can use the 0x API instead.

Table of contents

Introduction

Launch a 0x relayer in under a minute with Launch Kit. This repository contains an open-source, free-to-use 0x relayer template that you can use as a starting point for your own project.

  • Quickly launch a market for your community token
  • Seemlessly create an in-game marketplace for digital items and collectibles
  • Enable trading of any ERC-20 or ERC-721 asset

Fork this repository to get started!

Language choice

0x-launch-kit-backend ships with 2 codebases, one in Typescript and another in Javascript. Although the Javascript is auto-generated from the Typescript, we made sure the Javascript generated is readable.

Before you start using 0x-launch-kit-backend, choose whether you want your codebase to be in Typescript or Javascript.

If you want to work in Javascript:

  • delete the ts directory
  • delete all scripts from package.json that end with :ts

Note: If you also wish to build and use the Docker image, please update the command in the Dockerfile to CMD [ "forever", "js/index.js" ]

If you want to work in Typescript:

  • delete the js directory
  • delete all scripts from package.json that end with :js

Getting started

Pre-requirements

  • Node.js > v8.x
  • Yarn > v1.x
  • 0x Mesh > v5.0.1 for v3. Docker image 0xorg/mesh:5.0.1-beta-0xv3 or greater

To develop ontop of 0x-launch-kit, follow the following instructions:

  1. Fork this repository

  2. Clone your fork of this repository

  3. Open the config.ts/config.js file (depending on the language you've chosen above) and edit the whitelisted tokens:

    • WHITELISTED_TOKENS -- Which tokens you would like to host orderbooks for.
  4. Open the .env file and edit the following fields. Defaults are defined in config.ts/config.js. The bash environment takes precedence over the .env file. If you run source .env, changes to the .env file will have no effect until you unset the colliding variables.

    • CHAIN_ID -- the chain you'd like your relayer to run on (e.g: 1 -> mainnet, 42 -> Kovan, 3 -> Ropsten, etc...). Defaults to 42
    • MESH_ENDPOINT -- the url pointing to the 0x Mesh node. Defaults to ws://localhost:60557
    • FEE_RECIPIENT -- The Ethereum address which should be specified as the fee recipient in orders your relayer accepts. Defaults to a fake address that helps the 0x core team use anonymous, already public data to understand Launch Kit developer usage. Defaults to an auto-generated address
    • MAKER_FEE_ASSET_DATA -- The maker fee token asset data. Defaults to 0x, i.e no fee
    • MAKER_FEE_UNIT_AMOUNT -- The flat maker fee amount you'd like to receive for filled orders hosted by you. Defaults to 0
    • MAKER_FEE_ASSET_DATA -- The taker fee token asset data. Defaults to 0x, i.e no fee
    • TAKER_FEE_UNIT_AMOUNT -- The flat taker fee you'd like to receive for filled orders hosted by you. Defaults to 0

Instructions for using Launch Kit with Ganache

  1. Make sure you have Yarn installed.

  2. Install the dependencies:

    yarn
  3. Build the project [This step is for Typescript users only]

    yarn build:ts

    or build & watch:

    yarn watch:ts

    Note: There isn't currently a build step when working on the Javascript codebase because we assume 0x-launch-kit will be running on Node.js > v8.0. If you want this project to work in an environment that doesn't support many of the latest Javascript features, you will need to add a transpiler (e.g Babel) to this project.

  4. Start the relayer

    yarn start:ts

    OR

    yarn start:js

Client for your relayer's API

Since the 0x-launch-kit-backend relayer adheres to V3 of the Standard Relayer API Specification, you can use 0x Connect (an HTTP/Websocket client) to make calls to your relayer (e.g submit an order, get all orders, etc...)

Learn how to use 0x Connect to interact with your 0x-launch-kit relayer in this tutorial.

To quickly check if your relayer is up-and-running, send it this CURL request from the command-line:

curl http://localhost:3000/v3/orders

If everything is working as expected, you should see this response:

{
    "total": 0,
    "page": 0,
    "perPage": 20,
    "records": []
}

Since no orders have been added to your relayer yet, the records array is empty.

Commands

Typescript project commands:

  • yarn build:ts - Build the code
  • yarn lint:ts - Lint the code
  • yarn start:ts - Starts the relayer
  • yarn watch:ts - Watch the source code and rebuild on change
  • yarn prettier:ts - Auto-format the code

Javascript project commands:

  • yarn start:js - Start the relayer
  • yarn prettier:js - Auto-format the code

Database

This project uses TypeORM. It makes it easier for anyone to switch out the backing database used by this project. By default, this project uses an SQLite database.

Because we want to support both Javascript and Typescript codebases, we don't use TypeORM's decorators (since they don't transpile nicely into readable Javascript). TypeORM shines with decorators however, so you might want to use them if you're going to be working in Typescript.

Deployment

0x-launch-kit ships as a docker container. First, install Docker (mac, windows). To build the image run:

docker build -t 0x-launch-kit-backend .

You can check that the image was built by running:

docker images

And launch it with

docker run -p 3000:3000 -d 0x-launch-kit-backend

Check that it's working by running

curl http://localhost:3000/v3/asset_pairs

Legal Disclaimer

The laws and regulations applicable to the use and exchange of digital assets and blockchain-native tokens, including through any software developed using the licensed work created by ZeroEx Intl. as described here (the “Work”), vary by jurisdiction. As set forth in the Apache License, Version 2.0 applicable to the Work, developers are “solely responsible for determining the appropriateness of using or redistributing the Work,” which includes responsibility for ensuring compliance with any such applicable laws and regulations. See the Apache License, Version 2.0 for the specific language governing all applicable permissions and limitations: http://www.apache.org/licenses/LICENSE-2.0

0x-launch-kit-backend's People

Contributors

aakilfernandes avatar dekz avatar fabioberger avatar feugenea avatar fragosti avatar fvictorio avatar logvinovleon avatar mounibec avatar tomhschmidt avatar xianny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

0x-launch-kit-backend's Issues

yarn upgrade needed

root@9fcc641df655:/usr/src/app# yarn outdated
yarn outdated v1.12.1
info Color legend : 
 "<red>"    : Major Update backward-incompatible updates 
 "<yellow>" : Minor Update backward-compatible features 
 "<green>"  : Patch Update backward-compatible bug fixes
Package                Current  Wanted   Latest   Package Type    URL                                                                           
@0x/assert             2.0.1    2.0.7    2.0.7    dependencies    https://github.com/0xProject/0x-monorepo/packages/assert/README.md            
@0x/connect            4.0.1    4.0.4    5.0.3    dependencies    https://github.com/0xProject/0x-monorepo/packages/connect/README.md           
@0x/contract-addresses 2.2.1    2.2.3    2.2.3    dependencies    https://github.com/0xProject/0x-monorepo/packages/contract-addresses/README.md
@0x/json-schemas       3.0.1    3.0.7    3.0.7    dependencies    https://github.com/0xProject/0x-monorepo/packages/json-schemas/README.md      
@0x/order-watcher      3.0.1    3.0.4    4.0.4    dependencies    https://github.com/0xProject/0x-monorepo                                      
@0x/subproviders       3.0.1    3.0.3    4.0.3    dependencies                                                                                  
@0x/types              2.0.1    2.2.0    2.2.0    dependencies    https://github.com/0xProject/0x-monorepo/packages/types/README.md             
@0x/typescript-typings 4.0.0    4.2.0    4.2.0    dependencies    https://github.com/0xProject/0x-monorepo/packages/typescript-typings#readme   
@0x/utils              4.0.2    4.2.3    4.2.3    dependencies    https://github.com/0xProject/0x-monorepo/packages/utils/README.md             
@0x/web3-wrapper       4.0.1    4.0.2    6.0.3    dependencies    https://github.com/0xProject/0x-monorepo/packages/web3-wrapper/README.md      
@babel/polyfill        7.0.0    7.4.0    7.4.0    dependencies    https://babeljs.io/                                                           
@types/express         4.16.0   4.16.1   4.16.1   devDependencies https://github.com/DefinitelyTyped/DefinitelyTyped.git                        
@types/lodash          4.14.118 4.14.123 4.14.123 devDependencies https://github.com/DefinitelyTyped/DefinitelyTyped.git                        
0x.js                  4.0.1    4.0.3    6.0.4    dependencies    https://github.com/0xProject/0x-monorepo                                      
dotenv                 6.2.0    6.2.0    7.0.0    dependencies    https://github.com/motdotla/dotenv#readme                                     
http-status-codes      1.3.0    1.3.2    1.3.2    dependencies    https://github.com/prettymuchbryce/node-http-status#readme                    
prettier               1.15.2   1.16.4   1.16.4   devDependencies https://prettier.io                                                           
reflect-metadata       0.1.12   0.1.13   0.1.13   dependencies    http://rbuckton.github.io/reflect-metadata                                    
sqlite3                4.0.4    4.0.6    4.0.6    dependencies    http://github.com/mapbox/node-sqlite3                                         
tslint                 5.11.0   5.14.0   5.14.0   devDependencies https://palantir.github.io/tslint                                             
typeorm                0.2.7    0.2.7    0.2.15   dependencies    https://github.com/typeorm/typeorm#readme                                     
typescript             3.1.6    3.3.4000 3.3.4000 devDependencies https://www.typescriptlang.org/        

The colors got lost in copy/pasting. @0x/connect, @0x/order-watcher, @0x/subproviders, @0x/web3-wrapper, 0x.js, and dotenv, are all red and so will need to be upgraded manually. The others can be easily upgraded with yarn upgrade

The changes for 0x.js look like they should be compatible. I haven't looked at the other changelogs. https://github.com/0xProject/0x-monorepo/tree/development/packages

Error: schema /relayerApiOrderSchema on /v2/order/:orderHash queries

Hi @dekz,

Following up on our video chat earlier...
Pasted my console output below.
(Context: Running 0x Launch Kit locally in .ts mode and generating signed orders via CodeSandbox)

Steps to reproduce:

1/ Generate signed order (in this case, from CodeSandbox w/ Metamask)
2/ Use 0x Connect to .submitOrderAsync() to local Launch Kit Relayer
3/ Query local Launch Kit via CLI GET request, see that it returns order data properly. example:
curl http://localhost:3000/v2/order/0xc29a9d9b797f0071b80aacf66369d866f2ddabff1a91dddbfe5fcd954158ec25

4/ Query local Launch Kit with 0x Connect via .getOrderAsync() and get error from /relayerApiOrderSchema, example:
client.getOrderAsync('0xc29a9d9b797f0071b80aacf66369d866f2ddabff1a91dddbfe5fcd954158ec25')

Error:

client.getOrderAsync('0xc29a9d9b797f0071b80aacf66369d866f2ddabff1a91dddbfe5fcd954158ec25')
Error: Expected relayerApiOrder to conform to schema /relayerApiOrderSchema
Encountered: {
	"signature": "0x1b462e392e6008295fa29adb32d68427b7835969eca098942a585422682793f1ed67ad7f5caaa281b4852dd7e9c3acffb8fe123bb36ae62adf4cce71f9e5cef7b402",
	"senderAddress": "0x0000000000000000000000000000000000000000",
	"makerAddress": "0xb78f09d705dedaca26dc99e9ee7d789be7b38fcc",
	"takerAddress": "0x0000000000000000000000000000000000000000",
	"makerFee": "0",
	"takerFee": "0",
	"makerAssetAmount": "1000000000000000000",
	"takerAssetAmount": "10000000000000",
	"makerAssetData": "0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa",
	"takerAssetData": "0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c",
	"salt": "57718887633272621300663749607971996856877233498333220590130402684590306265495",
	"exchangeAddress": "0x35dd2932454449b14cee11a94d3674a936d5d7b2",
	"feeRecipientAddress": "0x0000000000000000000000000000000000000000",
	"expirationTimeSeconds": "1547684162302"
}
Validation errors: instance requires property "order", instance requires property "metaData"
    at Object.assert (/Users/lauren/github/0x-hackathon/node_modules/@0x/assert/lib/src/index.js:76:19)
    at Object.doesConformToSchema (/Users/lauren/github/0x-hackathon/node_modules/@0x/assert/lib/src/index.js:64:24)...

image

Getting "Tokens Unavailable" in instant

I have deployed both 0x-launch-kit-backend and 0x-launch-kit-frontend in my local system
I can able to create a sell order. It is listed in orders
I am running things in Ropsten Testnet

In 0X Instant Html code . I replace my relayer URL in orderSource and mention networkId:3

I can get values in record in asset_pairs api

While run instant in-browser got "Tokens Unavailable".

Thanks in advance
Sorry for my bad English.

har-validator not found

When running yarn or yarn install:

error An unexpected error occurred: "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.2.tgz: Request failed \"404 Not Found\"".

Retrieve order partial filled values from Relay

Right now, the relay does not retrieve the partially filled value of each order on the orderbook. This is necessary to the UX to not display the full amount on the orderbook or to show to the user that they have less balance locked on the order, as the order was already filled.

Three approaches can be done here to help solve this:

  • Add the partial value on the meta object of signed orders using orderWatcher
  • Create an endpoint that retrieves the partially filled order values, this helps to create an endpoint for market history
  • Create a Post endpoint where we post the order that was filled from frontend, and then it calls orderWatcher for that specific order hash.

Unknown fee token: 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 if FEE_ACCET_DATA set to wETH

Im getting Unknown fee token: 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 error when trying to use this settings:

MAKER_FEE_ASSET_DATA: '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
TAKER_FEE_ASSET_DATA: '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
MAKER_FEE_UNIT_AMOUNT: '100000000000000'
TAKER_FEE_UNIT_AMOUNT: '100000000000000'

/v2/orderbook: Pagination defaults to page 0. SRA spec defines page 1.

@dekz - Found another one:

When I hit local Launch Kit (.ts version) endpoint via curl /v2/orderbook it is properly returning bids and asks.

But when i use the 0x Connect client for the exact same query it doesn't return the actual records with the rest of the response. Records field is always empty in the response:

client.getOrderbookAsync(
  { "baseAssetData": baseAssetData,
    "quoteAssetData": quoteAssetData
  })
  .then(
    (r) => console.log(r),
    (e) => console.log(e)
  )

// query returns empty records:
{ bids: { total: 0, page: 1, perPage: 10, records: [] },
  asks: { total: 5, page: 1, perPage: 10, records: [] } }

Here's what the curl response for same exact query looks like, seems correct:

curl 'http://localhost:3000/v2/orderbook?baseAssetData=0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa&quoteAssetData=0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c'
{"bids":{"total":0,"page":0,"perPage":20,"records":[]},"asks":{"total":5,"page":0,"perPage":20,"records":[{"metaData":{},"order":{"signature":"0x1baf04b260c29cad9c6bb8812ea4c61a2681fadd578be000d2e770697d76d90fc811a301d55a161613920bbdeb64798157654b5adc2634f0a1f0579f67c62c04bd02","senderAddress":"0x0000000000000000000000000000000000000000","makerAddress":"0x063aaf1fbbf0238f1cb571a5e9a6d91304798887","takerAddress":"0x0000000000000000000000000000000000000000","makerFee":"0","takerFee":"0","makerAssetAmount":"1000000000000000000","takerAssetAmount":"50000000000000","makerAssetData":"0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa","takerAssetData":"0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c","salt":"26834400093700189474277646721932965984745061693386137028316104425807600698868","exchangeAddress":"0x35dd2932454449b14cee11a94d3674a936d5d7b2","feeRecipientAddress":"0x0000000000000000000000000000000000000000","expirationTimeSeconds":"1547675321658"}},{"metaData":{},"order":{"signature":"0x1cfe8e9d8a323049babeaa413e507905f2f2a1e8f1e399fa7457db0ab67218024c069d8e82c89cfb519bbd92f1878da527f16c82dda55ed2d05fc2bb8806e922f802","senderAddress":"0x0000000000000000000000000000000000000000","makerAddress":"0x063aaf1fbbf0238f1cb571a5e9a6d91304798887","takerAddress":"0x0000000000000000000000000000000000000000","makerFee":"0","takerFee":"0","makerAssetAmount":"2000000000000000000","takerAssetAmount":"20000000000000","makerAssetData":"0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa","takerAssetData":"0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c","salt":"23021941304080017233667145501165113484278445408483391664784942613403220214467","exchangeAddress":"0x35dd2932454449b14cee11a94d3674a936d5d7b2","feeRecipientAddress":"0x0000000000000000000000000000000000000000","expirationTimeSeconds":"1547681622628"}},{"metaData":{},"order":{"signature":"0x1b462e392e6008295fa29adb32d68427b7835969eca098942a585422682793f1ed67ad7f5caaa281b4852dd7e9c3acffb8fe123bb36ae62adf4cce71f9e5cef7b402","senderAddress":"0x0000000000000000000000000000000000000000","makerAddress":"0xb78f09d705dedaca26dc99e9ee7d789be7b38fcc","takerAddress":"0x0000000000000000000000000000000000000000","makerFee":"0","takerFee":"0","makerAssetAmount":"1000000000000000000","takerAssetAmount":"10000000000000","makerAssetData":"0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa","takerAssetData":"0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c","salt":"57718887633272621300663749607971996856877233498333220590130402684590306265495","exchangeAddress":"0x35dd2932454449b14cee11a94d3674a936d5d7b2","feeRecipientAddress":"0x0000000000000000000000000000000000000000","expirationTimeSeconds":"1547684162302"}},{"metaData":{},"order":{"signature":"0x1b34607ea85f31174ec2b6f3c0813c8890144f1e26b57cf75719dff889a930ccf270ec6f397e074643d8ad28f86000325adb1656574d0b78f2e559ac9f9e06f31102","senderAddress":"0x0000000000000000000000000000000000000000","makerAddress":"0xb78f09d705dedaca26dc99e9ee7d789be7b38fcc","takerAddress":"0x0000000000000000000000000000000000000000","makerFee":"0","takerFee":"0","makerAssetAmount":"1000000000000000000","takerAssetAmount":"17000000000000","makerAssetData":"0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa","takerAssetData":"0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c","salt":"90216706402638628412782469223982886692502260413125767364808989292368542931132","exchangeAddress":"0x35dd2932454449b14cee11a94d3674a936d5d7b2","feeRecipientAddress":"0x0000000000000000000000000000000000000000","expirationTimeSeconds":"1547687884512"}},{"metaData":{},"order":{"signature":"0x1bff4d0aa4ef7657c6c2df7bd959340a0259657a27aeb616fb8d6bca04d94cc8ce3165ddb083c820f1059e2eb39ea8f3bf1d76060458e513ceb3623347c287d0b902","senderAddress":"0x0000000000000000000000000000000000000000","makerAddress":"0x063aaf1fbbf0238f1cb571a5e9a6d91304798887","takerAddress":"0x0000000000000000000000000000000000000000","makerFee":"0","takerFee":"0","makerAssetAmount":"1000000000000000000","takerAssetAmount":"13000000000000","makerAssetData":"0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa","takerAssetData":"0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c","salt":"62855717622068651739943073684441414449311622915772187888148272159221902181113","exchangeAddress":"0x35dd2932454449b14cee11a94d3674a936d5d7b2","feeRecipientAddress":"0x0000000000000000000000000000000000000000","expirationTimeSeconds":"1547688659771"}}]}}

Launch kit does not support proxy id besides ERC20 and ERC721

If an SRA pull orders from mesh to their local database can get orders with proxy id's different than ERC20 and ERC721, this causes the endpoint get v2/asset_pairs to fail because mesh orders could be AssetProxyId.MultiAsset, AssetProxyId.StaticCall, AssetProxyId.ERC1155. We can solve this filtering the orders which have non-supported proxy's

public static async getAssetPairsAsync(
      page: number,
      perPage: number,
      assetDataA: string,
      assetDataB: string,
  ): Promise<PaginatedCollection<AssetPairsItem>> {
      const connection = getDBConnection();
      const signedOrderModels = (await connection.manager.find(SignedOrderModel)) as Array<
          Required<SignedOrderModel>
      ;


      const assetPairsItems: AssetPairsItem[] = signedOrderModels.map(deserializeOrder).filter(filterNonAsset).map(signedOrderToAssetPair);

using this function:

const filterNonAsset = (signedOrder: SignedOrder): boolean => {
    const assetProxyId = assetDataUtils.decodeAssetProxyId(signedOrder.makerAssetData);

    switch (assetProxyId) {
        case AssetProxyId.MultiAsset:
            return false;
        case AssetProxyId.StaticCall:
            return false;
        case AssetProxyId.ERC1155:
            return false;
        default:
           return true;
    }
};

OrderWatcher issue

Hello,
I add order using /v2/order api and i fill the order from my application but the order is still returned from /v2/orderbook API

Add all orders to OrderWatcher on startup

It appears that OrderWatcher isn't getting the orders in the database when restarted. This means expired orders and invalid orders aren't pruned if the service goes down.

rm cached .env files from git

Accidentally leaked my database passwords because even though its in .gitignore, it appears to have been included in the git cache. Was lucky to catch it on the test database, but could be bad if others don't notice

ERC721 asset pairs

The token id should be stripped out of the asset pairs endpoint so that only a single asset pair per contract is returned.

Current Behaviour

Adding 10 ERC721 Axie orders would result in 10 different asset pairs.

Expected Behaviour

1 Asset pair per ERC721 contract

WebSocket connection to 'ws://127.0.0.1:3000/' failed

Although I git the 0x-lauch-kit package (backend + frontend) to work out of the box, whenever I try just to run the backend, it fails to accept ws connections and to retrieve price data.
The Chrome console is filled with error messages like :

browser.js:19 WebSocket connection to 'ws://127.0.0.1:3000/' failed: Error during WebSocket handshake: Unexpected response code: 404
W3CWebSocket @ browser.js:19
(anonymous) @ orders_channel_factory.js:168
(anonymous) @ orders_channel_factory.js:167
step @ orders_channel_factory.js:125
(anonymous) @ orders_channel_factory.js:55
(anonymous) @ orders_channel_factory.js:27
push../node_modules/@0x/connect/lib/src/orders_channel_factory.js.__awaiter @ orders_channel_factory.js:4
createWebSocketOrdersChannelAsync @ orders_channel_factory.js:161
(anonymous) @ sra_websocket_order_provider.js:603
step @ sra_websocket_order_provider.js:167
(anonymous) @ sra_websocket_order_provider.js:97
(anonymous) @ sra_websocket_order_provider.js:69
push../node_modules/@0x/orderbook/lib/src/order_provider/sra_websocket_order_provider.js.__awaiter @ sra_websocket_order_provider.js:46
SRAWebsocketOrderProvider._createOrdersChannelAsync @ sra_websocket_order_provider.js:526
(anonymous) @ sra_websocket_order_provider.js:359
step @ sra_websocket_order_provider.js:167
(anonymous) @ sra_websocket_order_provider.js:97
fulfilled @ sra_websocket_order_provider.js:49
index.js:1437 0x-launch-kit-frontend::Market::Actions Failed to get price of currency pair zrx/weth
console.<computed> @ index.js:1437
r @ backend.js:6
t.<computed> @ logdown.min.js:149
_callee2$ @ actions.ts:91
tryCatch @ runtime.js:45
invoke @ runtime.js:264
prototype.<computed> @ runtime.js:98
asyncGeneratorStep @ asyncToGenerator.js:3
_throw @ asyncToGenerator.js:29
logdown.min.js:149 0x-launch-kit-frontend::gas_price_estimation  {gasPriceInWei: BigNumber, estimatedTimeMs: 30000}
browser.js:19 WebSocket connection to 'ws://127.0.0.1:3000/' failed: Error during WebSocket handshake: Unexpected response code: 404
W3CWebSocket @ browser.js:19
(anonymous) @ orders_channel_factory.js:168
(anonymous) @ orders_channel_factory.js:167
step @ orders_channel_factory.js:125
(anonymous) @ orders_channel_factory.js:55
(anonymous) @ orders_channel_factory.js:27
push../node_modules/@0x/connect/lib/src/orders_channel_factory.js.__awaiter @ orders_channel_factory.js:4
createWebSocketOrdersChannelAsync @ orders_channel_factory.js:161
(anonymous) @ sra_websocket_order_provider.js:603
step @ sra_websocket_order_provider.js:167
(anonymous) @ sra_websocket_order_provider.js:97
(anonymous) @ sra_websocket_order_provider.js:69
push../node_modules/@0x/orderbook/lib/src/order_provider/sra_websocket_order_provider.js.__awaiter @ sra_websocket_order_provider.js:46
SRAWebsocketOrderProvider._createOrdersChannelAsync @ sra_websocket_order_provider.js:526
(anonymous) @ sra_websocket_order_provider.js:359
step @ sra_websocket_order_provider.js:167
(anonymous) @ sra_websocket_order_provider.js:97
fulfilled @ sra_websocket_order_provider.js:49
index.js:1437 0x-launch-kit-frontend::Store::Market::Actions getUserOrders: fetch orders from the relayer failed. Error: Creating websocket connection to ws://127.0.0.1:3000/
    at SRAWebsocketOrderProvider.<anonymous> (sra_websocket_order_provider.js:612)
    at step (sra_websocket_order_provider.js:167)
    at Object.throw (sra_websocket_order_provider.js:97)
    at rejected (sra_websocket_order_provider.js:57)
console.<computed> @ index.js:1437
r @ backend.js:6
t.<computed> @ logdown.min.js:149
_callee2$ @ actions.ts:104
tryCatch @ runtime.js:45
invoke @ runtime.js:264
prototype.<computed> @ runtime.js:98
asyncGeneratorStep @ asyncToGenerator.js:3
_throw @ asyncToGenerator.js:29
browser.js:19 WebSocket connection to 'ws://127.0.0.1:3000/' failed: Error during WebSocket handshake: Unexpected response code: 404
W3CWebSocket @ browser.js:19
(anonymous) @ orders_channel_factory.js:168
(anonymous) @ orders_channel_factory.js:167
step @ orders_channel_factory.js:125
(anonymous) @ orders_channel_factory.js:55
(anonymous) @ orders_channel_factory.js:27
push../node_modules/@0x/connect/lib/src/orders_channel_factory.js.__awaiter @ orders_channel_factory.js:4
createWebSocketOrdersChannelAsync @ orders_channel_factory.js:161
(anonymous) @ sra_websocket_order_provider.js:603
step @ sra_websocket_order_provider.js:167
(anonymous) @ sra_websocket_order_provider.js:97
(anonymous) @ sra_websocket_order_provider.js:69
push../node_modules/@0x/orderbook/lib/src/order_provider/sra_websocket_order_provider.js.__awaiter @ sra_websocket_order_provider.js:46
SRAWebsocketOrderProvider._createOrdersChannelAsync @ sra_websocket_order_provider.js:526
(anonymous) @ sra_websocket_order_provider.js:359
step @ sra_websocket_order_provider.js:167
(anonymous) @ sra_websocket_order_provider.js:97
fulfilled @ sra_websocket_order_provider.js:49
index.js:1437 0x-launch-kit-frontend::Store::Market::Actions getAllOrders: fetch orders from the relayer failed. Error: Creating websocket connection to ws://127.0.0.1:3000/
    at SRAWebsocketOrderProvider.<anonymous> (sra_websocket_order_provider.js:612)
    at step (sra_websocket_order_provider.js:167)
    at Object.throw (sra_websocket_order_provider.js:97)
    at rejected (sra_websocket_order_provider.js:57)
console.<computed> @ index.js:1437
r @ backend.js:6
t.<computed> @ logdown.min.js:149
_callee$ @ actions.ts:83
tryCatch @ runtime.js:45
invoke @ runtime.js:264
prototype.<computed> @ runtime.js:98
asyncGeneratorStep @ asyncToGenerator.js:3
_throw @ asyncToGenerator.js:29
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js:13
_next @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
(anonymous) @ actions.ts:66
(anonymous) @ index.js:8
dispatch @ redux.js:613
_callee7$ @ actions.ts:300
tryCatch @ runtime.js:45
invoke @ runtime.js:264
prototype.<computed> @ runtime.js:98
asyncGeneratorStep @ asyncToGenerator.js:3
_next @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
(anonymous) @ actions.ts:298
(anonymous) @ index.js:8
dispatch @ redux.js:613
_callee3$ @ actions.ts:54
tryCatch @ runtime.js:45
invoke @ runtime.js:264
prototype.<computed> @ runtime.js:98
asyncGeneratorStep @ asyncToGenerator.js:3
_next @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
(anonymous) @ actions.ts:45
(anonymous) @ index.js:8
dispatch @ redux.js:613
_callee$ @ actions.ts:31
tryCatch @ runtime.js:45
invoke @ runtime.js:264
prototype.<computed> @ runtime.js:98
asyncGeneratorStep @ asyncToGenerator.js:3
_next @ asyncToGenerator.js:25
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js:13
_next @ asyncToGenerator.js:25
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js:13
_next @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
(anonymous) @ actions.ts:20
(anonymous) @ index.js:8
onUpdateStore @ app.tsx:103
_callee2$ @ app.tsx:66
tryCatch @ runtime.js:45
invoke @ runtime.js:264
prototype.<computed> @ runtime.js:98
asyncGeneratorStep @ asyncToGenerator.js:3
_next @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
Show 14 more frames
logdown.min.js:149 0x-launch-kit-frontend::gas_price_estimation  {gasPriceInWei: BigNumber, estimatedTimeMs: 30000}
browser.js:19 WebSocket connection to 'ws://127.0.0.1:3000/' failed: Error during WebSocket handshake: Unexpected response code: 404
W3CWebSocket @ browser.js:19
(anonymous) @ orders_channel_factory.js:168
(anonymous) @ orders_channel_factory.js:167
step @ orders_channel_factory.js:125
(anonymous) @ orders_channel_factory.js:55
(anonymous) @ orders_channel_factory.js:27
push../node_modules/@0x/connect/lib/src/orders_channel_factory.js.__awaiter @ orders_channel_factory.js:4
createWebSocketOrdersChannelAsync @ orders_channel_factory.js:161
(anonymous) @ sra_websocket_order_provider.js:603
step @ sra_websocket_order_provider.js:167
(anonymous) @ sra_websocket_order_provider.js:97
(anonymous) @ sra_websocket_order_provider.js:69
push../node_modules/@0x/orderbook/lib/src/order_provider/sra_websocket_order_provider.js.__awaiter @ sra_websocket_order_provider.js:46
SRAWebsocketOrderProvider._createOrdersChannelAsync @ sra_websocket_order_provider.js:526
(anonymous) @ sra_websocket_order_provider.js:359
step @ sra_websocket_order_provider.js:167
(anonymous) @ sra_websocket_order_provider.js:97
fulfilled @ sra_websocket_order_provider.js:49
index.js:1437 0x-launch-kit-frontend::Store::Market::Actions getUserOrders: fetch orders from the relayer failed. Error: Creating websocket connection to ws://127.0.0.1:3000/
    at SRAWebsocketOrderProvider.<anonymous> (sra_websocket_order_provider.js:612)
    at step (sra_websocket_order_provider.js:167)
    at Object.throw (sra_websocket_order_provider.js:97)
    at rejected (sra_websocket_order_provider.js:57)
console.<computed> @ index.js:1437
r @ backend.js:6
t.<computed> @ logdown.min.js:149
_callee2$ @ actions.ts:104
tryCatch @ runtime.js:45
invoke @ runtime.js:264
prototype.<computed> @ runtime.js:98
asyncGeneratorStep @ asyncToGenerator.js:3
_throw @ asyncToGenerator.js:29
logdown.min.js:149 0x-launch-kit-frontend::gas_price_estimation  {gasPriceInWei: BigNumber, estimatedTimeMs: 30000}
browser.js:19 WebSocket connection to 'ws://127.0.0.1:3000/' failed: Error during WebSocket handshake: Unexpected response code: 404
W3CWebSocket @ browser.js:19
(anonymous) @ orders_channel_factory.js:168
(anonymous) @ orders_channel_factory.js:167
step @ orders_channel_factory.js:125
(anonymous) @ orders_channel_factory.js:55
(anonymous) @ orders_channel_factory.js:27
push../node_modules/@0x/connect/lib/src/orders_channel_factory.js.__awaiter @ orders_channel_factory.js:4
createWebSocketOrdersChannelAsync @ orders_channel_factory.js:161
(anonymous) @ sra_websocket_order_provider.js:603
step @ sra_websocket_order_provider.js:167
(anonymous) @ sra_websocket_order_provider.js:97
(anonymous) @ sra_websocket_order_provider.js:69
push../node_modules/@0x/orderbook/lib/src/order_provider/sra_websocket_order_provider.js.__awaiter @ sra_websocket_order_provider.js:46
SRAWebsocketOrderProvider._createOrdersChannelAsync @ sra_websocket_order_provider.js:526
(anonymous) @ sra_websocket_order_provider.js:359
step @ sra_websocket_order_provider.js:167
(anonymous) @ sra_websocket_order_provider.js:97
fulfilled @ sra_websocket_order_provider.js:49
index.js:1437 0x-launch-kit-frontend::Market::Actions Failed to get price of currency pair mkr/weth
console.<computed> @ index.js:1437
r @ backend.js:6
t.<computed> @ logdown.min.js:149
_callee2$ @ actions.ts:91
tryCatch @ runtime.js:45
invoke @ runtime.js:264
prototype.<computed> @ runtime.js:98
asyncGeneratorStep @ asyncToGenerator.js:3
_throw @ asyncToGenerator.js:29
browser.js:19 WebSocket connection to 'ws://127.0.0.1:3000/' failed: Error during WebSocket handshake: Unexpected response code: 404
W3CWebSocket @ browser.js:19
(anonymous) @ orders_channel_factory.js:168
(anonymous) @ orders_channel_factory.js:167
step @ orders_channel_factory.js:125
(anonymous) @ orders_channel_factory.js:55
(anonymous) @ orders_channel_factory.js:27
push../node_modules/@0x/connect/lib/src/orders_channel_factory.js.__awaiter @ orders_channel_factory.js:4
createWebSocketOrdersChannelAsync @ orders_channel_factory.js:161
(anonymous) @ sra_websocket_order_provider.js:603
step @ sra_websocket_order_provider.js:167
(anonymous) @ sra_websocket_order_provider.js:97
(anonymous) @ sra_websocket_order_provider.js:69
push../node_modules/@0x/orderbook/lib/src/order_provider/sra_websocket_order_provider.js.__awaiter @ sra_websocket_order_provider.js:46
SRAWebsocketOrderProvider._createOrdersChannelAsync @ sra_websocket_order_provider.js:526
(anonymous) @ sra_websocket_order_provider.js:359
step @ sra_websocket_order_provider.js:167
(anonymous) @ sra_websocket_order_provider.js:97
fulfilled @ sra_websocket_order_provider.js:49
index.js:1437 0x-launch-kit-frontend::Market::Actions Failed to get price of currency pair feo1/weth
console.<computed> @ index.js:1437
r @ backend.js:6
t.<computed> @ logdown.min.js:149
_callee2$ @ actions.ts:91
tryCatch @ runtime.js:45
invoke @ runtime.js:264
prototype.<computed> @ runtime.js:98
asyncGeneratorStep @ asyncToGenerator.js:3
_throw @ asyncToGenerator.js:29
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js:13
_next @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
(anonymous) @ actions.ts:79
_callee3$ @ actions.ts:74
tryCatch @ runtime.js:45
invoke @ runtime.js:264
prototype.<computed> @ runtime.js:98
asyncGeneratorStep @ asyncToGenerator.js:3
_next @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
(anonymous) @ actions.ts:74
(anonymous) @ index.js:8
dispatch @ redux.js:613
_callee3$ @ actions.ts:45
tryCatch @ runtime.js:45
invoke @ runtime.js:264
prototype.<computed> @ runtime.js:98
asyncGeneratorStep @ asyncToGenerator.js:3
_next @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
(anonymous) @ actions.ts:45
(anonymous) @ index.js:8
dispatch @ redux.js:613
_callee$ @ actions.ts:31
tryCatch @ runtime.js:45
invoke @ runtime.js:264
prototype.<computed> @ runtime.js:98
asyncGeneratorStep @ asyncToGenerator.js:3
_next @ asyncToGenerator.js:25
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js:13
_next @ asyncToGenerator.js:25
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js:13
_next @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
(anonymous) @ actions.ts:20
(anonymous) @ index.js:8
onUpdateStore @ app.tsx:103
_callee2$ @ app.tsx:66
tryCatch @ runtime.js:45
invoke @ runtime.js:264
prototype.<computed> @ runtime.js:98
asyncGeneratorStep @ asyncToGenerator.js:3
_next @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
Show 12 more frames
browser.js:19 WebSocket connection to 'ws://127.0.0.1:3000/' failed: Error during WebSocket handshake: Unexpected response code: 404

Error: ENOENT: no such file or directory, open '%PARENT_PATH%/metadata.json'

When I try to run Launch Kit backend, I get the following issue: Error: ENOENT: no such file or directory, open '%PARENT_PATH%/metadata.json' where %PARENT_PATH% is the folder above the one where Launch Kit is installed.

To reproduce:

  1. git clone https://github.com/0xProject/0x-launch-kit-backend.git 0x-backend
  2. cd 0x-backend
  3. yarn
  4. yarn start:js

I fixed locally by changing path.join(__dirname, '../../metadata.json'); to path.join(__dirname, '../metadata.json'); in js/config.js.

Admin Panel + BuildPack

Hey, I'm working on adding an admin panel and heroku buildpack to 0x-launch-kit in a fork. Wondering if I should keep it as a separate fork, or merge into 0x-launch-kit.

Scrypt issue while running on Windows

Sometimes when you try running 0x-launch-kit on Windows you'll get an error like this:

Error: Cannot find module './build/Release/scrypt'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
    at Function.Module._load (internal/modules/cjs/loader.js:529:25)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (C:\Users\leonidlogvinov\0x-launch-kit\node_modules\scrypt\index.js:3:20)
    at Module._compile (internal/modules/cjs/loader.js:722:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

We are aware of that problem but it seems to stem from one of our dependencies, and is an issue shared across many Ethereum dev tools.

Here is the list of issues on other projects related to it that might help you resolve it:

typeorm error on curl http://localhost:3000/v2/orders (js codebase)

After running yarn start:js and curl http://localhost:3000/v2/orders, the following error is displayed.

EntityMetadataNotFound: No metadata for "SignedOrderModel" was found.

This error is only an issue when using the js codebase. When using the ts codebase there are no typeorm errors.

Persistent database re-initialization is slow

When re-starting the backend service with a database containing a number of orders, the re-initialization is slow as orders are validated before adding to orderwatcher. The validation is per order and can take some time (and become rate limited).

During this time the http service has not been started and will not respond to any requests.

Once the backend is updated with mesh we can bulk add orders and bootstrap efficiently.

EIP-55 checksummed addresses not supported

In publishing the latest versions of the 0x Python packages, we're migrating from v4 to v5 of Web3.py. v5 will not accept any non-checksummed addresses for any inputs to any contracts.

We have an end-to-end tested example of the Python SRA client, which creates an order, posts it to the Launch Kit backend, retrieves the order from the order book, and then fills the order. After migrating this example to v5 of Web3.py, this test is failing with the following output:

131 ...     expirationTimeSeconds=round(
132 ...         (datetime.utcnow() + timedelta(days=1)).timestamp()
133 ...     )
134 ... )
135 
136 >>> from zero_ex.order_utils import generate_order_hash_hex
137 >>> order_hash_hex = generate_order_hash_hex(
138 ...     order, contract_addresses.exchange
139 ... )
140 >>> relayer.post_order_with_http_info(
UNEXPECTED EXCEPTION: ApiException()
Traceback (most recent call last):

  File "/home/gene/.pythonz/pythons/CPython-3.7.2/lib/python3.7/doctest.py", line 1329, in __run
    compileflags, 1), test.globs)

  File "<doctest zero_ex.sra_client[21]>", line 7, in <module>

  File "/home/gene/dev/0x-monorepo/python-packages/sra_client/src/zero_ex/sra_client/api/default_api.py", line 1096, in post_order_with_http_info
    collection_formats=collection_formats,

  File "/home/gene/dev/0x-monorepo/python-packages/sra_client/src/zero_ex/sra_client/api_client.py", line 385, in call_api
    _request_timeout,

  File "/home/gene/dev/0x-monorepo/python-packages/sra_client/src/zero_ex/sra_client/api_client.py", line 183, in __call_api
    _request_timeout=_request_timeout,

  File "/home/gene/dev/0x-monorepo/python-packages/sra_client/src/zero_ex/sra_client/api_client.py", line 455, in request
    body=body,

  File "/home/gene/dev/0x-monorepo/python-packages/sra_client/src/zero_ex/sra_client/rest.py", line 349, in POST
    body=body,

  File "/home/gene/dev/0x-monorepo/python-packages/sra_client/src/zero_ex/sra_client/rest.py", line 253, in request
    raise ApiException(http_resp=r)

zero_ex.sra_client.rest.ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'X-Powered-By': 'Express', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '267', 'ETag': 'W/"10b-nhI1Hv/zADdsZ/uIGTlKZ6WiCIo"', 'Date': 'Wed, 07 Aug 2019 23:32:56 GMT', 'Connection': 'keep-alive'})
HTTP response body: {"code":100,"reason":"Validation Failed","validationErrors":[{"field":"instance","code":1001,"reason":"does not match allOf schema </orderSchema> with 1 error[s]:"},{"field":"instance.makerAddress","code":1001,"reason":"does not match pattern \"^0x[0-9a-f]{40}$\""}]}


/home/gene/dev/0x-monorepo/python-packages/sra_client/src/zero_ex/sra_client/__init__.py:140: UnexpectedException

The reason for the failure is that the example is sending a checksummed (mixed case) address for the makerAddress, and this build of Launch Kit is verifying that address against an old version of @0x/json-schemas. In version 3.1.1.1 the schemas were updated to allow for mixed case addresses.

However, simply accepting mixed case addresses in posting an order will not be sufficient to get these Python SRA client example working, because after posting an order, the example retrieves the order and fills it. So Launch Kit must also be changed to store the orders in mixed case as well, such that the retrieval will yield the case given in the posting.

failed to get price of currency pair - UI not accepting orders

getting quite a few error message like failed to get price of currency pair mkr/wethin Chrome console and UI does not accept (show?) any orders using wETH on Kovan and infura/Kovan with my project ID.

backend.js:6 0x-launch-kit-frontend::Market::Actions Failed to get price of currency pair zrx/weth

Sort orderbook by price

SRA Docs:

Bids will be sorted in descending order by price, and asks will be sorted in ascending order by price. Within the price sorted orders, the orders are further sorted by taker fee price which is defined as the takerFee divided by takerTokenAmount. After taker fee price, orders are to be sorted by expiration in ascending order.

/v2/fee_recipients: validation error on feeRecipients

Querying this endpoint via curl is fine but returns a schema error when queried via 0x Connect:
client.getFeeRecipientsAsync()

Error: Expected feeRecipients to conform to schema /relayerApiFeeRecipientsResponseSchema
Encountered: {
	"total": 1,
	"page": 0,
	"perPage": 20,
	"records": [
		"0x4448FC893284740551a5F776b4EC42cA0B010a1B"
	]
}
Validation errors: instance does not match allOf schema [subschema 1] with 1 error[s]:, instance.records[0] does not match pattern "^0x[0-9a-f]{40}$"
    at Object.assert (/Users/lauren/github/0x-hackathon/node_modules/@0x/assert/lib/src/index.js:76:19)
    at Object.doesConformToSchema (/Users/lauren/github/0x-hackathon/node_modules/@0x/assert/lib/src/index.js:64:24)

curl queries are fine:
curl 'http://localhost:3000/v2/fee_recipients' {"total":1,"page":0,"perPage":20,"records":["0x4448FC893284740551a5F776b4EC42cA0B010a1B"]}

asset_pairs question

Hey, is asset_pairs supposed to give a list of supported asset pairs, or a list of asset_pairs which currently have maker orders

Service crash

The service crash on Debian, after minutes running

Error: Failed to fetch parent block.
at Object. (/root/0x/0x-launch-kit/node_modules/ethereumjs-blockstream/output/source/block-reconciler.js:106:27)
at step (/root/0x/0x-launch-kit/node_modules/ethereumjs-blockstream/output/source/block-reconciler.js:32:23)
at Object.next (/root/0x/0x-launch-kit/node_modules/ethereumjs-blockstream/output/source/block-reconciler.js:13:53)
at fulfilled (/root/0x/0x-launch-kit/node_modules/ethereumjs-blockstream/output/source/block-reconciler.js:4:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
{ code: -32000, message: 'unknown block' }
Error: Failed to fetch parent block.
at Object. (/root/0x/0x-launch-kit/node_modules/ethereumjs-blockstream/output/source/block-reconciler.js:106:27)
at step (/root/0x/0x-launch-kit/node_modules/ethereumjs-blockstream/output/source/block-reconciler.js:32:23)
at Object.next (/root/0x/0x-launch-kit/node_modules/ethereumjs-blockstream/output/source/block-reconciler.js:13:53)
at fulfilled (/root/0x/0x-launch-kit/node_modules/ethereumjs-blockstream/output/source/block-reconciler.js:4:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Failed to fetch parent block.
at Object. (/root/0x/0x-launch-kit/node_modules/ethereumjs-blockstream/output/source/block-reconciler.js:106:27)
at step (/root/0x/0x-launch-kit/node_modules/ethereumjs-blockstream/output/source/block-reconciler.js:32:23)
at Object.next (/root/0x/0x-launch-kit/node_modules/ethereumjs-blockstream/output/source/block-reconciler.js:13:53)
at fulfilled (/root/0x/0x-launch-kit/node_modules/ethereumjs-blockstream/output/source/block-reconciler.js:4:58)
at process._tickCallback (internal/process/next_tick.js:68:7)

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.