SecretNET.Token Namespace

Snip20Querier..::..GetBalance Method

Gets the balance (This query MUST be authenticated). Returns the balance of the given address. Returns "0" if the address is unknown to the contract.

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

Syntax


public Task<SecretQueryContractResult<GetBalanceResponse>> GetBalance(
	string contractAddress,
	Nullable<string> walletAddress,
	Nullable<string> viewingKey,
	Nullable<Permit> permit,
	Nullable<string> codeHash
)
Public Function GetBalance ( _
	contractAddress As String, _
	walletAddress As Nullable(Of String), _
	viewingKey As Nullable(Of String), _
	permit As Nullable(Of Permit), _
	codeHash As Nullable(Of String) _
) As Task(Of SecretQueryContractResult(Of GetBalanceResponse))
public:
Task<SecretQueryContractResult<GetBalanceResponse^>^>^ GetBalance(
	String^ contractAddress, 
	Nullable<String^> walletAddress, 
	Nullable<String^> viewingKey, 
	Nullable<Permit^> permit, 
	Nullable<String^> codeHash
)

Parameters

contractAddress
Type: String
The contract address.
walletAddress
Type: Nullable<(Of <(<'String>)>)>
The wallet address.
viewingKey
Type: Nullable<(Of <(<'String>)>)>
Authenticate with viewing key.
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<GetBalanceResponse>.