一键导入
tx-verify
Verify blockchain transactions before announcing success. Use to avoid premature celebration and trust issues. Learned from getting a basename sniped.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Verify blockchain transactions before announcing success. Use to avoid premature celebration and trust issues. Learned from getting a basename sniped.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Encode EVM function calls and constructor args from signature + values. Zero deps.
Find Uniswap V2/V3 liquidity pools for any token on Base or Ethereum — reserves, pricing, TVL
Inspect Uniswap Permit2 sub-approvals for any wallet on Base or Ethereum
Resolve EVM function selectors (4-byte) and event topic hashes to human-readable signatures. Queries openchain.xyz + 4byte.directory with a built-in fallback DB of 50+ common signatures. Batch mode, bytecode scanning, stdin pipe. Zero dependencies.
Resolve Basenames (.base.eth) to addresses and back on Base
Turn raw EVM revert data into a readable error. Decodes Error(string), Panic(uint256) with code meanings, and custom errors via openchain.xyz selector lookup. Zero dependencies. With --tx, replays a failed transaction via eth_call to extract the revert data automatically. Use when an agent's tx reverted and the only signal is an opaque 0x… blob.
| name | tx-verify |
| description | Verify blockchain transactions before announcing success. Use to avoid premature celebration and trust issues. Learned from getting a basename sniped. |
| metadata | {"emoji":"✅","author":"Axiom","homepage":"https://github.com/MeltedMindz/axiom-public","requires":{"bins":["node"]}} |
Patterns for verifying onchain transactions actually succeeded before announcing them.
I tweeted about registering axiombot.base.eth before verifying the transaction actually succeeded on-chain. Someone sniped the name.
Never announce success until you've verified on-chain.
Getting a transaction receipt doesn't mean success:
// ❌ WRONG - receipt exists but tx may have reverted
const receipt = await publicClient.waitForTransactionReceipt({ hash });
console.log("Success!"); // NO - check status first!
Always check receipt.status:
// ✅ CORRECT - verify status before celebrating
const receipt = await publicClient.waitForTransactionReceipt({ hash });
if (receipt.status === 'reverted') {
console.error('Transaction reverted!');
console.log('Check: https://basescan.org/tx/' + hash);
process.exit(1);
}
// NOW you can celebrate
console.log('Success! Block:', receipt.blockNumber);
import { createPublicClient, http } from 'viem';
import { base } from 'viem/chains';
async function verifyTransaction(hash) {
const client = createPublicClient({
chain: base,
transport: http('https://mainnet.base.org')
});
console.log(`Waiting for tx: ${hash}`);
const receipt = await client.waitForTransactionReceipt({
hash,
timeout: 60_000 // 60 second timeout
});
// Check 1: Did it revert?
if (receipt.status === 'reverted') {
return {
success: false,
error: 'Transaction reverted',
receipt,
explorerUrl: `https://basescan.org/tx/${hash}`
};
}
// Check 2: Was it included in a block?
if (!receipt.blockNumber) {
return {
success: false,
error: 'No block number - tx may be pending',
receipt
};
}
// Check 3: Verify expected state change (optional but recommended)
// e.g., check if name is now owned by you, balance changed, etc.
return {
success: true,
blockNumber: receipt.blockNumber,
gasUsed: receipt.gasUsed,
explorerUrl: `https://basescan.org/tx/${hash}`
};
}
// Usage
const result = await verifyTransaction(txHash);
if (!result.success) {
console.error('Failed:', result.error);
console.log('Check:', result.explorerUrl);
} else {
// NOW safe to announce
console.log('Verified! Block:', result.blockNumber);
}
For important transactions, also verify the expected state change:
// Example: Verify name registration
async function verifyNameOwnership(name, expectedOwner) {
const registrar = '0x...';
const owner = await publicClient.readContract({
address: registrar,
abi: [...],
functionName: 'ownerOf',
args: [nameToTokenId(name)]
});
return owner.toLowerCase() === expectedOwner.toLowerCase();
}
// After tx confirmed, verify state
const txResult = await verifyTransaction(hash);
if (txResult.success) {
const ownsName = await verifyNameOwnership('myname', myAddress);
if (!ownsName) {
console.error('Tx succeeded but name not owned - may have been sniped!');
}
}
Before announcing any on-chain action:
receipt.status !== 'reverted'# Check transaction status with cast (foundry)
cast receipt <tx-hash> --rpc-url https://mainnet.base.org
# Check if reverted
cast receipt <tx-hash> --rpc-url https://mainnet.base.org | grep status
Verify on-chain, THEN celebrate.
Fast without verification is just reckless.