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

Support named parameters in abi.encodeCall #14979

Open
Amxx opened this issue Apr 3, 2024 · 1 comment
Open

Support named parameters in abi.encodeCall #14979

Amxx opened this issue Apr 3, 2024 · 1 comment
Labels

Comments

@Amxx
Copy link

Amxx commented Apr 3, 2024

Abstract

Add support for the following syntax:

abi.encodeCall(fnPointer, { arg1: 1, arg2: 2 });

Motivation

It is currently possible to call a function, or throw a custom error, using this syntax:

target.fn({ arg1: 1, arg2: 2 });
revert E({ arg1: 1, arg2: 2 });

it would be nice to have the same syntax supported for abi.encodeCall

Specification

The compiler already know how to encode the call when doing target.fn({ arg1: 1, arg2: 2 });. The idea is to reuse the same argument encoding logic, and return the encoded data without performing the call

Backwards Compatibility

No issue.

@Amxx Amxx added the feature label Apr 3, 2024
Copy link

github-actions bot commented Jul 3, 2024

This issue has been marked as stale due to inactivity for the last 90 days.
It will be automatically closed in 7 days.

@github-actions github-actions bot added the stale The issue/PR was marked as stale because it has been open for too long. label Jul 3, 2024
@ekpyron ekpyron removed the stale The issue/PR was marked as stale because it has been open for too long. label Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants