Applications (Precompiles)
Interacting with Precompiles
Reading State
import { ethers } from "ethers";
const provider = new ethers.JsonRpcProvider("https://rpc.v1.dev.pod.network");
const ORDERBOOK = "0x000000000000000000000000000000000000C10B";
const abi = ["function getBalance(address token) view returns (uint256)"];
const orderbook = new ethers.Contract(ORDERBOOK, abi, provider);
const USDT = "0x0000000000000000000000000000000000000001";
const balance = await orderbook.getBalance(USDT);
console.log("Balance:", balance.toString());from web3 import Web3
w3 = Web3(Web3.HTTPProvider("https://rpc.v1.dev.pod.network"))
ORDERBOOK = "0x000000000000000000000000000000000000C10B"
abi = [{"inputs": [{"name": "token", "type": "address"}],
"name": "getBalance",
"outputs": [{"name": "", "type": "uint256"}],
"stateMutability": "view", "type": "function"}]
orderbook = w3.eth.contract(address=ORDERBOOK, abi=abi)
USDT = "0x0000000000000000000000000000000000000001"
balance = orderbook.functions.getBalance(USDT).call()
print("Balance:", balance)Submitting Transactions
Last updated

