Skip to main content

mnft.ensureMachineNftAllowance(EnsureMachineNftAllowance)

Ensure the ERC20 allowance for the Machine NFT registration account is sufficient to cover the registration fee for N machines of a given value. If the allowance is insufficient, it submits an approval transaction.

EnsureMachineNftAllowance Type Parameters

machineNft must be the same Machine NFT contract you pass to registerMachine: the allowance is granted to that contract.

Returns

Usage

TypeScript

JavaScript

Example outputs