Class AccessListConverter
EIP-2930 Access List JSON Converter
Inherited Members
Namespace: Hiero.Converters
Assembly: Hiero.dll
Syntax
public sealed class AccessListConverter : JsonConverter<AccessListEntryData[]?>
Remarks
The mirror node reports a contract result's access list as an array of entries, but versions up to at least v0.152 reported it as an opaque string. That form carries nothing an AccessListEntryData can hold, so it reads as null rather than failing the whole result.
Methods
| Edit this page View SourceRead(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type T.
Declaration
public override AccessListEntryData[]? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonReader | reader | The reader. |
| Type | typeToConvert | The type to convert. |
| JsonSerializerOptions | options | An object that specifies serialization options to use. |
Returns
| Type | Description |
|---|---|
| AccessListEntryData[] | The converted value. |
Overrides
| Edit this page View SourceWrite(Utf8JsonWriter, AccessListEntryData[]?, JsonSerializerOptions)
Writes a specified value as JSON.
Declaration
public override void Write(Utf8JsonWriter writer, AccessListEntryData[]? entries, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonWriter | writer | The writer to write to. |
| AccessListEntryData[] | entries | |
| JsonSerializerOptions | options | An object that specifies serialization options to use. |