-
Notifications
You must be signed in to change notification settings - Fork 19
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
ManyChainMultiSig #517
ManyChainMultiSig #517
Conversation
augustbleeds
commented
Aug 29, 2024
•
edited
Loading
edited
- contract done
- set_config tests
- set_root tests
- execute tests
contracts/src/mcms.cairo
Outdated
// encode the data field by looping through | ||
let mut i = 0; | ||
while i < op.data.len() { | ||
encoded_leaf = encoded_leaf.encode(*op.data.at(i)); |
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 ok i think i understand now - i was confused as to how calldata is handled on Starknet.
Calldata on EVM and most other chains usually represents the encoded raw data to be passed in a transaction and is in the format of bytes or a hex string, e.g. EVM calldata is 0x + <4 bytes func selector> + <encoded args>
. However on Starknet it seems like calldata is more akin to "raw args" rather than encoded data and is represented by an array of felts corresponding to args (or arg metadata). I realized that since there's no encoding necessary as it gets passed straight to the called contract, you're right - we are free to choose the encoding method here for the purposes of generating a hash for MCM and just have to make sure it is consistent between the contract and tooling.
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.
nice to see in-depth tests 🎉 just minor comments
thanks @calvwang9 👍 , i pushed a change to address all the comments |
Quality Gate passedIssues Measures |