void Awake() { if (instance == null) { instance = this; } contract = new Nethereum.Contracts.Contract(null, applicationBinaryInterface, contractAddress); }
public static void AddArmy() { var function = instance.AddArmyFunction; var gas = new HexBigInteger(300000); var gasPrice = new HexBigInteger(1); var value = new HexBigInteger(0); var transactionInput = function.CreateTransactionInput(EthereumManager.AccountAddress, gas, value); EthereumManager.PrepareTransaction(transactionInput, OnAddArmyDone); }
public static void GetArmyCount() { EthereumManager.SendRequest(instance.GetArmyCountFunction.CreateCallInput(), OnGetArmyCountDone); }