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

Small refactoring #84

Merged
merged 3 commits into from
Dec 21, 2022
Merged

Small refactoring #84

merged 3 commits into from
Dec 21, 2022

Conversation

juniset
Copy link
Member

@juniset juniset commented Dec 14, 2022

This PR:

  • simplifies the execution of the multicall (uses CallArray instead of Call)
  • improves the recursion logic
  • for each call add the length of the returned data in the response
  • updates the IACCOUNT_ID to the latest version (closes update ERC165_ACCOUNT_INTERFACE_ID #75 )

Copy link
Contributor

@gaetbout gaetbout left a comment

Choose a reason for hiding this comment

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

LGTM

if (calls[0].selector == USE_PLUGIN_SELECTOR) {
let (response_len) = execute_calls(call_array_len - 1, calls + Call.SIZE, response, 0);
if (call_array[0].selector == USE_PLUGIN_SELECTOR) {
let (response_len, response) = execute_multicall(call_array_len - 1, call_array + CallArray.SIZE, calldata);
return (retdata_len=response_len, retdata=response);
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the if part is a returning statement you don't need to put an else

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but I believe both will compile to the exact same bytecode so if ok I'll leave it like that.

@juniset juniset merged commit b7c4af7 into develop Dec 21, 2022
@delaaxe delaaxe deleted the feature/small_refactoring branch January 24, 2023 08:41
sgc-code pushed a commit that referenced this pull request Aug 18, 2023
…ount-interface

Add TODO regarding account interface
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.

update ERC165_ACCOUNT_INTERFACE_ID
2 participants