-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make eth_getAccessList compatible with geth (#2976)
* Make eth_getAccessList compatible with geth * fix test
- Loading branch information
1 parent
546b2a6
commit 3c0e001
Showing
6 changed files
with
68 additions
and
27 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
35 changes: 35 additions & 0 deletions
35
src/Nethermind/Nethermind.Serialization.Json/StorageCellIndexConverter.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,35 @@ | ||
// Copyright (c) 2021 Demerzel Solutions Limited | ||
// This file is part of the Nethermind library. | ||
// | ||
// The Nethermind library is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Lesser General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// The Nethermind library is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Lesser General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Lesser General Public License | ||
// along with the Nethermind. If not, see <http://www.gnu.org/licenses/>. | ||
// | ||
|
||
using System; | ||
using Nethermind.Core.Extensions; | ||
using Nethermind.Int256; | ||
using Newtonsoft.Json; | ||
|
||
namespace Nethermind.Serialization.Json | ||
{ | ||
public class StorageCellIndexConverter : JsonConverter<UInt256> | ||
{ | ||
public override void WriteJson(JsonWriter writer, UInt256 value, JsonSerializer serializer) | ||
{ | ||
writer.WriteValue(value.ToHexString(false)); | ||
} | ||
|
||
public override UInt256 ReadJson(JsonReader reader, Type objectType, UInt256 existingValue, bool hasExistingValue, JsonSerializer serializer) => | ||
UInt256Converter.ReaderJson(reader); | ||
} | ||
} |
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