Skip to content

Commit 90ded4a

Browse files
Merge pull request #17 from rainlanguage/2026-05-09-soldeer
soldeer migration
2 parents 8308cbb + 1ebebb1 commit 90ded4a

34 files changed

Lines changed: 268 additions & 160 deletions
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Publish to Soldeer
2+
on:
3+
push:
4+
tags:
5+
- "v*"
6+
jobs:
7+
publish:
8+
uses: rainlanguage/rainix/.github/workflows/publish-soldeer.yaml@main
9+
secrets: inherit

‎.github/workflows/rainix.yaml‎

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,6 @@
1-
name: Rainix CI
1+
name: rainix
22
on: [push]
3-
43
jobs:
54
rainix:
6-
strategy:
7-
matrix:
8-
os: [ubuntu-latest]
9-
task: [rainix-sol-test, rainix-sol-static, rainix-sol-legal]
10-
fail-fast: false
11-
runs-on: ${{ matrix.os }}
12-
env:
13-
DEPLOYMENT_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRIVATE_KEY || secrets.PRIVATE_KEY_DEV }}
14-
steps:
15-
- uses: actions/checkout@v4
16-
with:
17-
submodules: recursive
18-
fetch-depth: 0
19-
20-
- uses: nixbuild/nix-quick-install-action@v30
21-
with:
22-
nix_conf: |
23-
keep-env-derivations = true
24-
keep-outputs = true
25-
- name: Restore and save Nix store
26-
uses: nix-community/cache-nix-action@v6
27-
with:
28-
# restore and save a cache using this key
29-
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
30-
# if there's no cache hit, restore a cache by this prefix
31-
restore-prefixes-first-match: nix-${{ runner.os }}-
32-
# collect garbage until the Nix store size (in bytes) is at most this number
33-
# before trying to save a new cache
34-
# 1G = 1073741824
35-
gc-max-store-size-linux: 1G
36-
37-
- run: nix develop --command rainix-sol-prelude
38-
- name: Run ${{ matrix.task }}
39-
env:
40-
ETH_RPC_URL: ${{ secrets.CI_DEPLOY_SEPOLIA_RPC_URL || vars.CI_DEPLOY_SEPOLIA_RPC_URL }}
41-
ETHERSCAN_API_KEY: ${{ secrets.EXPLORER_VERIFICATION_KEY }}
42-
DEPLOY_BROADCAST: ''
43-
DEPLOY_VERIFIER: ''
44-
DEPLOY_METABOARD_ADDRESS: ${{ vars.CI_DEPLOY_SEPOLIA_METABOARD_ADDRESS }}
45-
CI_FORK_SEPOLIA_BLOCK_NUMBER: ${{ vars.CI_FORK_SEPOLIA_BLOCK_NUMBER }}
46-
CI_FORK_SEPOLIA_DEPLOYER_ADDRESS: ${{ vars.CI_FORK_SEPOLIA_DEPLOYER_ADDRESS }}
47-
CI_DEPLOY_SEPOLIA_RPC_URL: ${{ secrets.CI_DEPLOY_SEPOLIA_RPC_URL || vars.CI_DEPLOY_SEPOLIA_RPC_URL }}
48-
run: nix develop --command ${{ matrix.task }}
5+
uses: rainlanguage/rainix/.github/workflows/rainix-sol.yaml@main
6+
secrets: inherit

‎.gitignore‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
out
2-
cache
2+
cache
3+
dependencies
4+
.pre-commit-config.yaml

‎.gitmodules‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎.soldeerignore‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.DS_Store
2+
.coderabbitai.yaml
3+
.gas-snapshot
4+
.git
5+
.github
6+
.gitignore
7+
.gitmodules
8+
.pre-commit-config.yaml
9+
.soldeerignore
10+
.vscode
11+
CLAUDE.md
12+
/audit
13+
/cache
14+
/dependencies
15+
/docs
16+
/flake.lock
17+
/flake.nix
18+
/foundry.lock
19+
/foundry.toml
20+
/lib
21+
/out
22+
/remappings.txt
23+
/slither.config.json
24+
/soldeer.lock
25+
/target
26+
/test

‎README.md‎

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -64,46 +64,55 @@ into their contracts, using the relevant supporting libs only, to minimise
6464
dependencies and potential code bloat, or even inconsistent behaviours between
6565
libs.
6666

67-
## Dev stuff
67+
## Install
6868

69-
### Local environment & CI
69+
Via [soldeer](https://soldeer.xyz):
7070

71-
Uses nixos.
71+
```sh
72+
forge soldeer install rain-math-fixedpoint~<version>
73+
```
7274

73-
Install `nix develop` - https://nixos.org/download.html.
75+
## Develop
7476

75-
Run `nix develop` in this repo to drop into the shell. Please ONLY use the nix
76-
version of `foundry` for development, to ensure versions are all compatible.
77+
This repo uses [nix](https://nixos.org/download.html). The default shell is the
78+
slim `sol-shell` from [rainix](https://github.com/rainlanguage/rainix).
7779

78-
Read the `flake.nix` file to find some additional commands included for dev and
79-
CI usage.
80+
```sh
81+
nix develop # enter the shell
82+
forge soldeer install # install deps declared in foundry.toml
83+
forge test
84+
```
8085

81-
## Legal stuff
86+
Tasks:
8287

83-
Everything is under DecentraLicense 1.0 (DCL-1.0) which can be found in `LICENSES/`.
88+
- `rainix-sol-test` — `forge test`
89+
- `rainix-sol-static` — slither
90+
- `rainix-sol-legal` — `reuse lint`
8491

85-
This is basically `CAL-1.0` which is an open source license
86-
https://opensource.org/license/cal-1-0
92+
Use the nix-pinned `forge` for all development.
8793

88-
The non-legal summary of DCL-1.0 is that the source is open, as expected, but
89-
also user data in the systems that this code runs on must also be made available
90-
to those users as relevant, and that private keys remain private.
94+
## Publish
9195

92-
Roughly it's "not your keys, not your coins" aware, as close as we could get in
93-
legalese.
96+
Tag `v<x.y.z>` on `main`. The
97+
[`Publish to Soldeer`](.github/workflows/publish-soldeer.yaml) wrapper delegates
98+
to rainix's reusable workflow, which derives the package name from the repo name
99+
(`rain.math.fixedpoint` → `rain-math-fixedpoint`).
94100

95-
This is the default situation on permissionless blockchains, so shouldn't require
96-
any additional effort by dev-users to adhere to the license terms.
101+
## License
97102

98-
This repo is REUSE 3.2 compliant https://reuse.software/spec-3.2/ and compatible
99-
with `reuse` tooling (also available in the nix shell here).
103+
DecentraLicense 1.0 (DCL-1.0) — full text in
104+
[`LICENSES/`](LICENSES/LicenseRef-DCL-1.0.txt). Roughly `CAL-1.0`
105+
([opensource.org](https://opensource.org/license/cal-1-0)) plus user-data
106+
disclosure obligations consistent with permissionless-blockchain assumptions.
100107

101-
```
108+
This repo is [REUSE 3.2](https://reuse.software/spec-3.2/) compliant. Verify
109+
locally:
110+
111+
```sh
102112
nix develop -c rainix-sol-legal
103113
```
104114

105115
## Contributions
106116

107-
Contributions are welcome **under the same license** as above.
108-
109-
Contributors agree and warrant that their contributions are compliant.
117+
Welcome under the same license. Contributors warrant that their contributions
118+
are compliant.

‎REUSE.toml‎

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,22 @@ version = 1
22

33
[[annotations]]
44
path = [
5-
".gas-snapshot",
6-
".github/workflows/**/",
7-
".vscode/**/",
8-
".gitignore",
9-
".gitmodules",
10-
"audit/**/",
11-
"README.md",
12-
"flake.lock",
13-
"flake.nix",
14-
"foundry.toml",
15-
"slither.config.json",
16-
"REUSE.toml",
17-
"foundry.lock",
5+
".gas-snapshot",
6+
".github/workflows/**/",
7+
".vscode/**/",
8+
".gitignore",
9+
".gitmodules",
10+
".soldeerignore",
11+
"audit/**/",
12+
"README.md",
13+
"flake.lock",
14+
"flake.nix",
15+
"foundry.toml",
16+
"remappings.txt",
17+
"slither.config.json",
18+
"REUSE.toml",
19+
"foundry.lock",
20+
"soldeer.lock",
1821
]
1922
SPDX-FileCopyrightText = "Copyright (c) 2020 Rain Open Source Software Ltd"
2023
SPDX-License-Identifier = "LicenseRef-DCL-1.0"

0 commit comments

Comments
 (0)