Handle BigNumber event params and customize Decimal (#63)

* Handle BigNumber event params in watchers

* Customize decimal according to limits of IEEE-754 decimal128

* Add definition for custom scalar BigDecimal
This commit is contained in:
prathamesh0
2021-12-28 16:08:05 +05:30
committed by nabarun
parent 238ad21189
commit 94e9182dd3
19 changed files with 232 additions and 56 deletions
@@ -591,7 +591,7 @@ export class Indexer implements IndexerInterface {
eventInfo = {
{{#each event.params}}
{{#if (compare this.type 'bigint')}}
{{this.name}}: BigInt(ethers.BigNumber.from({{this.name}}).toString())
{{this.name}}: BigInt({{this.name}}.toString())
{{~else}}
{{this.name}}
{{~/if}}