Skip to content

Conversation

@dhvanipa
Copy link
Collaborator

@dhvanipa dhvanipa commented May 1, 2024

Support batchCall

@dhvanipa dhvanipa requested review from alvrs, frolic and yonadaa as code owners May 1, 2024 12:51
@changeset-bot
Copy link

changeset-bot bot commented May 1, 2024

⚠️ No Changeset found

Latest commit: 51e8a2a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR


const systemCallFromData = writeArgs.args[0].map((systemCallData: Hex[]) => {
return [params.delegatorAddress, ...systemCallData];
});
Copy link
Member

Choose a reason for hiding this comment

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

I am not confident in the shape of this data. I think this works when it comes from our encodeSystemCalls but doesn't seem to exactly correspond to the shape of WriteContractParameters<typeof IBaseWorldAbi, "batchCall">

(property) args: readonly [readonly {
    systemId: `0x${string}`;
    callData: `0x${string}`;
}[]] | ([readonly {
    systemId: `0x${string}`;
    callData: `0x${string}`;
}[]] & readonly [readonly {
    systemId: `0x${string}`;
    callData: `0x${string}`;
}[]])

But if I inspect the broader WriteContractParameters<typeof IBaseWorldAbi> and do an if statement, the expected args type is a bit wider and includes the array of hex values.

Not really sure how best to approach this, but might mean we need more tests here.

@frolic frolic force-pushed the account-kit branch 2 times, most recently from eee1e53 to c3f00da Compare May 22, 2024 13:43
@frolic
Copy link
Member

frolic commented Jan 24, 2025

closing in favor of #2796

@dhvanipa dhvanipa closed this Jan 26, 2025
@dhvanipa dhvanipa deleted the account-kit-with-batch-call branch January 26, 2025 17:07
@dhvanipa dhvanipa restored the account-kit-with-batch-call branch January 26, 2025 17:07
@dhvanipa dhvanipa deleted the account-kit-with-batch-call branch January 26, 2025 17:08
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