Skip to content

Commit 0ab176a

Browse files
authored
Format code and check linting on CI (#5)
A replacement for #4 that uses the default Deno formatter instead of the Prettier one to avoid needing an extra tool to work on this repo. It also checks for proper formatting on CI. ### How to test Check that CI runs successfully.
1 parent f4c5ee1 commit 0ab176a

File tree

3 files changed

+45
-9
lines changed

3 files changed

+45
-9
lines changed

.github/workflows/lint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Linting
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
8+
jobs:
9+
lint:
10+
name: Lint checks
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
submodules: recursive
16+
17+
- uses: denoland/setup-deno@v2
18+
with:
19+
deno-version: v2.x
20+
21+
- name: Check deno fmt
22+
run: deno fmt --check

readme.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Safe Multisig Owner replacer
22

3-
Build a transaction to optimally change the owners of a Safe Multisigs to match a given list.
3+
Build a transaction to optimally change the owners of a Safe Multisigs to match
4+
a given list.
45

56
## Requirements
67

@@ -9,15 +10,18 @@ Build a transaction to optimally change the owners of a Safe Multisigs to match
910
## Usage
1011

1112
> [!TIP]
12-
> This repository can be run in a devcontainer directly from within github without the need for a local setup.
13+
> This repository can be run in a devcontainer directly from within github
14+
> without the need for a local setup.
1315
1416
The file `./config.ts` specifies all safes to consider, and, for each:
17+
1518
- the network they live in,
1619
- the list of new owners, and
1720
- the new threshold.
1821

19-
The script generates a transaction file for each Safe.
20-
You can use the transaction builder on the Safe interface to simulate and execute the resulting transaction.
22+
The script generates a transaction file for each Safe. You can use the
23+
transaction builder on the Safe interface to simulate and execute the resulting
24+
transaction.
2125

2226
Generate the transaction files with:
2327

@@ -30,3 +34,13 @@ The resulting output can be found in `./out`.
3034
## Limitations
3135

3236
See `./src/networks.ts` for a full list of supported networks.
37+
38+
## Development
39+
40+
### Code formatting
41+
42+
Run the following command to format the code to this project's standards:
43+
44+
```sh
45+
deno fmt
46+
```

src/networks.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ export function getRpc(network: SupportedNetworks): string {
2525
case "Arbitrum One":
2626
return "https://arbitrum-one-rpc.publicnode.com";
2727
case "Base":
28-
return "https://base.llamarpc.com"
28+
return "https://base.llamarpc.com";
2929
case "Bsc":
30-
return "https://bsc-dataseed.binance.org"
30+
return "https://bsc-dataseed.binance.org";
3131
case "Polygon":
32-
return "https://polygon-rpc.com/"
32+
return "https://polygon-rpc.com/";
3333
case "Optimism":
34-
return "https://mainnet.optimism.io"
34+
return "https://mainnet.optimism.io";
3535
case "Avalanche":
36-
return "https://api.avax.network/ext/bc/C/rpc"
36+
return "https://api.avax.network/ext/bc/C/rpc";
3737
case "Lens":
3838
return "https://rpc.lens.xyz";
3939
default:

0 commit comments

Comments
 (0)