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
Copy file name to clipboardexpand all lines: README.md
+63
Original file line number
Diff line number
Diff line change
@@ -128,3 +128,66 @@ See [LICENSE](LICENSE) file for details.
128
128
## Disclaimer
129
129
130
130
This platform is for educational purposes and responsible red teaming. Use your powers for good, and happy hacking!
131
+
132
+
## Development Setup
133
+
134
+
### Prerequisites
135
+
- Node.js and npm (for extension development)
136
+
- Scarb (Cairo package manager)
137
+
- jq (JSON processor for scripts)
138
+
139
+
### Installation
140
+
1. Install root dependencies:
141
+
```bash
142
+
npm install
143
+
```
144
+
145
+
2. Install jq if not already installed:
146
+
```bash
147
+
# macOS
148
+
brew install jq
149
+
150
+
# Ubuntu/Debian
151
+
sudo apt-get install jq
152
+
```
153
+
154
+
3. Set up the Git pre-commit hook:
155
+
```bash
156
+
# Make sure the Git hooks directory exists
157
+
mkdir -p .git/hooks
158
+
159
+
# Copy the pre-commit hook
160
+
cp scripts/pre-commit .git/hooks/
161
+
chmod +x .git/hooks/pre-commit
162
+
```
163
+
164
+
### ABI Synchronization
165
+
The project maintains automatic synchronization between the Cairo contract ABIs and the TypeScript interfaces used in the extension. This is handled through a Git pre-commit hook that:
166
+
167
+
1. Builds the contracts using Scarb
168
+
2. Extracts the ABIs from the contract class files using jq
169
+
3. Updates the TypeScript ABI files in `extension/src/abis/`
170
+
4. Verifies that all changes are committed
171
+
172
+
If you see an error about ABI files being out of sync during commit, simply add the updated ABI files to your commit.
0 commit comments