Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor OG RPC - Superseded #1832

Closed
wants to merge 64 commits into from
Closed
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
0fd181c
refactor OG RPC
tudor-malene Mar 7, 2024
0a7f04f
fix
tudor-malene Mar 7, 2024
edda55a
Merge remote-tracking branch 'origin/main' into tudor/refactor_gw_rpc
tudor-malene Mar 7, 2024
c007f8a
fix
tudor-malene Mar 8, 2024
4e79024
remove p2p
tudor-malene Mar 8, 2024
4a4c90d
fix
tudor-malene Mar 8, 2024
1c43e86
fix
tudor-malene Mar 8, 2024
9faa105
fix
tudor-malene Mar 8, 2024
246f576
fix
tudor-malene Mar 8, 2024
6697b37
fix
tudor-malene Mar 8, 2024
545f5d2
fix
tudor-malene Mar 8, 2024
b19660a
fix
tudor-malene Mar 9, 2024
99527e4
fix
tudor-malene Mar 9, 2024
b38ee73
fix
tudor-malene Mar 9, 2024
c3477ee
test
tudor-malene Mar 10, 2024
5704fa0
fixes
tudor-malene Mar 11, 2024
ff103af
fixes
tudor-malene Mar 11, 2024
3f4b2ea
fixes
tudor-malene Mar 11, 2024
fd59507
fixes
tudor-malene Mar 11, 2024
4ef979e
lint
tudor-malene Mar 11, 2024
5eb38ca
fix
tudor-malene Mar 11, 2024
5bc0061
Merge remote-tracking branch 'origin/main' into tudor/refactor_gw_rpc
tudor-malene Mar 11, 2024
223f999
fix
tudor-malene Mar 11, 2024
9e19381
fix
tudor-malene Mar 11, 2024
9f692c7
fix
tudor-malene Mar 11, 2024
2ba43c9
fix
tudor-malene Mar 11, 2024
624ed84
fix
tudor-malene Mar 11, 2024
f9b86fd
fix
tudor-malene Mar 11, 2024
014cb54
fix
tudor-malene Mar 11, 2024
56d8567
fix
tudor-malene Mar 12, 2024
a4c6b47
fix
tudor-malene Mar 12, 2024
4f06923
fix
tudor-malene Mar 12, 2024
545eb26
fix
tudor-malene Mar 12, 2024
3b0b03f
fix
tudor-malene Mar 13, 2024
a2d3c7e
fix
tudor-malene Mar 13, 2024
6333ac7
fix
tudor-malene Mar 13, 2024
ee9b5b8
fix
tudor-malene Mar 13, 2024
9847846
fix
tudor-malene Mar 13, 2024
40f0eeb
fix
tudor-malene Mar 13, 2024
e24570b
fix
tudor-malene Mar 13, 2024
e1b02ae
fixes
tudor-malene Mar 13, 2024
adb6479
fixes
tudor-malene Mar 14, 2024
d6a9922
Merge remote-tracking branch 'origin/main' into tudor/refactor_gw_rpc
tudor-malene Mar 14, 2024
a6025a3
fixes
tudor-malene Mar 14, 2024
d77dbab
fixes
tudor-malene Mar 14, 2024
e3fb769
fixes
tudor-malene Mar 15, 2024
8c28f94
fixes
tudor-malene Mar 15, 2024
40a2f28
fixes
tudor-malene Mar 15, 2024
42d675c
fixes
tudor-malene Mar 15, 2024
b90408a
fixes
tudor-malene Mar 15, 2024
9d78fd9
fixes
tudor-malene Mar 15, 2024
7a5c46a
fixes
tudor-malene Mar 15, 2024
bb6e22d
fixes
tudor-malene Mar 15, 2024
9a9232f
fixes
tudor-malene Mar 15, 2024
015b137
fixes
tudor-malene Mar 18, 2024
86fed33
fixes
tudor-malene Mar 18, 2024
4151997
fixes
tudor-malene Mar 18, 2024
5ab72f4
fixes
tudor-malene Mar 18, 2024
3fd2938
fixes
tudor-malene Mar 18, 2024
bb993dd
fixes
tudor-malene Mar 18, 2024
f00600d
fixes
tudor-malene Mar 18, 2024
b2ecded
fixes
tudor-malene Mar 18, 2024
b73f95b
fixes
tudor-malene Mar 18, 2024
b4a7bd9
fixes
tudor-malene Mar 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ go 1.20
replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220224222438-c78f6963a1c0+incompatible

require (
github.com/Microsoft/go-winio v0.6.1
github.com/andybalholm/brotli v1.0.5
github.com/deckarep/golang-set/v2 v2.1.0
github.com/dgraph-io/ristretto v0.1.1
github.com/docker/docker v24.0.5+incompatible
github.com/docker/go-connections v0.4.0
Expand All @@ -17,14 +19,17 @@ require (
github.com/gin-gonic/gin v1.9.1
github.com/go-kit/kit v0.10.0
github.com/go-sql-driver/mysql v1.4.1
github.com/gofrs/flock v0.8.1
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang-jwt/jwt/v4 v4.3.0
github.com/google/uuid v1.3.0
github.com/gorilla/websocket v1.4.2
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/holiman/uint256 v1.2.3
github.com/mattn/go-sqlite3 v1.14.16
github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416
github.com/pkg/errors v0.9.1
github.com/rs/cors v1.7.0
github.com/sanity-io/litter v1.5.5
github.com/status-im/keycard-go v0.2.0
github.com/stretchr/testify v1.8.3
Expand All @@ -42,7 +47,6 @@ require (
require (
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/DataDog/zstd v1.5.2 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/VictoriaMetrics/fastcache v1.6.0 // indirect
github.com/allegro/bigcache v1.2.1 // indirect
Expand All @@ -63,7 +67,6 @@ require (
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/crate-crypto/go-kzg-4844 v0.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/go-units v0.5.0 // indirect
Expand All @@ -82,9 +85,7 @@ require (
github.com/go-playground/validator/v10 v10.14.0 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.3.0 // indirect
github.com/golang/glog v1.0.0 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
Expand Down Expand Up @@ -122,7 +123,6 @@ require (
github.com/prometheus/common v0.39.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/rs/cors v1.7.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion go/common/enclave.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (

"github.com/ten-protocol/go-ten/go/common/errutil"

"github.com/ethereum/go-ethereum/rpc"
"github.com/ten-protocol/go-ten/go/common/tracers"
"github.com/ten-protocol/go-ten/go/responses"
"github.com/ten-protocol/go-ten/lib/gethfork/rpc"

gethcommon "github.com/ethereum/go-ethereum/common"
)
Expand Down
61 changes: 47 additions & 14 deletions go/common/gethencoding/geth_encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@
"github.com/ten-protocol/go-ten/go/enclave/crypto"

"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ten-protocol/go-ten/go/common/errutil"
"github.com/ten-protocol/go-ten/go/common/gethapi"

gethcommon "github.com/ethereum/go-ethereum/common"
gethrpc "github.com/ethereum/go-ethereum/rpc"
gethrpc "github.com/ten-protocol/go-ten/lib/gethfork/rpc"
)

const (
Expand Down Expand Up @@ -145,33 +144,67 @@
}

// ExtractOptionalBlockNumber defaults nil or empty block number params to latest block number
func ExtractOptionalBlockNumber(params []interface{}, idx int) (*gethrpc.BlockNumber, error) {
func ExtractOptionalBlockNumber(params []interface{}, idx int) (*gethrpc.BlockNumberOrHash, error) {
latest := gethrpc.BlockNumberOrHashWithNumber(gethrpc.LatestBlockNumber)
if len(params) <= idx {
return ExtractBlockNumber("latest")
return &latest, nil
}
if params[idx] == nil {
return ExtractBlockNumber("latest")
return &latest, nil
}
if emptyStr, ok := params[idx].(string); ok && len(strings.TrimSpace(emptyStr)) == 0 {
return ExtractBlockNumber("latest")
return &latest, nil
}

return ExtractBlockNumber(params[idx])
}

// ExtractBlockNumber returns a gethrpc.BlockNumber given an interface{}, errors if unexpected values are used
func ExtractBlockNumber(param interface{}) (*gethrpc.BlockNumber, error) {
func ExtractBlockNumber(param interface{}) (*gethrpc.BlockNumberOrHash, error) {
var blockNo *gethrpc.BlockNumber
var blockHa *gethcommon.Hash
var reqCanon bool

if param == nil {
return nil, errutil.ErrNotFound
latest := gethrpc.BlockNumberOrHashWithNumber(gethrpc.LatestBlockNumber)
return &latest, nil
}

blockNumber := gethrpc.BlockNumber(0)
err := blockNumber.UnmarshalJSON([]byte(param.(string)))
if err != nil {
return nil, fmt.Errorf("could not parse requested rollup number %s - %w", param.(string), err)
blockString, ok := param.(string)
if ok {

Check failure on line 173 in go/common/gethencoding/geth_encoding.go

View workflow job for this annotation

GitHub Actions / lint

`if ok` has complex nested blocks (complexity: 8) (nestif)
blockNumber := gethrpc.BlockNumber(0)
err := blockNumber.UnmarshalJSON([]byte(blockString))
if err != nil {
return nil, fmt.Errorf("invalid block number %s - %w", blockString, err)
}
blockNo = &blockNumber
} else {
blockAndHash, ok := param.(map[string]any)
if !ok {
return nil, fmt.Errorf("invalid block or hash parameter %s", param.(string))
}
if blockAndHash["blockNumber"] != nil {
b := blockAndHash["blockNumber"].(string)
blockNumber := gethrpc.BlockNumber(0)
err := blockNumber.UnmarshalJSON([]byte(b))
if err != nil {
return nil, fmt.Errorf("invalid block number %s - %w", b, err)
}
blockNo = &blockNumber
}
if blockAndHash["blockHash"] != nil {
bh := blockAndHash["blockHash"].(gethcommon.Hash)
blockHa = &bh
}
if blockAndHash["RequireCanonical"] != nil {
reqCanon = blockAndHash["RequireCanonical"].(bool)
}
}

return &blockNumber, err
return &gethrpc.BlockNumberOrHash{
BlockNumber: blockNo,
BlockHash: blockHa,
RequireCanonical: reqCanon,
}, nil
}

// ExtractEthCall extracts the eth_call gethapi.TransactionArgs from an interface{}
Expand Down
2 changes: 1 addition & 1 deletion go/common/host/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package host

import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/rpc"
"github.com/ten-protocol/go-ten/go/common"
"github.com/ten-protocol/go-ten/go/config"
"github.com/ten-protocol/go-ten/go/host/db"
"github.com/ten-protocol/go-ten/go/responses"
"github.com/ten-protocol/go-ten/lib/gethfork/rpc"
)

// Host is the half of the Obscuro node that lives outside the enclave.
Expand Down
2 changes: 1 addition & 1 deletion go/common/host/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package host
import (
"math/big"

"github.com/ethereum/go-ethereum/rpc"
"github.com/ten-protocol/go-ten/go/responses"
"github.com/ten-protocol/go-ten/lib/gethfork/rpc"

gethcommon "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
Expand Down
2 changes: 1 addition & 1 deletion go/common/log_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/eth/filters"
"github.com/ethereum/go-ethereum/rpc"
"github.com/ten-protocol/go-ten/go/common/viewingkey"
"github.com/ten-protocol/go-ten/lib/gethfork/rpc"
)

// LogSubscription is an authenticated subscription to logs.
Expand Down
2 changes: 1 addition & 1 deletion go/common/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/rpc"
"github.com/ten-protocol/go-ten/contracts/generated/MessageBus"
"github.com/ten-protocol/go-ten/lib/gethfork/rpc"
)

type (
Expand Down
6 changes: 3 additions & 3 deletions go/common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ func ShortNonce(nonce types.BlockNonce) uint64 {
}

// ExtractPotentialAddress - given a 32 byte hash , it checks whether it can be an address and extracts that
func ExtractPotentialAddress(hash gethcommon.Hash) *gethcommon.Address {
bitlen := hash.Big().BitLen()
func ExtractPotentialAddress(topic gethcommon.Hash) *gethcommon.Address {
bitlen := topic.Big().BitLen()
// Addresses have 20 bytes. If the field has more, it means it is clearly not an address
// Discovering addresses with more than 20 leading 0s is very unlikely, so we assume that
// any topic that has less than 80 bits of data to not be an address for sure
if bitlen < 80 || bitlen > 160 {
return nil
}
a := gethcommon.BytesToAddress(hash.Bytes())
a := gethcommon.BytesToAddress(topic.Bytes())
return &a
}

Expand Down
2 changes: 1 addition & 1 deletion go/enclave/components/batch_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import (

"github.com/ethereum/go-ethereum/core/state"
gethlog "github.com/ethereum/go-ethereum/log"
gethrpc "github.com/ethereum/go-ethereum/rpc"
"github.com/ten-protocol/go-ten/go/common/async"
"github.com/ten-protocol/go-ten/go/common/errutil"
"github.com/ten-protocol/go-ten/go/common/log"
"github.com/ten-protocol/go-ten/go/common/measure"
"github.com/ten-protocol/go-ten/go/enclave/core"
"github.com/ten-protocol/go-ten/go/enclave/limiters"
gethrpc "github.com/ten-protocol/go-ten/lib/gethfork/rpc"
)

type batchRegistry struct {
Expand Down
2 changes: 1 addition & 1 deletion go/enclave/components/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/params"
gethrpc "github.com/ethereum/go-ethereum/rpc"
"github.com/ten-protocol/go-ten/go/common"
"github.com/ten-protocol/go-ten/go/enclave/core"
"github.com/ten-protocol/go-ten/go/enclave/limiters"
gethrpc "github.com/ten-protocol/go-ten/lib/gethfork/rpc"
)

var ErrDuplicateRollup = errors.New("duplicate rollup received")
Expand Down
2 changes: 1 addition & 1 deletion go/enclave/enclave.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import (
gethcommon "github.com/ethereum/go-ethereum/common"
gethcore "github.com/ethereum/go-ethereum/core"
gethlog "github.com/ethereum/go-ethereum/log"
gethrpc "github.com/ethereum/go-ethereum/rpc"
gethrpc "github.com/ten-protocol/go-ten/lib/gethfork/rpc"
)

var _noHeadBatch = big.NewInt(0)
Expand Down
2 changes: 1 addition & 1 deletion go/enclave/events/subscription_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"math/big"
"sync"

gethrpc "github.com/ethereum/go-ethereum/rpc"
"github.com/ten-protocol/go-ten/go/enclave/vkhandler"
gethrpc "github.com/ten-protocol/go-ten/lib/gethfork/rpc"

"github.com/ten-protocol/go-ten/go/common/log"

Expand Down
2 changes: 1 addition & 1 deletion go/enclave/evm/evm_facade.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
gethcommon "github.com/ethereum/go-ethereum/common"
gethcore "github.com/ethereum/go-ethereum/core"
gethlog "github.com/ethereum/go-ethereum/log"
gethrpc "github.com/ethereum/go-ethereum/rpc"
gethrpc "github.com/ten-protocol/go-ten/lib/gethfork/rpc"
)

// ExecuteTransactions
Expand Down
3 changes: 2 additions & 1 deletion go/enclave/evm/no_op_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package evm
import (
"math/big"

"github.com/ethereum/go-ethereum/rpc"

gethlog "github.com/ethereum/go-ethereum/log"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/rpc"
)

// PoolAddress - address of the pool where the gas will go
Expand Down
3 changes: 2 additions & 1 deletion go/enclave/l2chain/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
gethcore "github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/vm"
gethrpc "github.com/ethereum/go-ethereum/rpc"
"github.com/ten-protocol/go-ten/go/common/gethapi"
"github.com/ten-protocol/go-ten/go/enclave/core"
gethrpc "github.com/ten-protocol/go-ten/lib/gethfork/rpc"
)

// ObscuroChain - the interface that provides the data access layer to the obscuro l2.
Expand All @@ -18,6 +18,7 @@ type ObscuroChain interface {
// For EOA - the actual address.
// For Contracts - the address of the deployer.
// Note - this might be subject to change if we implement a more flexible mechanism
// todo - BlockNumberOrHash
AccountOwner(address gethcommon.Address, blockNumber *gethrpc.BlockNumber) (*gethcommon.Address, error)

// GetBalanceAtBlock - will return the balance of a specific address at the specific given block number (batch number).
Expand Down
2 changes: 1 addition & 1 deletion go/enclave/l2chain/l2_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/ethereum/go-ethereum/core/vm"
gethlog "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
gethrpc "github.com/ethereum/go-ethereum/rpc"
"github.com/status-im/keycard-go/hexutils"
"github.com/ten-protocol/go-ten/go/common/gethapi"
"github.com/ten-protocol/go-ten/go/common/gethencoding"
Expand All @@ -24,6 +23,7 @@ import (
"github.com/ten-protocol/go-ten/go/enclave/core"
"github.com/ten-protocol/go-ten/go/enclave/evm"
"github.com/ten-protocol/go-ten/go/enclave/genesis"
gethrpc "github.com/ten-protocol/go-ten/lib/gethfork/rpc"
)

type obscuroChain struct {
Expand Down
5 changes: 3 additions & 2 deletions go/enclave/rpc/EstimateGas.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
gethcommon "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
gethcore "github.com/ethereum/go-ethereum/core"
gethrpc "github.com/ethereum/go-ethereum/rpc"
"github.com/ten-protocol/go-ten/go/common/gethapi"
"github.com/ten-protocol/go-ten/go/common/gethencoding"
"github.com/ten-protocol/go-ten/go/common/syserr"
gethrpc "github.com/ten-protocol/go-ten/lib/gethfork/rpc"
)

func EstimateGasValidate(reqParams []any, builder *CallBuilder[CallParamsWithBlock, hexutil.Uint64], _ *EncryptionManager) error {
Expand Down Expand Up @@ -47,7 +47,8 @@ func EstimateGasValidate(reqParams []any, builder *CallBuilder[CallParamsWithBlo
}

builder.From = callMsg.From
builder.Param = &CallParamsWithBlock{callMsg, blockNumber}
// todo
builder.Param = &CallParamsWithBlock{callMsg, blockNumber.BlockNumber}
return nil
}

Expand Down
9 changes: 5 additions & 4 deletions go/enclave/rpc/GetBalance.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import (

"github.com/ethereum/go-ethereum/common"

"github.com/ethereum/go-ethereum/rpc"
"github.com/ten-protocol/go-ten/lib/gethfork/rpc"

"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ten-protocol/go-ten/go/common/gethencoding"
)

type BalanceReq struct {
Addr *common.Address
Block *rpc.BlockNumber
Block *rpc.BlockNumberOrHash
}

func GetBalanceValidate(reqParams []any, builder *CallBuilder[BalanceReq, hexutil.Big], _ *EncryptionManager) error {
Expand Down Expand Up @@ -41,7 +41,8 @@ func GetBalanceValidate(reqParams []any, builder *CallBuilder[BalanceReq, hexuti
}

func GetBalanceExecute(builder *CallBuilder[BalanceReq, hexutil.Big], rpc *EncryptionManager) error {
acctOwner, err := rpc.chain.AccountOwner(*builder.Param.Addr, builder.Param.Block)
// todo
acctOwner, err := rpc.chain.AccountOwner(*builder.Param.Addr, builder.Param.Block.BlockNumber)
if err != nil {
return err
}
Expand All @@ -53,7 +54,7 @@ func GetBalanceExecute(builder *CallBuilder[BalanceReq, hexutil.Big], rpc *Encry
return nil
}

balance, err := rpc.chain.GetBalanceAtBlock(*builder.Param.Addr, builder.Param.Block)
balance, err := rpc.chain.GetBalanceAtBlock(*builder.Param.Addr, builder.Param.Block.BlockNumber)
if err != nil {
return fmt.Errorf("unable to get balance - %w", err)
}
Expand Down
Loading
Loading