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

Feature/celo cip 64 support #3

Closed
wants to merge 18 commits into from
Closed

Conversation

yerdua
Copy link

@yerdua yerdua commented Oct 2, 2023

No description provided.

@aaronmgdr
Copy link
Member

apart from the ordering comments looking good

Comment on lines 29 to 34
if ('maxFeePerGas' in tx && 'maxPriorityFeePerGas' in tx) {
// process as CIP42 if any of these fields are present. realistically gatewayfee is not used but is part of spec
if (
'gatewayFee' in tx ||
'gatewayFeeRecipient' in tx ||
('feeCurrency' in tx && tx.type && tx.type === 'cip42')

Choose a reason for hiding this comment

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

I wouldn't remove isCIP42, I'd have a isCIP64 method to hide implementation details here

if (isCIP4(tx)) {
  return serializeTransactionCIP64(
    tx as TransactionSerializableCIP64,
    signature,
  )
}
if (isCIP42(tx)) {
  ...
}

@yerdua yerdua force-pushed the feature/celo-cip-64-support branch from 5230db1 to fe47e3d Compare October 16, 2023 15:46
@github-actions
Copy link

github-actions bot commented Oct 18, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
viem (esm) 58.13 KB (0%) 1.2 s (0%) 2.6 s (+17.08% 🔺) 3.8 s
viem (cjs) 76.9 KB (0%) 1.6 s (0%) 3.1 s (-11.48% 🔽) 4.6 s
viem (minimal surface - tree-shaking) 3.86 KB (0%) 78 ms (0%) 640 ms (+55% 🔺) 717 ms
viem/accounts 89.01 KB (0%) 1.8 s (0%) 1.6 s (-27.3% 🔽) 3.4 s
viem/accounts (tree-shaking) 19.37 KB (0%) 388 ms (0%) 853 ms (+0.13% 🔺) 1.3 s
viem/actions 43.25 KB (0%) 865 ms (0%) 12.5 s (+18.4% 🔺) 13.4 s
viem/actions (tree-shaking) 350 B (0%) 10 ms (0%) 512 ms (-24.41% 🔽) 522 ms
viem/chains 17.29 KB (+1.26% 🔺) 346 ms (+1.26% 🔺) 1.2 s (+5.36% 🔺) 1.5 s
viem/chains (tree-shaking) 470 B (0%) 10 ms (0%) 455 ms (-38.94% 🔽) 465 ms
viem/chains/utils 8.29 KB (+3.96% 🔺) 166 ms (+3.96% 🔺) 745 ms (+27.99% 🔺) 911 ms
viem/chains/utils (tree-shaking) 5.36 KB (+2.3% 🔺) 108 ms (+2.3% 🔺) 637 ms (+12.74% 🔺) 744 ms
viem/ens 43.25 KB (0%) 865 ms (0%) 9.7 s (-32.59% 🔽) 10.6 s
viem/ens (tree-shaking) 17.94 KB (0%) 359 ms (0%) 1.4 s (-9.95% 🔽) 1.7 s

"from": "0x045d685d23e8aa34dc408a66fb408f20dc84d785",
"gas": 1527520n,
"gasPrice": 562129081n,
"gatewayFee": "0x0",
Copy link
Author

Choose a reason for hiding this comment

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

I don't know why or if this change is needed. I'd like confirmation about whether this change was right, or if I broke something elsewhere.

Copy link
Author

Choose a reason for hiding this comment

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

A test is failing at src/actions/public/getBlock.test.ts:54:27, in a way that looks the same as this. So, I'm inclined to believe that I somehow broke this.

@jxom
Copy link
Collaborator

jxom commented Oct 21, 2023

Would love to see this PR'd upstream into Viem!

o-az and others added 2 commits October 22, 2023 08:56
@yerdua
Copy link
Author

yerdua commented Oct 23, 2023

Would love to see this PR'd upstream into Viem!

Thanks for the encouragement! PR for upstream is here: wevm#1379

@aaronmgdr
Copy link
Member

closing in favor of wevm#1379

@aaronmgdr aaronmgdr closed this Oct 26, 2023
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.

5 participants