> For the complete documentation index, see [llms.txt](https://docs.astralbeam.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.astralbeam.io/operators/evm-commands.md).

# EVM Commands

Query EVM chain contract state. These commands are read-only and do not require a private key.

## Usage

```bash
bridge-cli evm [options] [contract] [method] [args...]
```

**Options:**

| Option                 | Description                                     |
| ---------------------- | ----------------------------------------------- |
| `-n, --network <name>` | Target network (e.g., `sepolia`, `baseSepolia`) |

**Contracts:**

* `MultiSigLocker` - The main bridge locker contract

## List Available Networks

```bash
bridge-cli evm networks
```

Output:

```
Available Networks:

  sepolia       Ethereum Sepolia (Chain ID: 11155111)
  baseSepolia   Base Sepolia (Chain ID: 84532)

Use: bridge-cli evm --network <name> MultiSigLocker <method>
```

***

## MultiSigLocker Commands

### Interactive Help

When you run the command without a method, the CLI displays available methods:

```bash
bridge-cli evm --network sepolia MultiSigLocker
```

Output:

```
MultiSigLocker Methods:

Contract Info:
  admin              - Get admin address
  VERSION            - Get contract version
  getImplementation  - Get proxy implementation address

Relayer Management:
  getRelayerSet      - Get all relayers and threshold
  isRelayer <addr>   - Check if address is a relayer

ERC-20 Token Registry:
  getRegisteredTokens    - Get all registered token addresses
  isTokenRegistered <token> - Check if token is registered
  getCasperContract <token> - Get Casper hash for token
  getLockedBalance <token>  - Get locked balance for token

Wrapped Tokens:
  hasWrappedToken <hash>     - Check if wrapped token exists
  getWrappedToken <hash>     - Get wrapped token address
  getCasperTokenHash <addr>  - Get Casper hash for wrapped
  isWrappedToken <addr>      - Check if address is wrapped token

Fee Configuration:
  bridgeFee      - Get current bridge fee
  feeRecipient   - Get fee recipient address
```

***

### Contract Information

```bash
# Get admin address
bridge-cli evm --network sepolia MultiSigLocker admin

# Get contract version
bridge-cli evm --network sepolia MultiSigLocker VERSION

# Get proxy implementation
bridge-cli evm --network sepolia MultiSigLocker getImplementation
```

### Relayer Information

```bash
# Get relayer set (addresses and threshold)
bridge-cli evm --network sepolia MultiSigLocker getRelayerSet

# Check if address is a relayer
bridge-cli evm --network sepolia MultiSigLocker isRelayer 0x1234...
```

**Example Output:**

```bash
$ bridge-cli evm --network sepolia MultiSigLocker getRelayerSet

Relayers (3-of-5):
  1. 0x1234567890abcdef1234567890abcdef12345678
  2. 0xabcdef1234567890abcdef1234567890abcdef12
  3. 0x9876543210fedcba9876543210fedcba98765432
  4. 0xfedcba9876543210fedcba9876543210fedcba98
  5. 0x1111222233334444555566667777888899990000
```

### Token Registry

```bash
# Get all registered tokens
bridge-cli evm --network sepolia MultiSigLocker getRegisteredTokens

# Check if token is registered
bridge-cli evm --network sepolia MultiSigLocker isTokenRegistered 0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238

# Get Casper contract hash for token
bridge-cli evm --network sepolia MultiSigLocker getCasperContract 0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238

# Get locked balance
bridge-cli evm --network sepolia MultiSigLocker getLockedBalance 0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238
```

### Wrapped Token Queries

```bash
# Check if wrapped token exists for Casper hash
bridge-cli evm --network sepolia MultiSigLocker hasWrappedToken 0xabc123...

# Get wrapped token address
bridge-cli evm --network sepolia MultiSigLocker getWrappedToken 0xabc123...

# Get Casper token hash for wrapped token
bridge-cli evm --network sepolia MultiSigLocker getCasperTokenHash 0x5678...

# Check if address is a wrapped token
bridge-cli evm --network sepolia MultiSigLocker isWrappedToken 0x5678...
```

### Fee Configuration

```bash
# Get bridge fee
bridge-cli evm --network sepolia MultiSigLocker bridgeFee

# Get fee recipient
bridge-cli evm --network sepolia MultiSigLocker feeRecipient
```

***

## Multi-Chain Support

Commands work across all configured EVM chains. Use the `--network` flag to specify the target:

```bash
# Query Sepolia
bridge-cli evm --network sepolia MultiSigLocker getLockedBalance 0x1c7D...

# Query Base Sepolia
bridge-cli evm --network baseSepolia MultiSigLocker getLockedBalance 0x036C...
```

Each chain has its own:

* Locker contract address
* Registered tokens
* Locked balances
* Relayer configuration

***

## Examples

### Check Contract Status

```bash
#!/bin/bash
NETWORK="sepolia"

echo "=== MultiSigLocker Status on $NETWORK ==="

# Get admin
echo "Admin: $(bridge-cli evm --network $NETWORK MultiSigLocker admin)"

# Get relayers
bridge-cli evm --network $NETWORK MultiSigLocker getRelayerSet

# Get fee info
echo "Bridge Fee: $(bridge-cli evm --network $NETWORK MultiSigLocker bridgeFee) wei"
echo "Fee Recipient: $(bridge-cli evm --network $NETWORK MultiSigLocker feeRecipient)"
```

### Query Locked Balances

```bash
#!/bin/bash
NETWORK="sepolia"

# USDC on Sepolia
USDC="0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"

echo "Locked USDC: $(bridge-cli evm --network $NETWORK MultiSigLocker getLockedBalance $USDC)"
```

***

## Notes

* All queries are read-only and do not require signing keys
* The `--network` flag is required for MultiSigLocker commands
* For admin operations (register tokens, update relayers), use `bridge-cli admin` commands
* Network names are case-sensitive (use `sepolia` not `Sepolia`)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.astralbeam.io/operators/evm-commands.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
