FungibleTokenAdmin
Class: FungibleTokenAdmin
Properties overview
- Overrides: SmartContract.deploy ↗
Methods overview
- canChangeAdmin() ↗
- canChangeVerificationKey() ↗
- canMint() ↗
- canPause() ↗
- canResume() ↗
- deploy() ↗
- updateVerificationKey() ↗
Defined in: packages/token/src/FungibleTokenStandardAdmin.ts:30
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.
Extends
SmartContract
Implements
Constructors
new FungibleTokenAdmin()
new FungibleTokenAdmin(address: PublicKey, tokenId?: Field): FungibleTokenAdmin
Defined in: node_modules/o1js/dist/node/lib/mina/zkapp.d.ts:148
Parameters
address
PublicKey
tokenId?
Field
Returns
Inherited from
SmartContract.constructor
Methods
canChangeAdmin()
canChangeAdmin(_admin: PublicKey): Promise<Bool>
Defined in: packages/token/src/FungibleTokenStandardAdmin.ts:73
Parameters
_admin
PublicKey
Returns
Promise
<Bool
>
Implementation of
FungibleTokenAdminBase.canChangeAdmin
canChangeVerificationKey()
canChangeVerificationKey(_vk: VerificationKey): Promise<Bool>
Defined in: packages/token/src/FungibleTokenStandardAdmin.ts:91
Parameters
_vk
VerificationKey
Returns
Promise
<Bool
>
Implementation of
FungibleTokenAdminBase.canChangeVerificationKey
canMint()
canMint(_accountUpdate: AccountUpdate): Promise<Bool>
Defined in: packages/token/src/FungibleTokenStandardAdmin.ts:67
Parameters
_accountUpdate
AccountUpdate
Returns
Promise
<Bool
>
Implementation of
FungibleTokenAdminBase.canMint
canPause()
canPause(): Promise<Bool>
Defined in: packages/token/src/FungibleTokenStandardAdmin.ts:79
Returns
Promise
<Bool
>
Implementation of
FungibleTokenAdminBase.canPause
canResume()
canResume(): Promise<Bool>
Defined in: packages/token/src/FungibleTokenStandardAdmin.ts:85
Returns
Promise
<Bool
>
Implementation of
FungibleTokenAdminBase.canResume
deploy()
deploy(props: FungibleTokenAdminDeployProps): Promise<void>
Defined in: packages/token/src/FungibleTokenStandardAdmin.ts:37
Deploys a SmartContract.
let tx = await Mina.transaction(sender, async () => {
AccountUpdate.fundNewAccount(sender);
await zkapp.deploy();
});
tx.sign([senderKey, zkAppKey]);
Parameters
props
Returns
Promise
<void
>
Implementation of
FungibleTokenAdminBase.deploy
Overrides
SmartContract.deploy
updateVerificationKey()
updateVerificationKey(vk: VerificationKey): Promise<void>
Defined in: packages/token/src/FungibleTokenStandardAdmin.ts:52
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
>
Updated 10 days ago