-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: custom paymaster handler on sendTransaction (#221)
* feat: add custom paymaster handler to send transaction and write contract methods * changeset * update custom paymaster handling * fix typing * fix tests * changeset * custom paymaster handler on sendTransaction (#218) * feat: add optional query client to agwProvider (#203) * add optional query client to agwProvider * add optional query client to abstractPrivyProvider * changeset * make field required but default value --------- Co-authored-by: Coffee☕️ <[email protected]> * Version Packages (#215) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix merge * update tests --------- Co-authored-by: Utkir S. <[email protected]> Co-authored-by: Hung Doan <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
6ed7630
commit 0178623
Showing
18 changed files
with
141 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@abstract-foundation/agw-client': minor | ||
'@abstract-foundation/agw-react': minor | ||
'@abstract-foundation/web3-react-agw': minor | ||
--- | ||
|
||
Update sendTransaction flows to use custom paymaster handler if passed in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@abstract-foundation/agw-client': minor | ||
--- | ||
|
||
Add paymaster handler functions for sending transactions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { type Address, type Hex } from 'viem'; | ||
|
||
export interface CustomPaymasterParameters { | ||
from: Address; | ||
chainId: number; | ||
nonce?: number | undefined; | ||
to?: Address | undefined; | ||
gas?: bigint | undefined; | ||
gasPrice?: bigint | undefined; | ||
gasPerPubdata?: bigint | undefined; | ||
value?: bigint | undefined; | ||
data?: Hex | undefined; | ||
maxFeePerGas?: bigint | undefined; | ||
maxPriorityFeePerGas?: bigint | undefined; | ||
} | ||
|
||
export interface PaymasterArgs { | ||
paymaster: Address; | ||
paymasterInput: Hex; | ||
} | ||
|
||
export type CustomPaymasterHandler = ( | ||
args: CustomPaymasterParameters, | ||
) => Promise<PaymasterArgs>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.