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

allow inline-string type assignment for txRequests #12

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

zeroXbrock
Copy link
Member

@zeroXbrock zeroXbrock commented Dec 8, 2023

so now you can write a txRequest like

const txReq: TransactionRequestSuave = {
    to: '0x0000000000000000000000000000000000000000',
    value: 0n,
    data: '0x',
    gasPrice: 0n,
    confidentialInputs: '0x',
    kettleAddress: '0x0000000000000000000000000000000000000000',
    type: '0x43' // <-- this!
}

prior to this, you'd have to set type with '0x43' as any or '0x43' as SuaveTxType or type: SuaveTxTypes.ConfidentialRequest

Copy link
Contributor

github-actions bot commented Dec 8, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
viem (esm) 58.15 KB (0%) 1.2 s (0%) 190 ms (-52.53% 🔽) 1.4 s
viem (cjs) 76.86 KB (0%) 1.6 s (0%) 367 ms (-20.55% 🔽) 2 s
viem (minimal surface - tree-shaking) 3.97 KB (0%) 80 ms (0%) 102 ms (+159.22% 🔺) 182 ms
viem/accounts 89.85 KB (0%) 1.8 s (0%) 154 ms (-36.26% 🔽) 2 s
viem/accounts (tree-shaking) 19.5 KB (0%) 390 ms (0%) 121 ms (+78.36% 🔺) 511 ms
viem/actions 43.43 KB (-0.01% 🔽) 869 ms (-0.01% 🔽) 1.7 s (+2.95% 🔺) 2.6 s
viem/actions (tree-shaking) 348 B (0%) 10 ms (0%) 67 ms (+66.53% 🔺) 77 ms
viem/chains 60.14 KB (+0.04% 🔺) 1.3 s (+0.04% 🔺) 226 ms (-41.93% 🔽) 1.5 s
viem/chains (tree-shaking) 473 B (0%) 10 ms (0%) 136 ms (+50.55% 🔺) 146 ms
viem/chains/utils 8.01 KB (0%) 161 ms (0%) 57 ms (-22.81% 🔽) 217 ms
viem/chains/utils (tree-shaking) 5.26 KB (0%) 106 ms (0%) 36 ms (-49.01% 🔽) 142 ms
viem/ens 43.43 KB (0%) 869 ms (0%) 1.3 s (-2.13% 🔽) 2.2 s
viem/ens (tree-shaking) 18.01 KB (0%) 361 ms (0%) 160 ms (+135.83% 🔺) 521 ms

@zeroXbrock zeroXbrock merged commit 563fd12 into main Dec 8, 2023
4 of 12 checks passed
@zeroXbrock zeroXbrock deleted the txRequest-type-inline-string branch December 8, 2023 01:33
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.

1 participant