Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cast): Implemented cast index (seth feature parity #29) #676

Merged
merged 2 commits into from
Feb 5, 2022
Merged

feat(cast): Implemented cast index (seth feature parity #29) #676

merged 2 commits into from
Feb 5, 2022

Conversation

psushi
Copy link
Contributor

@psushi psushi commented Feb 5, 2022

Motivation

Implemented cast index

Solution

Right now it has the same scope and behaviour as seth index. If there can be a better syntax please do comment.
Note:

  • The from_type and to_type is technically not required as cast abi-encode ignores the function signature.
  • But cast abi-encode requires that the signature matches the input parameters while seth abi-encode doesn't.
  • seth abi-encode "x(address,address)" 42 42 will work but cast abi-encode "x(address,address)" 42 42 won't. Just some observations.

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm!
smol nit

cast/src/lib.rs Outdated Show resolved Hide resolved
cli/src/cast.rs Outdated Show resolved Hide resolved
@psushi
Copy link
Contributor Author

psushi commented Feb 5, 2022

Thanks @mattsse! I have made the changes 👍🏽

@psushi
Copy link
Contributor Author

psushi commented Feb 5, 2022

@mattsse, one test is failing, is it from my PR?, seems to be from somewhere else, what can I do?

@mattsse
Copy link
Member

mattsse commented Feb 5, 2022

@mattsse, one test is failing, is it from my PR?, seems to be from somewhere else, what can I do?

unrelated rpc error,

lgtm!

@mattsse mattsse merged commit 4e89a5a into foundry-rs:master Feb 5, 2022
@mds1 mds1 mentioned this pull request Feb 5, 2022
@onbjerg onbjerg added the T-feature Type: feature label Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-feature Type: feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants