Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIP-1898 not support. For the graph node required. #12

Open
ronit9586 opened this issue Jul 28, 2022 · 0 comments
Open

EIP-1898 not support. For the graph node required. #12

ronit9586 opened this issue Jul 28, 2022 · 0 comments

Comments

@ronit9586
Copy link

i want to know gatchain evm support EIP-1898 ?
i want to fetch data from gatechain smart contract in subgraph but it is getting faild.

This is the function in subgraph:

export function fetchTokenSymbol(tokenAddress: Address): string {
  // hard coded override
  if (tokenAddress.toHexString() == ETH_ADDRESS) {
    return 'ETH'
  }
  if (tokenAddress.toHexString() == '0xe0b7927c4af23765cb51314a0e0521a9645f0e2a') {
    return 'DGD'
  }

  let contract = ERC20.bind(tokenAddress)
  let contractSymbolBytes = ERC20SymbolBytes.bind(tokenAddress)
   
  // try types string and bytes32 for symbol
  let symbolValue = 'unknown'
  let symbolResult = contract.try_symbol()
  if (symbolResult.reverted) {
    let symbolResultBytes = contractSymbolBytes.try_symbol()
    if (!symbolResultBytes.reverted) {
      // for broken pairs that have no symbol function exposed
      if (!isNullEthValue(`0x${symbolResultBytes.value.toHexString()}`)) {
        symbolValue = symbolResultBytes.value.toString()
      }
    }
  } else {
    symbolValue = symbolResult.value
  }

  return symbolValue
}

Continuously getting this Error on the graph node :

one }))), block_hash: 0xdc84e222308f0c3c0e96c5b96d769de105a9598d8066b5b45a125f73c85b6315, block_number: 2378311, sgd: 1, subgraph_id: QmSG5uSRty91BdhLr2bL7eGvw3LrQ48XfH4jqySTBRwknm, component: SubgraphInstanceManager
graph-node_1 | Jul 28 10:31:21.299 INFO Done processing trigger, gas_used: 0, data_source: Factory, handler: handleNewPair, total_ms: 3525, transaction: 0xa7ab…d918, address: 0xb4bc…c854, signature: Deployed(indexed address,indexed address,indexed address), block_hash: 0xdc84e222308f0c3c0e96c5b96d769de105a9598d8066b5b45a125f73c85b6315, block_number: 2378311, sgd: 1, subgraph_id: QmSG5uSRty91BdhLr2bL7eGvw3LrQ48XfH4jqySTBRwknm, component: SubgraphInstanceManager
graph-node_1 | Jul 28 10:31:21.300 INFO Possible reorg detected, retrying, error: failed to process trigger: block #2378311 (0xdc84…6315), transaction a7ab894749a2eafac1e8939caa6782794c4c5433b7ad1f7354213f3ae7a4d918: Ethereum node returned an error when calling function "symbol" of contract "ERC20": RPC error: Error { code: InvalidParams, message: "invalid argument 1: hex string without 0x prefix", data: None }

This issue is reported here in the graph node github : graphprotocol/graph-node#2319

this is the answer please some one help me out how can i found such gatechain RPC node which support EIP-1898.

Please someone help me out in this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant