Giter VIP home page Giter VIP logo

Comments (3)

fabioberger avatar fabioberger commented on August 19, 2024

@brennanerbz

In order to use ganache, you would need to manually run the 0x smart contract migrations (yarn migrate) locally after starting the Ganache TestRPC daemon.

If you want to use Ropsten with Infura, you need to pass in the 0x smart contract addresses deployed on Ropsten at 0x.js instantiation:

const provider = new Web3.providers.HttpProvider('https://ropsten.infura.io/');

// Instantiate 0x.js instance
const configs = {
    networkId: TESTRPC_NETWORK_ID,
    exchangeContractAddress: '0x479cc461fecd078f766ecc58533d6f69580cf3ac',
    tokenRegistryContractAddress: '0x6b1a50f0bb5a7995444bd3877b22dc89c62843ed',
    tokenTransferProxyContractAddress: '0x4e9aad8184de8833365fea970cd9149372fdf1e6',
    zrxContractAddress: '0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d',
};
const zeroEx = new ZeroEx(provider, configs);

The deployed 0x smart contract address for each network can be found here.

from 0x-starter-project.

quantumproducer avatar quantumproducer commented on August 19, 2024

yarn migrate did not work for me.

Error: TOKEN_CONTRACT_DOES_NOT_EXIST
    at TokenWrapper.<anonymous> (/Users/quantum/code/0x-starter-project/node_modules/0x.js/lib/src/contract_wrappers/contract_wrapper.js:136:35)
    at step (/Users/quantum/code/0x-starter-project/node_modules/0x.js/lib/src/contract_wrappers/contract_wrapper.js:32:23)
    at Object.next (/Users/quantum/code/0x-starter-project/node_modules/0x.js/lib/src/contract_wrappers/contract_wrapper.js:13:53)
    at fulfilled (/Users/quantum/code/0x-starter-project/node_modules/0x.js/lib/src/contract_wrappers/contract_wrapper.js:4:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
✨  Done in 3.45s.
~/code/0x-starter-project/git remote -v
origin	[email protected]:0xProject/0x-starter-project.git (fetch)
origin	[email protected]:0xProject/0x-starter-project.git (push)
~/code/0x-starter-project/yarn migrate
yarn run v1.6.0
error Command "migrate" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

from 0x-starter-project.

dekz avatar dekz commented on August 19, 2024

This now works with the Ganache snapshot, Ropsten and Kovan. Let me know if you have any further issues.

from 0x-starter-project.

Related Issues (20)

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.