You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- You'll know you did it right if you can run `foundryup-zksync --help` and you see a response like:
83
+
```
84
+
The installer for Foundry-zksync.
85
+
86
+
Update or revert to a specific Foundry-zksync version with ease.
87
+
.
88
+
.
89
+
.
90
+
```
91
+
92
+
### Usage - ZkSyncChecker
93
+
94
+
In your contract, you can import and inherit the abstract contract `ZkSyncChecker` to check if you are on a zkSync based chain. And add the `skipZkSync` modifier to any function you want to skip if you are on a zkSync based chain.
95
+
96
+
It will check both the precompiles or the `chainid` to determine if you are on a zkSync based chain.
- `skipZkSync`: Skips the function if you are on a zkSync based chain.
108
+
- `onlyZkSync`: Only allows the function if you are on a zkSync based chain.
109
+
110
+
### ZkSync Checker Functions:
111
+
- `isZkSyncChain()`: Returns true if you are on a zkSync based chain.
112
+
- `isOnZkSyncPrecompiles()`: Returns true if you are on a zkSync based chain using the precompiles.
113
+
- `isOnZkSyncChainId()`: Returns true if you are on a zkSync based chain using the chainid.
114
+
115
+
### Usage - FoundryZkSyncChecker
116
+
117
+
In your contract, you can import and inherit the abstract contract `FoundryZkSyncChecker` to check if you are on the `foundry-zksync` fork of `foundry`.
118
+
119
+
> !Important: Functions and modifiers in `FoundryZkSyncChecker` are only available if you run `foundry-zksync` with the `--zksync` flag.
0 commit comments