Skip to content

Commit 355e352

Browse files
authored
chore: bump crates and docs (#3)
* feat: update peer deps * feat: bump crates * bump version in README * feat: update docs * fix: fix commands
1 parent bff1f07 commit 355e352

File tree

5 files changed

+82
-107
lines changed

5 files changed

+82
-107
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
uses: docker/build-push-action@v6
141141
with:
142142
push: true
143-
platforms: linux/amd64,linux/arm64
143+
platforms: linux/arm64
144144
sbom: true
145145
provenance: mode=max
146146
tags: ${{ steps.meta.outputs.tags }}

Cargo.lock

Lines changed: 33 additions & 98 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
name = "soteria"
33
authors = ["QEDK <qedk@monad.foundation>"]
44
license = "Apache-2.0"
5-
version = "0.1.6"
5+
version = "0.1.7"
66
edition = "2024"
77

88
[dependencies]
99
# anyhow should not be pinned
1010
anyhow = "1"
11-
clap = { version = "=4.5.51", features = ["derive"] }
11+
clap = { version = "=4.5.53", features = ["derive"] }
1212
hex = "=0.4.3"
1313
owo-colors = "=4.2.3"
14-
primitive-types = "=0.12.2"
14+
primitive-types = "=0.14.0"
1515
# serde should not be pinned
1616
serde = { version = "1", features = ["derive"] }
1717
# serde_json should not be pinned

README.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,59 @@
11
# 🚦 soteria
2-
A simple CLI tool that validates Safe transaction hashes in JSON log files.
2+
A simple CLI tool that validates Safe transaction hashes in JSON log files. This is
3+
a metarepo that contains the CLI tool, a GitHub action, and a Docker image for easy integration into various workflows.
34

45
## Quickstart
56

6-
### Using CLI
7+
### Install from source
8+
To install soteria from source, ensure you have Rust and Cargo installed. Then, you can use the CLI tool as follows:
79
```bash
810
cargo install --git https://github.com/monad-developers/soteria.git
911
soteria /path/to/your/logs/directory
1012
```
1113

14+
### Build and install from source
15+
To build soteria from source, ensure you have Rust and Cargo installed. Then, clone the repository and build the project:
16+
```bash
17+
git clone https://github.com/monad-developers/soteria.git
18+
cd soteria
19+
cargo install --path .
20+
soteria /path/to/your/logs/directory
21+
```
22+
23+
### Using GitHub Actions
24+
If you want to integrate soteria into your CI/CD pipeline, you can use the GitHub action:
25+
```yaml
26+
- name: Run soteria
27+
id: soteria
28+
uses: monad-developers/soteria-action@v0.1.7
29+
with:
30+
directory: '/path/to/your/logs/directory'
31+
```
32+
33+
A full list of available flags for the GitHub action is provided below:
34+
| Input | Required? | Default | Description |
35+
|-----------------|-----------|----------|--------------------------------------|
36+
| `directory` | Yes | N/A | Directory containing log files. |
37+
| `version` | No | `latest` | Version of soteria to use. |
38+
| `github-token` | No | N/A | GitHub token for authentication. |
39+
| `fail-on-error` | No | `true` | Whether to fail the action on error. |
40+
1241
### Using Docker
42+
You can also run soteria using Docker. There are two options: using a pre-built image or building the image from source. Images use statically linked binaries and are run in a minimal non-root environment for security.
43+
44+
#### Pre-built image
45+
```bash
46+
docker pull monadfoundation/soteria
47+
```
48+
49+
#### Build from source
1350
```bash
51+
git clone https://github.com/monad-developers/soteria.git
52+
cd soteria
1453
docker build -t soteria .
1554
```
1655

17-
Replace `$(pwd)/src/mocks` with your directory of files to check:
56+
#### Run the image
1857
```bash
19-
docker run -v $(pwd)/src/mocks:/mnt/data soteria /mnt/data
58+
docker run -v <path-to-your-logs>:/mnt/data soteria /mnt/data
2059
```

src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,8 @@ fn encode_address(address: [u8; 20]) -> [u8; 32] {
489489

490490
fn encode_u256(value: U256) -> [u8; 32] {
491491
let mut out = [0u8; 32];
492-
value.to_big_endian(&mut out);
492+
let bytes = value.to_big_endian();
493+
out.copy_from_slice(&bytes);
493494
out
494495
}
495496

0 commit comments

Comments
 (0)