Snip20Tx..::..SendFrom Method (String, String, String, String, Nullable<(Of <(<'String>)>)>, Nullable<(Of <(<'String>)>)>, Nullable<(Of <(<'String>)>)>, Nullable<(Of <(<'TxOptions>)>)>)
SendFrom is to Send, what TransferFrom is to Transfer.
This allows a pre-approved account to not just transfer the tokens, but to send them to another address to trigger a given action.
Note SendFrom will set the Receive{sender} to be the env.message.sender (the account that triggered the transfer) rather than the owner account (the account the money is coming from).
Namespace:
SecretNET.Token
Assembly:
SecretNET.Token (in SecretNET.Token.dll)
Syntax
public Task<SingleSecretTx<SendFromResponse>> SendFrom( string contractAddress, string owner, string recipient, string amount, Nullable<string> message, Nullable<string> padding, Nullable<string> codeHash, Nullable<TxOptions> txOptions )
Public Function SendFrom ( _ contractAddress As String, _ owner As String, _ recipient As String, _ amount As String, _ message As Nullable(Of String), _ padding As Nullable(Of String), _ codeHash As Nullable(Of String), _ txOptions As Nullable(Of TxOptions) _ ) As Task(Of SingleSecretTx(Of SendFromResponse))
Parameters
- contractAddress
- Type: String
The contract address.
- owner
- Type: String
Account to take tokens from.
- recipient
- Type: String
Account to send tokens to.
- amount
- Type: String
Amount of tokens to transfer (Uint128).
- codeHash
- Type: Nullable<(Of <(<'String>)>)>
CodeHash is (not really) optional and makes a call way faster.
- txOptions
- Type: Nullable<(Of <(<'TxOptions>)>)>
The tx options.