-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Feature] Add transfer_public_as_signer
to credits.aleo
#2402
Conversation
synthesizer/src/vm/mod.rs
Outdated
// Update the VM. | ||
vm.add_next_block(&block).unwrap(); | ||
|
||
// Check the balance of the caller, which should be the same as before. |
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.
Seems like the balance of the caller did decrease, you assert it to be 182_499_997_483_583
above.
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 good catch, it should decrease because the caller pays the fee.
Motivation
This PR adds the
transfer_public_as_signer
function tocredits.aleo
. This function allows developers to write programs that interface withcredits.aleo
and transfer public credits through the written programs.Test Plan
Additional tests were added checking that:
transfer_public_from_user
transfer_public_from_program
transfer_public_as_signer_from_user
transfer_public_as_signer_from_program
Related PRs
Closes #2139