SNIPs
SNIPs copied to clipboard
SNIP13: index ERC20 event fields
Events in Starknet consist of two felt arrays, keys and data, the former is analogous to topics on Ethereum. Similarly to Ethereum, Starknet’s json-rpc allows you to filter over event keys via the starknet_getEvents method.
In this SNIP we suggest updating StarkGate's ERC20s (including ETH, STRK, USDC and others) to index more fields the Transfer and Approval events in order to allow filtration over the sender or receiver.
Should be changed "to index more fields in the..."
making ERC20 Transfer and Approval events index these fields should be part of SNIP-2 instead of creating a new snip targeted at StarkGate tokens no?
in fact, this PR fixes this in the ERC20 standard (among other things) https://github.com/starknet-io/SNIPs/pull/83
Need to further investigate this change on fees and disk usage of full nodes.
@ArielElp it's ok to have it discussed in a separate snip explicitly but you should align the actual change of adding the missing events to StarkGate ERC20 tokens with this PR https://github.com/starknet-io/SNIPs/pull/83
Effectively all snip-2 (erc-20) compatible token contracts should emit these events