Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module Details Views #103

Merged
163 commits merged into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
d5e8afa
Made entities and import flow
Aug 17, 2023
cdf8265
Added test to aggregate which validates events are stored
Aug 18, 2023
bc505e9
Merge branch 'main' into cbw-1248/implementation-smart-contract-aggre…
Aug 18, 2023
fbf296d
Added test for other read cases
Aug 18, 2023
aa922e0
Added smart contract entity
Aug 18, 2023
81b34ab
Added Smart Contract Aggregate to Startup
Aug 18, 2023
58156e1
Added import job
Aug 21, 2023
dcb5256
Finished repository test
Aug 21, 2023
ca0522a
Fixed aggregate test
Aug 21, 2023
b73da60
Added data source
Aug 21, 2023
91b0eaf
Added awaits on jobs on node import
Aug 21, 2023
fc47cb3
Added contract version to contract initialize and update events
Aug 22, 2023
50f6167
Added tests which validates uniqueness contrains
Aug 22, 2023
293329a
Remove todos and added simple resilience in import loop
Aug 22, 2023
1cfb11c
Fixed dependency injection issue
Aug 22, 2023
aa91b17
Fix issues when testing job
Aug 22, 2023
d575289
Small updates
Aug 22, 2023
f63bf17
Updated changelog
Aug 22, 2023
ef4550d
Moved classes to own files
Aug 22, 2023
eae5cb1
Added logic to Smart Contract Repository which can fetch batch
Aug 24, 2023
bb162ca
Made batch import instead of processing single rows
Aug 24, 2023
952e48b
Clean up unused code
Aug 24, 2023
4a40b00
Fix limit on smart contract database job
Aug 24, 2023
e708617
Remove unnecessary batch
Aug 24, 2023
40e474d
Added duration- and height metrics
Aug 24, 2023
d565919
Added health states to application
Aug 25, 2023
b3cc30b
Fixed health output
Aug 25, 2023
5411768
Adding temp CI
Aug 25, 2023
ea18072
Updating change log
Aug 25, 2023
75f2851
Remove some debugging and added nugets
Aug 25, 2023
54ab1c6
Fix test
Aug 25, 2023
b71562d
Merge branch 'main' into cbw-1248/implementation-smart-contract-aggre…
Aug 25, 2023
2c26643
Merge branch 'cbw-1248/implementation-smart-contract-aggregate' into …
Aug 25, 2023
915777e
Refactor
Aug 28, 2023
9857710
Merge branch 'cbw-1248/implementation-smart-contract-aggregate' into …
Aug 28, 2023
ce21ac8
Clean up after merge
Aug 28, 2023
707c401
Added smart contract paging query
Aug 31, 2023
7e5f664
Added metrics to graphql endpoints
Sep 1, 2023
2171a83
Updated changelog
Sep 1, 2023
09d7102
Added contract address to Smart Contract query
Sep 1, 2023
160f17d
Fix increment issue when reading heights
Sep 1, 2023
9edb613
Added simple view which can list smart contracts
Sep 1, 2023
ee4acf7
Updated naming from Smart Contract to Contract
Sep 1, 2023
9ba8c24
Renamed test and tables
Sep 1, 2023
68db31f
Merge branch 'cbw-1248/implementation-smart-contract-aggregate' into …
Sep 1, 2023
bc4440a
Fix naming conflicts
Sep 1, 2023
0faea97
Merge branch 'cbw-1249/add-observability' into cbw-1261/sc-listing-en…
Sep 1, 2023
c595e17
Resolve conflicts after merge
Sep 1, 2023
c823dde
Merge branch 'cbw-1261/sc-listing-endpoints' into cbw-1260/smart-cont…
Sep 1, 2023
e6f4b82
Renamed to Contract
Sep 1, 2023
aa2f083
Updated with add and remove link entities
Sep 1, 2023
f143293
Fixed off by one error
Sep 1, 2023
4ec857d
Merge branch 'cbw-1248/implementation-smart-contract-aggregate' into …
Sep 4, 2023
8c96ed8
Merge branch 'cbw-1249/add-observability' into cbw-1261/sc-listing-en…
Sep 4, 2023
bfd3257
Merge branch 'cbw-1261/sc-listing-endpoints' into cbw-1260/smart-cont…
Sep 4, 2023
f1f8c70
Update Program.cs
Sep 4, 2023
c33b7e6
Merge branch 'cbw-1249/add-observability' into cbw-1261/sc-listing-en…
Sep 4, 2023
8441f6c
Using activity and better exception handling in diagnostic handler
Sep 4, 2023
5197ede
Enable rewind of request body
Sep 4, 2023
ffaa221
Added tracing to logs
Sep 4, 2023
c42ada0
Updated log formats
Sep 4, 2023
0944d3d
remove extra from console
Sep 4, 2023
bff53f4
Corrected naming
Sep 5, 2023
5bf501e
Made repository for contract jobs
Sep 5, 2023
5843bdc
Migrated to options for feature flags
Sep 5, 2023
37b979e
Moved interfaces to same file as classes where only one implementatio…
Sep 5, 2023
e9bc1c1
Changed to date time offset
Sep 5, 2023
152c486
Added warnings not to change job identifier
Sep 5, 2023
3c682d0
Update range function with comments
Sep 5, 2023
6769b70
Follow standards from EF regarding CS8618 compiler warning for C# 10
Sep 5, 2023
3e7126e
Refactored Contract Aggregate Node Import job to be more readable
Sep 5, 2023
8048a49
Merge branch 'cbw-1248/implementation-smart-contract-aggregate' into …
Sep 5, 2023
a30fb7c
Resolve comments after merge
Sep 5, 2023
9f028f2
Merge branch 'main' into cbw-1249/add-observability
Sep 5, 2023
05dfeb9
Resolve issues after merge
Sep 5, 2023
0c43cc3
Merge branch 'cbw-1249/add-observability' into cbw-1261/sc-listing-en…
Sep 5, 2023
77ec045
Resolve issues after merge
Sep 5, 2023
c8020b3
Merge branch 'cbw-1261/sc-listing-endpoints' into cbw-1260/smart-cont…
Sep 5, 2023
e26cb54
Resolve comments
Sep 5, 2023
de8e391
Minor refactoring after final review
Sep 5, 2023
d47a38c
Merge branch 'cbw-1249/add-observability' into cbw-1261/sc-listing-en…
Sep 5, 2023
36467a9
Merge branch 'main' into cbw-1261/sc-listing-endpoints
Sep 5, 2023
f8fa896
Updates after merge
Sep 5, 2023
bfd0d97
Merge branch 'cbw-1261/sc-listing-endpoints' into cbw-1260/smart-cont…
Sep 5, 2023
9be4c15
Change log level to information when contract job has written heights.
Sep 5, 2023
8313365
Fix wrong tracing enrichment
Sep 5, 2023
f332453
Fix compiler warning and sorted contracts when queried for listing
Sep 5, 2023
0b2264f
Fix logging of users cancel queries.
Sep 5, 2023
4ec1261
Made searchable
Sep 6, 2023
946e160
Included contract address as string in Contract to make it searchable
Sep 6, 2023
722f551
Added search functionality to frontend
Sep 6, 2023
fed1171
moved private to bottom
Sep 6, 2023
d663bb0
Added initial details for contract
Sep 7, 2023
f05a536
Made contract rendering more nice
Sep 7, 2023
c1d851d
Made events open as default
Sep 7, 2023
f483588
Fix exceptions handling in diagnostics
Sep 8, 2023
0b962a5
Fix missing events when money CCD was transferred between account
Sep 8, 2023
282839d
Remove unused exception
Sep 8, 2023
1387363
Fix search result issue when end with comma or space
Sep 8, 2023
3492061
Added block slot time to all events
Sep 8, 2023
4838845
Updated graphql schema
Sep 8, 2023
bfc7795
Rejected events + Using Parallel in import job + Add Sender
Sep 8, 2023
0302c3c
Added to context, fix migration and fix serializer for reject
Sep 8, 2023
c0c8bb6
Removed wrong event_index from reject tables.
Sep 8, 2023
e9e1f09
Merge branch 'main' into cbw-1261/add-reject-events
Sep 11, 2023
b939614
Remove commented
Sep 11, 2023
4afcdd5
Added documentation to transfer event
Sep 11, 2023
b5928ff
Merge branch 'main' into cbw-1260/smart-contract-listing-view
Sep 11, 2023
842f47d
Merge branch 'cbw-1261/add-reject-events' into cbw-1260/smart-contrac…
Sep 11, 2023
0a104cd
Merge branch 'cbw-1260/smart-contract-listing-view' into cbw-1250and1…
Sep 11, 2023
7aeac5e
Merge branch 'cbw-1258and1259/contract-search' into cbw-1250and1251/c…
Sep 11, 2023
8378a25
Merge branch 'cbw-1260/smart-contract-listing-view' into cbw-1258and1…
Sep 11, 2023
55bf64e
Merge branch 'cbw-1258and1259/contract-search' into cbw-1250and1251/c…
Sep 11, 2023
542188d
Added age and module to contract list view
Sep 11, 2023
8755cd1
Validated performance and SQL on split query.
Sep 11, 2023
9bed3d6
Merge branch 'cbw-1260/smart-contract-listing-view' into cbw-1258and1…
Sep 11, 2023
b82bb7f
Resolve comments
Sep 11, 2023
ba46e63
Merge branch 'cbw-1258and1259/contract-search' into cbw-1250and1251/c…
Sep 11, 2023
1131387
Updated schema
Sep 11, 2023
8f6139c
Added rejected events to details
Sep 11, 2023
866008b
Fix pagination and ordering of events
Sep 11, 2023
697e220
Changed to subindex in database and made common identifier
Sep 12, 2023
b7cc600
Add new line
Sep 12, 2023
d866519
Update comments
Sep 12, 2023
7da3b79
Updated committed schema
Sep 12, 2023
5ab287e
Fix comments in UI
Sep 12, 2023
5cd4d8e
Added module to backend search and updated schema
Sep 13, 2023
f79c0e0
Added new event ContractCall which creates a contract event on the co…
Sep 13, 2023
278f392
Merge branch 'cbw-1250/contract-invoked-event' into cbw-1250/module-d…
Sep 13, 2023
e3631d8
Added frontend search functionality for modules
Sep 13, 2023
5766360
Added query to get module reference event
Sep 13, 2023
82dd6a2
Fix dublicate key violation
Sep 13, 2023
08d2f08
Fix dublicate key violation
Sep 13, 2023
6428b77
Fix test
Sep 13, 2023
035c49e
Added module details to frontend
Sep 13, 2023
651848f
Fix minor rendering issues
Sep 13, 2023
45158f2
Align search such that contracs and modules also show search
Sep 13, 2023
257e9f9
Updates changelog
Sep 13, 2023
86b1d94
Upodated Contract Upgrade with links to modules
Sep 13, 2023
d2c294e
Merge branch 'cbw-1250/contract-invoked-event' into cbw-1250/module-d…
Sep 13, 2023
e9af685
Fix missing new line
Sep 13, 2023
f6c6b17
Change to Try pattern
Sep 13, 2023
fd64758
Fixed comments
Sep 13, 2023
2297fe6
Merge branch 'cbw-1261/add-reject-events' into cbw-1260/smart-contrac…
Sep 14, 2023
146666b
Merge branch 'main' into cbw-1260/smart-contract-listing-view
Sep 14, 2023
0301bc2
Merge branch 'cbw-1260/smart-contract-listing-view' into cbw-1258and1…
Sep 14, 2023
fda6801
Merge branch 'main' into cbw-1258and1259/contract-search
Sep 14, 2023
a1bbfd9
Fixed merge issues
Sep 14, 2023
846e271
Fix schema
Sep 14, 2023
1871ee6
Merge branch 'cbw-1258and1259/contract-search' into cbw-1250and1251/c…
Sep 14, 2023
0a83576
Merge branch 'main' into cbw-1250and1251/contract-details
Sep 14, 2023
a18b5c4
Fix issues after merge
Sep 14, 2023
8bc2925
Merge branch 'cbw-1250and1251/contract-details' into cbw-1250/contrac…
Sep 14, 2023
9b73e79
Merge branch 'main' into cbw-1250/contract-invoked-event
Sep 14, 2023
c7a26aa
Add new lines
Sep 14, 2023
28e9f19
Merge branch 'cbw-1250/contract-invoked-event' into cbw-1250/module-d…
Sep 15, 2023
88bf5fa
Merge branch 'main' into cbw-1250/module-details
Sep 15, 2023
3ccc378
Bumped versions and added retry policy which retries on transient DB …
Sep 15, 2023
25a0fd7
Fix wrong sequencing
Sep 15, 2023
2103d4b
Add log when processed
Sep 15, 2023
07a68ce
Merge branch 'cbw-1264/prepare-release' into cbw-1250/module-details
Sep 15, 2023
557f0d2
Merge branch 'main' into cbw-1250/module-details
Sep 15, 2023
67a8098
Fix PR comments
Sep 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public IQueryable<Contract> GetContracts(
}

/// <summary>
/// Adds additional field to the returned GraphQL type <see cref="Contract"/>
/// Adds additional field to the GraphQL type <see cref="Contract"/>
/// </summary>
[ExtendObjectType(typeof(Contract))]
public sealed class ContractExtensions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using Application.Aggregates.Contract.Types;
using Application.Api.GraphQL;
using Application.Api.GraphQL.Accounts;
using HotChocolate;
using HotChocolate.Types;

namespace Application.Aggregates.Contract.Entities;

Expand Down Expand Up @@ -55,4 +57,14 @@ public enum ModuleReferenceContractLinkAction
Added,
Removed
}

/// <summary>
/// Adds additional fields to the GraphQL type <see cref="ModuleReferenceContractLinkEvent"/>.
/// </summary>
[ExtendObjectType(typeof(ModuleReferenceContractLinkEvent))]
public sealed class ModuleReferenceContractLinkEventExtensions
{
public ContractAddress GetContractAddress([Parent] ModuleReferenceContractLinkEvent linkEvent) =>
new(linkEvent.ContractAddressIndex, linkEvent.ContractAddressSubIndex);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
using System.Threading.Tasks;
using Application.Aggregates.Contract.Types;
using Application.Api.GraphQL;
using Application.Api.GraphQL.Accounts;
using Application.Api.GraphQL.EfCore;
using HotChocolate;
using HotChocolate.Types;
using Microsoft.EntityFrameworkCore;
using Polly;

namespace Application.Aggregates.Contract.Entities;

Expand All @@ -11,7 +18,21 @@ public sealed class ModuleReferenceEvent : BaseIdentification
public uint EventIndex { get; init; }
public string ModuleReference { get; init; } = null!;
public AccountAddress Sender { get; init; } = null!;

/// <summary>
/// It is important, that when pagination is used together with a <see cref="System.Linq.IQueryable"/> return type
/// then aggregation result like <see cref="Contract.ContractExtensions.GetAmount"/> will not be correct.
///
/// Hence pagination should only by used in cases where database query has executed like
/// <see cref="ModuleReferenceEvent.ModuleReferenceEventQuery.GetModuleReferenceEvent"/>.
/// </summary>
[UsePaging(IncludeTotalCount = true)]
public IList<ModuleReferenceContractLinkEvent> ModuleReferenceContractLinkEvents { get; init; } = null!;
/// <summary>
/// See pagination comment on above.
/// </summary>
[UsePaging(IncludeTotalCount = true)]
public IList<ModuleReferenceRejectEvent> ModuleReferenceRejectEvents { get; init; } = null!;

/// <summary>
/// Needed for EF Core
/// </summary>
Expand All @@ -33,4 +54,60 @@ public ModuleReferenceEvent(
ModuleReference = moduleReference;
Sender = sender;
}

[ExtendObjectType(typeof(Query))]
public class ModuleReferenceEventQuery
{
public Task<ModuleReferenceEvent?> GetModuleReferenceEvent(GraphQlDbContext context, string moduleReference)
{
return context.ModuleReferenceEvents
.AsSplitQuery()
.AsNoTracking()
.Where(m => m.ModuleReference == moduleReference)
.Include(m => m.ModuleReferenceContractLinkEvents
.OrderByDescending(me => me.BlockHeight)
.ThenByDescending(me => me.TransactionIndex)
.ThenByDescending(me => me.EventIndex))
.Include(m => m.ModuleReferenceRejectEvents
.OrderByDescending(me => me.BlockHeight)
.ThenByDescending(me => me.TransactionIndex))
.SingleOrDefaultAsync();
}
}

/// <summary>
/// Adds additional fields to the GraphQL type <see cref="ModuleReferenceEvent"/>.
/// </summary>
[ExtendObjectType(typeof(ModuleReferenceEvent))]
public sealed class ModuleReferenceEventExtensions
{
[UsePaging(IncludeTotalCount = true)]
public IList<LinkedContract> GetLinkedContracts([Parent] ModuleReferenceEvent moduleReferenceEvent)
{
var map = new Dictionary<(ulong, ulong), DateTimeOffset>();
foreach (var moduleReferenceContractLinkEvent in moduleReferenceEvent.ModuleReferenceContractLinkEvents
.OrderBy(me => me.BlockHeight)
.ThenBy(me => me.TransactionIndex)
.ThenBy(me => me.EventIndex))
{
switch (moduleReferenceContractLinkEvent.LinkAction)
{
case ModuleReferenceContractLinkEvent.ModuleReferenceContractLinkAction.Added:
map[(moduleReferenceContractLinkEvent.ContractAddressIndex, moduleReferenceContractLinkEvent.ContractAddressSubIndex)] = moduleReferenceContractLinkEvent.BlockSlotTime;
break;
case ModuleReferenceContractLinkEvent.ModuleReferenceContractLinkAction.Removed:
map.Remove((moduleReferenceContractLinkEvent.ContractAddressIndex,
moduleReferenceContractLinkEvent.ContractAddressSubIndex));
break;
}
}

return map
.Select(entry => new LinkedContract(new ContractAddress(entry.Key.Item1, entry.Key.Item2), entry.Value))
.OrderByDescending(l => l.LinkedDateTime)
.ToList();
}
}
}

public record LinkedContract(ContractAddress ContractAddress, DateTimeOffset LinkedDateTime);
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ internal static IRequestExecutorBuilder AddContractGraphQlConfigurations(this IR
{
builder
.AddType<Entities.Contract.ContractQuery>()
.AddTypeExtension<Entities.Contract.ContractExtensions>();
.AddTypeExtension<Entities.Contract.ContractExtensions>()
.AddType<Entities.ModuleReferenceEvent.ModuleReferenceEventQuery>()
.AddTypeExtension<Entities.ModuleReferenceEvent.ModuleReferenceEventExtensions>()
.AddTypeExtension<Entities.ModuleReferenceContractLinkEvent.ModuleReferenceContractLinkEventExtensions>();
return builder;
}

Expand Down
16 changes: 16 additions & 0 deletions backend/Application/Api/GraphQL/Search/SearchResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ public IQueryable<Contract> GetContracts(GraphQlDbContext context)
.ThenByDescending(c => c.ContractAddressSubIndex);
}

[UsePaging]
public IQueryable<ModuleReferenceEvent> GetModules(GraphQlDbContext context)
{
if (string.IsNullOrEmpty(_queryString) || !HashRegex.IsMatch(_queryString))
{
return new List<ModuleReferenceEvent>().AsQueryable();
}

var lowerCaseQuery = _queryString.ToLowerInvariant() + "%";
return context.ModuleReferenceEvents.AsNoTracking()
.Where(module => EF.Functions.Like(module.ModuleReference, lowerCaseQuery))
.OrderByDescending(module => module.BlockHeight)
.ThenByDescending(module => module.TransactionIndex)
.ThenByDescending(module => module.EventIndex);
}

[UseDbContext(typeof(GraphQlDbContext))]
[UsePaging]
public IQueryable<Block> GetBlocks([ScopedService] GraphQlDbContext dbContext)
Expand Down
5 changes: 3 additions & 2 deletions backend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
- Duration of GraphQL endpoints
- Added health checks, where application goes into degraded state if some job stops running. These health checks are now making endpoint `rest/health` redundant and it is removed.
- Added GraphQL endpoints
- Contract listing with pagination
- Extended search functionality to include contracts.
- Contract listing with pagination and details page.
- Module details page.
- Extended search functionality to include contracts and modules.
- Updated
- `HotChocolate` nuget libraries from major `12` to `13`. Because of this done some migration changes like adding `RegisterDbContext<GraphQlDbContext>(DbContextKind.Pooled)`
to GraphQL schema configuration *(migration documentation located at: https://chillicream.com/docs/hotchocolate/v13/migrating/migrate-from-12-to-13)*.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
using System.Collections.Generic;
using Application.Aggregates.Contract.Entities;
using Application.Api.GraphQL;
using FluentAssertions;
using Tests.TestUtilities.Builders;

namespace Tests.Aggregates.Contract.Entities;

public sealed class ModuleReferenceEventTests
{
[Fact]
public void WhenGetLinkedContract_ThenReturnThoseWhichHasNotBeenRemoved()
{
// Arrange
var contractFirst = new ContractAddress(1, 0);
var contractSecond = new ContractAddress(2, 0);
var contractThird = new ContractAddress(3, 0);
const string moduleReference = "fooBart";
var firstEvent = ModuleReferenceContractLinkEventBuilder.Create()
.WithBlockHeight(1)
.WithTransactionIndex(0)
.WithEventIndex(0)
.WithLinkAction(ModuleReferenceContractLinkEvent.ModuleReferenceContractLinkAction.Added)
.WithModuleReference(moduleReference)
.WithContractAddress(contractFirst)
.Build();
var secondEvent = ModuleReferenceContractLinkEventBuilder.Create()
.WithBlockHeight(1)
.WithTransactionIndex(1)
.WithEventIndex(0)
.WithLinkAction(ModuleReferenceContractLinkEvent.ModuleReferenceContractLinkAction.Added)
.WithModuleReference(moduleReference)
.WithContractAddress(contractSecond)
.Build();
var thirdEvent = ModuleReferenceContractLinkEventBuilder.Create()
.WithBlockHeight(2)
.WithTransactionIndex(0)
.WithEventIndex(0)
.WithLinkAction(ModuleReferenceContractLinkEvent.ModuleReferenceContractLinkAction.Removed)
.WithModuleReference(moduleReference)
.WithContractAddress(contractFirst)
.Build();
var fourthEvent = ModuleReferenceContractLinkEventBuilder.Create()
.WithBlockHeight(2)
.WithTransactionIndex(0)
.WithEventIndex(1)
.WithLinkAction(ModuleReferenceContractLinkEvent.ModuleReferenceContractLinkAction.Added)
.WithModuleReference(moduleReference)
.WithContractAddress(contractThird)
.Build();
var fifthEvent = ModuleReferenceContractLinkEventBuilder.Create()
.WithBlockHeight(2)
.WithTransactionIndex(0)
.WithEventIndex(2)
.WithLinkAction(ModuleReferenceContractLinkEvent.ModuleReferenceContractLinkAction.Removed)
.WithModuleReference(moduleReference)
.WithContractAddress(contractThird)
.Build();
var moduleReferenceContractLinkEvents = new List<ModuleReferenceContractLinkEvent>{firstEvent, secondEvent, thirdEvent, fourthEvent, fifthEvent};
var moduleReferenceEvent = ModuleReferenceEventBuilder.Create()
.WithModuleReferenceContractLinkEvent(moduleReferenceContractLinkEvents)
.WithModuleReference(moduleReference)
.Build();
var moduleReferenceEventExtensions = new ModuleReferenceEvent.ModuleReferenceEventExtensions();

// Act
var linkedContracts = moduleReferenceEventExtensions.GetLinkedContracts(moduleReferenceEvent);

// Assert
linkedContracts.Count.Should().Be(1);
linkedContracts[0].ContractAddress.Index.Should().Be(contractSecond.Index);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,31 @@ type LeverageFactor {
denominator: UnsignedLong!
}

type LinkedContract {
contractAddress: ContractAddress!
linkedDateTime: DateTime!
}

"A connection to a list of items."
type LinkedContractsConnection {
"Information to aid in pagination."
pageInfo: PageInfo!
"A list of edges."
edges: [LinkedContractsEdge!]
"A flattened list of the nodes."
nodes: [LinkedContract!]
"Identifies the total count of items in the connection."
totalCount: Int!
}

"An edge in a connection."
type LinkedContractsEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: LinkedContract!
}

type MicroCcdPerEuroChainUpdatePayload {
exchangeRate: ExchangeRate!
}
Expand Down Expand Up @@ -1266,6 +1291,92 @@ type ModuleReferenceContractLinkEvent {
source: ImportSource!
blockSlotTime: DateTime!
createdAt: DateTime!
contractAddress: ContractAddress!
}

"A connection to a list of items."
type ModuleReferenceContractLinkEventsConnection {
"Information to aid in pagination."
pageInfo: PageInfo!
"A list of edges."
edges: [ModuleReferenceContractLinkEventsEdge!]
"A flattened list of the nodes."
nodes: [ModuleReferenceContractLinkEvent!]
"Identifies the total count of items in the connection."
totalCount: Int!
}

"An edge in a connection."
type ModuleReferenceContractLinkEventsEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: ModuleReferenceContractLinkEvent!
}

type ModuleReferenceEvent {
eventIndex: UnsignedInt!
moduleReference: String!
sender: AccountAddress!
moduleReferenceContractLinkEvents("Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String): ModuleReferenceContractLinkEventsConnection
moduleReferenceRejectEvents("Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String): ModuleReferenceRejectEventsConnection
blockHeight: UnsignedLong!
transactionHash: String!
transactionIndex: UnsignedLong!
source: ImportSource!
blockSlotTime: DateTime!
createdAt: DateTime!
linkedContracts("Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String): LinkedContractsConnection
}

type ModuleReferenceRejectEvent {
moduleReference: String!
sender: AccountAddress!
rejectedEvent: TransactionRejectReason!
blockHeight: UnsignedLong!
transactionHash: String!
transactionIndex: UnsignedLong!
source: ImportSource!
blockSlotTime: DateTime!
createdAt: DateTime!
}

"A connection to a list of items."
type ModuleReferenceRejectEventsConnection {
"Information to aid in pagination."
pageInfo: PageInfo!
"A list of edges."
edges: [ModuleReferenceRejectEventsEdge!]
"A flattened list of the nodes."
nodes: [ModuleReferenceRejectEvent!]
"Identifies the total count of items in the connection."
totalCount: Int!
}

"An edge in a connection."
type ModuleReferenceRejectEventsEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: ModuleReferenceRejectEvent!
}

"A connection to a list of items."
type ModulesConnection {
"Information to aid in pagination."
pageInfo: PageInfo!
"A list of edges."
edges: [ModulesEdge!]
"A flattened list of the nodes."
nodes: [ModuleReferenceEvent!]
}

"An edge in a connection."
type ModulesEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: ModuleReferenceEvent!
}

type NewEncryptedAmount {
Expand Down Expand Up @@ -1631,6 +1742,7 @@ type Query {
nodeStatus(id: ID!): NodeStatus
contract(contractAddressIndex: UnsignedLong! contractAddressSubIndex: UnsignedLong!): Contract
contracts("Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String): ContractsConnection
moduleReferenceEvent(moduleReference: String!): ModuleReferenceEvent
}

type Ranking {
Expand Down Expand Up @@ -1711,6 +1823,7 @@ type ScheduledSelfTransfer {

type SearchResult {
contracts("Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String): ContractsConnection
modules("Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String): ModulesConnection
blocks("Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String): BlocksConnection
transactions("Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String): TransactionsConnection
accounts("Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String): AccountsConnection
Expand Down
Loading
Loading