SecretNET.Token Namespace

Snip20Tx..::..Deposit Method (String, array<Coin>[]()[][], Nullable<(Of <(<'String>)>)>, Nullable<(Of <(<'String>)>)>, Nullable<(Of <(<'TxOptions>)>)>)

Deposits a native coin into the contract, which will mint an equivalent amount of tokens to be created. The amount MUST be sent in the sent_funds field of the transaction itself, as coins must really be sent to the contract's native address. The minted amounts MUST match the exchange rate specified by the ExchangeRate query. The deposit MUST return an error if any coins that do not match expected denominations are sent.

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

Syntax


public Task<SingleSecretTx<DepositResponse>> Deposit(
	string contractAddress,
	Coin[] sentFunds,
	Nullable<string> padding,
	Nullable<string> codeHash,
	Nullable<TxOptions> txOptions
)
Public Function Deposit ( _
	contractAddress As String, _
	sentFunds As Coin(), _
	padding As Nullable(Of String), _
	codeHash As Nullable(Of String), _
	txOptions As Nullable(Of TxOptions) _
) As Task(Of SingleSecretTx(Of DepositResponse))
public:
Task<SingleSecretTx<DepositResponse^>^>^ Deposit(
	String^ contractAddress, 
	array<Coin^>^ sentFunds, 
	Nullable<String^> padding, 
	Nullable<String^> codeHash, 
	Nullable<TxOptions^> txOptions
)

Parameters

contractAddress
Type: String
The contract address.
sentFunds
Type: array<Coin>[]()[][]
The sent funds.
padding
Type: Nullable<(Of <(<'String>)>)>
The padding.
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<DepositResponse>.