ERC20 Transfer

Request

This request sends ERC-20 tokens.

#include "HyperPlayUtils.h"
#include "Endpoints/SendContract.h"

void OnResponse(FString Response, int32 StatusCode)
{
    const bool bWasSuccessful = HyperPlayUtils::StatusCodeIsSuccess(StatusCode);

    UE_LOG(LogTemp, Display, TEXT("SendContract Success: %s"), bWasSuccessful ? "true" : "false");
    UE_LOG(LogTemp, Display, TEXT("SendContract Response: %s"), *Response);
}

int main(){
    const FString address("0x62bb848ec84D08d55Ea70a19118300bae6658F18");
    const FString amount("100000000000000000000");
    TArray<FString> params;
    params.Add(address);
    params.Add(amount);
    USendContract* SendContractInstance = USendContract::SendContract(nullptr,
        "0xBA62BCfcAaFc6622853cca2BE6Ac7d845BC0f2Dc",
        "transfer",
        "",
        params,
        -1,
        "",
        5);
    SendContractInstance->GetOnCompletedDelegate().AddRaw(this, &OnResponse);
    SendContractInstance->Activate();
}

Response

0x1b8368d5b67a914a49c76984776849ee3c56a4ac28c92d98103ef18e7215ae2b