|
|
@@ -980,8 +980,8 @@ type BlockChainAPI struct {
|
|
|
}
|
|
|
|
|
|
// NewBlockChainAPI creates a new Ethereum blockchain API.
|
|
|
-func NewBlockChainAPI(b Backend) *BlockChainAPI {
|
|
|
- return &BlockChainAPI{b}
|
|
|
+func NewBlockChainAPI(b Backend) *PublicBlockChainAPI {
|
|
|
+ return &PublicBlockChainAPI{b}
|
|
|
}
|
|
|
|
|
|
// BatchCall executes a series of transactions on the state of a given block as base.
|
|
|
@@ -991,7 +991,7 @@ func NewBlockChainAPI(b Backend) *BlockChainAPI {
|
|
|
//
|
|
|
// Note, this function doesn't make any changes in the state/blockchain and is
|
|
|
// useful to execute and retrieve values.
|
|
|
-func (s *BlockChainAPI) BatchCall(ctx context.Context, config BatchCallConfig) ([]CallResult, error) {
|
|
|
+func (s *PublicBlockChainAPI) BatchCall(ctx context.Context, config BatchCallConfig) ([]CallResult, error) {
|
|
|
state, header, err := s.b.StateAndHeaderByNumberOrHash(ctx, config.Block)
|
|
|
if state == nil || err != nil {
|
|
|
return nil, err
|