Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64,linux/arm64
platforms: linux/arm64
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing linux/amd64 from the platforms list means the Docker image will only be built for ARM64 architecture. This will prevent the vast majority of users on x86_64/AMD64 systems from using the pre-built Docker image. If this is intentional due to build issues, it should be documented in the README or PR description why AMD64 is unsupported. Otherwise, consider keeping both platforms or at least linux/amd64 as it's the most common architecture.

Suggested change
platforms: linux/arm64
platforms: linux/amd64,linux/arm64

Copilot uses AI. Check for mistakes.
sbom: true
provenance: mode=max
tags: ${{ steps.meta.outputs.tags }}
Expand Down
131 changes: 33 additions & 98 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
name = "soteria"
authors = ["QEDK <qedk@monad.foundation>"]
license = "Apache-2.0"
version = "0.1.6"
version = "0.1.7"
edition = "2024"

[dependencies]
# anyhow should not be pinned
anyhow = "1"
clap = { version = "=4.5.51", features = ["derive"] }
clap = { version = "=4.5.53", features = ["derive"] }
hex = "=0.4.3"
owo-colors = "=4.2.3"
primitive-types = "=0.12.2"
primitive-types = "=0.14.0"
# serde should not be pinned
serde = { version = "1", features = ["derive"] }
# serde_json should not be pinned
Expand Down
47 changes: 43 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,59 @@
# 🚦 soteria
A simple CLI tool that validates Safe transaction hashes in JSON log files.
A simple CLI tool that validates Safe transaction hashes in JSON log files. This is
a metarepo that contains the CLI tool, a GitHub action, and a Docker image for easy integration into various workflows.

## Quickstart

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

### Build and install from source
To build soteria from source, ensure you have Rust and Cargo installed. Then, clone the repository and build the project:
```bash
git clone https://github.com/monad-developers/soteria.git
cd soteria
cargo install --path .
soteria /path/to/your/logs/directory
Comment on lines +7 to +20
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sections "Install from source" and "Build and install from source" are redundant. Both sections describe installing from source using Cargo, with the only difference being whether you clone first. Consider consolidating these into a single "Install from source" section that shows both methods, or clarifying the distinction between installing directly from git vs building locally.

Copilot uses AI. Check for mistakes.
```

### Using GitHub Actions
If you want to integrate soteria into your CI/CD pipeline, you can use the GitHub action:
```yaml
- name: Run soteria
id: soteria
uses: monad-developers/soteria-action@v0.1.7
with:
directory: '/path/to/your/logs/directory'
```
A full list of available flags for the GitHub action is provided below:
| Input | Required? | Default | Description |
|-----------------|-----------|----------|--------------------------------------|
| `directory` | Yes | N/A | Directory containing log files. |
| `version` | No | `latest` | Version of soteria to use. |
| `github-token` | No | N/A | GitHub token for authentication. |
| `fail-on-error` | No | `true` | Whether to fail the action on error. |

### Using Docker
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.

#### Pre-built image
```bash
docker pull monadfoundation/soteria
```

#### Build from source
```bash
git clone https://github.com/monad-developers/soteria.git
cd soteria
docker build -t soteria .
```

Replace `$(pwd)/src/mocks` with your directory of files to check:
#### Run the image
```bash
docker run -v $(pwd)/src/mocks:/mnt/data soteria /mnt/data
docker run -v <path-to-your-logs>:/mnt/data soteria /mnt/data
```
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,8 @@ fn encode_address(address: [u8; 20]) -> [u8; 32] {

fn encode_u256(value: U256) -> [u8; 32] {
let mut out = [0u8; 32];
value.to_big_endian(&mut out);
let bytes = value.to_big_endian();
out.copy_from_slice(&bytes);
Comment on lines +492 to +493
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intermediate allocation and copy is unnecessary. If the new API for to_big_endian() returns [u8; 32] directly, you can simplify this to just return the result directly without creating out and copying into it.

Copilot uses AI. Check for mistakes.
out
}

Expand Down