Code Monkey home page Code Monkey logo

0x-launch-kit's People

Contributors

bmillman19 avatar chriskalani avatar dekz avatar dependabot[bot] avatar fabioberger avatar fragosti avatar fvictorio avatar tomhschmidt avatar unjapones 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

0x-launch-kit's Issues

Error: EPERM: operation not permitted, open 'docker-compose.yml'

i'm getting this error message when installing the launch kit on Kovan, any help please?

.......

node:fs:594
handleErrorFromBinding(ctx);
^

Error: EPERM: operation not permitted, open 'docker-compose.yml'
at Object.openSync (node:fs:594:3)
at Object.writeFileSync (node:fs:2207:35)
at C:\Users\angey\AppData\Local\npm-cache_npx\3d2d2a4ffc4c7abe\node_modules@0x\launch-kit-wizard\lib\index.js:241:24
at step (C:\Users\angey\AppData\Local\npm-cache_npx\3d2d2a4ffc4c7abe\node_modules@0x\launch-kit-wizard\lib\index.js:33:23)
at Object.next (C:\Users\angey\AppData\Local\npm-cache_npx\3d2d2a4ffc4c7abe\node_modules@0x\launch-kit-wizard\lib\index.js:14:53)
at fulfilled (C:\Users\angey\AppData\Local\npm-cache_npx\3d2d2a4ffc4c7abe\node_modules@0x\launch-kit-wizard\lib\index.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
errno: -4048,
syscall: 'open',
code: 'EPERM',
path: 'docker-compose.yml'
}

ERC721 Interface breaks with CheezWizards

Using contract address 0x2f4bdafb22bd92aa7b7552d270376de8edccbc1e (CheezWizards) on mainnet, I receive the following errors in console and the page fails to render.

logdown.min.js:149 0x-launch-kit-frontend::Collectibles::Actions There was a problem fetching the collectibles TypeError: Cannot read property 'toLowerCase' of null
    at filterable_collectibles.ts:46
    at Array.filter (<anonymous>)
    at CC (filterable_collectibles.ts:45)
    at t.n.render (collectible_list_modal.tsx:100)
    at Di (react-dom.production.min.js:3785)
    at Oi (react-dom.production.min.js:3776)
    at Ii (react-dom.production.min.js:3960)
    at Go (react-dom.production.min.js:5514)
    at Jo (react-dom.production.min.js:5536)
    at ks (react-dom.production.min.js:5958)

Error 403 - forbidden

First, it said docker wasn't detected as running. Using it with sudo had fixed it, but yet not exporting the frontend. After manually creating /usr/share/nginx/html and putting user-group docker with RW permissions, docker-composer can now run without sudo. But it yet isn't exporting to /nginx/html.

Order Unfunded error on mesh:8

Context

  • 0x-lauch-kit running on a external machine running ubuntu 19.04 using mesh:7-0xv3 on Kovan testnet (42)
  • modified another 0x-launch-kit-frontend only instance to support a new token, contract is deployed on (and only !) Kovan testnet.
    Contract address for all other networks was set to the kovan address , although they do not exist there - that was required because otherwise I got another error and it did not work at all.
    "tokens": [
        {
            "symbol": "feo1",
            "name": "Iron Ore Token Type1",
            "primaryColor": "#333333",
            "icon": "assets/icons/zrx.svg",
            "addresses": {
                "1": "0x1621aec5d5b2e6ec6d9b58399e9d5253af86df5f",
                "3": "0x1621aec5d5b2e6ec6d9b58399e9d5253af86df5f",
                "4": "0x1621aec5d5b2e6ec6d9b58399e9d5253af86df5f",
                "42": "0x1621aec5d5b2e6ec6d9b58399e9d5253af86df5f",
                "50": "0x1621aec5d5b2e6ec6d9b58399e9d5253af86df5f"
            },
            "decimals": 18,
            "displayDecimals": 4
        },

Everything was working fine

https://github.com/SvenMeyer/commx-frontend

On external machine running the 0x-lauch-kit with the backend :

  • changed within docker-compose.ymlto mesh:latest
  • restarted 0x-lauch-kit docker-compose up

Accessed 0x-launch-kit backend (on on a external machine running ubuntu 19.04) using the same modified 0x-frontend (with support for custom token).
Got error message when trying to create order for the custom token - all other existing standard token were working fine.

0x_OrderUnfunded

No 'Access-Control-Allow-Origin' header is present on the requested resource

image
Access to fetch at 'https://api.coinmarketcap.com/v1/ticker/ethereum/' from origin 'http://digitalworldexchange.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I keep getting this issue. Any help regarding this how do i resolve this ?

Live demo breaks for a specific Cheeze Wizard

https://demo.0x.org/marketplace#/erc721/ currently shows three different Cheeze Wizards. One of them has a price of -906.50 ETH.

Screen Shot 2019-12-05 at 3 03 26 PM

Clicking on this Cheeze Wizard leads to a a blank white page and produces an error in the JavaScript console:

Screen Shot 2019-12-05 at 3 06 22 PM

Here's a direct link to the page: https://demo.0x.org/marketplace#/erc721/collectible/2700

react-dom.production.min.js:4408 TypeError: Cannot read property 'price' of undefined
    at t.n._generateMarkersWithPrices (declining_price_graph.tsx:104)
    at t.n.componentDidMount (declining_price_graph.tsx:31)
    at Wo (react-dom.production.min.js:4978)
    at Vo (react-dom.production.min.js:5123)
    at react-dom.production.min.js:5975
    at Object.t.unstable_runWithPriority (scheduler.production.min.js:274)
    at Cs (react-dom.production.min.js:5974)
    at ks (react-dom.production.min.js:5958)
    at Os (react-dom.production.min.js:5925)
    at xs (react-dom.production.min.js:5860)
lo @ react-dom.production.min.js:4408
r.callback @ react-dom.production.min.js:4773
no @ react-dom.production.min.js:4271
ro @ react-dom.production.min.js:4257
Wo @ react-dom.production.min.js:4999
Vo @ react-dom.production.min.js:5123
(anonymous) @ react-dom.production.min.js:5975
t.unstable_runWithPriority @ scheduler.production.min.js:274
Cs @ react-dom.production.min.js:5974
ks @ react-dom.production.min.js:5958
Os @ react-dom.production.min.js:5925
xs @ react-dom.production.min.js:5860
Xo @ react-dom.production.min.js:5787
enqueueSetState @ react-dom.production.min.js:2790
w.setState @ react.production.min.js:72
(anonymous) @ Provider.js:53
b @ redux.js:213
(anonymous) @ middleware.js:36
(anonymous) @ middlewares.ts:14
(anonymous) @ index.js:11
dispatch @ redux.js:613
(anonymous) @ actions.ts:40
c @ runtime.js:45
(anonymous) @ runtime.js:264
e.<computed> @ runtime.js:98
n @ asyncToGenerator.js:3
s @ asyncToGenerator.js:25
Promise.then (async)
n @ asyncToGenerator.js:13
s @ asyncToGenerator.js:25
Promise.then (async)
n @ asyncToGenerator.js:13
s @ asyncToGenerator.js:25
Promise.then (async)
n @ asyncToGenerator.js:13
s @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
(anonymous) @ actions.ts:31
(anonymous) @ index.js:8
dispatch @ redux.js:613
(anonymous) @ actions.ts:328
c @ runtime.js:45
(anonymous) @ runtime.js:264
e.<computed> @ runtime.js:98
n @ asyncToGenerator.js:3
s @ asyncToGenerator.js:25
Promise.then (async)
n @ asyncToGenerator.js:13
s @ asyncToGenerator.js:25
Promise.then (async)
n @ asyncToGenerator.js:13
s @ asyncToGenerator.js:25
Promise.then (async)
n @ asyncToGenerator.js:13
s @ asyncToGenerator.js:25
Promise.then (async)
n @ asyncToGenerator.js:13
s @ asyncToGenerator.js:25
Promise.then (async)
n @ asyncToGenerator.js:13
s @ asyncToGenerator.js:25
Promise.then (async)
n @ asyncToGenerator.js:13
s @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
(anonymous) @ actions.ts:279
(anonymous) @ index.js:8
onConnectWallet @ app.tsx:105
n.componentDidMount @ app.tsx:37
Wo @ react-dom.production.min.js:4978
Vo @ react-dom.production.min.js:5123
(anonymous) @ react-dom.production.min.js:5975
t.unstable_runWithPriority @ scheduler.production.min.js:274
Cs @ react-dom.production.min.js:5974
ks @ react-dom.production.min.js:5958
Os @ react-dom.production.min.js:5925
xs @ react-dom.production.min.js:5860
Xo @ react-dom.production.min.js:5787
Fs @ react-dom.production.min.js:6077
Bs @ react-dom.production.min.js:6085
Hs.render @ react-dom.production.min.js:6276
(anonymous) @ react-dom.production.min.js:6360
Rs @ react-dom.production.min.js:6007
zs @ react-dom.production.min.js:6359
render @ react-dom.production.min.js:6390
1147 @ index.tsx:39
l @ marketplace:3
481 @ serviceWorker.js:132
l @ marketplace:3
a @ marketplace:3
e @ marketplace:3
(anonymous) @ main.71ad18a0.chunk.js:1
logdown.min.js:149 0x-launch-kit-frontend::Collectibles::Actions There was a problem fetching the collectibles TypeError: Cannot read property 'price' of undefined
    at t.n._generateMarkersWithPrices (declining_price_graph.tsx:104)
    at t.n.componentDidMount (declining_price_graph.tsx:31)
    at Wo (react-dom.production.min.js:4978)
    at Vo (react-dom.production.min.js:5123)
    at react-dom.production.min.js:5975
    at Object.t.unstable_runWithPriority (scheduler.production.min.js:274)
    at Cs (react-dom.production.min.js:5974)
    at ks (react-dom.production.min.js:5958)
    at Os (react-dom.production.min.js:5925)
    at xs (react-dom.production.min.js:5860)

white screen ?

When MetaMask connection is established, the web page appears as a white screen.
what is the source of the problem

Assign a volume to persist orders on restart

Assign a volume to backend so that orders are persisted across restarts.

Document a production ready database.

Database currently lives inside the container in the working directory as database.sqlite. To make a copy of the database run:

docker cp <container id>:/usr/src/app/database.sqlite .

error when trying to run the wizard from terminal

Traceback (most recent call last):
File "urllib3/connectionpool.py", line 677, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1277, in request
File "http/client.py", line 1323, in _send_request
File "http/client.py", line 1272, in endheaders
File "http/client.py", line 1032, in _send_output
File "http/client.py", line 972, in send
File "docker/transport/unixconn.py", line 43, in connect
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "requests/adapters.py", line 449, in send
File "urllib3/connectionpool.py", line 727, in urlopen
File "urllib3/util/retry.py", line 410, in increment
File "urllib3/packages/six.py", line 734, in reraise
File "urllib3/connectionpool.py", line 677, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1277, in request
File "http/client.py", line 1323, in _send_request
File "http/client.py", line 1272, in endheaders
File "http/client.py", line 1032, in _send_output
File "http/client.py", line 972, in send
File "docker/transport/unixconn.py", line 43, in connect
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "docker/api/client.py", line 214, in _retrieve_server_version
File "docker/api/daemon.py", line 181, in version
File "docker/utils/decorators.py", line 46, in inner
File "docker/api/client.py", line 237, in _get
File "requests/sessions.py", line 543, in get
File "requests/sessions.py", line 530, in request
File "requests/sessions.py", line 643, in send
File "requests/adapters.py", line 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

SSH ,withdrawal fees,adding token

I want to ask if I can run this code in GoDaddy shared hosting ssh and how can I add a fixed withdrawal fees inside and lastly how to add tokens to the Exchange thank you .

Unable to buy / sell

Hi guys,
Similar issue in your erc20 demo, now on my deployment.

I've managed to install it but there's no way I can do any buy / sell orders on market or limit.

image
although I have ETH, WETH, ZRX in my wallet, I've unlocked them, there's no way. I click on buy button but nothing happens:

also in the console I can see loads of errors:
image

Do I have to enable in the firewall these ports or what should I do ?

Also, is there any proper tutorial on how to add my own tokens?

I use ropsten test network

Thank you!

loading issue

after doing everything as i see in you tube when i load the code it says "bash: docker-compose: command not found"
can someone help

Custom Network is not working

Hello, I’m trying to launch exchange on the xDai network. I tried different things but all of them didn’t work.

I changed the network ID to 100 in the build.ts file then built it then : node ./lib/index.js.
On the wizard I choose custom network then inputed the xDAI rpc address.
.....

when I open the frontend, it gives me a blank page. (I changed the network ID of mainnet to random number and it gave the same blank page)

Can you please help me or guide me how to connect it to Custom network like xDai and Binance chain.

Something wrong with your containers

I get "403 Forbidden nginx/1.15.12 error"

nginx_1 | 2019/05/30 02:23:55 [error] 6#6: *7 directory index of "/usr/share/nginx/html/" is forbidden, client: 24.215.98.192, server: localhost, request: "GET / HTTP/1.1", host: "138.197.145.222:3001"

nginx_1 | 24.215.98.192 - - [30/May/2019:02:23:55 +0000] "GET / HTTP/1.1" 403 556 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36" "-"

Describe the Relayer strategy of Launch Kit

Since 0x can have multiple different relayer strategies:

  • Matching
  • Open Orderbook
  • Coordinator

Document clearly the strategy of Launch Kit and what behaviour a developer should expect (i.e negative spread will not be automatically matched and its a profit making opportunity for a keen observer or arb bot).

Prompt for the Fee Asset Data

V2 assumed ZRX was the fee asset data and no prompt was made. In V3 Fee Asset data can be any token and isn't being set in the wizard.

MAKER_FEE_ASSET_DATA and TAKER_FEE_ASSET_DATA should be set in the backend container.

Prompt for the ERC20 contract address and encode as ERC20 asset data for the golden path.

Unable to complete market buy orders not completing

As you can see from the below attached screenshot. The error from console. Market sells work as expected. Limit orders also do not match as expected. The only thing currently working as expected is the market sell for orders.

Screenshot from 2019-07-02 16-31-50

Note: limit orders will stay/show on the exchange however the spread is incorrectly displayed. Please check the second attached image for reference.

Screenshot from 2019-07-02 16-43-48

Using the Kovan Network on Ubuntu 18.04.2

Can't run 0x-launch-kit locally on Windows

I deployed 0x-launch-kit locally on docker in windows OS , after I run this command : npx @0x/launch-kit-wizard && docker-compose up Then When I open http://localhost:3001/ I show nginx result 403 Forbidden, I am also deployed 0x-launch-kit to Digitalocean droplet docker I showed the same error, Other thing when I browse to /usr/share/nginx/html directory inside nginx container I didn't show index.html please can you solve problem ?

Error while running wizard

File "docker\api\client.py", line 214, in _retrieve_server_version
File "docker\api\daemon.py", line 181, in version
File "docker\utils\decorators.py", line 46, in inner
File "docker\api\client.py", line 237, in _get
File "requests\sessions.py", line 543, in get
File "requests\sessions.py", line 530, in request
File "requests\sessions.py", line 643, in send
File "requests\adapters.py", line 439, in send
File "urllib3\connectionpool.py", line 670, in urlopen
File "urllib3\connectionpool.py", line 392, in _make_request
File "http\client.py", line 1255, in request
File "http\client.py", line 1301, in _send_request
File "http\client.py", line 1250, in endheaders
File "http\client.py", line 1010, in _send_output
File "http\client.py", line 950, in send
File "docker\transport\npipeconn.py", line 32, in connect
File "docker\transport\npipesocket.py", line 23, in wrapped
File "docker\transport\npipesocket.py", line 72, in connect
File "docker\transport\npipesocket.py", line 52, in connect
pywintypes.error: (2, 'CreateFile', 'The system cannot find the file specified.')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "docker-compose", line 3, in
File "compose\cli\main.py", line 81, in main
File "compose\cli\main.py", line 200, in perform_command
File "compose\cli\command.py", line 60, in project_from_options
File "compose\cli\command.py", line 152, in get_project
File "compose\cli\docker_client.py", line 41, in get_client
File "compose\cli\docker_client.py", line 170, in docker_client
File "docker\api\client.py", line 197, in init
File "docker\api\client.py", line 221, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: (2, 'CreateFile', 'The system cannot find the file specified.')
[17564] Failed to execute script docker-compose

I also had an error with docker desktop running before this.

Launch Kit does not read environment variable REACT_APP_COLLECTIBLE_ADDRESS

Repro steps:

  1. Set REACT_APP_COLLECTIBLE_ADDRESS to the 721 contract address of your choice in .env (I'm using 0x2f4bdafb22bd92aa7b7552d270376de8edccbc1e for CheezWizards)
  2. yarn start
  3. App does not load your collectibles from this contract address and instead defaults to Axie Infinity (the default)

It doesn't even look like there's code to read in this environment variable??? src/constants.ts does not look at this var name

backend_1 | { code: -32000, message: 'unknown block' }

Hey I am trying to find a resolution to this, also in the future can we have a FAQ/wiki for common problems or error code and fixes.
Thanks
last log
backend_1 | "PERMANENT_CLEANUP_INTERVAL_MS": 10000, backend_1 | "MAX_PER_PAGE": 1000, backend_1 | "DEFAULT_ERC20_TOKEN_PRECISION": 18 backend_1 | } backend_1 | { code: -32000, message: 'unknown block' }

Update instructions

Based on my discussions in Discord I realized that there is a missing step 2. in instructions:

  1. Install Pre-requirements:
    Node.js > v8.x
    Yarn > v1.x
    Docker
    npx

  2. Clone the repo:
    git clone https://github.com/0xProject/0x-launch-kit.git

  3. Run the wizard
    npx @0x/launch-kit-wizard && docker-compose up

Also: Please be prepared to wait up to five (5) minutes to get all the background services properly running before trying to check your http://[host]:3001

Model Documentation

The launch kit notes that the current version of the launch kit is designed with the "open order" relay variety. However, flat fees are not something the typical user is looking for and so a 'matching' system config would be valuable.

While 0x-launch-kit notes that "some elements would need to be changed" there is no documentation on what changes would need to be made and even the 0x docs lack good documentation on how to set up different relayer strategies.

This seems to be a significant gap to adoption. Since the 0x launch kit was clearly designed to make adoption more accessible I figured this was worth addressing in this channel that that 0x Launch Kit team should either have a version supporting matching order types or maintain more robust documentation on that.

Prompt for the Backend URL

When deploying to public infra the user currently has to edit the docker-compose.yml file and replace localhost. If this is known ahead of time (i.e docker machine) then we can prompt for this in the wizard.

Default to http://localhost:3000/v2.

Documentation on Gas Cost/Fees?

The 0x Launch Kit sets up a forwarding contract which converts ETH to wETH and then does the 0x transaction. It seems there are two costs associated with this:

  1. The gas fees of the ETH to wETH transaction.
  2. The protocol fee of the swap (gas fee + protocol fee).
  3. The gas fee of the assets switching wETH to ETH again.
  4. The gas fee of returning the users transaction.

(Perhaps these are bundled in single transactions but, thats still all the fees.)

In the launch kit, we're asked to set a Maker/Taker fee, but it isn't very clear what costs we would expect to cover from those fees.

In the documentation we see that the protocol fee is "tx.gasprice * protocolFeeMultiplier" and that protocolFeeMultiplier is suggested to be roughly equal to 150000. But, it isn't clear what we should expect for the average tx.gasprice - and while that is the protocol fee from the 0x documentation, it doesn't note what we would expect in costs from the forwarder contract.

Any insights here?

Hello how can I change the WETH to my token

Hello how can I make User's only trade my Token(Erc20) i.e Speedkingtoken to Ethererum .
Also they can withdraw Speedkingtoken.
Lastly do I need VPS to run the code because I watched the video ,can I run it via SSH hosting ,thank you .

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.