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

Add revoke instruction #85

Merged
merged 4 commits into from
Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feedback
  • Loading branch information
jackcmay committed Jul 7, 2020
commit 4ed960848a11cdb85c18bbc8a65b520a874cbf11
10 changes: 4 additions & 6 deletions token/inc/token.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,25 +103,23 @@ typedef enum Token_TokenInstruction_Tag {
Transfer,
/**
* Approves a delegate. A delegate is given the authority over
* tokens on behalf of the source account's owner. If the amount to
* delegate is zero then delegation is rescinded
*
* tokens on behalf of the source account's owner.
* Accounts expected by this instruction:
*
* * Single owner
* 0. `[writable]` The source account.
* 1. `[]` The delegate if amount is non-zero.
* 1. `[]` The delegate.
* 2. `[signer]` The source account owner.
*
* * Multisignature owner
* 0. `[writable]` The source account.
* 1. `[]` The delegate if amount is non-zero.
* 1. `[]` The delegate.
* 2. '[]' The source account's multisignature owner.
* 3. ..3+M '[signer]' M signer accounts
*/
Approve,
/**
* Revokes a delegate.
* Revokes the delegate's authority.
*
* Accounts expected by this instruction:
*
Expand Down
11 changes: 5 additions & 6 deletions token/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,22 @@ pub enum TokenInstruction {
/// 3. ..3+M '[signer]' M signer accounts.
Transfer(u64),
/// Approves a delegate. A delegate is given the authority over
/// tokens on behalf of the source account's owner. If the amount to
/// delegate is zero then delegation is rescinded
///
/// tokens on behalf of the source account's owner.

/// Accounts expected by this instruction:
///
/// * Single owner
/// 0. `[writable]` The source account.
/// 1. `[]` The delegate if amount is non-zero.
/// 1. `[]` The delegate.
/// 2. `[signer]` The source account owner.
///
/// * Multisignature owner
/// 0. `[writable]` The source account.
/// 1. `[]` The delegate if amount is non-zero.
/// 1. `[]` The delegate.
/// 2. '[]' The source account's multisignature owner.
/// 3. ..3+M '[signer]' M signer accounts
Approve(u64),
/// Revokes a delegate.
/// Revokes the delegate's authority.
///
/// Accounts expected by this instruction:
///
Expand Down