Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
2db0c67
initial commit
Voxelot May 7, 2022
12fb3b7
cli methods for generate and import
Voxelot May 7, 2022
6dd883d
custom formatting
Voxelot May 7, 2022
dc4fdf4
update docs
Voxelot May 7, 2022
43fb7b1
add newline
Voxelot May 7, 2022
924bf8d
add cargo toml description and license
Voxelot May 7, 2022
1dfebb2
add ci for wallet
Voxelot May 12, 2022
e749c12
cargo toml lint
Voxelot May 12, 2022
9e399c4
Apply suggestions from code review
Voxelot May 12, 2022
1baa01b
Merge pull request #1 from FuelLabs/mvp
Voxelot May 12, 2022
6a5af29
feat: integration with the SDK (#3)
digorithm Aug 19, 2022
6d30836
refactor: refactor current wallet functionalities (#11)
iqdecay Aug 23, 2022
3181336
Add lock file (#21)
kayagokalp Aug 24, 2022
b0986b1
feat: init & new commands - A way to init a new HD wallet or create …
kayagokalp Aug 24, 2022
638d3e6
refactor: list accounts without decrypting the wallet (#23)
kayagokalp Aug 25, 2022
e385bef
feat: added `account` command to show address of an account given its…
kayagokalp Aug 25, 2022
d78bba3
feat: add the sign feature (#24)
kayagokalp Aug 29, 2022
bd6f40b
Update readme with installation and basic usage (#30)
kayagokalp Aug 30, 2022
cce7d47
bump to v0.1.0 (#29)
kayagokalp Aug 30, 2022
d5957cc
feat: Allow wallet to be regenerated from a mnemonic phrase (#34)
kayagokalp Sep 1, 2022
f10702e
feat: Accept optional phrase as a password field rather than a parame…
kayagokalp Sep 3, 2022
217c466
feat: Move init --import to a seperate command (import) (#38)
kayagokalp Sep 7, 2022
09e4820
Adds a CI check to ensure the lock file is always up to date (#42)
mitchmindtree Sep 8, 2022
3470ad5
feat: Add --export to account to export account's private key (#40)
kayagokalp Sep 10, 2022
312410b
CI: build binaries in CI (#41)
kayagokalp Sep 18, 2022
af0f1d3
bump fuels versions to 0.24.0 (#45)
kayagokalp Sep 22, 2022
906565d
feat: Moved --export to a seperate export command (#47)
kayagokalp Sep 23, 2022
bc5bcd0
refactor: Use SDK derivation path (#50)
kayagokalp Sep 27, 2022
0bbac1c
refactor: rework some basic functions (#51)
iqdecay Sep 28, 2022
26ad2cc
Bump version to v0.1.1 (#48)
kayagokalp Sep 28, 2022
52e9089
Fix error in the case of an non-existing vault path and refactor disc…
kayagokalp Sep 30, 2022
9473052
bump version to 0.1.2 (#55)
kayagokalp Oct 1, 2022
4ee5257
Add tests for existing wallet operations (#57)
kayagokalp Oct 10, 2022
ad1d783
import is own command and not anymore a argument (#58)
smuueth Oct 14, 2022
30117cb
chore: clippy fixes for rust 1.65 (#64)
kayagokalp Nov 22, 2022
d765d05
ci: Added markdown lint (#63)
kayagokalp Nov 22, 2022
448d310
doc: Add export and import to readme (#61)
kayagokalp Nov 22, 2022
cdc60a6
docs: update README quickstart (#67)
spiral-ladder Dec 2, 2022
b597569
chore: clippy warnings for rust 1.66.1 (#71)
kayagokalp Jan 20, 2023
a73f1b8
feat: sign with private key command for testing with local node (#70)
kayagokalp Jan 23, 2023
543bc1f
chore: bump version to 0.1.3 (#72)
kayagokalp Jan 24, 2023
1186c57
chore: 1.67.0 cargo clippy fix (#74)
kayagokalp Feb 8, 2023
324595a
update README to version 1.3 (#73)
sarahschwartz Feb 9, 2023
07a5bb0
Refactor `--path` arg for commands, use consistent terminology for wa…
mitchmindtree Feb 10, 2023
50a4f54
Expect path to wallet file, not dir. Use a cache for account addresse…
mitchmindtree Feb 10, 2023
2621dab
Update all dependencies, removed unused (#81)
mitchmindtree Feb 14, 2023
86361b6
Address ambiguitiy in init, new, list. Create a new `account` subcomm…
mitchmindtree Feb 17, 2023
4070e52
Add `--unverified` option to commands that display cached addresses (…
mitchmindtree Feb 17, 2023
d2e7a3f
feat: Add support for signing arbitrary data via new `string`, `file`…
mitchmindtree Feb 21, 2023
c0a69f0
Publish v0.2.0 (#90)
mitchmindtree Feb 21, 2023
30d2f85
feat: add support for displaying public key for an account derived wi…
kayagokalp Feb 22, 2023
27a5ed2
chore: bump version to 0.2.1 (#94)
kayagokalp Feb 22, 2023
41a0e30
Add `balance` and `account <ix> balance` subcommands for printing all…
mitchmindtree Mar 2, 2023
a95020f
Add beta-3 network URL. Switch to beta-3 as the default. (#101)
mitchmindtree Mar 29, 2023
6244108
Add derivation for plain address into forc-wallet (#99)
crypdoughdoteth Mar 29, 2023
cdf3a93
Publish version 0.2.2. Only print `EXAMPLES` section on long help (i.…
mitchmindtree Mar 29, 2023
ac82950
feat: transfer (#103)
spiral-ladder Apr 12, 2023
27ef56d
chore: bump clap to v4.2.4 for v1.69 clippy lints (#110)
kayagokalp Apr 24, 2023
599fd8d
feat: expose cli functionality as a lib (#109)
kayagokalp Apr 25, 2023
29732c4
Update password input message (#112)
Braqzen May 1, 2023
e740334
chore: bump fuels-* to 0.43 and fuel-* to 0.31 (#116)
kayagokalp Jul 4, 2023
982882f
refactor: expose derive_secret_key functionality (#119)
kayagokalp Jul 4, 2023
073dac3
fix: plain address queries with as-hex flag fails (#118)
kayagokalp Jul 4, 2023
14c29a7
chore: bump version to 0.2.3 (#114)
kayagokalp Jul 5, 2023
bee0964
refactor: expose balance collecting and printing functionality (#120)
kayagokalp Jul 7, 2023
a4054d8
feat: enforce 0x prefix for hex data input (#125)
kayagokalp Jul 17, 2023
0bfa922
fix: forc-wallet balance command panics after clap v4 update (#126)
kayagokalp Jul 17, 2023
bf45512
chore: bump fuels, fuels-core and fuel-* deps (#123)
Dentosal Jul 17, 2023
a8862ec
chore: bump version to v0.2.4 (#124)
kayagokalp Jul 17, 2023
8a3ff40
An upgrade to `fuel-core` v0.20.1 (#128)
xgreenx Aug 11, 2023
755404c
Release v0.2.5 (#131)
xgreenx Aug 11, 2023
1ef840f
feat: point to beta-4 faucet and block explorer by default (#134)
kayagokalp Aug 27, 2023
7aea774
chore: bump to v0.3.0 (#136)
kayagokalp Aug 28, 2023
d6a4798
chore: bump fuels-rs to 0.49 (#140)
kayagokalp Nov 2, 2023
182351d
Updated command in error (#141)
Braqzen Nov 6, 2023
24b1e75
chore: upgrade to fuels-rs v0.50.1 (#144)
kayagokalp Nov 11, 2023
e17af15
feat: upgrade `fuels-rs` and `fuels-core` to `tx-policies` (#145)
hal3e Nov 21, 2023
a719247
chore!: upgrade to `fuels-rs` `v0.53.0` (#151)
hal3e Nov 30, 2023
7debb0d
chore: bump version to 0.4.0 (#153)
kayagokalp Nov 30, 2023
36ecad0
feat: add --force option to forc-wallet new (#148)
levisyin Dec 12, 2023
fff40b2
chore: bump sdk version to 0.54.0 (#158)
kayagokalp Jan 4, 2024
16ed864
chore: bump version to 0.4.1 (#159)
kayagokalp Jan 4, 2024
ab83453
chore: expose new options for new_cli so that it can be used outside …
kayagokalp Jan 4, 2024
dcece09
chore: bump version to 0.4.2 (#161)
kayagokalp Jan 4, 2024
e0c391f
refactor: use common forc utils for formatting error & warning output…
levisyin Jan 10, 2024
bbf2fbf
feat: point to beta-5 by default (#162)
kayagokalp Feb 15, 2024
4d5fa8b
chore: bump to v0.4.3 (#163)
kayagokalp Feb 15, 2024
6a110b6
chore: bump to sdk 0.56.0, vm 0.47 (#169)
kayagokalp Mar 28, 2024
f1fa930
chore: bump to 0.5.0 (#170)
kayagokalp Mar 28, 2024
05563df
WIP: Working on `forc wallet list` (#167)
crodas Apr 1, 2024
565b6b6
chore: bump to latest sdk for fuel-core 0.24.2 (#171)
kayagokalp Apr 12, 2024
412dbda
chore: bump to v0.6.0 (#172)
kayagokalp Apr 12, 2024
36ecebe
chore: bump fuel-core to v0.24.3 (#174)
kayagokalp Apr 26, 2024
4b26c83
chore: bump to v0.6.1 (#175)
kayagokalp Apr 26, 2024
3472d3c
chore: use rust-sdk v0.60 to support fuel-core v0.26.0 (#177)
kayagokalp May 9, 2024
3576ae7
chore: bump to 0.7.0 (#178)
kayagokalp May 9, 2024
746746c
chore: bump fuels-rs to 0.62.0 (#179)
kayagokalp May 16, 2024
8420eb6
chore: bump to v0.7.1 (#180)
kayagokalp May 16, 2024
7db199b
chore: bump to fuel-core v0.27.0 (#181)
kayagokalp May 31, 2024
b89e83d
feat: point to testnet for default query end point (#182)
kayagokalp Jun 1, 2024
2c157b1
chore: bump to v0.8.0 (#183)
kayagokalp Jun 1, 2024
d8bb6ed
feat: derive and cache some accounts with forc-wallet import (#187)
kayagokalp Jun 13, 2024
4d7e844
chore: bump sdk to 0.64.0 to support fuel-core v0.28.0 (#189)
kayagokalp Jun 24, 2024
353a7a8
chore: Use FuelLabs fork of publish-crates (#190)
sdankel Jun 24, 2024
8e68044
chore: bump to v0.8.1 (#191)
kayagokalp Jun 24, 2024
887df24
chore: update all dependencies (#195)
kayagokalp Jun 27, 2024
ab41cd5
ci: add code coverage reports (#194)
kayagokalp Jun 27, 2024
0cab479
chore: bump to use sdk 0.65 (#196)
kayagokalp Jul 10, 2024
76e9796
chore: bump to v0.8.2 (#197)
kayagokalp Jul 10, 2024
84ffb0e
chore: bump to sdk 0.66 (#199)
kayagokalp Aug 12, 2024
29d9b25
chore: bump to v0.9.0 (#200)
kayagokalp Aug 12, 2024
5c30466
feat: print plain addresses by default (#205)
kayagokalp Sep 20, 2024
db23d0b
chore: bump fuels-* to v0.66.5 (#206)
kayagokalp Sep 23, 2024
c49415c
chore: bump version to 0.9.1 (#207)
kayagokalp Sep 23, 2024
ee49fcb
upgrade to fuels v0.66.6 and bump to v0.10.0 (#208)
sdankel Oct 6, 2024
e51eda8
feat: implement check sum reporting and update default target (#210)
kayagokalp Oct 14, 2024
90d4a0f
chore: bump sdk to v0.66.9 (#213)
kayagokalp Oct 15, 2024
152bfb4
chore: bump to 0.11.0 (#214)
kayagokalp Oct 15, 2024
c78954e
Import struct force var public visibility (#219)
zees-dev Oct 29, 2024
e0b0d8c
Fix minor wallet issues (#220)
zees-dev Oct 30, 2024
f405201
chore: bump to 0.11.1 (#221)
zees-dev Oct 30, 2024
f6f0ff0
chore: remove beta networks (#229)
sdankel Jan 12, 2025
e2a98f2
chore: bump sdk to 0.70 (#230)
kayagokalp Jan 21, 2025
8d59dbc
chore: bump version `0.11.1` -> `0.12.0` (#231)
zees-dev Jan 22, 2025
90a8cb2
refac: Update fuels and other dependencies (#236)
sdankel Mar 25, 2025
d689913
chore: bump fuels to 0.72, fuel-core to 0.43.1 (#238)
kayagokalp Apr 24, 2025
9015e09
chore: bump version to 0.14 (#239)
kayagokalp Apr 24, 2025
24883eb
feat: wallet export (#240)
kayagokalp Apr 29, 2025
bddda68
update fuels-rs (#245)
zees-dev Jun 12, 2025
9fea98d
upd forc-tracing 0.67.0 -> 0.68.8 (#246)
zees-dev Jun 19, 2025
710e703
bump rust stable version 1.86.0 -> 1.90.0 (#248)
zees-dev Oct 6, 2025
69d41ee
bump fuels 0.74 -> 0.75 (#249)
zees-dev Oct 6, 2025
6ba79bc
forc-wallet version update 0.15.1 -> 0.15.2 (#250)
zees-dev Oct 6, 2025
279124d
chore(deps): bump tokio from 1.44.1 to 1.44.2 (#252)
dependabot[bot] Oct 7, 2025
4b36e9a
Merge remote-tracking branch 'forc-wallet/master' into josh/forc-wallet
JoshuaBatty Nov 12, 2025
11c9251
add .claude to .gitignore
JoshuaBatty Nov 12, 2025
224bd02
Fix typo throughout codebase (#253)
knagy2 Nov 13, 2025
a761f57
Fix Typo in Wallet Accounts Directory Path (#247)
leopardracer Nov 13, 2025
d59f739
chore(deps): bump tracing-subscriber from 0.3.19 to 0.3.20 (#251)
dependabot[bot] Nov 13, 2025
74d8ce5
chore: swap deprecated actions/upload-release-assets to shogo82148/ac…
alfiedotwtf Nov 13, 2025
ff15624
Merge remote-tracking branch 'upstream/master' into josh/forc-wallet
JoshuaBatty Nov 18, 2025
f5c24b6
make forc-wallet into a workspace member
JoshuaBatty Nov 20, 2025
a17cb94
update forc-wallet version to 0.16.0
JoshuaBatty Nov 20, 2025
f07a36d
create forc-wallet CHANGELOG.md file
JoshuaBatty Nov 21, 2025
3c1f005
ci: support independent workspace member releases
JoshuaBatty Nov 21, 2025
dea92eb
ci: generalize build-release job for any workspace member
JoshuaBatty Nov 21, 2025
02cceb9
clean up
JoshuaBatty Nov 21, 2025
cb0d4f2
add Cargo.lock
JoshuaBatty Nov 21, 2025
6d0715c
fix: markdownlint errors
JoshuaBatty Nov 21, 2025
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
269 changes: 269 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
name: CI

on:
push:
branches:
- master
pull_request:
release:
types: [published]

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
REGISTRY: ghcr.io
RUST_VERSION: 1.90.0
NIGHTLY_RUST_VERSION: nightly-2025-09-28

jobs:
cancel-previous-runs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

publish-codecov:
name: Check code coverage (branch)
runs-on: ubuntu-latest
permissions: # Write access to push changes to pages
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Install latest Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.NIGHTLY_RUST_VERSION }}

- name: Install cargo-llvm-codecov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Code coverage report
run: cargo +${{ env.NIGHTLY_RUST_VERSION }} llvm-cov --all-features --lcov --branch --output-path lcov.info

- name: Setup LCOV
uses: hrishikesh-kadam/setup-lcov@v1

- name: Report code coverage
uses: zgosalvez/github-actions-report-lcov@v4
with:
coverage-files: lcov.info
minimum-coverage: 0 # for now we are not enforcing any minimum coverage.
artifact-name: code-coverage-report
github-token: ${{ secrets.GITHUB_TOKEN }}
update-comment: true

lint-toml-files:
needs: cancel-previous-runs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install Cargo.toml linter
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-toml-lint
version: "0.1"
- name: Run Cargo.toml linter
run: git ls-files | grep Cargo.toml$ | xargs --verbose -n 1 cargo-toml-lint
- name: Notify if Job Fails
uses: ravsamhq/notify-slack-action@v1
if: always() && github.ref == 'refs/heads/master'
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>'
footer: ''
notify_when: 'failure'
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}

cargo-verifications:
needs: cancel-previous-runs
runs-on: ubuntu-latest
strategy:
matrix:
include:
- command: fmt
args: --all --verbose -- --check
- command: clippy
args: --all-targets --all-features
- command: check
args: --locked --all-targets --all-features
- command: test
args: --all-targets --all-features
- command: test
args: --all-targets --no-default-features
# disallow any job that takes longer than 30 minutes
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v1
with:
key: "${{ matrix.command }}${{ matrix.args }}"
- name: ${{ matrix.command }} ${{ matrix.args }}
uses: actions-rs/cargo@v1
with:
command: ${{ matrix.command }}
args: ${{ matrix.args }}
- name: Notify if Job Fails
uses: ravsamhq/notify-slack-action@v1
if: always() && github.ref == 'refs/heads/master'
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>'
footer: ''
notify_when: 'failure'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NOTIFY_BUILD }}
RUSTFLAGS: -D warnings


publish-crates:
# Only do this job if publishing a release
needs:
- lint-toml-files
- cargo-verifications
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Verify tag version
run: |
curl -sSLf "https://github.com/TomWright/dasel/releases/download/v1.24.3/dasel_linux_amd64" -L -o dasel && chmod +x dasel
mv ./dasel /usr/local/bin/dasel
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }}

- name: Publish crate
uses: FuelLabs/publish-crates@v1
with:
publish-delay: 30000
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

- name: Notify if Job Fails
uses: ravsamhq/notify-slack-action@v1
if: always()
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>'
footer: ''
notify_when: 'failure'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TOOLING }}

build-release:
name: build release binaries
runs-on: ${{ matrix.job.os }}
if: github.event_name == 'release' && github.event.action == 'published'
needs: cancel-previous-runs
strategy:
matrix:
job:
- os: ubuntu-latest
platform: linux
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
platform: linux
target: aarch64-unknown-linux-gnu
- os: macos-latest
platform: darwin
target: x86_64-apple-darwin
- os: macos-latest
platform: darwin
target: aarch64-apple-darwin
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Extract crate name from tag
id: extract_crate
run: |
TAG="${GITHUB_REF#refs/tags/}"
# Extract crate name (everything before the last version number)
CRATE_NAME=$(echo "$TAG" | sed -E 's/-[0-9]+\.[0-9]+\.[0-9]+.*//')
echo "crate_name=$CRATE_NAME" >> $GITHUB_OUTPUT
echo "Building crate: $CRATE_NAME"

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.job.target }}
override: true

- uses: Swatinem/rust-cache@v1
with:
cache-on-failure: true
key: "${{ matrix.job.target }}"

- name: Use Cross
uses: baptiste0928/cargo-install@v1
with:
crate: cross
cache-key: "${{ matrix.job.target }}"

- name: Build ${{ steps.extract_crate.outputs.crate_name }}
run: |
cross build --profile=release --target ${{ matrix.job.target }} -p ${{ steps.extract_crate.outputs.crate_name }}
- name: Strip release binary x86_64-linux-gnu
if: matrix.job.target == 'x86_64-unknown-linux-gnu'
run: strip "target/${{ matrix.job.target }}/release/${{ steps.extract_crate.outputs.crate_name }}"

- name: Strip release binary aarch64-linux-gnu
if: matrix.job.target == 'aarch64-unknown-linux-gnu'
run: |
docker run --rm -v \
"$PWD/target:/target:Z" \
ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main \
aarch64-linux-gnu-strip \
/target/aarch64-unknown-linux-gnu/release/${{ steps.extract_crate.outputs.crate_name }}
- name: Strip release binary mac
if: matrix.job.os == 'macos-latest'
run: strip -x "target/${{ matrix.job.target }}/release/${{ steps.extract_crate.outputs.crate_name }}"

- name: Prep assets
id: prep_assets
env:
PLATFORM_NAME: ${{ matrix.job.platform }}
TARGET: ${{ matrix.job.target }}
CRATE_NAME: ${{ steps.extract_crate.outputs.crate_name }}
run: |
# Get tag name
# See: https://github.community/t5/GitHub-Actions/How-to-get-just-the-tag-name/m-p/32167/highlight/true#M1027
TAG="${GITHUB_REF#refs/tags/}"
echo "version is: $TAG"
# setup artifact filename
ARTIFACT="${TAG}-${{ env.TARGET }}"
ZIP_FILE_NAME="$ARTIFACT.tar.gz"
echo "ZIP_FILE_NAME=$ZIP_FILE_NAME" >> $GITHUB_ENV
# create zip file
mkdir -pv "$ARTIFACT"
cp "target/${{ matrix.job.target }}/release/${CRATE_NAME}" "$ARTIFACT"
tar -czvf $ZIP_FILE_NAME "$ARTIFACT"
- name: Upload release archive
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
files: ${{ env.ZIP_FILE_NAME }}
22 changes: 22 additions & 0 deletions .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Markdown Lint

on:
push:
branches:
- master
pull_request:
release:
types: [published]

jobs:
markdown-lint:
name: Markdown Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: |
npm install -g markdownlint-cli@0.32.1
markdownlint --config .markdownlint.yaml '**/*.md'
14 changes: 14 additions & 0 deletions .github/workflows/nightly-cargo-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Nightly Cargo Audit

on:
schedule:
- cron: '0 0 * * *'

jobs:
cargo_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
53 changes: 53 additions & 0 deletions .github/workflows/scripts/verify_tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env bash
set -e

err() {
echo -e "\e[31m\e[1merror:\e[0m $@" 1>&2;
}

status() {
WIDTH=12
printf "\e[32m\e[1m%${WIDTH}s\e[0m %s\n" "$1" "$2"
}

TAG=$1

if [ -z "$TAG" ]; then
err "Expected tag to be set"
exit 1
fi

# Extract crate name and version from tag (format: {crate-name}-{version})
# Example: forc-wallet-0.16.0 -> crate=forc-wallet, version=0.16.0
CRATE_NAME=$(echo "$TAG" | sed -E 's/-[0-9]+\.[0-9]+\.[0-9]+.*//')
VERSION=$(echo "$TAG" | sed -E 's/^.*-([0-9]+\.[0-9]+\.[0-9]+.*)/\1/')

if [ -z "$CRATE_NAME" ] || [ -z "$VERSION" ]; then
err "Failed to parse crate name and version from tag: $TAG"
err "Expected format: {crate-name}-{version} (e.g., forc-wallet-0.16.0)"
exit 1
fi

status "Parsed tag" "$TAG -> crate: $CRATE_NAME, version: $VERSION"

# Find the Cargo.toml for this crate
MANIFEST="${CRATE_NAME}/Cargo.toml"

if [ ! -f "$MANIFEST" ]; then
err "Manifest not found at $MANIFEST"
err "Available workspace members:"
ls -d */ | grep -v target | sed 's|/||'
exit 1
fi

status "Found manifest" "$MANIFEST"

# Verify the version in Cargo.toml matches the tag
TOML_VERSION=$(cat "$MANIFEST" | dasel -r toml 'package.version')

if [ "$TOML_VERSION" != "$VERSION" ]; then
err "Crate version $TOML_VERSION in $MANIFEST doesn't match tag version $VERSION"
exit 1
else
status "Verified" "Crate version matches tag: $VERSION"
fi
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# IDE
.vscode

# Output
/target

# .DS_Store
.DS_Store

# Forc's build directory
out

.claude
7 changes: 7 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"default": true # Default state for all rules
"MD013": false # Disable rule for line length
"MD033": false # Disable rule banning inline HTML
"MD001": false # Allow heading increments (needed for CHANGELOGs)
"MD024": false # Allow duplicate headings (needed for CHANGELOGs)
"MD025": false # Allow multiple H1 headings (needed for CHANGELOGs)
"MD037": false # Allow spaces in emphasis markers
Loading
Loading