Open Inphi opened 1 year ago
Quick question, what is the best way to parse this type of transaction in Block API?
The receipt of such transactions contain DelegateChanged events. There's already logic in roseta-geth-sdk to parse ERC20 transfer events. Parsing delegate calls would be similar.
Is your feature request related to a problem? Please describe. Support ERC20Votes delegation as a built-in operation type.
Describe the solution you'd like The interface can be similar to
ERC20_TRANSFER
operations. When a user queries the/construction/preprocess
endpoint for token delegation, they'll need to provide operations with the following schema:ERC20VOTERS_DELEGATE
, is introduced to describe the intent of an ERC20Votes delegate call.ERC20VOTES_DELEGATE
.contractAddress
in its metadata. ThecontractAddress
should point to an ERC20Votes compatible token.Once the metadata is created, it can be forwarded through the usual flow to construct, sign and submit the tx.
Describe alternatives you've considered
Additional context The outlined schema is based off of the design used in optimism-rosetta.