Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Add contractClass interpretation to address values #6130

Merged
merged 4 commits into from
Jun 29, 2023
Merged

Conversation

haltman-at
Copy link
Contributor

PR description

Addresses #5913. Adds a contractClass interpretation to address values. Basically, if we can identify what sort of contract a given address is, it will have this interpretation with more information; otherwise it won't.

Yes, this means that the address/contract distinction is now pretty silly -- they now contain the same information but formatted differently. Oh well. I don't want to make a breaking change to make them more unified.

The code is pretty straightforward, not much to explain. I could have further eliminated some minor recomputation by just using decodeContract and then doing everything based on the results of that, but I decided it was clearer to do it this way, even if that means calling Evm.Utils.toAddress twice. :P

I also updated the inspector so that it now basically just treats addresses like contracts. Could have distinguished them some but that would have been more work.

I did not update codec-components. I figure I can worry about that later; there are likely multiple changes I want to make to address and contracts there.

Testing instructions

I added a debugger test for it, I figured that should be enough.

Copy link
Contributor

@cliffoo cliffoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! Although maybe someone else should take a look also...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants