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

optionalize TxRequestSuave params #31

Merged
merged 3 commits into from Feb 21, 2024
Merged

Conversation

zeroXbrock
Copy link
Member

@zeroXbrock zeroXbrock commented Feb 17, 2024

some params in the suave-viem TransactionRequestSuave interface should have been optional and weren't:

  • gasPrice
  • gas
  • chainId
  • nonce

now you can do eth_calls without gas params

suaveProvider.call({
  to: CONTRACT_ADDRESS,
  data: '0x686f776479',
})

and don't have to manually populate your nonce before manually signing a tx.
nonce, from, gasPrice, gas, chainId auto-populate as needed upon signature.

@zeroXbrock zeroXbrock changed the title optionalize TxRequestSuave gasPrice,type, add test (TODO: update examples) optionalize TxRequestSuave gasPrice, type Feb 17, 2024
Copy link
Contributor

github-actions bot commented Feb 17, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
viem (esm) 58.15 KB (0%) 1.2 s (0%) 485 ms (+54.27% 🔺) 1.7 s
viem (cjs) 76.86 KB (0%) 1.6 s (0%) 598 ms (-8.73% 🔽) 2.2 s
viem (minimal surface - tree-shaking) 3.97 KB (0%) 80 ms (0%) 125 ms (+102.5% 🔺) 204 ms
viem/accounts 89.88 KB (0%) 1.8 s (0%) 263 ms (+60.51% 🔺) 2.1 s
viem/accounts (tree-shaking) 19.5 KB (0%) 390 ms (0%) 149 ms (+38.87% 🔺) 539 ms
viem/actions 43.43 KB (0%) 869 ms (0%) 1.7 s (-23.26% 🔽) 2.6 s
viem/actions (tree-shaking) 348 B (0%) 10 ms (0%) 50 ms (-45.7% 🔽) 60 ms
viem/chains 17.93 KB (+0.25% 🔺) 359 ms (+0.25% 🔺) 110 ms (+15.47% 🔺) 469 ms
viem/chains (tree-shaking) 473 B (0%) 10 ms (0%) 56 ms (-52.71% 🔽) 66 ms
viem/chains/utils 49.9 KB (+0.2% 🔺) 998 ms (+0.2% 🔺) 183 ms (-40.64% 🔽) 1.2 s
viem/chains/utils (tree-shaking) 5.26 KB (0%) 106 ms (0%) 69 ms (+32.02% 🔺) 174 ms
viem/ens 43.43 KB (0%) 869 ms (0%) 1.7 s (-26.25% 🔽) 2.6 s
viem/ens (tree-shaking) 18.01 KB (0%) 361 ms (0%) 132 ms (-38.38% 🔽) 492 ms

@zeroXbrock zeroXbrock changed the title optionalize TxRequestSuave gasPrice, type optionalize TxRequestSuave params Feb 21, 2024
@zeroXbrock zeroXbrock merged commit fe1be0f into main Feb 21, 2024
@zeroXbrock zeroXbrock deleted the optional-SuaveTxRequest-params branch February 21, 2024 21:01
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.

None yet

2 participants