Skip to content

feat: add EIP1559 tx type support #827

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

Merged
merged 9 commits into from
Aug 5, 2025
Merged

feat: add EIP1559 tx type support #827

merged 9 commits into from
Aug 5, 2025

Conversation

Ansonhkg
Copy link
Collaborator

WHAT

add EIP 1559 support

  • If gasPrice, maxFeePerGas, and maxPriorityFeePerGas are all undefined -> fetch fee data
  • If EIP-1559 supported, then populate maxFeePerGas, maxPriorityFeePerGas, and set type = 2
  • if not supported, then fall back to getPrice
  • always use manual values if set

@FedericoAmura FedericoAmura requested a review from Copilot July 17, 2025 14:53
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Add EIP-1559 transaction type support to PKPEthersWallet, enabling both manual and automatic fee settings based on network support.

  • Introduce EIP1559_TX_TYPE constant and setters for manual EIP-1559 fee fields
  • Extend signTransaction logic to fetch and apply fee data or fallback to legacy gasPrice
  • Update Rust toolchain version and adjust .gitignore for Cargo.lock

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/wasm/rust/rust-toolchain.toml Specify Rust toolchain channel 1.83 with WebAssembly target
packages/wasm/rust/.gitignore Remove Cargo.lock from ignore to include it in the repo
packages/pkp-ethers/src/lib/pkp-ethers.ts Add EIP-1559 support: constant, setters, reset logic, and feeData handling in signTransaction
Comments suppressed due to low confidence (2)

packages/pkp-ethers/src/lib/pkp-ethers.ts:162

  • [nitpick] Add unit tests for setMaxFeePerGas and setMaxPriorityFeePerGas to ensure manual EIP-1559 settings are applied correctly.
  setMaxFeePerGas = (maxFeePerGas: string): void => {

packages/wasm/rust/.gitignore:3

  • [nitpick] Verify that re-including Cargo.lock in the repo aligns with project conventions; libraries typically ignore it, while applications commit it.
bin/

glitch003 and others added 5 commits July 18, 2025 21:18
…eat/eip-1559

23.81.180.7 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCVcVPlYm+nxd2l+v2d3r3op8nUz+inhOGj7bmJf6iW9EzHg5hcmaDVBhTaShIa4Exotq1TOBZsRBE2WcpoBvbEJam2Gp6SShe2P6Upe1oWbiW124jfRaHHc+Tm+eTN039ofBrFjCgWWIYPxP+BzvQ3FSbB4u6DDgZs0IHy7KOjjnoc9bCJNIxLNjdzwmCRfGfuPcPi8v3J9dWj+anTWvRnrVRNrJXE669Mo0QA0xz45JdBjJ8wjMonZSBf4dsLDNCrWIjUmOxpvpziBbo7KStEuGkuxv71NFVGxnGGvSHvyJx3CICrwrtF/SmYmG2jpuepDiIyyNVzqMQ7rdgenloMifYbHUf67H/AhV6m8Xx4UtpqTo3MDiZhGp/xNshX6LE7GY0B2mLsQWvKe6xBO4+9Iha1cH3X9gcRs1FkAJTJjRWzDFly44D5FeHcrNTz/cKOOQRzlXNvbyzRwMHKz7U/Z8XcVW7LgJVVXxGZ8rW7T7n0cL/Ds7GMjXMogUJjdFk=
@glitch003
Copy link
Collaborator

works great in my local tests with walletconnect + PKPEthers

@glitch003 glitch003 merged commit 1adee31 into master Aug 5, 2025
4 of 5 checks passed
@glitch003 glitch003 deleted the feat/eip-1559 branch August 5, 2025 22:23
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.

2 participants