Giter Site home page Giter Site logo

Comments (12)

justinkchen avatar justinkchen commented on May 24, 2024 2

The wiki should be updated to reflect this btw (also the fact that config is required for the ZeroEx constructor in newer versions)

from 0x-monorepo.

fabioberger avatar fabioberger commented on May 24, 2024 1

Thanks for the heads up @justinkchen! Going to update the wiki today!

from 0x-monorepo.

fabioberger avatar fabioberger commented on May 24, 2024

Hi Justin, in what context are you trying to get the EtherToken address?

Re: wiki, what part of the wiki is currently out of date?

from 0x-monorepo.

justinkchen avatar justinkchen commented on May 24, 2024

Hi @fabioberger , the wiki (https://0xproject.com/wiki) shows to get the WETH_ADDRESS via this call: const WETH_ADDRESS = await zeroEx.etherToken.getContractAddressAsync();, and the EXCHANGE_ADDRESS via: const EXCHANGE_ADDRESS = await zeroEx.exchange.getContractAddressAsync();.

Looking through the latest version (0.30.1) of 0x.js, the EXCHANGE_ADDRESS has changed to zeroEx.exchange.getContractAddress(), but the etherToken method has been removed.

Also, the wiki says to instantiate ZeroEx like this:

// Instantiate 0x.js instance
const zeroEx = new ZeroEx(provider);

but the ZeroEx constructor has a required config parameter in latest versions too now

from 0x-monorepo.

justinkchen avatar justinkchen commented on May 24, 2024

P.S. I know that the docs are up to date here: https://0xproject.com/docs/0xjs, but just saying that the wiki is no longer compatible with the docs

from 0x-monorepo.

justinkchen avatar justinkchen commented on May 24, 2024

thanks! :)

from 0x-monorepo.

justinkchen avatar justinkchen commented on May 24, 2024

@fabioberger whenever I try to do any kind of methods on the ethertoken contract, I keep getting InvalidNumberOfSolidityArgs as an error. Is there something wrong with the smart contract that is deployed?

from 0x-monorepo.

justinkchen avatar justinkchen commented on May 24, 2024

I think the issue is coming from the BigNumber not being treated as a single variable but instead being an array. Any ideas as to why? Is it a poor installation or something?

from 0x-monorepo.

justinkchen avatar justinkchen commented on May 24, 2024

screen shot 2018-01-30 at 2 05 47 am

as you can see in my dev console, the argument that is supposed to be the `amountInBaseUnits` is being passed as an object instead of a BigNumber

from 0x-monorepo.

justinkchen avatar justinkchen commented on May 24, 2024

here is the actual method call await zeroEx.token.setAllowanceAsync( tokenContractAddress, account, zeroExProxyContractAddress, new BigNumber(0), ); and this is on 0.30.1 version of 0x.js

from 0x-monorepo.

justinkchen avatar justinkchen commented on May 24, 2024

I found the issue. It happens when trying to use the method while statically serving the files (whether through serve -s build or express.static) still can't find the solution though...

from 0x-monorepo.

fabioberger avatar fabioberger commented on May 24, 2024

@justinkchen can you try with BigNumber.js version ~4.1.0? Also, let's continue this conversation at chat.0xproject.com #dev channel.

from 0x-monorepo.

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.