Skip to main content

FungibleTokenAdvancedAdmin

A contract that grants permissions for administrative actions on a token.

We separate this out into a dedicated contract. That way, when issuing a token, a user can specify their own rules for administrative actions, without changing the token contract itself.

The advantage is that third party applications that only use the token in a non-privileged way can integrate against the unchanged token contract.

Hierarchy

  • unknown
    • FungibleTokenAdvancedAdmin

Implements

Index

Constructors

constructor

Properties

adminData

adminData: any = ...

adminPublicKey

adminPublicKey: any = ...

events

events: { updateWhitelist: any } = ...

Type declaration

  • updateWhitelist: any

tokenContract

tokenContract: any = ...

whitelist

whitelist: any = ...

Methods

approveBase

  • approveBase(forest: AccountUpdateForest): Promise<void>
  • Overrides the approveBase method to prevent transfers of tokens.


    Parameters

    • forest: AccountUpdateForest

      The account update forest.

    Returns Promise<void>

publiccanChangeAdmin

  • canChangeAdmin(_admin: PublicKey): Promise<any>
  • Parameters

    • _admin: PublicKey

    Returns Promise<any>

publiccanChangeVerificationKey

  • canChangeVerificationKey(_vk: VerificationKey): Promise<Bool>
  • Parameters

    • _vk: VerificationKey

    Returns Promise<Bool>

publiccanMint

  • canMint(_accountUpdate: AccountUpdate): Promise<any>
  • Parameters

    • _accountUpdate: AccountUpdate

    Returns Promise<any>

publiccanPause

  • canPause(): Promise<Bool>
  • Returns Promise<Bool>

publiccanResume

  • canResume(): Promise<Bool>
  • Returns Promise<Bool>

deploy

updateVerificationKey

  • updateVerificationKey(vk: VerificationKey): Promise<void>
  • Update the verification key. Note that because we have set the permissions for setting the verification key to impossibleDuringCurrentVersion(), this will only be possible in case of a protocol update that requires an update.


    Parameters

    • vk: VerificationKey

    Returns Promise<void>

updateWhitelist

  • updateWhitelist(whitelist: Whitelist): Promise<void>
  • Parameters

    • whitelist: Whitelist

    Returns Promise<void>