Skip to content

Tool for verifying bytecode equality between on-chain contract vs local compiled contract in Stellar network.

Notifications You must be signed in to change notification settings

MCarlomagno/pharus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pharus

WARNING: This project is experimental, expect breaking changes, this is not production ready.

Pharus is a tool for verifying smart contract deployments by comparing local compiled contracts with their on-chain counterparts across EVM-compatible (bytecode) and Stellar networks (wasm).

Installation

cargo install pharus

Or build from source:

git clone https://github.com/yourusername/pharus
cd pharus
cargo build --release

Usage

Basic Usage

pharus --network <NETWORK> --local <LOCAL_PATH> --remote <CONTRACT_ADDRESS>

Examples

Stellar Contract Verification

# Mainnet
pharus --network stellar \
       --local ./path/to/contract.wasm \
       --remote CB5HA53QWBLOCD7LQOFZ4FIOSQS2ZUA7KIBZYOV6D4CPJWXIYGX2OBAC

# Testnet
pharus --network stellar-testnet \
       --local ./path/to/contract.wasm \
       --remote CCHXQJ5YDCIRGCBUTLC5BF2V2DKHULVPTQJGD4BAHW46JQWVRQNGA2LU

EVM Contract Verification

pharus --network ethereum \
       --local ./path/to/artifact.json \
       --remote 0x1234567890123456789012345678901234567890 \
       --contract-path contracts/MyContract.sol \
       --contract-name MyContract

# Custom EVM Network
pharus --network custom-evm \
       --rpc-url https://my-network-rpc.example.com \
       --local ./path/to/artifact.json \
       --remote 0x1234567890123456789012345678901234567890 \
       --contract-path contracts/MyContract.sol \
       --contract-name MyContract

Command Line Options

Option Description Required
--network Network name (e.g., stellar, ethereum, sepolia) Yes
--local Path to local contract file Yes
--remote On-chain contract address Yes
--rpc-url Custom RPC URL (optional for supported networks) No
--network-passphrase Custom network passphrase (Stellar only) No
--contract-path Contract path in artifact (EVM only) Yes for EVM
--contract-name Contract name in artifact (EVM only) Yes for EVM

Supported Networks

Stellar

EVM

  • Any custom EVM-compatible network (requires --rpc-url)

Development

Running Tests

cargo test

About

Tool for verifying bytecode equality between on-chain contract vs local compiled contract in Stellar network.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages