hashgraph / hethers.js

DEPRECATED Complete EVM library in JavaScript/TypeScript for Hedera Hashgraph Smart Contract Service
https://docs.hedera.com/hethers
MIT License
16 stars 7 forks source link

ChainIDs don't match IDs specified in HIP-26 #249

Closed gregscullard closed 2 years ago

gregscullard commented 2 years ago

Describe the bug

WIth hethers.js, querying the chainId with signer.getChainId() returns different values to those specified in HIP-26 (https://hips.hedera.com/hip/hip-26)

According to the HIP, the CHAINID opcode will return 295 (hex 0x0127) for mainnet, 296 ( hex 0x0128) for testnet, and 297 (hex 0x0129) for previewnet.

hethers.js returns 290, 291 and 292

Reproduction steps

const signer = await walletEoaAddress.connect(provider);
  const chainId = await signer.getChainId();