Ejemplo n.º 1
0
        void Awake()
        {
            if (instance == null)
            {
                instance = this;
            }

            contract = new Nethereum.Contracts.Contract(null, applicationBinaryInterface, contractAddress);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public static void GetArmyCount()
 {
     EthereumManager.SendRequest(instance.GetArmyCountFunction.CreateCallInput(), OnGetArmyCountDone);
 }