-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/3518 use generic eth client for l2 (#3519)
* #3518 compatibility with ethereum-API L2 node * migrate docker-compose to v2 because ubuntu:latest have deprecated it * fix case trusted URL is not set
- Loading branch information
1 parent
31aecea
commit 26ec1b5
Showing
8 changed files
with
221 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
synchronizer/common/syncinterfaces/mocks/zkevm_client_ethereum_compatible_interface.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
synchronizer/common/syncinterfaces/zkevm_ethereum_compatible_client.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package syncinterfaces | ||
|
||
import ( | ||
"context" | ||
"math/big" | ||
|
||
"github.com/ethereum/go-ethereum/core/types" | ||
) | ||
|
||
// ZKEVMClientEthereumCompatibleInterface contains the methods required to interact with zkEVM-RPC as a ethereum-API compatible | ||
// | ||
// Reason behind: the zkEVMClient have some extensions to ethereum-API that are not compatible with all nodes. So if you need to maximize | ||
// the compatibility the idea is to use a regular ethereum-API compatible client | ||
type ZKEVMClientEthereumCompatibleInterface interface { | ||
ZKEVMClientEthereumCompatibleL2BlockGetter | ||
} | ||
|
||
// ZKEVMClientEthereumCompatibleL2BlockGetter contains the methods required to interact with zkEVM-RPC as a ethereum-API compatible for obtain Block information | ||
type ZKEVMClientEthereumCompatibleL2BlockGetter interface { | ||
BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.