@@ -24,7 +24,7 @@ import (
2424 "sync"
2525 "time"
2626
27- ethereum "github.com/microstack-tech/parallax"
27+ "github.com/microstack-tech/parallax"
2828 "github.com/microstack-tech/parallax/accounts/abi"
2929 "github.com/microstack-tech/parallax/accounts/abi/bind"
3030 "github.com/microstack-tech/parallax/common"
@@ -231,7 +231,7 @@ func (b *SimulatedBackend) TransactionReceipt(ctx context.Context, txHash common
231231
232232 receipt , _ , _ , _ := rawdb .ReadReceipt (b .database , txHash , b .config )
233233 if receipt == nil {
234- return nil , ethereum . NotFound
234+ return nil , parallax . ErrNotFound
235235 }
236236 return receipt , nil
237237}
@@ -252,7 +252,7 @@ func (b *SimulatedBackend) TransactionByHash(ctx context.Context, txHash common.
252252 if tx != nil {
253253 return tx , false , nil
254254 }
255- return nil , false , ethereum . NotFound
255+ return nil , false , parallax . ErrNotFound
256256}
257257
258258// BlockByHash retrieves a block based on the block hash.
@@ -414,7 +414,7 @@ func (e *revertError) ErrorData() any {
414414}
415415
416416// CallContract executes a contract call.
417- func (b * SimulatedBackend ) CallContract (ctx context.Context , call ethereum .CallMsg , blockNumber * big.Int ) ([]byte , error ) {
417+ func (b * SimulatedBackend ) CallContract (ctx context.Context , call parallax .CallMsg , blockNumber * big.Int ) ([]byte , error ) {
418418 b .mu .Lock ()
419419 defer b .mu .Unlock ()
420420
@@ -437,7 +437,7 @@ func (b *SimulatedBackend) CallContract(ctx context.Context, call ethereum.CallM
437437}
438438
439439// PendingCallContract executes a contract call on the pending state.
440- func (b * SimulatedBackend ) PendingCallContract (ctx context.Context , call ethereum .CallMsg ) ([]byte , error ) {
440+ func (b * SimulatedBackend ) PendingCallContract (ctx context.Context , call parallax .CallMsg ) ([]byte , error ) {
441441 b .mu .Lock ()
442442 defer b .mu .Unlock ()
443443 defer b .pendingState .RevertToSnapshot (b .pendingState .Snapshot ())
@@ -482,7 +482,7 @@ func (b *SimulatedBackend) SuggestGasTipCap(ctx context.Context) (*big.Int, erro
482482
483483// EstimateGas executes the requested code against the currently pending block/state and
484484// returns the used amount of gas.
485- func (b * SimulatedBackend ) EstimateGas (ctx context.Context , call ethereum .CallMsg ) (uint64 , error ) {
485+ func (b * SimulatedBackend ) EstimateGas (ctx context.Context , call parallax .CallMsg ) (uint64 , error ) {
486486 b .mu .Lock ()
487487 defer b .mu .Unlock ()
488488
@@ -585,7 +585,7 @@ func (b *SimulatedBackend) EstimateGas(ctx context.Context, call ethereum.CallMs
585585
586586// callContract implements common code between normal and pending contract calls.
587587// state is modified during execution, make sure to copy it if necessary.
588- func (b * SimulatedBackend ) callContract (ctx context.Context , call ethereum .CallMsg , block * types.Block , stateDB * state.StateDB ) (* core.ExecutionResult , error ) {
588+ func (b * SimulatedBackend ) callContract (ctx context.Context , call parallax .CallMsg , block * types.Block , stateDB * state.StateDB ) (* core.ExecutionResult , error ) {
589589 // Gas prices post 1559 need to be initialized
590590 if call .GasPrice != nil && (call .GasFeeCap != nil || call .GasTipCap != nil ) {
591591 return nil , errors .New ("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified" )
@@ -678,7 +678,7 @@ func (b *SimulatedBackend) SendTransaction(ctx context.Context, tx *types.Transa
678678// returning all the results in one batch.
679679//
680680// TODO(karalabe): Deprecate when the subscription one can return past data too.
681- func (b * SimulatedBackend ) FilterLogs (ctx context.Context , query ethereum .FilterQuery ) ([]types.Log , error ) {
681+ func (b * SimulatedBackend ) FilterLogs (ctx context.Context , query parallax .FilterQuery ) ([]types.Log , error ) {
682682 var filter * filters.Filter
683683 if query .BlockHash != nil {
684684 // Block filter requested, construct a single-shot filter
@@ -710,7 +710,7 @@ func (b *SimulatedBackend) FilterLogs(ctx context.Context, query ethereum.Filter
710710
711711// SubscribeFilterLogs creates a background log filtering operation, returning a
712712// subscription immediately, which can be used to stream the found events.
713- func (b * SimulatedBackend ) SubscribeFilterLogs (ctx context.Context , query ethereum .FilterQuery , ch chan <- types.Log ) (ethereum .Subscription , error ) {
713+ func (b * SimulatedBackend ) SubscribeFilterLogs (ctx context.Context , query parallax .FilterQuery , ch chan <- types.Log ) (parallax .Subscription , error ) {
714714 // Subscribe to contract events
715715 sink := make (chan []* types.Log )
716716
@@ -743,7 +743,7 @@ func (b *SimulatedBackend) SubscribeFilterLogs(ctx context.Context, query ethere
743743}
744744
745745// SubscribeNewHead returns an event subscription for a new header.
746- func (b * SimulatedBackend ) SubscribeNewHead (ctx context.Context , ch chan <- * types.Header ) (ethereum .Subscription , error ) {
746+ func (b * SimulatedBackend ) SubscribeNewHead (ctx context.Context , ch chan <- * types.Header ) (parallax .Subscription , error ) {
747747 // subscribe to a new head
748748 sink := make (chan * types.Header )
749749 sub := b .events .SubscribeNewHeads (sink )
@@ -793,7 +793,7 @@ func (b *SimulatedBackend) Blockchain() *core.BlockChain {
793793
794794// callMsg implements core.Message to allow passing it as a transaction simulator.
795795type callMsg struct {
796- ethereum .CallMsg
796+ parallax .CallMsg
797797}
798798
799799func (m callMsg ) From () common.Address { return m .CallMsg .From }
0 commit comments