-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
291 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/EoaServer.Application.Contracts/Provider/Dto/Indexer/IndexerTransactionListResultDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System.Collections.Generic; | ||
using EoaServer.Commons; | ||
using EoaServer.Token.Dto; | ||
|
||
namespace EoaServer.Provider.Dto.Indexer; | ||
|
||
public class IndexerTransactionResultDto | ||
{ | ||
public IndexerTransactionListResultDto TransactionInfos { get; set; } | ||
} | ||
|
||
public class IndexerTransactionListResultDto | ||
{ | ||
public long TotalCount { get; set; } | ||
public List<IndexerTransactionInfoDto> Items { get; set; } = new(); | ||
} | ||
|
||
public class IndexerTransactionInfoDto | ||
{ | ||
public string TransactionId { get; set; } | ||
public long BlockHeight { get; set; } | ||
public string MethodName { get; set; } | ||
public TransactionStatus Status { get; set; } | ||
public string From { get; set; } | ||
public string To { get; set; } | ||
public long TransactionValue { get; set; } | ||
public MetadataDto Metadata { get; set; } | ||
public long Fee { get; set; } | ||
} |
44 changes: 44 additions & 0 deletions
44
src/EoaServer.Application.Contracts/Provider/Dto/Indexer/TransactionsRequestDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace EoaServer.Provider.Dto.Indexer; | ||
|
||
public class TransactionsRequestDto : BaseInput | ||
{ | ||
public string TransactionId { get; set; } = ""; | ||
public int BlockHeight { get; set; } | ||
public long StartTime { get; set; } | ||
public long EndTime { get; set; } | ||
public string Address { get; set; } = ""; | ||
|
||
public void SetDefaultSort() | ||
{ | ||
if (!OrderBy.IsNullOrEmpty() || !OrderInfos.IsNullOrEmpty()) | ||
{ | ||
return; | ||
} | ||
|
||
OfOrderInfos((SortField.BlockTime, SortDirection.Desc), (SortField.TransactionId, SortDirection.Desc)); | ||
} | ||
|
||
|
||
public void SetFirstTransactionSort() | ||
{ | ||
if (!OrderBy.IsNullOrEmpty() || !OrderInfos.IsNullOrEmpty()) | ||
{ | ||
return; | ||
} | ||
|
||
OfOrderInfos((SortField.BlockHeight, SortDirection.Asc), (SortField.TransactionId, SortDirection.Asc)); | ||
} | ||
|
||
public void SetLastTransactionSort() | ||
{ | ||
if (!OrderBy.IsNullOrEmpty() || !OrderInfos.IsNullOrEmpty()) | ||
{ | ||
return; | ||
} | ||
|
||
OfOrderInfos((SortField.BlockHeight, SortDirection.Desc), (SortField.TransactionId, SortDirection.Desc)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.