SecretNET.Token Namespace

Snip20Tx..::..DecreaseAllowance Method (String, String, String, Nullable<(Of <(<'Int32>)>)>, Nullable<(Of <(<'String>)>)>, Nullable<(Of <(<'String>)>)>, Nullable<(Of <(<'TxOptions>)>)>)

Decrease or clear the allowance by a sent amount. This may optionally come with an expiration time, which if set limits when the approval can be used. If amount is equal or greater than the current allowance, this action MUST set the allowance to zero, and return a "success" response.

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

Syntax


public Task<SingleSecretTx<DecreaseAllowanceResponse>> DecreaseAllowance(
	string contractAddress,
	string spender,
	string amount,
	Nullable<int> expiration,
	Nullable<string> padding,
	Nullable<string> codeHash,
	Nullable<TxOptions> txOptions
)
Public Function DecreaseAllowance ( _
	contractAddress As String, _
	spender As String, _
	amount As String, _
	expiration As Nullable(Of Integer), _
	padding As Nullable(Of String), _
	codeHash As Nullable(Of String), _
	txOptions As Nullable(Of TxOptions) _
) As Task(Of SingleSecretTx(Of DecreaseAllowanceResponse))
public:
Task<SingleSecretTx<DecreaseAllowanceResponse^>^>^ DecreaseAllowance(
	String^ contractAddress, 
	String^ spender, 
	String^ amount, 
	Nullable<int^> expiration, 
	Nullable<String^> padding, 
	Nullable<String^> codeHash, 
	Nullable<TxOptions^> txOptions
)

Parameters

contractAddress
Type: String
The contract address.
spender
Type: String
The address of the account getting access to the funds.
amount
Type: String
The number of tokens to decrease allowance by (Uint128).
expiration
Type: Nullable<(Of <(<'Int32>)>)>
Time at which the allowance expires. Counts the number of seconds from epoch, 1.1.1970 encoded as uint64.
padding
Type: Nullable<(Of <(<'String>)>)>
Ignored string used to maintain constant-length messages.
codeHash
Type: Nullable<(Of <(<'String>)>)>
CodeHash is (not really) optional and makes a call way faster.
txOptions
Type: Nullable<(Of <(<'TxOptions>)>)>
The tx options.

Return Value

SingleSecretTx<DecreaseAllowanceResponse>.