-
Notifications
You must be signed in to change notification settings - Fork 405
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
[SDK] Feature: Basic EIP7702 Support #5801
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 4413b3a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
size-limit report 📦
|
from: options.from ? getAddress(options.from) : undefined, | ||
from: | ||
typeof options.from === "string" // Is this just an address? | ||
? checksumAddress(options.from) |
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.
Getaddress is nice because it throws if invalid input, not sure if checksum does that
}): Promise<SignedAuthorization[]> { | ||
const { authorizations, account } = options; | ||
|
||
return Promise.all( |
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.
There's no way to sign multiple authorizations with one signature? Assume this will prompt multiple signatures right
resolvePromisedValue(options.transaction.to), | ||
resolvePromisedValue(options.transaction.accessList), | ||
resolvePromisedValue(options.transaction.value), | ||
resolvePromisedValue(options.transaction.authorizations), |
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.
You don't need this right? Weird to have this and the one below
@@ -112,5 +128,50 @@ export async function toSerializableTransaction( | |||
accessList, | |||
value, | |||
...feeData, | |||
// For some reason authorizationList is not getting properly typed when returned from resolveAndSignAuthorizations? |
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.
Prob because of the comment above
async function resolveAndSignAuthorizations( | ||
options: ToSerializableTransactionOptions, | ||
): Promise<SignedAuthorization[] | undefined> { | ||
if (typeof options.transaction.authorizations === "undefined") { |
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.
Don't you need to resolvePromise this first?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5801 +/- ##
==========================================
+ Coverage 53.20% 53.28% +0.07%
==========================================
Files 1101 1102 +1
Lines 59095 59174 +79
Branches 4816 4837 +21
==========================================
+ Hits 31444 31528 +84
+ Misses 26934 26928 -6
- Partials 717 718 +1
*This pull request uses carry forward flags. Click here to find out more.
|
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.
Beautiful
55bb597
to
d59413e
Compare
Revive |
bd73f03
to
8d493ca
Compare
8d493ca
to
cf3ad5e
Compare
.changeset/clever-beds-knock.md
Outdated
client: TEST_CLIENT, | ||
value: 100n, | ||
to: TEST_WALLET_B, | ||
authorizationList: authorization, |
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.
should be an array right?
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.
Ah yes
cf3ad5e
to
ae8bee2
Compare
* const transaction = prepareTransaction({ | ||
* chain: sepolia, | ||
* client: client, | ||
* authorizations: [ |
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.
authorizationList or authorizations? i think it should be the former right?
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.
Fixed
ae8bee2
to
4413b3a
Compare
PR-Codex overview
This PR introduces beta support for EIP-7702 authorization lists, enhancing transaction capabilities and authorization signing within the
thirdweb
ecosystem.Detailed summary
style
configuration inbiome.json
.sleep
insmart-wallet-integration.test.ts
.Number
inethers5.ts
.thirdweb.ts
andtransaction.ts
.signAuthorization
for EIP-7702 inauthorization.ts
.prepareTransaction
to acceptauthorizationList
.signAuthorization
andprepareTransaction
with authorization.estimate-gas.ts
.serialize-transaction.ts
.wagmiTokenContractConfig
inwagmiToken.ts
.