Skip to content

Commit

Permalink
Include Y, R, and yParity fields
Browse files Browse the repository at this point in the history
  • Loading branch information
emlautarom1 committed Oct 14, 2024
1 parent b6b57bf commit 2023723
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,8 @@ public class SetCodeTransactionForRpc : EIP1559TransactionForRpc, IFromTransacti
[JsonIgnore(Condition = JsonIgnoreCondition.Always)]
public override UInt256? GasPrice { get; set; }

[JsonIgnore(Condition = JsonIgnoreCondition.Always)]
public override UInt256? YParity { get; set; }

[JsonIgnore(Condition = JsonIgnoreCondition.Always)]
public override UInt256? V { get; set; }

[JsonIgnore(Condition = JsonIgnoreCondition.Always)]
public override UInt256? R { get; set; }

[JsonIgnore(Condition = JsonIgnoreCondition.Always)]
public override UInt256? S { get; set; }
#endregion

[JsonConstructor]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ public static void ValidateSchema(JsonElement json)
});
}
json.GetProperty("chainId").GetString().Should().MatchRegex("^0x([1-9a-f]+[0-9a-f]*|0)$");
json.GetProperty("yParity").GetString().Should().MatchRegex("^0x([1-9a-f]+[0-9a-f]*|0)$");
json.GetProperty("r").GetString().Should().MatchRegex("^0x([1-9a-f]+[0-9a-f]*|0)$");
json.GetProperty("s").GetString().Should().MatchRegex("^0x([1-9a-f]+[0-9a-f]*|0)$");
// NOTE: Empty authorization lists are considered invalid
json.GetProperty("authorizationList").EnumerateArray().Should().AllSatisfy(tuple =>
{
Expand All @@ -129,9 +132,6 @@ public static void ValidateSchema(JsonElement json)

// Assert deprecated fields are no longer serialized
json.TryGetProperty("gasPrice", out _).Should().BeFalse();
json.TryGetProperty("yParity", out _).Should().BeFalse();
json.TryGetProperty("v", out _).Should().BeFalse();
json.TryGetProperty("r", out _).Should().BeFalse();
json.TryGetProperty("s", out _).Should().BeFalse();
}
}

0 comments on commit 2023723

Please sign in to comment.