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

Pass in fee payer as public key #652

Merged
merged 17 commits into from
Dec 16, 2022
Merged

Pass in fee payer as public key #652

merged 17 commits into from
Dec 16, 2022

Conversation

mitschabaude
Copy link
Member

@mitschabaude mitschabaude commented Dec 14, 2022

  • closes Pass in fee payer as a public key #635 (see that issue for new Mina.transaction API)
  • Remove private key argument to AccountUpdate.fundNewAccount(). Also, add an argument to fund multiple accounts and deprecate the initialBalance argument (can achieved in a cleaner way by calling .send() on the returned account update)
  • update examples throughout to reflect these new APIs; also removes other deprecated uses of private keys in transactions (createSigned, this.sign()) along the way
  • closes API to expose public key of caller in SnarkyJS methods #47
  • new API to get the sender's public key from zkApp methods: this.sender. Also available globally as Mina.sender()
  • try out this.sender in the dex examples

TODO:

  • support public key as fee payer argument
  • deprecate private key as fee payer argument
  • update examples
  • changelog

Copy link
Member

@Trivo25 Trivo25 left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Contributor

@ymekuria ymekuria left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@ymekuria ymekuria left a comment

Choose a reason for hiding this comment

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

LGTM! I created an issue to update the example contracts in the CLI once this PR lands and a new version if SnarkyJS is published to npm.

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.

Pass in fee payer as a public key API to expose public key of caller in SnarkyJS methods
3 participants