-
Notifications
You must be signed in to change notification settings - Fork 1
chore: bump crates and docs #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| 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
|
||
| ``` | ||
|
|
||
| ### 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 | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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
|
||
| out | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing
linux/amd64from 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 leastlinux/amd64as it's the most common architecture.