一键导入
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 职业分类
Manage Uniswap V4 LP positions on Base. Add, remove, monitor, auto-compound, and harvest fees — including Clanker protocol fee claims.
Bankr leaderboard rankings, user profiles, wallet export, and score breakdowns
Register Basenames (.base.eth) for AI agents. Use when an agent needs to register a human-readable ENS-style name on Base for their wallet address. Supports checking availability, pricing, registration, and setting primary name.
Send and read onchain messages via Net Protocol. Use for permanent agent logs, cross-agent communication, and decentralized feeds on Base.
| 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.