public ContractTask(Oracle oracle) { calculator = new Calculator(oracle.web3); var summa = Summa.Create(); calculator.RequestToConvetSumma(summa.rubs, summa.kops); calculator.AskRateFrom(oracle); id = count++; }
public void ExecuteWith(Oracle oracle) { oracle.RequestToExecute(calculator); var res = calculator.Result(); var rate = calculator.Rate(); string info = $"Contract address {calculator.Address()} from thread # {Thread.CurrentThread.ManagedThreadId}: {res} with rate {rate}"; Log.Information(info); Console.WriteLine(info); }
public void AskRateFrom(Oracle oracle) { oracle.RequestToSetRate(); var r = service.AskRateFromOracleRequestAndWaitForReceiptAsync(oracle.Address()).Result; }