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

feat: upgrade viem to support heterogeneous calls #1527

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

abcrane123
Copy link
Contributor

What changed? Why?

Notes to reviewers

How has it been tested?

Copy link

vercel bot commented Oct 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
onchainkit-coverage ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 9:24pm
onchainkit-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 9:24pm
onchainkit-routes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 9:24pm

@abcrane123 abcrane123 changed the title chore: upgrade chore: upgrade viem to support heterogeneous calls Oct 28, 2024
@abcrane123 abcrane123 changed the title chore: upgrade viem to support heterogeneous calls feat: upgrade viem to support heterogeneous calls Oct 28, 2024
@abcrane123 abcrane123 marked this pull request as ready for review October 28, 2024 03:17
@@ -70,7 +70,7 @@
"graphql-request": "^6.1.0",
"jsdom": "^24.1.0",
"packemon": "3.3.1",
"permissionless": "^0.1.29",
"permissionless": "^0.2.10",
Copy link
Contributor

@alessey alessey Oct 28, 2024

Choose a reason for hiding this comment

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

are we still using this dependency after these changes (and under dependencies)?

@@ -35,7 +34,6 @@ export function Transaction({
calls={calls}
capabilities={capabilities}
chainId={accountChainId}
contracts={contracts}
Copy link
Contributor

Choose a reason for hiding this comment

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

could we still support this param and/or deprecate over time by just having anything passed in here be treated the same as the calls param?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'm leaning towards just removing it to avoid confusion. i.e devs might think they need to pass calls to calls and contracts to contracts which would cause the order of execution to be unreliable. plus it is a super small change on the developer side (just changing prop name to calls).

Copy link
Contributor

Choose a reason for hiding this comment

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

If you left the calls and contracts error in place we could mark contracts as deprecated for a few releases before removing. it would at least give the devs a heads up over the next few releases before the forcing them to update due to a breaking change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

curious what the rest of the team thinks but personally still leaning towards just removing it since it is such a small change on the dev side.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 on marking as deprecated for a few releases, then removing. It should be a simple change for the dev but nice to give them a bit of time to switch over

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, reconsidered this. Given it's a simple prop name change, I'd probably lean towards just making the breaking change now


// Transaction hash for single transaction (non-batched)
const singleTransactionHash =
writeContractTransactionHash || sendCallTransactionHash;
const singleTransactionHash = sendCallTransactionHash;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need this assignment?

Can we remove this and update useSendCall data return value to be named singleTransactionHash?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants