Skip to content

Commit 6eee9dc

Browse files
nep-393: add bool return to sbt_revoke_by_owner (#510)
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`
1 parent 3786d9b commit 6eee9dc

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

neps/nep-0393.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,15 @@ trait SBTRegistry {
404404
/// Must also emit `Burn` event if the SBT tokens are burned (removed).
405405
fn sbt_revoke(&mut self, tokens: Vec<TokenId>, burn: bool);
406406

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

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

0 commit comments

Comments
 (0)