Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (42 sloc) 1.6 KB
using System;
using System.Collections;
using Expload.Unity.Codegen;
namespace Expload.Pravda.Program
{
public class BalanceOfRequest : ProgramRequest<int>
{
public BalanceOfRequest(byte[] programAddress) : base(programAddress) { }
protected override int ParseResult(string elem)
{
return ExploadTypeConverters.ParseInt32(elem);
}
public IEnumerator BalanceOf(byte[] arg0)
{
yield return SendRequest("BalanceOf", new string[] { ExploadTypeConverters.PrintBytes(arg0) });
}
}
public class EmitRequest : ProgramRequest<object>
{
public EmitRequest(byte[] programAddress) : base(programAddress) { }
protected override object ParseResult(string elem)
{
return ExploadTypeConverters.ParseNull(elem);
}
public IEnumerator Emit(byte[] arg0, int arg1)
{
yield return SendRequest("Emit", new string[] { ExploadTypeConverters.PrintBytes(arg0), ExploadTypeConverters.PrintInt32(arg1) });
}
}
public class TransferRequest : ProgramRequest<object>
{
public TransferRequest(byte[] programAddress) : base(programAddress) { }
protected override object ParseResult(string elem)
{
return ExploadTypeConverters.ParseNull(elem);
}
public IEnumerator Transfer(byte[] arg0, int arg1)
{
yield return SendRequest("Transfer", new string[] { ExploadTypeConverters.PrintBytes(arg0), ExploadTypeConverters.PrintInt32(arg1) });
}
}
}
You can’t perform that action at this time.