-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
WIP: implement EIP-5806 (type 4) delegate transaction #4638
base: main
Are you sure you want to change the base?
Conversation
This is similar to eip-2803? I’d love to see something like this championed. :) |
EIP-5806 is being actively developed. There are talks of a possible testnet, and inclusion in Prague. We are still far from it, and it may not happen at all, but this PR is part of the "feasibility evaluation" |
const fragment = getFragment(...args); | ||
// If an overrides was passed in, copy it and normalize the values | ||
if (fragment.inputs.length + 1 === args.length) { | ||
Object.assign(args[args.length - 1], { type: 4 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current implementation "leaks" types: 4
into the args[args.length - 1] ... that may be reused elsewhere.
Object.assign(args[args.length - 1], { type: 4 }); | |
args[args.length - 1] = Object.assign({}, args[args.length - 1], { type: 4 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we need to copy the args array first ?
This is a work-in-progress implementation of EIP-5806 (type 4) delegate transactions.
For references:
TODO: