Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface NftApprove

Add an approved account for a specific token.

Requirements

  • Caller of the method must attach a deposit of at least 1 yoctoⓃ for security purposes
  • Contract MAY require caller to attach larger deposit, to cover cost of storing approver data
  • Contract MUST panic if called by someone other than token owner
  • Contract MUST panic if addition would cause nft_revoke_all to exceed single-block gas limit
  • Contract MUST increment approval ID even if re-approving an account
  • If successfully approved or if had already been approved, and if msg is present, contract MUST call nft_on_approve on account_id. See nft_on_approve description below for details.

Arguments:

  • token_id: the token for which to add an approval
  • account_id: the account to add to approvals
  • msg: optional string to be passed to nft_on_approve

Returns void, if no msg given. Otherwise, returns promise call to nft_on_approve, which can resolve with whatever it wants.

contractmethod

change

Hierarchy

  • NftApprove

Index

Properties

Properties

args: { account_id: string; msg?: string; token_id: string }

Type declaration

  • account_id: string
  • Optional msg?: string
  • token_id: string
options: { attachedDeposit?: string; gas?: string }

Type declaration

  • Optional attachedDeposit?: string

    Units in yoctoNear

    default

    "0"

  • Optional gas?: string

    Units in gas

    pattern

    [0-9]+

    default

    "30000000000000"

Generated using TypeDoc