Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions setup-templates/template-pause-bridge-base/.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ OWNER_SAFE=0x14536667Cd30e52C0b458BaACcB9faDA7046E056
L1_PORTAL=0x49048044D57e1C92A77f79988d21Fa8fAF74E97e
L2_BRIDGE=

IS_PAUSED= # true or false

# # Sepolia
# OWNER_SAFE=0x5dfEB066334B67355A15dc9b67317fD2a2e1f77f
# L1_PORTAL=0x49f53e41452C74589E85cA1677426Ba426459e85
# L2_BRIDGE=

# IS_PAUSED= # true or false
10 changes: 8 additions & 2 deletions setup-templates/template-pause-bridge-base/FACILITATOR.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ cd <network>/<task-name>
make deps
```

### 2. Execute the transaction
### 2. Execute pause

```bash
SIGNATURES=AAABBBCCC make execute
SIGNATURES=AAABBBCCC make execute-pause
```

### 3. (When ready) Execute un-pause

```bash
SIGNATURES=AAABBBCCC make execute-unpause
```
48 changes: 40 additions & 8 deletions setup-templates/template-pause-bridge-base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,47 @@ ifndef LEDGER_ACCOUNT
override LEDGER_ACCOUNT = 0
endif

# TODO: ensure `SAFE_NONCE` matches the real `OWNER_SAFE` nonce
SAFE_NONCE=6
# TODO: ensure `sender` is a signer for `OWNER_SAFE`
SENDER=0xb2d9a52e76841279EF0372c534C539a4f68f8C0B

SCRIPT_NAME=PauseBridge

.PHONY: gen-validation
gen-validation:
$(GOPATH)/bin/state-diff --rpc $(L1_RPC_URL) -o validations/signer.json \
-- forge script --rpc-url $(L1_RPC_URL) PauseBridge \
--sig "sign(address[])" "[$(OWNER_SAFE)]" \
--sender 0xb2d9a52e76841279EF0372c534C539a4f68f8C0B
gen-validation: checkout-signer-tool run-script

.PHONY: run-script
run-script:
cd $(SIGNER_TOOL_PATH); \
npm ci; \
bun run scripts/genValidationFile.ts --rpc-url $(L1_RPC_URL) \
--workdir .. --forge-cmd 'forge script --rpc-url $(L1_RPC_URL) \
$(SCRIPT_NAME) --sig "sign(address[])" [] --sender $(SENDER)' --out ../validations/base-signer.json;

.PHONY: sign-pause
sign-pause:
IS_PAUSED=true SAFE_NONCE=$(SAFE_NONCE) $(GOPATH)/bin/eip712sign --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" -- \
forge script --rpc-url $(L1_RPC_URL) $(SCRIPT_NAME) \
--sig "sign(address[])" "[]" --sender $(SENDER)

.PHONY: sign-unpause
sign-unpause:
IS_PAUSED=false SAFE_NONCE=$(SAFE_NONCE) $(GOPATH)/bin/eip712sign --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" -- \
forge script --rpc-url $(L1_RPC_URL) $(SCRIPT_NAME) \
--sig "sign(address[])" "[]" --sender $(SENDER)

# Execute
.PHONY: execute
execute:
$(call MULTISIG_EXECUTE,$(SIGNATURES))
.PHONY: execute-pause
execute-pause:
IS_PAUSED=true forge script --rpc-url $(L1_RPC_URL) $(SCRIPT_NAME) \
--sig "run(bytes)" $(SIGNATURES) --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast -vvvv

.PHONY: execute-unpause
execute-unpause:
IS_PAUSED=false forge script --rpc-url $(L1_RPC_URL) $(SCRIPT_NAME) \
--sig "run(bytes)" $(SIGNATURES) --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast -vvvv

.PHONY: check-status
check-status:
cast call $(L2_BRIDGE) "paused()" --rpc-url $(L2_RPC_URL)
29 changes: 14 additions & 15 deletions setup-templates/template-pause-bridge-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ Pauses the Base side of [Base Bridge](https://github.com/base/bridge).

## Install dependencies

### 1. Install Node.js
### 1. Update foundry

```bash
foundryup
```

### 2. Install Node.js if needed

First, check if you have node installed

Expand All @@ -22,28 +28,21 @@ If you see a version output from the above command, you can move on. Otherwise,
brew install node
```

### 2. Install bun
## Sign Task

First, check if you have bun installed
### 1. Update repo:

```bash
bun --version
cd contract-deployments
git pull
```

If you see a version output from the above command, you can move on. Otherwise, install bun

```bash
curl -fsSL https://bun.sh/install | bash
```

## Signing Steps

### 1. Run the signer tool
### 2. Run the signing tool (NOTE: do not enter the task directory. Run this command from the project's root).

```bash
make sign-task
```

### 2. Open the UI at [http://localhost:3000](http://localhost:3000)
### 3. Open the UI at [http://localhost:3000](http://localhost:3000)

### 3. Send signature to facilitator
### 4. Send signature to facilitator