SecretNET.NFT Namespace

Snip721Querier..::..GetNumTokens Method

NumTokens returns the number of tokens controlled by the contract. If the contract's token supply is private, only an authenticated minter's address will be allowed to perform this query.

Namespace:  SecretNET.NFT
Assembly:  SecretNET.NFT (in SecretNET.NFT.dll)

Syntax


public Task<SecretQueryContractResult<GetNumTokensResponse>> GetNumTokens(
	string contractAddress,
	string address,
	string viewingKey,
	Nullable<Permit> permit,
	Nullable<string> codeHash
)
Public Function GetNumTokens ( _
	contractAddress As String, _
	address As String, _
	viewingKey As String, _
	permit As Nullable(Of Permit), _
	codeHash As Nullable(Of String) _
) As Task(Of SecretQueryContractResult(Of GetNumTokensResponse))
public:
Task<SecretQueryContractResult<GetNumTokensResponse^>^>^ GetNumTokens(
	String^ contractAddress, 
	String^ address, 
	String^ viewingKey, 
	Nullable<Permit^> permit, 
	Nullable<String^> codeHash
)

Parameters

contractAddress
Type: String
The contract address.
address
Type: String
Address of the querier if supplying optional ViewerInfo.
viewingKey
Type: String
Viewer's key if supplying optional ViewerInfo.
permit
Type: Nullable<(Of <(<'Permit>)>)>
Authenticate with permit.
codeHash
Type: Nullable<(Of <(<'String>)>)>
CodeHash is (not really) optional and makes a call way faster.

Return Value

SecretQueryContractResult<GetNumTokensResponse>.