Snip20Querier..::..GetAllowance Method
Gets the allowance (This query MUST be authenticated).
This returns the available allowance that spender can access from the owner's account, along with the expiration info.
Every account's viewing key MUST be given permissions to query the allowance of any pair of owner and spender, as long as that account is either the owner or the spender in the query.
In other words, every account's viewing key can be used to find out how much allowance the account has given other accounts, and how much it has been given by other accounts.
The expiration field of the response may be either null or unset if no expiration has been set.
Namespace:
SecretNET.Token
Assembly:
SecretNET.Token (in SecretNET.Token.dll)
Syntax
public Task<SecretQueryContractResult<GetAllowanceResponse>> GetAllowance( string contractAddress, string ownerAddress, string spenderAddress, Nullable<string> viewingKey, Nullable<Permit> permit, Nullable<string> codeHash )
Parameters
- contractAddress
- Type: String
The contract address.
- ownerAddress
- Type: String
Account from which tokens are allowed to be taken.
- spenderAddress
- Type: String
Account which is allowed to spend tokens on behalf of the owner.
- permit
- Type: Nullable<(Of <(<'Permit>)>)>
Authenticate with permit.