Comments (2)
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.
It looks like the attestation app assumes the payment amount is a number:
- https://github.com/statechannels/the-graph/blob/452086264de10b8263926d0dd85eb1a5f5a20654/packages/statechannels-contracts/src/utils/app-data.ts#L68
- https://github.com/statechannels/the-graph/blob/452086264de10b8263926d0dd85eb1a5f5a20654/packages/statechannels-contracts/src/utils/app-data.ts#L86
- https://github.com/statechannels/the-graph/blob/452086264de10b8263926d0dd85eb1a5f5a20654/packages/statechannels-contracts/src/utils/app-data.ts#L137
whereas it should really be a uint256
/ BigNumber(ish)
.
from indexer.
Related Issues (20)
- Make call cache a config option for Indexers with locally hosted RPC nodes HOT 1
- Network Subgraph's latest indexed block () is higher than Network's latest block () HOT 1
- Fixup current release HOT 3
- Add support for Fuse subgraphs HOT 1
- Figure out Issue regarding sequelize
- Indexer-cli: Make --network argument optional if only operating on single network HOT 1
- RAV processing still executing even if user doesn't configure TAP
- use `@whatwg-node/fetch` and remove all other clients
- Migrate from `urql` to `graphql-yoga`
- Use GraphQL codegen server preset
- Migrate CLI to OClif
- Refactor CLI API calls
- Stricter linting rules to disallow `any`
- Setup commitlint
- Feat: New indexer management API for querying unclaimed query fees
- indexer-agent: Error Tx reverted "Failed to redeem RAV", but actually didn't fail HOT 1
- Bug: Seg fault starting Node processes HOT 1
- Cannot open allocate on broken subgraph
- Expose GraphiQL interface for /status endpoint
- Null value resolved for non-null field `paused` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from indexer.