Monad

Monad is the primary EVM test network exercised by the current sb-on-demand-examples repo. The verified Monad testnet Switchboard proxy is 0x6724818814927e057a693f4e3A172b6cC1eA690C.

Network Information

Network
Chain ID
RPC URL
Switchboard Contract

Mainnet

143

https://rpc-mainnet.monadinfra.com/rpc/YOUR_API_KEY

0xB7F03eee7B9F56347e32cC71DaD65B303D5a0E67

Testnet

10143

https://testnet-rpc.monad.xyz

0x6724818814927e057a693f4e3A172b6cC1eA690C

Quick Start

Price Feeds

git clone https://github.com/switchboard-xyz/sb-on-demand-examples.git
cd sb-on-demand-examples/evm/price-feeds
bun install
forge build
cp .env.example .env

Set your .env like this:

PRIVATE_KEY=0xyour_private_key_here
RPC_URL=https://testnet-rpc.monad.xyz
NETWORK=monad-testnet
# Optional: if omitted, the example deploys a new consumer contract for you
CONTRACT_ADDRESS=0xyour_existing_consumer

Then run:

This flow was verified on Monad testnet. The packaged script now handles the current Crossbar Monad testnet rollout by falling back to the network-agnostic oracle quote endpoint if the chain-specific feed lookup is unavailable.

Direct Randomness

That example talks directly to the Switchboard proxy, creates a randomness request, waits for the settlement window, resolves through Crossbar, and settles on-chain.

Coin Flip

After deployment, fund the example contract with a small bankroll so it can pay winning flips:

Set your .env:

Run the game script:

Pancake Stacker

Set your .env:

Then run:

If a previous run already created a pending flip, the packaged script resumes settlement instead of failing.

Integration Example

Monad Notes

  • MON is the native gas token on Monad.

  • The current examples repo is organized as standalone subprojects under evm/price-feeds, evm/randomness, evm/randomness/coin-flip, and evm/randomness/pancake-stacker.

  • Testnet MON is available from the Monad faucetarrow-up-right.

Last updated