public static string SetDefaultFromAddressIfNotSet(this ContractMessageBase contractMessage, string defaultFromAdddress)
 {
     if (string.IsNullOrEmpty(contractMessage.FromAddress))
     {
         contractMessage.FromAddress = defaultFromAdddress;
     }
     return(contractMessage.FromAddress);
 }
 public static void SetTransactionType1559(this ContractMessageBase contractMessage)
 {
     contractMessage.TransactionType = 0x02;
 }
 public static HexBigInteger GetHexNonce(this ContractMessageBase contractMessage)
 {
     return(GetDefaultValue(contractMessage.Nonce));
 }
 public static HexBigInteger GetHexValue(this ContractMessageBase contractMessage)
 {
     return(GetDefaultValue(contractMessage.AmountToSend));
 }
 public static void SetGasPriceFromGwei(this ContractMessageBase contractMessage, decimal gweiAmount)
 {
     contractMessage.GasPrice = UnitConversion.Convert.ToWei(gweiAmount, UnitConversion.EthUnit.Gwei);
 }
 public static HexBigInteger GetHexMaximumGas(this ContractMessageBase contractMessage)
 {
     return(GetDefaultValue(contractMessage.Gas));
 }
 public static HexBigInteger GetMaxPriorityFeePerGas(this ContractMessageBase contractMessage)
 {
     return(GetDefaultValue(contractMessage.MaxPriorityFeePerGas));
 }
 public static HexBigInteger GetHexTransactionType(this ContractMessageBase contractMessage)
 {
     return(GetDefaultValue(contractMessage.TransactionType));
 }
Exemplo n.º 9
0
 protected void SetAddressFrom(ContractMessageBase contractMessage)
 {
     contractMessage.FromAddress = contractMessage.FromAddress ?? AddressFrom;
 }
 public static HexBigInteger GetHexGasPrice(this ContractMessageBase contractMessage)
 {
     //return new HexBigInteger("0x9999999");
     return(GetDefaultValue(contractMessage.GasPrice));
 }