public override Task <TransactionInfo> CommitAsync() { DataSet.AcceptChanges(); var bytes = DataSetConverter.ToBytes(DataSet); Console.WriteLine($"Commiting {bytes.Length} bytes to the network"); var gasToUse = EthereumConnection.EstimateGasCost(bytes) + 5000; return(EthCon.PostNewTransaction(bytes, GasPrice)); }
public override CostInfo GetEstimatedCommitCostAsync() { DataSet.AcceptChanges(); var bytes = DataSetConverter.ToBytes(DataSet); var gas = EthereumConnection.EstimateGasCost(bytes); var cost = new EthCostInfo(gas, GasPrice); return(cost); }
public override async Task <bool> UseAddress(string address) { if (address == null) { // No table has been published yet DataSet = new DataSet(); return(true); } var data = await EthCon.GetTransactionData(address); if (data == null) { return(false); } DataSet = DataSetConverter.FromBytes(data); return(true); }