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

Add overriding name to method spec so it comes through in contract json #550

Merged
merged 9 commits into from
Oct 7, 2022

Conversation

barnjamin
Copy link
Contributor

@barnjamin barnjamin commented Oct 5, 2022

Sometimes we want to have the same named method with different arguments, this should be present in the contract spec not just the handler method signature.

Its already the case that the method signature will get its name overridden but if we don't pass through the overriding name to the contract.json output, calls to the contract will fail with an invalid signature since they don't match.

Copy link
Contributor

@ahangsu ahangsu left a comment

Choose a reason for hiding this comment

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

Looks good, I was wondering another set of API level problem:
We should provide overriding_name as an (optional) arg in constructing an ABIReturnSubroutine, rather than using overriding_name as an arg in method_spec and method_signature.

ahangsu and others added 3 commits October 5, 2022 13:00
…ng (#551)

* Typo Fix for `abi.Uint64TypeSpec` (#549)

* minor suggestion on ABIReturnSubroutine API change
Copy link
Contributor

@ahangsu ahangsu left a comment

Choose a reason for hiding this comment

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

Looks good to me, would be good if you add warning or comments in method_selector in ABIReturnSubroutine about the future API change.

* abi overridden name subr doc testcase

* minor typo fix

Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>

Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>
Copy link
Contributor

@michaeldiamant michaeldiamant left a comment

Choose a reason for hiding this comment

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

@barnjamin Thanks for addressing the inconsistent name override behavior. ☕

@michaeldiamant
Copy link
Contributor

@barnjamin Sorry - Post-approval note: Appreciate a CHANGELOG update prior to merging.

@barnjamin barnjamin merged commit 33a4e5e into master Oct 7, 2022
@barnjamin barnjamin deleted the override-name branch October 7, 2022 18:31
@ahangsu ahangsu mentioned this pull request Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants