TransferTokens
Description
Details
Signature
Task TransferTokens(dynamic args, Action<dynamic> callback = null)Arguments
Parameter
Type
Definition
Return Value
Example
Last updated
Task TransferTokens(dynamic args, Action<dynamic> callback = null)Last updated
{
"status": "TXHASH", // "TXHASH"/"SUCCESS"/"FAILED"
"errorMsg": "",
"txHash": "0xec90b7c220b1d9550c202ed7adb7db97be2b8c8b9f422bb2d3c555498d95ef49",
"from": "0xb8E46105a6F11E3250837897b3A10450716b28d8",
"to": "0xfFEaf294116b610d0cdD4afaAfe861563c72BB76",
"amount": "0.1",
"currency": Object // type Currency class
}using System;
using Metafi.Unity;
public class TransferButton : MonoBehaviour {
public async void TransferTokensWithoutArgs(){
await MetafiProvider.Instance.TransferTokens( new {},
((Action<dynamic>) (result => {
Debug.Log("TransferTokens complete, result: " + result.ToString());
})));
}
}using System;
using Metafi.Unity;
public class TransferButton : MonoBehaviour {
public async void TransferTokensWithArgs(){
await MetafiProvider.Instance.TransferTokens( new {
to = "to_address",
amount = "amount",
currency = Assets.GOERLI_ETH,
},
((Action<dynamic>) (result => {
Debug.Log("TransferTokens complete, result: " + result.ToString());
})));
}
}