-
Notifications
You must be signed in to change notification settings - Fork 80
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
Sma 46 multichain validation module #257
Sma 46 multichain validation module #257
Conversation
// TODO: Actually depends on the module address so maybe we can make it dynamic | ||
getDummySignature(): string { | ||
return '0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000002E817fe3749B81dA801fc08B247E081ec20eB080000000000000000000000000000000000000000000000000000000000000004181d4b4981670cb18f99f0b4a66446df1bf5b204d24cfcb659bf38ba27a4359b5711649ec2423c5e1247245eba2964679b6a1dbb85c992ae40b9b00c6935b02ff1b00000000000000000000000000000000000000000000000000000000000000' |
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.
Why is this needed, what needs to be updated?
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.
smartAccount.buildUserOp() makes a call to the bundler where need to provide one dummySignature for one of the enabled modules. so each module is supposed to provide dummy mock sig.
but I think as MultiChain is extension of ECDSA and can verifying ECDSA sigs as well the default ECDSA module sig also works on bundler side, when I was just calling sa.buildUserOp()
and the TODO note is specific to making above sig dynamic so that module address becomes a param. I will push this change now.
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.
done
ModuleVersion, | ||
MultiChainUserOpDto | ||
} from './utils/Types' | ||
export class MultiChainValidationModule extends ECDSAOwnershipValidationModule { |
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.
@AmanRaj1608 @tomarsachin2271 since it extends the ECDSAModule chainId becomes mandatory but in real sense this module itself doesn't need to maintain chainId as it will receive it as part of dto (array of objects - userop + chainId) in singUserOps method.
what should I do?
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.
I think we can remove the extend part as the MultiChainValidationModule
is different module and not really depends on ECDSAOwnershipValidationModule
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.
ok let me do that.
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.
done
also updated sample client side code. |
// TODO | ||
const validUntil = 0 // unlimited | ||
const validAfter = 0 | ||
|
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.
these should be taken by the user as param
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.
done
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.
Can refactor the commented codes and merge
Description
Multichain validation module implementation for multi chain userops signing.
Actual test script would be part of test cases soon - and also in backend scripts modulat-SA-v2 playground.
can change the base later if other PRs are merged first.
EDIT: This is done
I am trying to send one tx on bnb + polygon testnets soon using this module.
later we can send the ops which actually makes uses of enabled session.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
I have tested from backend-node scripts in sdk-examples repo here
Checklist: