forked from NethermindEth/nethermind
-
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.
Merge branch 'NethermindEth:master' into master
- Loading branch information
Showing
309 changed files
with
2,860 additions
and
2,226 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
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
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
23 changes: 10 additions & 13 deletions
23
src/Nethermind/Nethermind.AccountAbstraction/Network/UserOperationsMessage.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 |
---|---|---|
@@ -1,37 +1,34 @@ | ||
// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited | ||
// SPDX-License-Identifier: LGPL-3.0-only | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using Nethermind.AccountAbstraction.Data; | ||
using Nethermind.Core; | ||
using Nethermind.Core.Collections; | ||
using Nethermind.Network.P2P.Messages; | ||
|
||
namespace Nethermind.AccountAbstraction.Network | ||
{ | ||
public class UserOperationsMessage : P2PMessage | ||
public class UserOperationsMessage(IOwnedReadOnlyList<UserOperationWithEntryPoint> userOperations) : P2PMessage | ||
{ | ||
public override int PacketType { get; } = AaMessageCode.UserOperations; | ||
public override string Protocol { get; } = "aa"; | ||
|
||
public IList<UserOperationWithEntryPoint> UserOperationsWithEntryPoint { get; } | ||
public IOwnedReadOnlyList<UserOperationWithEntryPoint> UserOperationsWithEntryPoint { get; } = userOperations; | ||
|
||
public UserOperationsMessage(IList<UserOperationWithEntryPoint> userOperations) | ||
public override void Dispose() | ||
{ | ||
UserOperationsWithEntryPoint = userOperations; | ||
base.Dispose(); | ||
UserOperationsWithEntryPoint.Dispose(); | ||
} | ||
|
||
public override string ToString() => $"{nameof(UserOperationsMessage)}({UserOperationsWithEntryPoint?.Count})"; | ||
} | ||
|
||
public class UserOperationWithEntryPoint | ||
public class UserOperationWithEntryPoint(UserOperation userOperation, Address entryPoint) | ||
{ | ||
public UserOperation UserOperation { get; } | ||
public Address EntryPoint { get; } | ||
|
||
public UserOperationWithEntryPoint(UserOperation userOperation, Address entryPoint) | ||
{ | ||
UserOperation = userOperation; | ||
EntryPoint = entryPoint; | ||
} | ||
public UserOperation UserOperation { get; } = userOperation; | ||
public Address EntryPoint { get; } = entryPoint; | ||
} | ||
} |
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
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.