For the complete documentation index, see llms.txt. This page is also available as Markdown.

Precompiles

Pod uses precompiles for enshrined applications and internal protocol operations. Precompiles are built into the protocol rather than deployed as user contracts, so they can access internal state (validator signatures, timestamps, merkle proofs) and execute without contract call overhead.

Precompile Addresses

Signature
Address
Description

0x50d0000000000000000000000000000000000002

Central limit order book for spot and perpetual markets

0x50d0000000000000000000000000000000000001

Token bridging in and out of Pod — the only way value crosses the boundary

0x50d0000000000000000000000000000000000003

Recover a locked account by finalizing the target transaction chain

Interacting with Precompiles

You interact with Pod's precompiles the same way you would interact with any smart contract on Ethereum - by encoding function calls against a Solidity ABI and sending them via eth_call (reads) or eth_sendRawTransaction (writes).

Reading State

Query an account's token balance in the orderbook contract using eth_call.

import { ethers } from "ethers";

const provider = new ethers.JsonRpcProvider("https://staging-rpc.podtestnet.dev");

const ORDERBOOK = "0x50d0000000000000000000000000000000000002";
const abi = ["function balanceOf(address token, address account) view returns (uint256)"];
const orderbook = new ethers.Contract(ORDERBOOK, abi, provider);

const USDT = "0x0000000000000000000000000000000000000001";
const ACCOUNT = "0xYourAddress";
const balance = await orderbook.balanceOf(USDT, ACCOUNT);
console.log("Balance:", balance.toString());
from web3 import Web3

w3 = Web3(Web3.HTTPProvider("https://staging-rpc.podtestnet.dev"))

ORDERBOOK = "0x50d0000000000000000000000000000000000002"
abi = [{"inputs": [{"name": "token", "type": "address"},
                   {"name": "account", "type": "address"}],
        "name": "balanceOf",
        "outputs": [{"name": "", "type": "uint256"}],
        "stateMutability": "view", "type": "function"}]

orderbook = w3.eth.contract(address=ORDERBOOK, abi=abi)

USDT = "0x0000000000000000000000000000000000000001"
ACCOUNT = "0xYourAddress"
balance = orderbook.functions.balanceOf(USDT, ACCOUNT).call()
print("Balance:", balance)

Submitting Transactions

Send a signed transaction to place a buy order on the orderbook via eth_sendRawTransaction.

Last updated