subsquid / squid-sdk

The main repo of the squid SDK
Apache License 2.0
1.23k stars 151 forks source link

make evmLog contract address case insensitive #72

Closed belopash closed 2 years ago

belopash commented 2 years ago

@eldargab should we do the same with contract addresses for .addContractsContractEmittedHandler() and addContractsContractEmitted()?

eldargab commented 2 years ago

should we do the same with contract addresses for .addContractsContractEmittedHandler() and addContractsContractEmitted()?

You mean.toLowerCase()? Seems like we should.

eldargab commented 2 years ago

Hey, @RaekwonIII and @dzhelezov !

For batch processing the above normalisation will not help, because an explicit dispatch on a contract address will be often required.

if (item.event.args.contract == '0xaA...') {
else {
}

Docs should clearly advise to work only with decoded raw addresses in a lower cased hex form.