Eth JSON-RPC: use ToFilecoinAddress() to get f4 addr and validate v sig + cleanups (#9970)

Co-authored-by: raulk <raul@protocol.ai>
This commit is contained in:
ychiao
2023-01-12 14:55:07 +00:00
committed by GitHub
co-authored by raulk
parent c61edd1d6d
commit 105a1259bc
15 changed files with 141 additions and 114 deletions
+4 -4
View File
@@ -375,10 +375,10 @@ func init() {
addExample(ethint)
addExample(&ethint)
ethaddr, _ := ethtypes.EthAddressFromHex("0x5CbEeCF99d3fDB3f25E309Cc264f240bb0664031")
ethaddr, _ := ethtypes.ParseEthAddress("0x5CbEeCF99d3fDB3f25E309Cc264f240bb0664031")
addExample(ethaddr)
addExample(&ethaddr)
ethhash, _ := ethtypes.NewEthHashFromCid(c)
ethhash, _ := ethtypes.EthHashFromCid(c)
addExample(ethhash)
addExample(&ethhash)
@@ -387,10 +387,10 @@ func init() {
addExample(&uuid.UUID{})
filterid, _ := ethtypes.NewEthHashFromHex("0x5CbEeC012345673f25E309Cc264f240bb0664031")
filterid, _ := ethtypes.ParseEthHash("0x5CbEeC012345673f25E309Cc264f240bb0664031")
addExample(ethtypes.EthFilterID(filterid))
subid, _ := ethtypes.NewEthHashFromHex("0x5CbEeCF99d3fDB301234567c264f240bb0664031")
subid, _ := ethtypes.ParseEthHash("0x5CbEeCF99d3fDB301234567c264f240bb0664031")
addExample(ethtypes.EthSubscriptionID(subid))
pstring := func(s string) *string { return &s }