Skip to content

Commit

Permalink
nep-393: add bool return to sbt_revoke_by_owner (#510)
Browse files Browse the repository at this point in the history
In the
[reference](https://github.com/near-ndc/i-am-human/blob/cfc92b1/contracts/registry/src/registry.rs#L362)
implementation we return `bool` in the `registry.sbt_revoke_by_owner` to
signal if the operation should continue or it's finished.

We forgot to push this update to the standard.

This update also makes the API consistent with `sbt_recover` and
`sbt_soul_transfer`
  • Loading branch information
robert-zaremba authored Oct 22, 2023
1 parent 3786d9b commit 6eee9dc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions neps/nep-0393.md
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,15 @@ trait SBTRegistry {
/// Must also emit `Burn` event if the SBT tokens are burned (removed).
fn sbt_revoke(&mut self, tokens: Vec<TokenId>, burn: bool);

/// Similar to `sbt_revoke`, but revokes all `owner`s tokens issued by the caller.
fn sbt_revoke_by_owner(&mut self, owner: AccountId, burn: bool);
/// Similar to `sbt_revoke`. Allows SBT issuer to revoke all tokens by holder either by
/// burning or updating their expire time. When an owner has many tokens from the issuer,
/// the issuer may need to call this function multiple times, until all tokens are revoked.
/// Retuns true if all the tokens were revoked, false otherwise.
/// If false is returned issuer must call the method until true is returned
/// Must be called by an SBT contract.
/// Must emit `Revoke` event.
/// Must also emit `Burn` event if the SBT tokens are burned (removed).
fn sbt_revoke_by_owner(&mut self, owner: AccountId, burn: bool) -> bool;

/// Allows issuer to update token metadata reference and reference_hash.
/// * `updates` is a list of triples: (token ID, reference, reference base64-encoded sha256 hash).
Expand Down

0 comments on commit 6eee9dc

Please sign in to comment.