Git Product home page Git Product logo

Comments (2)

Jannis avatar Jannis commented on August 29, 2024

I suspect that, somewhere, the amount is turned into a number and not a string, because BigNumber.from("100000000000000000") works fine:

> BigNumber.from('100000000000000000')
BigNumber { _hex: '0x016345785d8a0000', _isBigNumber: true }

whereas BigNumber.from(100000000000000000) fails:

> BigNumber.from(100000000000000000)
/Users/jannis/work/graphprotocol/gateway/node_modules/@ethersproject/logger/lib/index.js:188
        throw this.makeError(message, code, params);
        ^

Uncaught:
Error: overflow (fault="overflow", operation="BigNumber.from", value=100000000000000000, code=NUMERIC_FAULT, version=bignumber/5.0.7)
    at Logger.makeError (/Users/jannis/work/graphprotocol/gateway/node_modules/@ethersproject/logger/src.ts/index.ts:205:28)
    at Logger.throwError (/Users/jannis/work/graphprotocol/gateway/node_modules/@ethersproject/logger/src.ts/index.ts:217:20)
    at throwFault (/Users/jannis/work/graphprotocol/gateway/node_modules/@ethersproject/bignumber/src.ts/bignumber.ts:335:19)
    at Function.BigNumber.from (/Users/jannis/work/graphprotocol/gateway/node_modules/@ethersproject/bignumber/src.ts/bignumber.ts:226:17)
    at /Users/jannis/work/graphprotocol/gateway/[eval].ts:1:20
    at Script.runInThisContext (vm.js:120:20)
    at exec (/usr/local/lib/node_modules/ts-node/src/bin.ts:324:17)
    at /usr/local/lib/node_modules/ts-node/src/bin.ts:314:27
    at Array.reduce (<anonymous>)
    at _eval (/usr/local/lib/node_modules/ts-node/src/bin.ts:313:18) {
  reason: 'overflow',
  code: 'NUMERIC_FAULT',
  fault: 'overflow',
  operation: 'BigNumber.from',
  value: 100000000000000000
}

from indexer.

Jannis avatar Jannis commented on August 29, 2024

It looks like the attestation app assumes the payment amount is a number:

whereas it should really be a uint256 / BigNumber(ish).

from indexer.

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.