diff --git a/package.json b/package.json index f4964299..af43bc31 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build": "graph build", "create-local": "graph create ianlapham/uniswap-v3 --node http://127.0.0.1:8020", "deploy-local": "graph deploy ianlapham/uniswap-v3 --debug --ipfs http://localhost:5001 --node http://127.0.0.1:8020", - "deploy": "graph deploy ianlapham/optimism-post-regenesis --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ --debug", + "deploy": "graph deploy ianlapham/uniswap-optmism-regen --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ --debug", "deploy-dev": "graph deploy sommelier/uniswap-v3 --ipfs http://35.197.14.14:5000/ --node http://35.197.14.14:8020/ --debug", "deploy-staging": "graph deploy $THE_GRAPH_GITHUB_USER/$THE_GRAPH_SUBGRAPH_NAME /Uniswap --ipfs https://api.staging.thegraph.com/ipfs/ --node https://api.staging.thegraph.com/deploy/", "watch-local": "graph deploy ianlapham/uniswap-v3 --watch --debug --node http://127.0.0.1:8020/ --ipfs http://localhost:5001" diff --git a/src/mappings/factory.ts b/src/mappings/factory.ts index 0f41d5cc..1492cc22 100644 --- a/src/mappings/factory.ts +++ b/src/mappings/factory.ts @@ -15,6 +15,18 @@ export function handlePoolCreated(event: PoolCreated): void { return } + // fix for pool overflow - this pool has a token that overflows on one of its values, but theres no way in + // assembly ts to error catch for this. + // Transaction - https://optimistic.etherscan.io/tx/0x16312a52237ce08e4bb7534648f4c8da6cd4c192f0b955cf6770b2d347f19d2b + if ( + event.params.pool === Address.fromHexString('0x282b7d6bef6c78927f394330dca297eca2bd18cd') + || event.params.pool === Address.fromHexString('0x5738de8d0b864d5ef5d65b9e05b421b71f2c2eb4') + || event.params.pool === Address.fromHexString('0x5500721e5a063f0396c5e025a640e8491eb89aac') + || event.params.pool === Address.fromHexString('0x1ffd370f9d01f75de2cc701956886acec9749e80') + ) { + return + } + // load factory let factory = Factory.load(FACTORY_ADDRESS) if (factory === null) { diff --git a/src/utils/token.ts b/src/utils/token.ts index 2ede089a..0cf71671 100644 --- a/src/utils/token.ts +++ b/src/utils/token.ts @@ -3,7 +3,7 @@ import { ERC20 } from '../types/Factory/ERC20' import { ERC20SymbolBytes } from '../types/Factory/ERC20SymbolBytes' import { ERC20NameBytes } from '../types/Factory/ERC20NameBytes' import { StaticTokenDefinition } from './staticTokenDefinition' -import { BigInt, Address } from '@graphprotocol/graph-ts' +import { BigInt, Address, ByteArray } from '@graphprotocol/graph-ts' import { isNullEthValue } from '.' export function fetchTokenSymbol(tokenAddress: Address): string { @@ -88,6 +88,7 @@ export function fetchTokenDecimals(tokenAddress: Address): BigInt { } let decimalResult = contract.try_decimals() + if (!decimalResult.reverted) { decimalValue = decimalResult.value } diff --git a/subgraph.yaml b/subgraph.yaml index 72f6191d..23b204e4 100644 --- a/subgraph.yaml +++ b/subgraph.yaml @@ -1,8 +1,8 @@ specVersion: 0.0.2 description: Uniswap is a decentralized protocol for automated token exchange on Ethereum. graft: - base: Qmf9i13TJknQwcamcLbb75hEhbf3nqDi321XWhtFBj3P5s - block: 10028767 + base: QmSeJkpvWGcm9XceLc7qV9kKbc2pmo4xyfcfEd8GLgpVDw + block: 108380046 repository: https://github.com/Uniswap/uniswap-v3-subgraph schema: file: ./schema.graphql diff --git a/yarn.lock b/yarn.lock index 980c5bc5..b89db381 100644 --- a/yarn.lock +++ b/yarn.lock @@ -314,9 +314,9 @@ asn1@~0.2.3: dependencies: safer-buffer "~2.1.0" -"assemblyscript@git+https://github.com/AssemblyScript/assemblyscript.git#36040d5b5312f19a025782b5e36663823494c2f3": +"assemblyscript@https://github.com/AssemblyScript/assemblyscript#36040d5b5312f19a025782b5e36663823494c2f3": version "0.6.0" - resolved "git+https://github.com/AssemblyScript/assemblyscript.git#36040d5b5312f19a025782b5e36663823494c2f3" + resolved "https://github.com/AssemblyScript/assemblyscript#36040d5b5312f19a025782b5e36663823494c2f3" dependencies: "@protobufjs/utf8" "^1.1.0" binaryen "77.0.0-nightly.20190407"