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

Formatting and Comments #364

Merged
merged 41 commits into from
Oct 21, 2022
Merged

Formatting and Comments #364

merged 41 commits into from
Oct 21, 2022

Conversation

Orland0x
Copy link
Contributor

@Orland0x Orland0x commented Oct 7, 2022

Added comments and some general formatting/cleaning up

  • changed all usage of executor to execution_strategy as we had a mix of the terms.
  • Reordered params so that voting_strategy_params_flat is after voting_strategies in the constructor args.
  • removed excessive whitespace in setter functions
  • Added MIT Licence identifier to all files
  • moved contract external functions to camelCase to match OZ guidelines. (Library functions are still snake_case)
  • Moved update_* functions to set_*

closes #210
closes #367

@bonustrack
Copy link
Member

Does this follow the Orlando standard?

@Orland0x
Copy link
Contributor Author

Orland0x commented Oct 7, 2022

Does this follow the Orlando standard?

yep :))

@Orland0x Orland0x changed the title Cairo comments according to standard Formatting and Comments Oct 12, 2022
contracts/starknet/Authenticators/EthSigSessionKey.cairo Outdated Show resolved Hide resolved
// @param target Address of the space contract
// @param function_selector Function selector of the action
// @param calldata Calldata array required for the action
// @param session_public_key The StarkNet session public key that was used to generate the signature
Copy link
Contributor

Choose a reason for hiding this comment

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

since this is an external function, should it be sessionPublicKey? or is it only for function names and not the arguments?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

what a mess this casing is haha

contracts/starknet/Authenticators/EthTxSessionKey.cairo Outdated Show resolved Hide resolved
contracts/starknet/Authenticators/EthSigSessionKey.cairo Outdated Show resolved Hide resolved
contracts/starknet/Authenticators/EthTxSessionKey.cairo Outdated Show resolved Hide resolved
Comment on lines -83 to -89
// We don't need to pad because calling `.address` with starknet.js
// already left pads the address with 0s
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be interesting to keep this comment?

Copy link
Contributor Author

@Orland0x Orland0x Oct 18, 2022

Choose a reason for hiding this comment

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

Actually, might be worth leaving the padding on-chain so that the signed message is more readable in users wallet.

See this issue: snapshot-labs/sx.js#92

Copy link
Contributor

Choose a reason for hiding this comment

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

See my comment in the issue you posted :) I think we should still keep the comment! :)

@Orland0x Orland0x merged commit 05e0b1b into develop Oct 21, 2022
@Orland0x Orland0x deleted the comments branch November 25, 2022 13:33
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.

change update* to set* Add Cairo comments according to standard
3 participants