namespace Nethereum.BlockchainProcessing.BlockStorage.Entities.Mapping { public static class AddressTransactionMapping { public static void Map(this AddressTransaction to, Nethereum.RPC.Eth.DTOs.Transaction @from, string address) { to.BlockNumber = @from.BlockNumber.Value.ToString(); to.Hash = @from.TransactionHash; to.Address = address; } public static AddressTransaction MapToStorageEntityForUpsert(this Nethereum.RPC.Eth.DTOs.TransactionReceiptVO @from, string address) { return from.MapToStorageEntityForUpsert(address); } public static TEntity MapToStorageEntityForUpsert(this Nethereum.RPC.Eth.DTOs.TransactionReceiptVO @from, string address) where TEntity : AddressTransaction, new() { return MapToStorageEntityForUpsert(new TEntity(), from, address); } public static TEntity MapToStorageEntityForUpsert(this TEntity to, Nethereum.RPC.Eth.DTOs.TransactionReceiptVO @from, string address) where TEntity : AddressTransaction { to.Map(from.Transaction, address); to.UpdateRowDates(); return to; } } }