tools/SKILL.md
Development tools for Hyperliquid — Foundry, Hardhat, viem, wagmi for HyperEVM; Python SDK and TypeScript SDK for HyperCore API. What works, what to use, how to set up.
npx skillsauth add cloudzombie/liquidskills toolsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"I need special tools for Hyperliquid." For HyperEVM, standard EVM tools work unchanged. Foundry, Hardhat, viem, wagmi, Remix — all work. Just point them at the right RPC and chain ID.
"The Python SDK is optional." If you're interacting with HyperCore (trading, positions, HIP-1 tokens), use the official SDK. Rolling your own API calls with manual EIP-712 signing is error-prone and unsupported.
"ethers.js is fine." It works, but viem is preferred for new projects — smaller, better TypeScript, more explicit about what it's doing.
Foundry works with HyperEVM unchanged. Point it at the right RPC:
# Install Foundry
curl -L https://foundry.paradigm.xyz | bash
foundryup
# Initialize a project
forge init my-project
cd my-project
# Deploy to HyperEVM testnet
forge create src/MyContract.sol:MyContract \
--rpc-url https://rpc.hyperliquid-testnet.xyz/evm \
--private-key $PRIVATE_KEY \
--broadcast
# Deploy to HyperEVM mainnet
forge create src/MyContract.sol:MyContract \
--rpc-url https://rpc.hyperliquid.xyz/evm \
--private-key $PRIVATE_KEY \
--broadcast
# Verify contract (Blockscout)
forge verify-contract <ADDRESS> src/MyContract.sol:MyContract \
--verifier blockscout \
--verifier-url https://explorer.hyperliquid.xyz/api
foundry.toml for HyperEVM:
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
[rpc_endpoints]
hyperliquid = "https://rpc.hyperliquid.xyz/evm"
hyperliquid_testnet = "https://rpc.hyperliquid-testnet.xyz/evm"
[etherscan]
hyperliquid = { key = "empty", chain = 999, url = "https://explorer.hyperliquid.xyz/api" }
hyperliquid_testnet = { key = "empty", chain = 998, url = "https://explorer-testnet.hyperliquid.xyz/api" }
// hardhat.config.ts
import { HardhatUserConfig } from "hardhat/config";
const config: HardhatUserConfig = {
solidity: "0.8.24",
networks: {
hyperliquid: {
url: "https://rpc.hyperliquid.xyz/evm",
chainId: 999,
accounts: [process.env.PRIVATE_KEY!],
},
hyperliquidTestnet: {
url: "https://rpc.hyperliquid-testnet.xyz/evm",
chainId: 998,
accounts: [process.env.PRIVATE_KEY!],
},
},
};
export default config;
import { createPublicClient, createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { defineChain } from 'viem';
// Define HyperEVM chain
const hyperliquid = defineChain({
id: 999,
name: 'HyperEVM',
nativeCurrency: { name: 'HYPE', symbol: 'HYPE', decimals: 18 },
rpcUrls: {
default: { http: ['https://rpc.hyperliquid.xyz/evm'] },
},
blockExplorers: {
default: { name: 'Explorer', url: 'https://explorer.hyperliquid.xyz' },
},
});
// Public client (reads)
const publicClient = createPublicClient({
chain: hyperliquid,
transport: http(),
});
// Wallet client (writes)
const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
const walletClient = createWalletClient({
account,
chain: hyperliquid,
transport: http(),
});
// Read a contract
const balance = await publicClient.readContract({
address: tokenAddress,
abi: erc20Abi,
functionName: 'balanceOf',
args: [userAddress],
});
// Write a contract
const txHash = await walletClient.writeContract({
address: tokenAddress,
abi: erc20Abi,
functionName: 'transfer',
args: [recipient, amount],
});
// wagmi config for HyperEVM
import { createConfig, http } from 'wagmi';
import { defineChain } from 'viem';
import { injected, walletConnect } from 'wagmi/connectors';
const hyperliquid = defineChain({
id: 999,
name: 'HyperEVM',
nativeCurrency: { name: 'HYPE', symbol: 'HYPE', decimals: 18 },
rpcUrls: {
default: { http: ['https://rpc.hyperliquid.xyz/evm'] },
},
});
export const wagmiConfig = createConfig({
chains: [hyperliquid],
connectors: [
injected(),
walletConnect({ projectId: process.env.NEXT_PUBLIC_WC_PROJECT_ID! }),
],
transports: {
[hyperliquid.id]: http('https://rpc.hyperliquid.xyz/evm'),
},
});
Works with HyperEVM via Injected Provider (MetaMask) or by adding a custom RPC in the Remix environment. No special configuration needed beyond having MetaMask on chain 999.
pip install hyperliquid-dex
from hyperliquid.info import Info
from hyperliquid.exchange import Exchange
from hyperliquid.utils import constants
from eth_account import Account
import os
# Setup
wallet = Account.from_key(os.environ['PRIVATE_KEY'])
info = Info(constants.MAINNET_API_URL)
exchange = Exchange(wallet, constants.MAINNET_API_URL)
# Read operations (no signing needed)
user_state = info.user_state(wallet.address)
positions = user_state['assetPositions']
# Get orderbook
book = info.l2_snapshot("ETH")
# Place an order (requires signing)
order_result = exchange.order(
"ETH",
is_buy=True,
sz=0.1,
limit_px=2000.0,
order_type={"limit": {"tif": "Gtc"}}
)
# Cancel an order
cancel_result = exchange.cancel("ETH", order_id=12345)
SDK GitHub: https://github.com/hyperliquid-dex/hyperliquid-python-sdk
npm install @nktkas/hyperliquid
import { HyperliquidClient } from '@nktkas/hyperliquid';
import { privateKeyToAccount } from 'viem/accounts';
// Info (read-only, no signing)
const client = new HyperliquidClient({ testnet: false });
// Get market info
const meta = await client.info.perpetuals.getMetaAndAssetCtxs();
// Get user state
const state = await client.info.perpetuals.getClearinghouseState({
user: '0x...',
});
// Exchange (requires wallet for signing)
const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
const exchangeClient = new HyperliquidClient({ account, testnet: false });
// Place order
const result = await exchangeClient.exchange.placeOrder({
orders: [{
a: 1, // asset index (ETH perp)
b: true, // is buy
p: '2000', // price
s: '0.1', // size
r: false, // reduce only
t: { limit: { tif: 'Gtc' } },
}],
grouping: 'na',
});
SDK GitHub: https://github.com/nktkas/hyperliquid
| Need | Tool | |------|------| | HyperEVM contract development | Foundry (forge + cast + anvil) | | HyperEVM frontend (React) | wagmi + viem | | HyperCore API (Python) | hyperliquid-dex (official SDK) | | HyperCore API (TypeScript) | @nktkas/hyperliquid | | Quick contract interaction | cast (CLI) or Remix | | Fork testing HyperEVM | anvil --fork-url https://rpc.hyperliquid.xyz/evm | | Contract verification | forge verify-contract (Blockscout) |
# Check balance
cast balance 0xYourAddress --rpc-url https://rpc.hyperliquid.xyz/evm
# Read contract
cast call 0xContractAddr "balanceOf(address)(uint256)" 0xWallet \
--rpc-url https://rpc.hyperliquid.xyz/evm
# Send transaction
cast send 0xContractAddr "transfer(address,uint256)" 0xTo 1000000 \
--private-key $PRIVATE_KEY \
--rpc-url https://rpc.hyperliquid.xyz/evm
# Gas price
cast gas-price --rpc-url https://rpc.hyperliquid.xyz/evm
# Chain ID
cast chain-id --rpc-url https://rpc.hyperliquid.xyz/evm
# → 999
# Fork mainnet locally
anvil --fork-url https://rpc.hyperliquid.xyz/evm
| Network | Explorer | |---------|----------| | HyperEVM Mainnet | https://explorer.hyperliquid.xyz | | HyperEVM Testnet | https://explorer-testnet.hyperliquid.xyz |
Both explorers are Blockscout-based. Use Blockscout APIs for programmatic explorer access.
# Fork HyperEVM mainnet for local testing
anvil --fork-url https://rpc.hyperliquid.xyz/evm --chain-id 999
# Fork at specific block (reproducible tests)
anvil --fork-url https://rpc.hyperliquid.xyz/evm --fork-block-number 1234567
# Run Foundry tests against fork
forge test --fork-url https://rpc.hyperliquid.xyz/evm
For HyperCore API testing, always use the testnet:
Testnet API: https://api.hyperliquid-testnet.xyz
Testnet RPC: https://rpc.hyperliquid-testnet.xyz/evm
Testnet Chain ID: 998
development
Why build on Hyperliquid. HyperBFT consensus, native orderbook, speed, AI agent angle, honest tradeoffs. Use when someone asks "should I build on Hyperliquid?", "why not Ethereum?", or when an agent needs to understand what makes Hyperliquid unique.
development
Wallets on Hyperliquid — MetaMask + chain ID 999 setup, HyperCore API wallets, agent wallet patterns, EIP-712 signing for exchange actions. Essential for any agent that needs to interact with Hyperliquid.
testing
Smart contract testing for HyperEVM with Foundry/Hardhat — unit tests, fuzz testing, testnet fork testing. What to test, what not to test, and what LLMs get wrong on Hyperliquid.
tools
Token standards on Hyperliquid — ERC-20 on HyperEVM, HIP-1/HIP-2/HIP-3 native token standards on HyperCore. When to use each, how they work, key interfaces.