public static void Map(this TransactionBase to, Conflux.RPC.Eth.DTOs.Transaction @from) { to.BlockHash = @from.BlockHash; to.Hash = @from.TransactionHash; to.AddressFrom = @from.From; to.Value = @from.Value?.Value.ToString(); to.AddressTo = @from.To ?? string.Empty; to.BlockNumber = @from.BlockNumber.Value.ToString(); to.Gas = @from.Gas?.Value.ToString(); to.GasPrice = @from.GasPrice?.Value.ToString(); to.Input = @from.Input ?? string.Empty; to.Nonce = @from.Nonce?.Value.ToString(); }
public static void Map(this Contract contract, string contractAddress, string code, Conflux.RPC.Eth.DTOs.Transaction transaction) { contract.Address = contractAddress; contract.Code = code; contract.TransactionHash = transaction.TransactionHash; contract.Creator = transaction.From; }