Skip to content

Command line utilities to check StarkNet contracts written in Cairo.

License

Notifications You must be signed in to change notification settings

onlydustxyz/uraeus

Repository files navigation

Uræus

Command line utilities to check StarkNet contracts written in Cairo.

⚠️ WARNING! ⚠️

This repo contains highly experimental code. Expect rapid iteration.

Prerequisites

📦 Installation

🧱 From crates.io

cargo install uraeus

🔧 From source

cargo install --path .

🔬 Usage

Verify

Verify checks if a source code matches a deployed contract.

uraeus-verify 
verify source code of deployed smart contracts

USAGE:
    uraeus verify [OPTIONS] <address>

ARGS:
    <address>    Address of the smart contract

OPTIONS:
    -b, --builddir <BUILD_DIR>        Build directory [default: ]
    -h, --help                        Print help information
    -n, --name <CONTRACT_NAME>        Contract name [default: main]
    -p, --projectdir <PROJECT_DIR>    Project root directory [default: ]

Example:

uraeus verify 0x0253db1872f5b9ad73ad17461fbbf0e987a23ea05d34c120311301bddb092dc8

Example verify

UI

UI provides a UI to verify if a source code matches a deployed contract.

uraeus-ui
starts the web ui

USAGE:
    uraeus ui [OPTIONS]

OPTIONS:
    -b, --builddir <BUILD_DIR>        build directory [default: ]
    -h, --help                        Print help information
    -o, --open                        open the browser from the CLI
    -p, --projectdir <PROJECT_DIR>    project root directory [default: ]
        --port <PORT>                 change the UI port [default: 7878]

Example:

uraeus ui \
  --projectdir examples/starknet/protostar/gm \
  --open

Example ui

📗 Logging

Change log level using RUST_LOG environment variable.

Example:

RUST_LOG=debug cargo run -- verify 0x4bfedc224c8360eaa16969c5db2944d19c32dbabdb4fc0d93bb3ea759c7198c

🌡️ Testing

cargo test --verbose

🏄‍♂️ Test coverage

sh scripts/test_coverage.sh

🛠️ Development

Install git hooks

sh scripts/install_git_hooks.sh

📄 License

uraeus is released under the MIT.