.claude/skills/voltaire-effect-provider/SKILL.md
JSON-RPC provider operations with Effect.ts. Use when reading blockchain data, making contract calls, or estimating gas.
npx skillsauth add cyotee/crane voltaire-effect-providerInstall 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.
JSON-RPC operations with Effect.ts composition.
import { Effect, Layer } from 'effect'
import { Provider, HttpTransport } from 'voltaire-effect'
const ProviderLayer = Provider.pipe(
Layer.provide(HttpTransport('https://eth.llamarpc.com'))
)
import { getBlockNumber, getBlock, getBlockReceipts } from 'voltaire-effect'
const program = Effect.gen(function* () {
const blockNum = yield* getBlockNumber()
const block = yield* getBlock({ blockTag: 'latest', includeTransactions: true })
const receipts = yield* getBlockReceipts({ blockTag: 'latest' })
return { blockNum, block, receipts }
})
import { getBalance, getTransactionCount, getCode, getStorageAt } from 'voltaire-effect'
const state = yield* Effect.all({
balance: getBalance('0x123...', 'latest'),
nonce: getTransactionCount('0x123...'),
code: getCode('0x123...'),
slot: getStorageAt('0x123...', '0x0')
})
import { readContract } from 'voltaire-effect'
const erc20Abi = [
{ type: 'function', name: 'balanceOf', stateMutability: 'view',
inputs: [{ name: 'account', type: 'address' }],
outputs: [{ name: 'balance', type: 'uint256' }]
}
] as const
const balance = yield* readContract({
address: '0x6B175474E89094C44Da98b954EecdEfaE6E286AB',
abi: erc20Abi,
functionName: 'balanceOf',
args: ['0x1234567890123456789012345678901234567890']
})
import { multicall } from 'voltaire-effect'
const results = yield* multicall({
contracts: [
{ address: tokenA, abi: erc20Abi, functionName: 'balanceOf', args: [user] },
{ address: tokenB, abi: erc20Abi, functionName: 'balanceOf', args: [user] }
]
})
// results: [{ status: 'success', result: 1000n }, { status: 'success', result: 500n }]
import { withTimeout, withRetrySchedule } from 'voltaire-effect'
import { Schedule } from 'effect'
const balance = yield* getBalance(addr).pipe(
withTimeout('5 seconds'),
withRetrySchedule(Schedule.exponential('500 millis').pipe(
Schedule.jittered,
Schedule.compose(Schedule.recurs(3))
))
)
import { simulateContract } from 'voltaire-effect'
const { result, request } = yield* simulateContract({
address: tokenAddress,
abi: erc20Abi,
functionName: 'transfer',
args: [recipient, amount],
account: senderAddress
})
import { getLogs } from 'voltaire-effect'
const logs = yield* getLogs({
address: '0x123...',
topics: ['0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'],
fromBlock: 18000000n,
toBlock: 'latest'
})
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
documentation
Write to contracts and send transactions. Use when executing state-changing contract functions.
development
HTTP and WebSocket transports for blockchain connectivity. Use when configuring network connections.
data-ai
Read contract data with type-safe ABI. Use when querying smart contract view/pure functions.