Skip to content

Commit 856c38d

Browse files
committed
Merge branch 'main' into release-v1
2 parents 8de79a7 + 621f125 commit 856c38d

Some content is hidden

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

50 files changed

+3462
-1183
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ name: CI
22

33
on:
44
push:
5-
pull_request:
65
workflow_dispatch:
76

87
jobs:
98
foundry:
109
env:
1110
FOUNDRY_PROFILE: ci
11+
NODE_OPTIONS: "--disable-warning=ExperimentalWarning"
1212

1313
strategy:
1414
fail-fast: true
@@ -46,11 +46,8 @@ jobs:
4646
- name: Show Bun version
4747
run: bun --version
4848

49-
- name: Install Solhint
50-
run: bun install solhint
51-
52-
- name: Show Solhint version
53-
run: bunx --bun solhint --version
49+
- name: Install Test-Tooling
50+
run: bun install
5451

5552
- name: Run Solhint in `src` dir
5653
run: bunx --bun solhint --config .solhint.json 'src/**/*.sol'
@@ -64,6 +61,10 @@ jobs:
6461
run: bunx --bun solhint --config .solhint.other.json 'script/**/*.sol'
6562
id: solhint-script
6663

64+
- name: Run Forge clean
65+
run: forge clean
66+
id: clean
67+
6768
- name: Run Forge build
6869
run: forge build --sizes --ast
6970
id: build
@@ -72,26 +73,6 @@ jobs:
7273
run: forge test -vvv --gas-report
7374
id: test
7475

75-
juvix:
76-
strategy:
77-
fail-fast: true
78-
79-
name: Juvix project
80-
runs-on: ubuntu-latest
81-
steps:
82-
- uses: actions/checkout@v4
83-
84-
- name: Download latest nightly Juvix binary
85-
uses: jaxxstorm/[email protected]
86-
with:
87-
repo: anoma/juvix-nightly-builds
88-
tag: nightly-2025-02-13-0.6.9-8b06157
89-
cache: enable
90-
91-
- name: Run Juvix typecheck
92-
run: juvix dependencies update
93-
working-directory: ./juvix
94-
95-
- name: Run Juvix typecheck
96-
run: juvix typecheck
97-
working-directory: ./juvix
76+
- name: Run Forge coverage
77+
run: forge coverage --ir-minimum
78+
id: coverage

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@ out/
77
/broadcast/*/31337/
88
/broadcast/**/dry-run/
99

10+
# Node modules
11+
node_modules/
12+
1013
# Docs
1114
docs/
1215

1316
# Dotenv file
1417
.env
18+
19+
# Coverage report
20+
lcov.info

.gitmodules

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
[submodule "lib/openzeppelin-contracts-upgradeable"]
55
path = lib/openzeppelin-contracts-upgradeable
66
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
7-
branch = v5.3.0
87
[submodule "lib/openzeppelin-foundry-upgrades"]
98
path = lib/openzeppelin-foundry-upgrades
109
url = https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades

.solhint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@
3434

3535
"imports-on-top": "warn",
3636
"imports-order": "warn",
37+
"import-path-check": "off",
3738
"ordering": "warn",
3839
"visibility-modifier-order": "error",
3940
"constructor-syntax": "error",
4041
"gas-calldata-parameters": "warn",
4142
"gas-custom-errors": "warn",
4243
"gas-increment-by-one": "warn",
43-
"gas-indexed-events": "warn",
44+
"gas-indexed-events": "off",
4445
"gas-length-in-loops": "warn",
4546
"gas-multitoken1155": "warn",
4647
"gas-named-return-values": "warn",

.solhint.other.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,17 @@
2727

2828
"imports-on-top": "warn",
2929
"imports-order": "warn",
30+
"import-path-check": "off",
3031
"ordering": "warn",
3132
"visibility-modifier-order": "error",
3233
"constructor-syntax": "error",
3334
"gas-calldata-parameters": "warn",
34-
"gas-custom-errors": "warn",
35+
"gas-custom-errors": "off",
3536
"gas-increment-by-one": "warn",
3637
"gas-indexed-events": "warn",
3738
"gas-multitoken1155": "warn",
3839
"gas-named-return-values": "warn",
39-
"gas-small-strings": "warn",
40+
"gas-small-strings": "off",
4041
"gas-struct-packing": "warn",
4142

4243
"quotes": "error",
@@ -48,13 +49,13 @@
4849
"avoid-tx-origin": "error",
4950
"check-send-result": "error",
5051
"compiler-version": ["error", "^0.8.24"],
51-
"func-visibility": ["error", { "ignoreConstructors": true }],
52+
"func-visibility": ["error", {"ignoreConstructors": true}],
5253

5354
"multiple-sends": "error",
5455
"no-complex-fallback": "error",
5556
"no-inline-assembly": "error",
5657
"not-rely-on-block-hash": "error",
57-
"not-rely-on-time": "error",
58+
"not-rely-on-time": "off",
5859
"reentrancy": "error",
5960
"state-visibility": "error"
6061
}

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"[solidity]": {
3+
"editor.formatOnSave": true
4+
},
5+
"[toml]": {
6+
"editor.defaultFormatter": "tamasfe.even-better-toml"
7+
},
8+
"solidity.formatter": "forge"
9+
}

README.md

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# Token
22

3-
> [!WARNING]
4-
> This repo features a prototype and is work in progress. Do NOT use in
5-
> production.
6-
73
## Installation
84

95
1. Get an up-to-date version of [Foundry](https://github.com/foundry-rs/foundry)
@@ -26,34 +22,25 @@
2622
Run
2723

2824
```sh
29-
forge test
25+
forge test --force --gas-report
3026
```
3127

32-
### Deployment
28+
> [!NOTE]
29+
> The `--force` flag is required for the [openzeppelin-foundry-upgrades](https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades) package to work.
30+
> The `--gas-report` flag prints selected gas reports.
31+
32+
### Coverage
3333

34-
To simulate deployment on sepolia, run
34+
Run
3535

3636
```sh
37-
forge script script/Deploy.s.sol:Deploy \
38-
--rpc-url sepolia
37+
forge coverage
3938
```
4039

41-
Append the
42-
43-
- `--broadcast` flag to deploy on sepolia
44-
- `--verify` flag for subsequent contract verification on Etherscan
45-
- `--account <ACCOUNT_NAME>` flag to use a previously imported keystore (see
46-
`cast wallet --help` for more info)
40+
### Documentation
4741

48-
#### Block Explorer Verification
49-
50-
For post-deployment verification on Etherscan run
42+
Run
5143

5244
```sh
53-
forge verify-contract \
54-
<ADDRESS> \
55-
src/MerkleDistributor.sol:MerkleDistributor \
56-
--chain sepolia
45+
forge doc
5746
```
58-
59-
after replacing `<ADDRESS>` with the respective contract address.

0 commit comments

Comments
 (0)