Skip to content
This repository was archived by the owner on Apr 12, 2026. It is now read-only.

Commit 46c5fa3

Browse files
committed
feat: add nulla cross-chain firewall demo
0 parents  commit 46c5fa3

143 files changed

Lines changed: 26778 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
ETH_SEPOLIA_RPC_URL=
2+
BASE_SEPOLIA_RPC_URL=
3+
LASNA_RPC_URL=
4+
ETH_SEPOLIA_CHAIN_ID=11155111
5+
BASE_SEPOLIA_CHAIN_ID=84532
6+
LASNA_CHAIN_ID=5318007
7+
REACTIVE_DEPLOY_VALUE=3000000000000000000
8+
9+
ETH_SEPOLIA_PRIVATE_KEY=
10+
BASE_SEPOLIA_PRIVATE_KEY=
11+
LASNA_PRIVATE_KEY=
12+
DEMO_SAFE_OWNER_PRIVATE_KEY=
13+
14+
DEMO_SAFE_SHARED_ADDRESS=0x23BB5F9b7D50f2ecdE6305E6cdB71c1e7Ba698F0
15+
DEMO_SAFE_OWNER_ADDRESS=0xbA64397d50D71fE0c38a86B51fc77BedB580C8A4
16+
17+
ETH_SEPOLIA_CALLBACK_PROXY_ADDRESS=0xc9f36411C9897e7F959D99ffca2a0Ba7ee0D7bDA
18+
BASE_SEPOLIA_CALLBACK_PROXY_ADDRESS=0xa6eA49Ed671B8a4dfCDd34E36b7a75Ac79B8A5a6
19+
SAFE_SINGLETON_ADDRESS=0x41675C099F32341bf84BFc5382aF534df5C7461a
20+
SAFE_PROXY_FACTORY_ADDRESS=0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67
21+
SAFE_FALLBACK_HANDLER_ADDRESS=0xfd0732Dc9E303f09fCEf3a7388Ad10A83459Ec99
22+
23+
NULLA_REGISTRY_ADDRESS=
24+
ETH_TOKEN_ADDRESS=
25+
BASE_TOKEN_ADDRESS=
26+
ETH_SERVICE_ADDRESS=
27+
BASE_SERVICE_ADDRESS=
28+
ETH_MODULE_ADDRESS=
29+
BASE_MODULE_ADDRESS=
30+
ETH_GUARD_ADDRESS=
31+
BASE_GUARD_ADDRESS=
32+
REACTIVE_LASNA_ADDRESS=
33+
34+
CRON10_TOPIC0=0x04463f7c1651e6b9774d7f85c85bb94654e3c46ca79b0c16fb16d4183307b687
35+
CRON_TICK_DIVISOR=10
36+
SHIELD_DURATION_TICKS=10
37+
CALLBACK_GAS_LIMIT=500000
38+
DESTINATION_DEPLOY_VALUE=10000000000000000
39+
40+
DEFAULT_ALLOWED_SPENDER=0x0000000000000000000000000000000000000000
41+
DEFAULT_ALLOWED_CAP=100000000
42+
DEFAULT_BLACKLISTED_SPENDER=0x301E4F2bA24b4C009BfDCc5F7F192f6A0f9C8e8d
43+
44+
DEMO_RISK_SPENDER=
45+
DEMO_RISK_AMOUNT=150000000

.github/workflows/test.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
permissions: {}
4+
5+
on:
6+
push:
7+
pull_request:
8+
workflow_dispatch:
9+
10+
env:
11+
FOUNDRY_PROFILE: ci
12+
13+
jobs:
14+
check:
15+
name: Foundry project
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
steps:
20+
- uses: actions/checkout@v5
21+
with:
22+
persist-credentials: false
23+
submodules: recursive
24+
25+
- name: Install Foundry
26+
uses: foundry-rs/foundry-toolchain@v1
27+
28+
- name: Show Forge version
29+
run: forge --version
30+
31+
- name: Run Forge fmt
32+
run: forge fmt --check
33+
34+
- name: Run Forge build
35+
run: forge build --sizes
36+
37+
- name: Run Forge tests
38+
run: forge test -vvv

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Compiler files
2+
cache/
3+
out/
4+
5+
# Ignores development broadcast logs
6+
!/broadcast
7+
/broadcast/*/31337/
8+
/broadcast/**/dry-run/
9+
10+
# Docs
11+
# docs are tracked in this repo
12+
13+
# Dotenv file
14+
.env
15+
web/.env.local
16+
17+
# Frontend build artifacts
18+
web/node_modules/
19+
web/.next/
20+
web/test-results/
21+
web/tsconfig.tsbuildinfo

.gitmodules

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[submodule "lib/forge-std"]
2+
path = lib/forge-std
3+
url = https://github.com/foundry-rs/forge-std
4+
[submodule "lib/reactive-lib"]
5+
path = lib/reactive-lib
6+
url = https://github.com/Reactive-Network/reactive-lib
7+
[submodule "lib/safe-smart-account"]
8+
path = lib/safe-smart-account
9+
url = https://github.com/safe-global/safe-smart-account
10+
[submodule "lib/openzeppelin-contracts"]
11+
path = lib/openzeppelin-contracts
12+
url = https://github.com/OpenZeppelin/openzeppelin-contracts

AGENTS.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
This repository is a minimal Foundry project for Ethereum smart contracts. Core contracts live in `src/`, deployment and broadcast scripts live in `script/`, and tests live in `test/`. Third-party dependencies are vendored in `lib/`, currently including `forge-std`. Foundry outputs build artifacts to `out/`, as configured in `foundry.toml`; treat generated output as disposable unless a task explicitly requires it.
5+
6+
## Build, Test, and Development Commands
7+
Run all local commands through `rtk`, per workspace instructions.
8+
9+
- `rtk forge build`: compile contracts.
10+
- `rtk forge build --sizes`: compile and report contract size, matching CI.
11+
- `rtk forge test -vvv`: run the full test suite with verbose traces.
12+
- `rtk forge fmt`: format Solidity files.
13+
- `rtk forge fmt --check`: verify formatting without rewriting files.
14+
- `rtk forge snapshot`: record gas snapshots when gas changes matter.
15+
- `rtk anvil`: start a local EVM node for manual testing.
16+
- `rtk forge script script/Counter.s.sol:CounterScript --rpc-url <RPC_URL> --private-key <KEY>`: run a deployment script.
17+
18+
## Coding Style & Naming Conventions
19+
Use Solidity `^0.8.13`, matching the current codebase. Follow `forge fmt` output for spacing and line wrapping; the existing code uses 4-space indentation. Name contracts in `PascalCase` (`Counter`), state variables and functions in `camelCase` (`setNumber`, `increment`), and test files with the `.t.sol` suffix. Keep one primary contract per file where practical, and place deployment scripts in files ending with `.s.sol`.
20+
21+
## Testing Guidelines
22+
Tests use Foundry’s `forge-std/Test.sol`. Add unit tests in `test/` alongside the feature they validate, and prefer descriptive names such as `test_Increment()` and `testFuzz_SetNumber(uint256 x)`. Cover happy paths, reverts, and relevant fuzz cases for state-changing logic. Before opening a PR, run `rtk forge fmt --check`, `rtk forge build --sizes`, and `rtk forge test -vvv`.
23+
24+
## Commit & Pull Request Guidelines
25+
This repository currently has no commit history, so no established convention can be inferred yet. Use short, imperative commit subjects, ideally scoped by area, for example: `feat: add ownership checks` or `test: cover counter underflow guard`. PRs should include a concise summary, testing notes, linked issues when applicable, and command output or screenshots only when they help explain behavior changes.
26+
27+
## Security & Configuration Tips
28+
Do not commit private keys, RPC URLs, or `.env` secrets. Pass credentials through environment variables or CLI flags during local runs. Treat `lib/` as external code: avoid editing vendored dependencies unless the task explicitly requires a dependency update.

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
## Foundry
2+
3+
**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.**
4+
5+
Foundry consists of:
6+
7+
- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
8+
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
9+
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
10+
- **Chisel**: Fast, utilitarian, and verbose solidity REPL.
11+
12+
## Documentation
13+
14+
https://book.getfoundry.sh/
15+
16+
## Usage
17+
18+
### Build
19+
20+
```shell
21+
$ forge build
22+
```
23+
24+
### Test
25+
26+
```shell
27+
$ forge test
28+
```
29+
30+
### Format
31+
32+
```shell
33+
$ forge fmt
34+
```
35+
36+
### Gas Snapshots
37+
38+
```shell
39+
$ forge snapshot
40+
```
41+
42+
### Anvil
43+
44+
```shell
45+
$ anvil
46+
```
47+
48+
### Deploy
49+
50+
```shell
51+
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
52+
```
53+
54+
### Cast
55+
56+
```shell
57+
$ cast <subcommand>
58+
```
59+
60+
### Help
61+
62+
```shell
63+
$ forge --help
64+
$ anvil --help
65+
$ cast --help
66+
```

broadcast/DeployBaseSepolia.s.sol/84532/run-1774697313652.json

Lines changed: 340 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)