public Task <BigInteger> PriceQueryAsync(string name, BigInteger returnValue2, BigInteger duration, BlockParameter blockParameter = null) { var priceFunction = new PriceFunction(); priceFunction.Name = name; priceFunction.ReturnValue2 = returnValue2; priceFunction.Duration = duration; return(ContractHandler.QueryAsync <PriceFunction, BigInteger>(priceFunction, blockParameter)); }
public Task <BigInteger> PriceQueryAsync(ushort returnValue1, ushort returnValue2, byte returnValue3, string returnValue4, BlockParameter blockParameter = null) { var priceFunction = new PriceFunction(); priceFunction.ReturnValue1 = returnValue1; priceFunction.ReturnValue2 = returnValue2; priceFunction.ReturnValue3 = returnValue3; priceFunction.ReturnValue4 = returnValue4; return(ContractHandler.QueryAsync <PriceFunction, BigInteger>(priceFunction, blockParameter)); }
private void CalculatePrices() { PriceFunction function = new PriceFunction(null); if (m_losesPrice == null) { LossesPrice minLosesPrice = new LossesPrice(function.CalculateLosses(m_battle.Units, m_minAttackerLosses)); LossesPrice maxLosesPrice = new LossesPrice(function.CalculateLosses(m_battle.Units, m_maxAttackerLosses)); LossesPrice avgLosesPrice = new LossesPrice(function.CalculateLosses(m_battle.Units, m_avgAttackerLosses)); m_losesPrice = new StatisticsLossesPrice(minLosesPrice, avgLosesPrice, maxLosesPrice); } }
public Task <BigInteger> PriceQueryAsync(PriceFunction priceFunction, BlockParameter blockParameter = null) { return(ContractHandler.QueryAsync <PriceFunction, BigInteger>(priceFunction, blockParameter)); }