flow-go icon indicating copy to clipboard operation
flow-go copied to clipboard

[EVM] Using hex-encoded address as event values

Open devbugging opened this issue 9 months ago • 4 comments

EVM events CadenceOwnedAccountCreated FLOWTokensDeposited FLOWTokensWithdrawn contain the EVM address as byte array, this is not great for human-readability and has been suggested we could change to hex-encoded addresses.

The original discussion: https://discord.com/channels/613813861610684416/1239301250630291517

devbugging avatar May 14 '24 17:05 devbugging

@ramtinms @m-Peter Do you see any issues or reservations if we change this?

cc @bjartek @sisyphusSmiling @bluesign

devbugging avatar May 14 '24 17:05 devbugging

I don't anticipate issues from my perspective. Human-readable events are definitely preferred, and the emitted string values can soon be deserialized into EVMAddress objects with #5892. At this stage, are there any consumers that would be impacted by the event change - gateway, wallets, etc.?

sisyphusSmiling avatar May 14 '24 17:05 sisyphusSmiling

Yeah, I like changing it to hex

ramtinms avatar May 14 '24 18:05 ramtinms

Fine by me as well. This is already the case for the EVM.TransactionExecuted event:

access(all)
event TransactionExecuted(
    ...
    // if transaction was a deployment contains a newly deployed contract address
    contractAddress: String,
    ...
)

m-Peter avatar May 15 '24 07:05 m-Peter