Skip to content

Commit 1fe6738

Browse files
committed
(chore) (openai/gpt-5.5, reviewed T, tested T) add RIKLauncher deployment scripts
1 parent 56578df commit 1fe6738

5 files changed

Lines changed: 67 additions & 9 deletions

File tree

AGENTS.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ Guidance for AI coding agents working in this repository. See
4242
| Contract build with sizes | `cd contracts && forge build --sizes` |
4343
| Contract tests | `cd contracts && forge test -vvv` |
4444
| Local Anvil deploy helper | `./local-rpc.sh src/RIK.sol:RIK` |
45-
| Sepolia deploy script | `cd contracts && PRIVATE_KEY=... ./deploy-sepolia.sh` |
45+
| Base Sepolia RIK deploy script | `cd contracts && PRIVATE_KEY=... ./deploy-rik-base-sepolia.sh` |
46+
| Base Sepolia RIKLauncher deploy script | `cd contracts && PRIVATE_KEY=... AIRLOCK_ADDRESS=... RIK_ADDRESS=... ./deploy-rik-launcher-base-sepolia.sh` |
4647
| Finds agents TODOs when asked | `rg -F 'TODO (AGENT)'` |
4748

4849
Do not run release/versioning commands such as `cd cli && pnpm version:minor`
@@ -72,9 +73,14 @@ release path. They mutate `cli/package.json`.
7273
ownership, JWT claims, keys, and expiry.
7374
- `contracts/test/fixtures/load-fixture.mjs`: Node helper used by `vm.ffi` to
7475
generate deterministic RSA/JWT fixtures for Solidity tests.
75-
- `contracts/script/Deploy.s.sol`: Foundry deploy script.
76-
- `contracts/deploy-sepolia.sh`: Sepolia deploy wrapper using `PRIVATE_KEY` and
77-
optional `SEPOLIA_RPC_URL` / `VERIFY`.
76+
- `contracts/script/DeployRIK.s.sol`: Foundry deploy script for `RIK`.
77+
- `contracts/script/DeployRIKLauncher.s.sol`: Foundry deploy script for
78+
`RIKLauncher`.
79+
- `contracts/deploy-rik-base-sepolia.sh`: Base Sepolia deploy wrapper for
80+
`RIK` using `PRIVATE_KEY` and optional `BASE_SEPOLIA_RPC_URL` / `VERIFY`.
81+
- `contracts/deploy-rik-launcher-base-sepolia.sh`: Base Sepolia deploy wrapper
82+
for `RIKLauncher` using `PRIVATE_KEY`, `AIRLOCK_ADDRESS`, `RIK_ADDRESS`, and
83+
optional `BASE_SEPOLIA_RPC_URL` / `VERIFY`.
7884
- `contracts/lib/`: git submodules and vendor code. Do not edit directly.
7985

8086
## Architecture Boundaries
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
SEPOLIA_RPC_URL="${SEPOLIA_RPC_URL:-https://sepolia.base.org}"
4+
BASE_SEPOLIA_RPC_URL="${BASE_SEPOLIA_RPC_URL:-https://sepolia.base.org}"
55
VERIFY="${VERIFY:-true}"
66

77
if [[ -z "${PRIVATE_KEY:-}" ]]; then
@@ -10,8 +10,8 @@ if [[ -z "${PRIVATE_KEY:-}" ]]; then
1010
fi
1111

1212
ARGS=(
13-
script/Deploy.s.sol
14-
--rpc-url "$SEPOLIA_RPC_URL"
13+
script/DeployRIK.s.sol
14+
--rpc-url "$BASE_SEPOLIA_RPC_URL"
1515
--broadcast
1616
)
1717

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
BASE_SEPOLIA_RPC_URL="${BASE_SEPOLIA_RPC_URL:-https://sepolia.base.org}"
5+
VERIFY="${VERIFY:-true}"
6+
7+
if [[ -z "${PRIVATE_KEY:-}" ]]; then
8+
printf 'Missing PRIVATE_KEY.\n' >&2
9+
exit 1
10+
fi
11+
12+
if [[ -z "${AIRLOCK_ADDRESS:-}" ]]; then
13+
printf 'Missing AIRLOCK_ADDRESS.\n' >&2
14+
exit 1
15+
fi
16+
17+
if [[ -z "${RIK_ADDRESS:-}" ]]; then
18+
printf 'Missing RIK_ADDRESS.\n' >&2
19+
exit 1
20+
fi
21+
22+
ARGS=(
23+
script/DeployRIKLauncher.s.sol
24+
--rpc-url "$BASE_SEPOLIA_RPC_URL"
25+
--broadcast
26+
)
27+
28+
if [[ "$VERIFY" == "true" ]]; then
29+
ARGS+=(--verify)
30+
fi
31+
32+
forge script "${ARGS[@]}"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// script/Deploy.s.sol
1+
// script/DeployRIK.s.sol
22
// SPDX-License-Identifier: Apache-2.0
33

44
pragma solidity ^0.8.24;
55

66
import {Script} from "forge-std/Script.sol";
77
import {RIK} from "../src/RIK.sol";
88

9-
contract Deploy is Script {
9+
contract DeployRIK is Script {
1010
function run() external returns (RIK rik) {
1111
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
1212
address owner = vm.addr(deployerPrivateKey);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// script/DeployRIKLauncher.s.sol
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
pragma solidity ^0.8.24;
5+
6+
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
7+
import {Script} from "forge-std/Script.sol";
8+
import {IAirlock, RIKLauncher} from "../src/RIKLauncher.sol";
9+
10+
contract DeployRIKLauncher is Script {
11+
function run() external returns (RIKLauncher launcher) {
12+
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
13+
address airlock = vm.envAddress("AIRLOCK_ADDRESS");
14+
address registry = vm.envAddress("RIK_ADDRESS");
15+
16+
vm.startBroadcast(deployerPrivateKey);
17+
launcher = new RIKLauncher(IAirlock(airlock), IERC721(registry));
18+
vm.stopBroadcast();
19+
}
20+
}

0 commit comments

Comments
 (0)