-
Notifications
You must be signed in to change notification settings - Fork 102
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: allow passing raw call data to sendUserOperation #272
Conversation
95fdef3
to
b7dc0c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should update the sendUO doc. otherwise lgtm
b7dc0c9
to
eb94a54
Compare
@denniswon docs are updated |
export type KernelUserOperationCallData = Exclude< | ||
UserOperationCallData, | ||
Hex | ||
> & { | ||
delegateCall?: boolean; | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh so does Exclude only work when UserOperationCallData
is the Hex
type alias, vs. the calldata object of target, data, value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other way around, the use of Exclude
here means take all the union types of UserOperationCallData
and omit the Hex
one. Essentially: Exclude<a | b, b> = a
### `UserOperationCallData | UserOperationCallData[]` | ||
### `UserOperationCallData | UserOperationCallData[] | Hex` | ||
|
||
`UserOperationCallData` is an object with the following properties: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`UserOperationCallData` is an object with the following properties: | |
`UserOperationCallData` is either a `Hex`value, or an object with the following properties: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I didn't want to confuse that here actually... I add the | Hex
explicitly already above to make that clearer. because otherwise it might be the case that you can do Hex[]
as batch (which is not the case)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two nits, lgtm
Pull Request Checklist
yarn test
)site
folder, see guidleines below)feat!: breaking change
)yarn lint:check
) and fix any issues? (yarn lint:fix
)development
and notmain
?PR-Codex overview
Focus of the PR:
This PR focuses on modifying the
UserOperationCallData
type to allow for an additional propertyHex
, and updating related code to accommodate this change.Detailed summary:
UserOperationCallData
type to include an additional propertyHex
KernelUserOperationCallData
type to excludeHex
KernelBatchUserOperationCallData
type to excludeHex
BatchUserOperationCallData
type to excludeHex
sendUserOperation.md
guide to includeHex
as a possible parameter type