public override async Task <string> GetTransactionErrorAsync(string txHash) { var request = new RpcRequest($"{NewGuid.Get()}", "trace_transaction", txHash); var response = await _web3Parity.Client.SendRequestAsync <JArray>(request); return(response?.Select(x => x?["error"]?.ToString()).FirstOrDefault()); }
public override async Task <BigInteger> GetNextNonceAsync(string address) { var request = new RpcRequest($"{NewGuid.Get()}", "parity_nextNonce", address); var response = await _web3Parity.Client.SendRequestAsync <string>(request); var result = new HexBigInteger(response); return(result.Value); }
/// <summary> /// constructor /// </summary> public ReplaceWithNewGuid(NewGuid newGuid = null) { if (newGuid != null) { this.delegateNewGuid = newGuid; } else { this.delegateNewGuid = delegate { return(Guid.NewGuid()); }; } }
private void ChangeDeviceId(object sender, RoutedEventArgs e) { try { var guid = Guid.Parse(NewGuid.Text); Properties.Settings.Default.DeviceId = guid; Properties.Settings.Default.Save(); MessageBox.Show("DeviceId успешно изменен!"); Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); NewGuid.Focus(); } }
internal EnvironmentConfiguration() { IdGenerator = new NewGuid(); SerializationConfiguration = new SerializationConfiguration(); }