id
stringlengths
10
33
split
stringclasses
1 value
task_type
stringclasses
1 value
version
stringclasses
2 values
category
stringclasses
3 values
subcategory
stringlengths
7
21
difficulty
stringclasses
4 values
title
stringlengths
14
55
description
stringlengths
70
2.38k
natural_language_templates
listlengths
3
5
chain
stringclasses
2 values
network
stringclasses
3 values
tags
listlengths
4
10
parameter_names
listlengths
0
11
parameters
stringlengths
2
2.04k
validation
stringlengths
2
1.43k
composite_structure
stringclasses
1 value
interaction_config
stringclasses
1 value
scoring_strategy
stringclasses
1 value
metadata
stringlengths
2
1.04k
source_path
stringlengths
48
74
raw_definition
stringlengths
2.08k
6.68k
contract_delegate_call
atomic
atomic
2.0.0
advanced_features
delegate_call
hard
DelegateCall - Proxy Pattern
Call a function through a proxy contract that uses delegatecall to execute logic from an implementation contract. Technical context: - The proxy contract forwards calls to an implementation contract using delegatecall - DelegateCall executes the implementation's code in the proxy's context - Storage changes affect the...
[ "Call the setValue function on the proxy contract at {proxy_address} with value {value}", "Set the value to {value} using the proxy contract {proxy_address}", "Execute setValue({value}) through the proxy at {proxy_address}", "I want to call setValue on proxy {proxy_address} and pass {value}" ]
BSC
mainnet
[ "delegatecall", "proxy", "upgradeable", "advanced", "storage_context" ]
[ "implementation_address", "proxy_address", "value" ]
{"implementation_address": {"description": "Implementation contract address (contains logic)", "generation": {"comment": "Implementation contract for verification", "env_key": "delegate_call_implementation_address", "method": "from_env"}, "role": "contract", "type": "address"}, "proxy_address": {"description": "Proxy c...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Transaction calls PROXY contract (not implementation)", "expected": "{proxy_address}", "type": "contract_call", "weight": 0.2}, {"description": "Correct setValue function signature",...
{}
{}
{}
{"contract_requirements": {"contract_type": "DelegateCallProxy + Implementation", "note": "Tests understanding of delegatecall and proxy patterns", "required_functions": ["setValue", "getValue"]}, "educational_value": "Understanding delegatecall is crucial for upgradeable contracts and many DeFi protocols", "estimated_...
advanced_features/delegate_call/contract_delegate_call.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "advanced_features", "description": ["Call a function through a proxy contract that uses delegatecall to execute logic from an implementation contract.", "", "Technical context:", "- The proxy contract forwards calls to an implementation contract using ...
contract_payable_fallback
atomic
atomic
2.0.0
advanced_features
fallback
medium
Payable Fallback - Send BNB to Contract
Send BNB directly to a contract without calling any specific function. This will trigger the contract's receive() or fallback() function. Technical context: - When you send BNB to a contract without calldata, it triggers receive() if it exists - If receive() doesn't exist, it triggers fallback() if it's payable - The ...
[ "Send {amount} BNB to the contract at {contract_address}", "Transfer {amount} BNB to contract {contract_address} without calling any function", "I want to send {amount} BNB directly to {contract_address}", "Send {amount} BNB to {contract_address} (no function call)" ]
BSC
mainnet
[ "fallback", "receive", "payable", "direct_transfer", "advanced" ]
[ "amount", "contract_address" ]
{"amount": {"description": "Amount of BNB to send", "generation": {"decimals": 4, "max": 0.05, "method": "random", "min": 0.001}, "role": "transfer_amount", "type": "number", "unit": "BNB"}, "contract_address": {"description": "Contract address with payable fallback/receive", "generation": {"comment": "Use dynamically ...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Transaction sent to correct contract", "expected": "{contract_address}", "type": "contract_address", "weight": 0.2}, {"description": "Correct BNB amount sent", "expected": "{amount}"...
{}
{}
{}
{"contract_requirements": {"contract_type": "FallbackReceiver", "note": "Tests understanding of fallback/receive functions", "required_functions": ["receive() or fallback()"]}, "educational_value": "Understanding fallback/receive is important for contract interactions and DeFi protocols", "estimated_gas": 100000, "requ...
advanced_features/fallback/contract_payable_fallback.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "advanced_features", "description": ["Send BNB directly to a contract without calling any specific function.", "This will trigger the contract's receive() or fallback() function.", "", "Technical context:", "- When you send BNB to a contract without cal...
erc20_flashloan
atomic
atomic
2.0.0
advanced_features
flashloan
hard
ERC20 FlashLoan - Execute Flash Loan
Execute a flash loan by calling the FlashLoan contract's executeFlashLoan function. Technical context: - Flash loan allows borrowing tokens without collateral in a single transaction - The loan must be repaid with a fee (0.3%) in the same transaction - Function signature: executeFlashLoan(address token, uint256 amount...
[ "Execute a flash loan of {amount} {token_symbol} from the flash loan contract at {flashloan_contract_address}. The loan must be repaid with {fee_percentage}% fee in the same transaction.", "Borrow {amount} {token_symbol} using flash loan from contract {flashloan_contract_address}, use the funds, and repay with fe...
BSC
mainnet
[ "flashloan", "defi", "advanced", "lending", "borrowing" ]
[ "amount", "fee_percentage", "flashloan_contract_address", "token_address", "token_decimals", "token_symbol" ]
{"amount": {"description": "Amount to borrow (in token units)", "generation": {"decimals": 2, "max": 1000, "method": "random", "min": 100}, "role": "transfer_amount", "type": "number"}, "fee_percentage": {"description": "Flash loan fee percentage", "generation": {"method": "fixed", "value": 0.3}, "role": "parameter", "...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Transaction calls correct flash loan contract", "expected": "{flashloan_contract_address}", "type": "contract_call", "weight": 0.2}, {"description": "Correct executeFlashLoan functio...
{}
{}
{}
{"complexity": "high", "contract_requirements": {"contract_type": "FlashLoan", "note": "Agent must approve flash loan contract before calling executeFlashLoan", "required_functions": ["executeFlashLoan"]}, "educational_value": "Demonstrates understanding of flash loans, approvals, and atomic transactions", "estimated_g...
advanced_features/flashloan/erc20_flashloan.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "advanced_features", "description": ["Execute a flash loan by calling the FlashLoan contract's executeFlashLoan function.", "", "Technical context:", "- Flash loan allows borrowing tokens without collateral in a single transaction", "- The loan must be ...
query_current_block_number
atomic
atomic
basic_transactions
blockchain_queries
easy
Query Current Block Number
Query the current block height of the blockchain by calling eth_blockNumber RPC method. This is a fundamental blockchain query that returns the latest block number, useful for tracking blockchain state, calculating block intervals, and determining transaction timing. The block number increases with each new block mined...
[ "Get the current block number of the blockchain", "Query the latest block height", "Check what is the current block number", "Retrieve the most recent block number from the chain" ]
BSC
mainnet
[ "blockchain", "block", "eth_blockNumber", "query", "rpc" ]
[]
{}
{"rules": [{"condition": "success", "error_message": "Failed to query current block number", "field": "query_execution", "weight": 50}, {"condition": "has_required_fields", "error_message": "Missing required fields in query result", "field": "return_format", "required_fields": ["block_number"], "weight": 25}, {"conditi...
{}
{}
{}
{"estimated_gas": 0, "learning_objectives": ["Understand the eth_blockNumber RPC method", "Learn how to query blockchain state without contracts", "Master block height tracking", "Understand blockchain time progression", "Learn about block-based timing mechanisms"], "notes": ["eth_blockNumber returns the latest block n...
basic_transactions/blockchain_queries/query_current_block_number.json
{"blockchain": "bsc", "category": "basic_transactions", "description": "Query the current block height of the blockchain by calling eth_blockNumber RPC method. This is a fundamental blockchain query that returns the latest block number, useful for tracking blockchain state, calculating block intervals, and determining ...
query_gas_price
atomic
atomic
basic_transactions
blockchain_queries
easy
Query Gas Price
Query the current gas price and EIP-1559 fee parameters by calling eth_gasPrice or getFeeData() methods. This returns the current network gas pricing information including maxFeePerGas and maxPriorityFeePerGas for EIP-1559 transactions. Understanding gas prices is crucial for estimating transaction costs and optimizing...
[ "Get the current gas price of the network", "Query the current EIP-1559 fee parameters", "Check what is the current maxFeePerGas and maxPriorityFeePerGas", "Retrieve the current gas pricing information" ]
BSC
mainnet
[ "blockchain", "gas", "eth_gasPrice", "getFeeData", "EIP-1559", "query", "rpc" ]
[]
{}
{"rules": [{"condition": "success", "error_message": "Failed to query gas price", "field": "query_execution", "weight": 40}, {"condition": "has_required_fields", "error_message": "Missing required EIP-1559 fields in query result", "field": "return_format", "required_fields": ["maxFeePerGas", "maxPriorityFeePerGas"], "w...
{}
{}
{}
{"estimated_gas": 0, "learning_objectives": ["Understand the eth_gasPrice and getFeeData RPC methods", "Learn about EIP-1559 gas pricing mechanism", "Master maxFeePerGas and maxPriorityFeePerGas parameters", "Understand how to optimize transaction gas costs", "Learn about base fee and priority fee concepts"], "notes": ...
basic_transactions/blockchain_queries/query_gas_price.json
{"blockchain": "bsc", "category": "basic_transactions", "description": "Query the current gas price and EIP-1559 fee parameters by calling eth_gasPrice or getFeeData() methods. This returns the current network gas pricing information including maxFeePerGas and maxPriorityFeePerGas for EIP-1559 transactions. Understandi...
query_transaction_count_nonce
atomic
atomic
basic_transactions
blockchain_queries
easy
Query Transaction Count (Nonce)
Query the transaction count (nonce) for a specific address by calling eth_getTransactionCount. The nonce represents the number of transactions sent from an address and is critical for transaction ordering and replay protection. Understanding the difference between 'pending' and 'latest' states is important: 'pending' i...
[ "Get the transaction count (nonce) for address {{query_address}}", "Query the nonce for address {{query_address}}", "Check how many transactions address {{query_address}} has sent", "Retrieve the current nonce for address {{query_address}}" ]
BSC
mainnet
[ "blockchain", "nonce", "transaction_count", "eth_getTransactionCount", "query", "rpc" ]
[ "query_address" ]
{"query_address": {"description": "Address to query transaction count for", "generation": {"env_key": "test_address", "method": "from_env"}, "type": "address"}}
{"rules": [{"condition": "success", "error_message": "Failed to query transaction count", "field": "query_execution", "weight": 40}, {"condition": "has_required_fields", "error_message": "Missing required fields in query result", "field": "return_format", "required_fields": ["nonce"], "weight": 30}, {"condition": "is_v...
{}
{}
{}
{"estimated_gas": 0, "learning_objectives": ["Understand the eth_getTransactionCount RPC method", "Learn about nonce and its role in transaction ordering", "Master the difference between 'pending' and 'latest' states", "Understand replay attack protection", "Learn when to use which nonce state"], "notes": ["Nonce start...
basic_transactions/blockchain_queries/query_transaction_count_nonce.json
{"blockchain": "bsc", "category": "basic_transactions", "description": "Query the transaction count (nonce) for a specific address by calling eth_getTransactionCount. The nonce represents the number of transactions sent from an address and is critical for transaction ordering and replay protection. Understanding the di...
contract_call_simple
atomic
atomic
2.0.0
basic_transactions
contract_call
medium
Simple Contract Call - Increment Counter
Call a simple contract function without parameters. Technical context: - The target contract is a SimpleCounter with an increment() function - Function signature: increment() (no parameters, no return value) - This is a state-changing function that increases a counter by 1 - Function selector: 0xd09de08a (keccak256('i...
[ "Call the increment() function on the contract at {contract_address}", "Increment the counter in the smart contract {contract_address}", "Execute the increment function on contract {contract_address}", "I need you to call increment() on the contract at address {contract_address}" ]
BSC
mainnet
[ "contract_call", "simple", "increment", "state_change", "basic" ]
[ "contract_address" ]
{"contract_address": {"description": "SimpleCounter contract address", "generation": {"comment": "Use dynamically deployed SimpleCounter contract from environment", "env_key": "simple_counter_address", "method": "from_env"}, "role": "contract", "type": "address"}}
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.4}, {"description": "Transaction calls correct contract", "expected": "{contract_address}", "type": "contract_call", "weight": 0.2}, {"description": "Correct increment function signature", "expected": "i...
{}
{}
{}
{"contract_requirements": {"contract_type": "SimpleCounter", "note": "A simple counter contract for testing basic contract calls", "required_functions": ["increment", "getCounter"]}, "estimated_gas": 50000, "requires_contract": true, "tags": ["contract_call", "simple", "increment", "state_change", "basic"]}
basic_transactions/contract_call/contract_call_simple.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Call a simple contract function without parameters.", "", "Technical context:", "- The target contract is a SimpleCounter with an increment() function", "- Function signature: increment() (no parameters, no return ...
contract_call_with_params
atomic
atomic
2.0.0
basic_transactions
contract_call
medium
Contract Call with Parameters - Set Message
Call a contract function with parameters (string argument). Technical context: - The target contract is a MessageBoard with a setMessage(string) function - Function signature: setMessage(string message) - This function accepts a string parameter and stores it - You must encode both the function selector and the parame...
[ "Call the setMessage function on contract {contract_address} with the message '{message}'", "Set the message to '{message}' on the contract at {contract_address}", "Update the message in contract {contract_address} to '{message}'", "I want to call setMessage on contract {contract_address} and pass the string ...
BSC
mainnet
[ "contract_call", "parameters", "string", "abi_encoding", "intermediate" ]
[ "contract_address", "message" ]
{"contract_address": {"description": "MessageBoard contract address", "generation": {"comment": "Use dynamically deployed MessageBoard contract from environment", "env_key": "message_board_address", "method": "from_env"}, "role": "contract", "type": "address"}, "message": {"description": "Message to set in the contract...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.4}, {"description": "Transaction calls correct contract", "expected": "{contract_address}", "type": "contract_call", "weight": 0.2}, {"description": "Correct setMessage function signature", "expected": "...
{}
{}
{}
{"contract_requirements": {"contract_type": "MessageBoard", "note": "A simple message board contract that stores and retrieves messages", "required_functions": ["setMessage", "getMessage"]}, "estimated_gas": 80000, "requires_contract": true, "tags": ["contract_call", "parameters", "string", "abi_encoding", "intermediat...
basic_transactions/contract_call/contract_call_with_params.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Call a contract function with parameters (string argument).", "", "Technical context:", "- The target contract is a MessageBoard with a setMessage(string) function", "- Function signature: setMessage(string message...
contract_call_with_value
atomic
atomic
2.0.0
basic_transactions
contract_call
medium
Contract Call with Value - Send BNB to Payable Function
Call a payable contract function with BNB value attached. Technical context: - The target contract is a DonationBox with a payable donate() function - Function signature: donate() payable - This function accepts BNB and records donations - You must set the transaction 'value' field to send BNB - Function selector: 0xe...
[ "Call the donate() function on contract {contract_address} and send {amount} BNB", "Donate {amount} BNB to the contract at {contract_address}", "Send {amount} BNB to the donate function of contract {contract_address}", "I want to call donate() on contract {contract_address} with {amount} BNB attached" ]
BSC
mainnet
[ "contract_call", "payable", "value", "donation", "bnb", "intermediate" ]
[ "amount", "contract_address" ]
{"amount": {"description": "Amount of BNB to donate", "generation": {"decimals": 3, "max": 0.05, "method": "random", "min": 0.001}, "role": "transfer_amount", "type": "number", "unit": "BNB"}, "contract_address": {"description": "DonationBox contract address", "generation": {"comment": "Use dynamically deployed Donatio...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Transaction calls correct contract", "expected": "{contract_address}", "type": "contract_call", "weight": 0.2}, {"description": "Correct donate function signature", "expected": "dona...
{}
{}
{}
{"contract_requirements": {"contract_type": "DonationBox", "note": "A simple donation box contract that accepts BNB via payable function", "required_functions": ["donate"]}, "estimated_gas": 100000, "requires_contract": true, "tags": ["contract_call", "payable", "value", "donation", "bnb", "intermediate"]}
basic_transactions/contract_call/contract_call_with_value.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Call a payable contract function with BNB value attached.", "", "Technical context:", "- The target contract is a DonationBox with a payable donate() function", "- Function signature: donate() payable", "- This fun...
erc20_approve
atomic
atomic
2.0.0
basic_transactions
erc20_operations
easy
ERC20 Token Approval
Approve a spender (Router or Contract) to spend your ERC20 tokens. This is a prerequisite for many DeFi operations like swapping or adding liquidity. The approve function sets the allowance that a spender can use on behalf of the token owner. Key Points: - Function: approve(address spender, uint256 amount) - Sets all...
[ "Approve {spender_name} to spend {amount} {token_symbol} tokens from your account.", "Grant approval to {spender_name} for {amount} {token_symbol} tokens.", "Set allowance of {amount} {token_symbol} tokens for {spender_name}.", "Authorize {spender_name} to use up to {amount} {token_symbol} tokens on your beha...
BSC
mainnet
[ "erc20", "approve", "allowance", "defi", "prerequisite" ]
[ "agent_address", "amount", "chain_id", "spender_address", "spender_name", "token_address", "token_decimals", "token_symbol" ]
{"agent_address": {"description": "Agent address (token owner)", "dynamic": true, "generation": {"env_key": "test_address", "method": "from_env"}, "role": "address", "type": "address"}, "amount": {"description": "Amount to approve (in token units)", "example": 200.0, "generation": {"decimals": 2, "max": 500.0, "method"...
{}
{}
{}
{}
{}
basic_transactions/erc20_operations/erc20_approve.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "common_mistakes": ["Forgetting to convert amount to wei (multiply by 10^decimals)", "Sending BNB value with approve transaction (not needed)", "Approving the token address instead of the spender address", "Not waiting for transact...
erc20_approve_and_call_1363
atomic
atomic
2.0.0
basic_transactions
erc20_operations
medium
ERC20 Approve with Callback (ERC1363)
Approve an address to spend ERC20 tokens and trigger an `onApprovalReceived` callback on the spender contract if it implements `IERC1363Spender`. Technical context: - ERC1363 extends ERC20 with payable token functions - Function signature: approveAndCall(address spender, uint256 value) or approveAndCall(address spende...
[ "Approve {spender_address} to spend {amount} {token_symbol} tokens with callback", "Use ERC1363 approveAndCall to authorize {spender_address} to use {amount} {token_symbol}", "Grant approval to {spender_address} for {amount} {token_symbol} using the ERC1363 token's callback feature", "Approve {amount} {token_...
BSC
mainnet
[ "erc1363", "token", "approve", "callback", "allowance", "spender_notification", "onchain" ]
[ "amount", "spender_address", "token_address", "token_decimals", "token_symbol" ]
{"amount": {"description": "Amount of tokens to approve", "generation": {"decimals": 2, "max": 100.0, "method": "random", "min": 1.0}, "role": "approval_amount", "type": "number", "unit": "token"}, "spender_address": {"description": "Address to be approved for spending tokens", "generation": {"method": "random"}, "role...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Allowance correctly set for spender", "expected_allowance": "{amount}", "owner": "{agent_address}", "spender": "{spender_address}", "token": "{token_address}", "tolerance": "0", "typ...
{}
{}
{}
{"erc_standard": "ERC1363", "estimated_gas": 200000, "implementation_status": "development", "known_limitations": ["Most standard ERC20 tokens (USDT, USDC, DAI) do NOT support ERC1363", "Requires token to implement approveAndCall function", "If spender is a contract, it can optionally implement IERC1363Spender interfac...
basic_transactions/erc20_operations/erc20_approve_and_call_1363.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Approve an address to spend ERC20 tokens and trigger an `onApprovalReceived` callback on the spender contract if it implements `IERC1363Spender`.", "", "Technical context:", "- ERC1363 extends ERC20 with payable to...
erc20_burn
atomic
atomic
2.0.0
basic_transactions
erc20_operations
medium
ERC20 Token Burn
Burn (destroy) ERC20 tokens by transferring them to the zero address (0x0000...0000), permanently removing them from circulation. Technical context: - Most ERC20 tokens don't have a dedicated burn() function - The standard way to burn tokens is to transfer them to address(0) - Zero address: 0x0000000000000000000000000...
[ "Burn {amount} {token_symbol} tokens", "Destroy {amount} {token_symbol} tokens permanently by sending to zero address", "Remove {amount} {token_symbol} from circulation using the test token", "Burn {amount} {token_symbol} from the ERC1363 test token" ]
BSC
mainnet
[ "erc20", "burn", "destroy", "deflation", "intermediate" ]
[ "amount", "token_address", "token_decimals", "token_symbol" ]
{"amount": {"description": "Amount of tokens to burn", "generation": {"decimals": 3, "max": 1.0, "min": 0.001}, "role": "transfer_amount", "type": "number", "unit": "tokens"}, "token_address": {"description": "ERC20 token contract address", "generation": {"comment": "Use dynamically deployed ERC1363 test token (T1363)"...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Transaction calls correct token contract", "expected": "{token_address}", "type": "contract_call", "weight": 0.2}, {"description": "Correct transfer function signature (to zero addre...
{}
{}
{}
{"contract_requirements": {"contract_type": "ERC20", "note": "Token must support burn function and agent must have tokens", "required_functions": ["burn", "balanceOf"]}, "estimated_gas": 70000, "requires_contract": true, "requires_token_balance": true, "tags": ["erc20", "burn", "destroy", "deflation", "intermediate"]}
basic_transactions/erc20_operations/erc20_burn.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Burn (destroy) ERC20 tokens by transferring them to the zero address (0x0000...0000), permanently removing them from circulation.", "", "Technical context:", "- Most ERC20 tokens don't have a dedicated burn() funct...
erc20_decrease_allowance
atomic
atomic
2.0.0
basic_transactions
erc20_operations
easy-medium
ERC20 Decrease Allowance
Decrease the allowance for a spender (Router or Contract) by a specified amount. This safely reduces an existing allowance without completely revoking it. The decreaseAllowance function subtracts from the existing allowance and includes underflow protection. Key Points: - Function: decreaseAllowance(address spender, ...
[ "Decrease the allowance for {spender_name} by {subtracted_value} {token_symbol} tokens.", "Reduce {spender_name}'s allowance by {subtracted_value} {token_symbol}.", "Subtract {subtracted_value} {token_symbol} from the allowance for {spender_name}.", "Lower the spending limit for {spender_name} by {subtracted_...
BSC
mainnet
[ "erc20", "allowance", "decrease", "safe", "revoke" ]
[ "agent_address", "chain_id", "spender_address", "spender_name", "subtracted_value", "token_address", "token_decimals", "token_symbol" ]
{"agent_address": {"description": "Agent address (token owner)", "dynamic": true, "generation": {"env_key": "test_address", "method": "from_env"}, "role": "address", "type": "address"}, "chain_id": {"description": "BSC Mainnet chain ID", "example": 56, "generation": {"method": "fixed", "value": 56}, "role": "parameter"...
{}
{}
{}
{}
{}
basic_transactions/erc20_operations/erc20_decrease_allowance.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "common_mistakes": ["Using approve(spender, 0) instead of decreaseAllowance()", "Not checking current allowance before calling (causing underflow revert)", "Forgetting to convert subtractedValue to wei", "Sending BNB value with the...
erc20_increase_allowance
atomic
atomic
2.0.0
basic_transactions
erc20_operations
easy
ERC20 Increase Allowance
Increase the allowance for a spender (Router or Contract) by a specified amount. This is safer than calling approve() directly as it prevents race conditions. The increaseAllowance function adds to the existing allowance instead of overwriting it. Key Points: - Function: increaseAllowance(address spender, uint256 add...
[ "Increase the allowance for {spender_name} by {added_value} {token_symbol} tokens.", "Add {added_value} {token_symbol} tokens to the allowance for {spender_name}.", "Top up the allowance for {spender_name} with an additional {added_value} {token_symbol}.", "Incrementally increase {spender_name}'s spending all...
BSC
mainnet
[ "erc20", "allowance", "increase", "safe", "approval" ]
[ "added_value", "agent_address", "chain_id", "spender_address", "spender_name", "token_address", "token_decimals", "token_symbol" ]
{"added_value": {"description": "Amount to add to allowance (in token units)", "example": 100.0, "generation": {"decimals": 2, "max": 200.0, "method": "random", "min": 50.0}, "role": "parameter", "type": "number"}, "agent_address": {"description": "Agent address (token owner)", "dynamic": true, "generation": {"env_key"...
{}
{}
{}
{}
{}
basic_transactions/erc20_operations/erc20_increase_allowance.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "common_mistakes": ["Using approve() instead of increaseAllowance()", "Forgetting to convert addedValue to wei", "Sending BNB value with the transaction (not needed)", "Confusing spender address with token address", "Not understand...
erc20_permit
atomic
atomic
2.0.0
basic_transactions
erc20_operations
hard
ERC20 Permit - Gasless Approval (EIP-2612)
Test understanding of EIP-2612 permit concept by setting token allowance. This tests the same end goal as permit (setting allowance) using approve(). Technical context: - EIP-2612 extends ERC20 with permit() for gasless, signature-based approvals - The goal is to set allowance for a spender to use tokens on behalf of ...
[ "Approve {value} tokens for spender {spender_address} at token address {token_address}", "Set allowance of {value} tokens for spender {spender_address} using token contract {token_address}", "Call approve function to authorize {spender_address} to spend {value} tokens from token {token_address}" ]
BSC
mainnet
[ "eip-2612", "permit", "signature", "eip-712", "gasless-approval", "meta-transaction", "cryptography", "advanced" ]
[ "deadline", "owner_address", "spender_address", "token_address", "token_decimals", "token_symbol", "value" ]
{"deadline": {"description": "Timestamp deadline for signature validity (use future timestamp)", "generation": {"comment": "Fixed future timestamp (May 18, 2033)", "method": "fixed", "value": 2000000000}, "role": "signature_deadline", "type": "number"}, "owner_address": {"description": "Token owner address (must sign t...
{}
{}
{}
{}
{"difficulty_notes": ["Requires understanding of EIP-712 typed data", "Must construct proper domain separator", "Must query and use correct nonce", "Signature must be from correct private key", "Must handle deadline timestamp"], "erc_standard": "EIP-2612", "estimated_gas": 80000, "implementation_status": "development",...
basic_transactions/erc20_operations/erc20_permit.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Test understanding of EIP-2612 permit concept by setting token allowance. This tests the same end goal as permit (setting allowance) using approve().", "", "Technical context:", "- EIP-2612 extends ERC20 with permi...
erc20_revoke_approval
atomic
atomic
2.0.0
basic_transactions
erc20_operations
medium
ERC20 Revoke Approval (Set Allowance to Zero)
Revoke (cancel) a previously granted ERC20 token approval by setting the allowance to zero. Technical context: - This is a security best practice to prevent unauthorized token transfers - Revoking approval is done by calling approve(spender, 0) - Function signature: approve(address,uint256) - The amount should be 0 to...
[ "Revoke approval for spender address {spender_address} to spend my {token_symbol} tokens at {token_address}", "Cancel the authorization for address {spender_address} to use my {token_symbol} token (contract: {token_address})", "Remove the spending permission for {spender_address} on {token_symbol} token at {tok...
BSC
mainnet
[ "erc20", "approve", "revoke", "security", "allowance", "intermediate" ]
[ "spender_address", "spender_name", "token_address", "token_decimals", "token_symbol" ]
{"spender_address": {"description": "Address to revoke approval from (typically a DeFi contract)", "generation": {"addresses": ["0x10ED43C718714eb63d5aA57B78B54704E256024E", "0x13f4EA83D0bd40E75C8222255bc855a974568Dd4", "0x1b81D678ffb9C0263b24A97847620C99d213eB14"], "comment": "PancakeSwap Router, Venus Protocol, Panca...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Transaction calls correct token contract", "expected": "{token_address}", "type": "contract_call", "weight": 0.2}, {"description": "Correct approve function signature", "expected": "...
{}
{}
{}
{"contract_requirements": {"contract_type": "ERC20", "note": "Revoking approval is a security best practice", "required_functions": ["approve", "allowance"]}, "estimated_gas": 60000, "requires_contract": true, "requires_token_balance": false, "tags": ["erc20", "approve", "revoke", "security", "allowance", "intermediate...
basic_transactions/erc20_operations/erc20_revoke_approval.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Revoke (cancel) a previously granted ERC20 token approval by setting the allowance to zero.", "", "Technical context:", "- This is a security best practice to prevent unauthorized token transfers", "- Revoking appr...
erc20_transfer_fixed
atomic
atomic
2.0.0
basic_transactions
erc20_operations
medium
ERC20 Token Transfer
Transfer ERC20 tokens from one address to another by calling the token contract's transfer function. Technical context: - ERC20 tokens are smart contracts implementing a standard interface - Function signature: transfer(address to, uint256 amount) - Function selector: 0xa9059cbb (first 4 bytes of keccak256('transfer(a...
[ "Transfer {amount} {token_symbol} tokens to {to_address}", "Send {amount} {token_symbol} to address {to_address}", "Please transfer {amount} {token_symbol} tokens to {to_address}", "I want to send {amount} {token_symbol} to {to_address}" ]
BSC
mainnet
[ "erc20", "token", "transfer", "contract_call", "intermediate" ]
[ "amount", "to_address", "token_address", "token_decimals", "token_symbol" ]
{"amount": {"description": "Transfer amount in tokens", "generation": {"decimals": 2, "max": 100.0, "method": "random", "min": 1.0}, "role": "transfer_amount", "type": "number"}, "to_address": {"description": "Recipient address", "generation": {"method": "random"}, "role": "receiver", "type": "address"}, "token_address...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Transaction calls the correct token contract", "expected": "{token_address}", "type": "contract_call", "weight": 0.2}, {"description": "Correct ERC20 transfer function signature", "e...
{}
{}
{}
{"contract_requirements": {"required_functions": ["transfer", "balanceOf"], "standard": "ERC20"}, "erc_standard": "ERC20", "estimated_gas": 65000, "requires_contract": true, "tags": ["erc20", "token", "transfer", "contract_call", "intermediate"]}
basic_transactions/erc20_operations/erc20_transfer_fixed.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Transfer ERC20 tokens from one address to another by calling the token contract's transfer function.", "", "Technical context:", "- ERC20 tokens are smart contracts implementing a standard interface", "- Function s...
erc20_transfer_max_amount
atomic
atomic
2.0.0
basic_transactions
erc20_operations
medium
ERC20 Transfer Maximum Amount
Transfer the entire balance of an ERC20 token to another address. Technical context: - Query current token balance using balanceOf(address owner) - Transfer all tokens using transfer(address to, uint256 amount) - Unlike native BNB transfers, no need to reserve for gas (gas is paid in BNB) - Function signature: transfe...
[ "Transfer all my {token_symbol} tokens at {token_address} to address {to_address}", "Send my entire {token_symbol} balance (token: {token_address}) to {to_address}", "Transfer the maximum amount of {token_symbol} from {token_address} to {to_address}", "I want to transfer all available {token_symbol} tokens at...
BSC
mainnet
[ "erc20", "transfer", "max", "balance", "query", "intermediate" ]
[ "to_address", "token_address", "token_decimals", "token_symbol" ]
{"to_address": {"description": "Recipient address", "generation": {"method": "random"}, "role": "recipient", "type": "address"}, "token_address": {"description": "ERC20 token contract address", "generation": {"addresses": ["0x55d398326f99059fF775485246999027B3197955", "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82"], "com...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Transaction calls correct token contract", "expected": "{token_address}", "type": "contract_call", "weight": 0.2}, {"description": "Correct transfer function signature", "expected": ...
{}
{}
{}
{"contract_requirements": {"contract_type": "ERC20", "note": "Agent must have tokens to transfer", "required_functions": ["transfer", "balanceOf"]}, "estimated_gas": 65000, "requires_balance_query": true, "requires_contract": true, "requires_token_balance": true, "tags": ["erc20", "transfer", "max", "balance", "query",...
basic_transactions/erc20_operations/erc20_transfer_max_amount.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Transfer the entire balance of an ERC20 token to another address.", "", "Technical context:", "- Query current token balance using balanceOf(address owner)", "- Transfer all tokens using transfer(address to, uint25...
erc20_transfer_percentage
atomic
atomic
2.0.0
basic_transactions
erc20_operations
medium
ERC20 Percentage Token Transfer
Transfer a percentage of ERC20 token balance from the agent's address to another address. Technical context: - Requires querying the agent's current token balance before calculating transfer amount - Formula: transfer_amount = token_balance * (percentage / 100) - Use the token contract's balanceOf(address) function to...
[ "Transfer {percentage}% of my {token_symbol} tokens to {to_address}", "Send {percentage} percent of {token_symbol} to address {to_address}", "Please transfer {percentage}% of my {token_symbol} balance to {to_address}", "I want to send {percentage}% of the {token_symbol} I have to {to_address}" ]
BSC
mainnet
[ "erc20", "token", "percentage", "contract_call", "balance_query", "intermediate" ]
[ "percentage", "to_address", "token_address", "token_decimals", "token_symbol" ]
{"percentage": {"description": "Percentage of token balance to transfer (10-90)", "generation": {"max": 90, "min": 10, "step": 5}, "role": "parameter", "type": "integer", "unit": "%"}, "to_address": {"description": "Recipient address", "generation": {"method": "random"}, "role": "receiver", "type": "address"}, "token_a...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Transaction calls the correct token contract", "expected": "{token_address}", "type": "contract_call", "weight": 0.2}, {"description": "Correct ERC20 transfer function signature", "e...
{}
{}
{}
{"contract_requirements": {"required_functions": ["transfer", "balanceOf"], "standard": "ERC20"}, "estimated_gas": 65000, "requires_balance_query": true, "requires_contract": true, "requires_token_balance": true, "tags": ["erc20", "token", "percentage", "contract_call", "balance_query", "intermediate"]}
basic_transactions/erc20_operations/erc20_transfer_percentage.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Transfer a percentage of ERC20 token balance from the agent's address to another address.", "", "Technical context:", "- Requires querying the agent's current token balance before calculating transfer amount", "- F...
erc20_transfer_with_callback_1363
atomic
atomic
2.0.0
basic_transactions
erc20_operations
medium
ERC1363 Transfer with Callback
Transfer ERC1363 tokens to a receiver contract with automatic callback execution. Technical context: - Use ERC1363's transferAndCall(address to, uint256 value) function - This is an extension of ERC20 that calls onTransferReceived() on the receiver - The receiver must implement IERC1363Receiver interface - Function se...
[ "Transfer {amount} {token_symbol} tokens to contract {to_address} using ERC1363 transferAndCall", "Send {amount} {token_symbol} to {to_address} with automatic callback using the ERC1363 token", "Use ERC1363 transferAndCall to send {amount} {token_symbol} tokens to contract {to_address}", "Transfer {amount} {t...
BSC
mainnet
[ "erc1363", "token", "transfer", "callback", "receiver_pays", "onchain" ]
[ "amount", "to_address", "token_address", "token_decimals", "token_symbol" ]
{"amount": {"description": "Amount of tokens to transfer", "generation": {"decimals": 2, "max": 50, "method": "random", "min": 1}, "role": "transfer_amount", "type": "number"}, "to_address": {"description": "Receiver contract address (must implement IERC1363Receiver)", "generation": {"method": "random"}, "role": "recei...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"address": "agent", "description": "Sender token balance decreased correctly", "expected_change": "-{amount}", "tolerance": "0", "type": "token_balance_change", "weight": 0.4}, {"address": "{to_addr...
{}
{}
{}
{"erc_standard": "ERC1363", "estimated_gas": 200000, "implementation_status": "partial", "known_limitations": ["Most standard ERC20 tokens (USDT, USDC, DAI) do NOT support ERC1363", "Requires token to implement transferAndCall function", "Requires receiver to implement IERC1363Receiver interface", "For testing, need to...
basic_transactions/erc20_operations/erc20_transfer_with_callback_1363.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Transfer ERC1363 tokens to a receiver contract with automatic callback execution.", "", "Technical context:", "- Use ERC1363's transferAndCall(address to, uint256 value) function", "- This is an extension of ERC20 ...
erc20_transferfrom_basic
atomic
atomic
2.0.0
basic_transactions
erc20_operations
medium
ERC20 TransferFrom - Authorized Transfer
Execute an authorized ERC20 token transfer using the transferFrom function. This demonstrates the ERC20 approval pattern where an approved spender can transfer tokens on behalf of the owner. IMPORTANT: Authorization Pattern - The from_address (token owner) has already approved you (agent) to spend tokens - You need to...
[ "Transfer {amount} {token_symbol} from {from_address} to {to_address} using transferFrom", "Execute authorized transfer of {amount} {token_symbol} tokens from {from_address} to {to_address}", "Move {amount} {token_symbol} from owner {from_address} to recipient {to_address}", "Use transferFrom to send {amount}...
BSC
mainnet
[ "erc20", "transferfrom", "approval", "authorization", "token" ]
[ "agent_address", "amount", "chain_id", "from_address", "to_address", "token_address", "token_decimals", "token_symbol" ]
{"agent_address": {"description": "Agent address (approved spender)", "dynamic": true, "generation": {"env_key": "test_address", "method": "from_env"}, "role": "address", "type": "address"}, "amount": {"description": "Transfer amount in tokens", "example": 50.0, "generation": {"decimals": 2, "max": 100.0, "method": "ra...
{}
{}
{}
{}
{}
basic_transactions/erc20_operations/erc20_transferfrom_basic.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "contracts": {"usdt_token": {"abi_functions": ["function transferFrom(address from, address to, uint256 amount) external returns (bool)", "function allowance(address owner, address spender) external view returns (uint256)", "functi...
bnb_transfer_basic
atomic
atomic
2.0.0
basic_transactions
native_transfer
easy
Basic BNB Transfer
Transfer a fixed amount of BNB from one address to another. Technical context: - This is a simple EOA (Externally Owned Account) to EOA transfer - Standard gas limit for simple transfers: 21000 - Use EIP-1559 transaction format (type: 2) - Amount must be converted to Wei: amount_bnb × 10^18 Key considerations: - Set ...
[ "Transfer {amount} BNB to {to_address}", "Send {amount} BNB to address {to_address}", "Please send {amount} BNB to {to_address}", "I want to transfer {amount} BNB to {to_address}" ]
BSC
mainnet
[ "native_transfer", "bnb", "basic", "simple" ]
[ "amount", "to_address" ]
{"amount": {"description": "Transfer amount in BNB", "generation": {"decimals": 3, "max": 0.1, "method": "random", "min": 0.001}, "role": "transfer_amount", "type": "number"}, "to_address": {"description": "Recipient address", "generation": {"method": "random"}, "role": "receiver", "type": "address"}}
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Target address must be correct", "expected": "{to_address}", "field": "to", "type": "address_check", "weight": 0.25}, {"description": "Transfer amount must be correct", "expected": "...
{}
{}
{}
{"estimated_gas": 21000, "requires_contract": false, "tags": ["native_transfer", "bnb", "basic", "simple"]}
basic_transactions/native_transfer/bnb_transfer_basic.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Transfer a fixed amount of BNB from one address to another.", "", "Technical context:", "- This is a simple EOA (Externally Owned Account) to EOA transfer", "- Standard gas limit for simple transfers: 21000", "- Us...
bnb_transfer_max_amount
atomic
atomic
2.0.0
basic_transactions
native_transfer
medium
BNB Transfer Maximum Amount
Transfer the maximum possible amount of BNB to an address, which is the current balance minus the gas cost for the transaction. Technical context: - Query the current balance using eth_getBalance RPC call - Calculate the gas cost: gasLimit × gasPrice (or maxFeePerGas for EIP-1559) - The maximum transferable amount = b...
[ "Transfer all my BNB to {to_address}", "Send my entire BNB balance to {to_address}", "Transfer the maximum amount of BNB to {to_address}", "Send all available BNB to {to_address}", "I want to transfer all my BNB to {to_address}" ]
BSC
mainnet
[ "bnb", "native", "transfer", "max", "balance", "query", "intermediate" ]
[ "to_address" ]
{"to_address": {"description": "Recipient address", "generation": {"method": "random"}, "role": "recipient", "type": "address"}}
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Correct recipient address", "expected": "{to_address}", "type": "recipient_correct", "weight": 0.2}, {"description": "Transferred maximum amount (balance - gas)", "tolerance": "0.1%"...
{}
{}
{}
{"estimated_gas": 21000, "requires_balance_query": true, "requires_contract": false, "requires_gas_calculation": true, "tags": ["bnb", "native", "transfer", "max", "balance", "query", "intermediate"]}
basic_transactions/native_transfer/bnb_transfer_max_amount.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Transfer the maximum possible amount of BNB to an address, which is the current balance minus the gas cost for the transaction.", "", "Technical context:", "- Query the current balance using eth_getBalance RPC call...
bnb_transfer_percentage
atomic
atomic
2.0.0
basic_transactions
native_transfer
medium
Percentage BNB Transfer
Transfer a percentage of BNB balance from sender's address to another address. Technical context: - Requires querying the sender's current balance before calculating transfer amount - Formula: transfer_amount = balance × (percentage / 100) - Query balance using eth_getBalance RPC call - Standard gas limit: 21000 Key ...
[ "Transfer {percentage}% of my BNB balance to {to_address}", "Send {percentage} percent of BNB to {to_address}", "Please transfer {percentage}% of the BNB I have to {to_address}", "I want to send {percentage}% of my BNB to address {to_address}" ]
BSC
mainnet
[ "native_transfer", "bnb", "percentage", "query", "dynamic" ]
[ "percentage", "to_address" ]
{"percentage": {"description": "Percentage of balance to transfer (1-100)", "generation": {"max": 90, "method": "random", "min": 10, "step": 5}, "role": "percentage", "type": "integer"}, "to_address": {"description": "Recipient address", "generation": {"method": "random"}, "role": "receiver", "type": "address"}}
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Target address must be correct", "expected": "{to_address}", "field": "to", "type": "address_check", "weight": 0.2}, {"base": "sender_balance_before", "description": "Transfer amount...
{}
{}
{}
{"estimated_gas": 21000, "requires_contract": false, "requires_query": true, "tags": ["native_transfer", "bnb", "percentage", "query", "dynamic"]}
basic_transactions/native_transfer/bnb_transfer_percentage.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Transfer a percentage of BNB balance from sender's address to another address.", "", "Technical context:", "- Requires querying the sender's current balance before calculating transfer amount", "- Formula: transfer...
bnb_transfer_to_contract
atomic
atomic
2.0.0
basic_transactions
native_transfer
easy
BNB Transfer to Contract
Test the agent's ability to transfer BNB to a smart contract address. Technical context: - The target is a WBNB (Wrapped BNB) contract that accepts BNB transfers - WBNB has a receive() function that calls deposit() internally - This requires more gas than a simple transfer due to storage writes and event emissions - R...
[ "Transfer {amount} BNB to contract address {contract_address}", "Send {amount} BNB to the smart contract at {contract_address}", "Please transfer {amount} BNB to contract {contract_address}", "I want to send {amount} BNB to the contract address {contract_address}" ]
BSC
mainnet
[ "native_transfer", "bnb", "contract", "payable", "basic", "wbnb" ]
[ "amount", "contract_address" ]
{"amount": {"description": "Transfer amount in BNB", "generation": {"decimals": 3, "max": 0.05, "min": 0.001}, "role": "transfer_amount", "type": "number", "unit": "BNB"}, "contract_address": {"description": "Target contract address (must be a contract, not EOA)", "generation": {"addresses": ["0xbb4CdB9CBd36B01bD1cBaEB...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Correct amount of BNB transferred", "expected": "{amount}", "tolerance": "0", "type": "value_transfer", "weight": 0.3}, {"description": "BNB sent to correct contract address", "expec...
{}
{}
{}
{"contract_requirements": {"must_accept_bnb": true, "must_be_payable": true, "note": "WBNB deposit requires ~50-60k gas for storage write and event emission"}, "estimated_gas": 60000, "requires_contract": true, "tags": ["native_transfer", "bnb", "contract", "payable", "basic", "wbnb"]}
basic_transactions/native_transfer/bnb_transfer_to_contract.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Test the agent's ability to transfer BNB to a smart contract address.", "", "Technical context:", "- The target is a WBNB (Wrapped BNB) contract that accepts BNB transfers", "- WBNB has a receive() function that ca...
bnb_transfer_with_message
atomic
atomic
2.0.0
basic_transactions
native_transfer
easy
BNB Transfer with Message
Transfer BNB with an attached text message encoded in the transaction data field. Technical context: - Message should be encoded in the 'data' field of the transaction - Convert string to UTF-8 bytes, then to hexadecimal format - Transactions with data field consume slightly more gas than empty data - Recommended gas ...
[ "Transfer {amount} BNB to {to_address} with message '{message}'", "Send {amount} BNB to {to_address} and include the message: {message}", "Please send {amount} BNB to address {to_address} with the note '{message}'", "I want to transfer {amount} BNB to {to_address} and attach message: {message}" ]
BSC
mainnet
[ "native_transfer", "bnb", "message", "data_field", "basic" ]
[ "amount", "message", "to_address" ]
{"amount": {"description": "Transfer amount in BNB", "generation": {"decimals": 3, "max": 0.1, "min": 0.001}, "role": "transfer_amount", "type": "number", "unit": "BNB"}, "message": {"description": "Text message to attach to the transaction", "generation": {"charset": "alphanumeric_space", "length": 20, "method": "rand...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.2}, {"description": "Correct amount of BNB transferred", "expected": "{amount}", "tolerance": "0", "type": "value_transfer", "weight": 0.2}, {"description": "BNB sent to correct recipient", "expected": "...
{}
{}
{}
{"estimated_gas": 25000, "requires_contract": false, "tags": ["native_transfer", "bnb", "message", "data_field", "basic"]}
basic_transactions/native_transfer/bnb_transfer_with_message.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Transfer BNB with an attached text message encoded in the transaction data field.", "", "Technical context:", "- Message should be encoded in the 'data' field of the transaction", "- Convert string to UTF-8 bytes, ...
wbnb_deposit
atomic
atomic
2.0.0
basic_transactions
native_transfer
medium
WBNB Deposit (Wrap BNB)
Deposit native BNB into the WBNB (Wrapped BNB) contract to receive an equivalent amount of WBNB tokens. Technical context: - WBNB is an ERC20 wrapper for native BNB, allowing BNB to be used in DeFi protocols - The deposit() function is payable and mints WBNB tokens equal to msg.value - Function signature: deposit() pa...
[ "Deposit {amount} BNB to WBNB contract", "Wrap {amount} BNB into WBNB", "Convert {amount} BNB to WBNB", "I want to deposit {amount} BNB to get WBNB" ]
BSC
mainnet
[ "wbnb", "wrap", "deposit", "native_token", "contract_call", "intermediate" ]
[ "amount", "wbnb_address" ]
{"amount": {"description": "Amount of BNB to deposit", "generation": {"decimals": 3, "max": 0.05, "min": 0.001}, "role": "transfer_amount", "type": "number", "unit": "BNB"}, "wbnb_address": {"description": "WBNB contract address", "generation": {"addresses": ["0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"], "comment": "B...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Transaction calls WBNB contract", "expected": "{wbnb_address}", "type": "contract_call", "weight": 0.2}, {"description": "Correct deposit function signature", "expected": "deposit()"...
{}
{}
{}
{"contract_requirements": {"contract_type": "WBNB", "note": "WBNB is a specific contract that wraps native BNB into an ERC20 token", "required_functions": ["deposit", "balanceOf"]}, "estimated_gas": 60000, "requires_contract": true, "tags": ["wbnb", "wrap", "deposit", "native_token", "contract_call", "intermediate"]}
basic_transactions/native_transfer/wbnb_deposit.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Deposit native BNB into the WBNB (Wrapped BNB) contract to receive an equivalent amount of WBNB tokens.", "", "Technical context:", "- WBNB is an ERC20 wrapper for native BNB, allowing BNB to be used in DeFi protoc...
wbnb_withdraw
atomic
atomic
2.0.0
basic_transactions
native_transfer
medium
WBNB Withdraw (Unwrap WBNB)
Withdraw WBNB tokens from the WBNB contract to receive an equivalent amount of native BNB. Technical context: - The withdraw(uint256) function burns WBNB tokens and sends native BNB back - Function signature: withdraw(uint256 wad) - The amount must be in wei (smallest unit) - You must have sufficient WBNB balance befo...
[ "Withdraw {amount} WBNB to get BNB", "Unwrap {amount} WBNB back to BNB", "Convert {amount} WBNB to native BNB", "I want to withdraw {amount} WBNB to receive BNB" ]
BSC
mainnet
[ "wbnb", "unwrap", "withdraw", "native_token", "contract_call", "intermediate" ]
[ "amount", "wbnb_address" ]
{"amount": {"description": "Amount of WBNB to withdraw (will be converted to BNB)", "generation": {"decimals": 3, "max": 0.05, "min": 0.001}, "role": "transfer_amount", "type": "number", "unit": "WBNB"}, "wbnb_address": {"description": "WBNB contract address", "generation": {"addresses": ["0xbb4CdB9CBd36B01bD1cBaEBF2De...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Transaction calls WBNB contract", "expected": "{wbnb_address}", "type": "contract_call", "weight": 0.2}, {"description": "Correct withdraw function signature", "expected": "withdraw(...
{}
{}
{}
{"contract_requirements": {"contract_type": "WBNB", "note": "Must have WBNB tokens to withdraw", "required_functions": ["withdraw", "balanceOf"]}, "estimated_gas": 60000, "requires_contract": true, "requires_token_balance": true, "tags": ["wbnb", "unwrap", "withdraw", "native_token", "contract_call", "intermediate"]}
basic_transactions/native_transfer/wbnb_withdraw.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Withdraw WBNB tokens from the WBNB contract to receive an equivalent amount of native BNB.", "", "Technical context:", "- The withdraw(uint256) function burns WBNB tokens and sends native BNB back", "- Function sig...
erc1155_safe_transfer_with_data
atomic
atomic
2.0.0
basic_transactions
nft_operations
medium
ERC1155 Safe Transfer with Data
Transfer ERC1155 tokens with additional data bytes using the safeTransferFrom function. Technical context: - ERC1155 is the multi-token standard supporting both fungible and non-fungible tokens - Function signature: safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes data) - The 'data' paramet...
[ "Transfer {amount} units of token ID {token_id} from {nft_address} to {to_address} with data message: {data_message}", "Send {amount} of ERC1155 token #{token_id} at {nft_address} to {to_address} with attached data", "Transfer {amount} units of multi-token {token_id} from contract {nft_address} to {to_address} ...
BSC
mainnet
[ "erc1155", "multi-token", "nft", "transfer", "data", "callback", "advanced" ]
[ "amount", "data_message", "nft_address", "nft_name", "to_address", "token_id" ]
{"amount": {"description": "Amount of tokens to transfer", "generation": {"method": "fixed", "value": 5}, "role": "transfer_amount", "type": "integer"}, "data_message": {"description": "Custom data message to include with transfer", "generation": {"method": "from_list", "values": ["Transfer with metadata", "NFT batch t...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.25}, {"description": "Transaction calls correct ERC1155 contract", "expected": "{nft_address}", "type": "contract_call", "weight": 0.15}, {"description": "Correct safeTransferFrom function signature", "e...
{}
{}
{}
{"contract_requirements": {"contract_type": "ERC1155", "note": "Agent must own sufficient tokens to transfer; recipient may need to implement ERC1155Receiver", "required_functions": ["safeTransferFrom", "balanceOf", "balanceOfBatch"]}, "erc_standard": "ERC1155", "estimated_gas": 200000, "requires_contract": true, "requ...
basic_transactions/nft_operations/erc1155_safe_transfer_with_data.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Transfer ERC1155 tokens with additional data bytes using the safeTransferFrom function.", "", "Technical context:", "- ERC1155 is the multi-token standard supporting both fungible and non-fungible tokens", "- Funct...
erc1155_transfer_single
atomic
atomic
2.0.0
basic_transactions
nft_operations
medium
ERC1155 Single Token Transfer
Transfer ERC1155 tokens (single token ID) to another address using the safeTransferFrom function. Technical context: - ERC1155 is the multi-token standard supporting both fungible and non-fungible tokens - Function signature: safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes data) - The 'fro...
[ "Transfer {amount} units of token ID {token_id} from {nft_address} to {to_address}", "Send {amount} of ERC1155 token #{token_id} at {nft_address} to {to_address}", "Transfer {amount} units of multi-token {token_id} from contract {nft_address} to {to_address}", "I want to transfer {amount} of token {token_id} ...
BSC
mainnet
[ "erc1155", "multi-token", "nft", "transfer", "semi-fungible", "intermediate" ]
[ "amount", "nft_address", "nft_name", "to_address", "token_id" ]
{"amount": {"description": "Amount of tokens to transfer", "generation": {"method": "fixed", "value": 10}, "role": "transfer_amount", "type": "integer"}, "nft_address": {"description": "ERC1155 multi-token contract address", "generation": {"comment": "Use dynamically deployed ERC1155 token from environment", "env_key":...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Transaction calls correct ERC1155 contract", "expected": "{nft_address}", "type": "contract_call", "weight": 0.2}, {"description": "Correct safeTransferFrom function signature", "exp...
{}
{}
{}
{"contract_requirements": {"contract_type": "ERC1155", "note": "Agent must own sufficient tokens to transfer", "required_functions": ["safeTransferFrom", "balanceOf", "balanceOfBatch"]}, "erc_standard": "ERC1155", "estimated_gas": 150000, "requires_contract": true, "requires_custom_token": true, "requires_token_ownersh...
basic_transactions/nft_operations/erc1155_transfer_single.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Transfer ERC1155 tokens (single token ID) to another address using the safeTransferFrom function.", "", "Technical context:", "- ERC1155 is the multi-token standard supporting both fungible and non-fungible tokens"...
erc721_approve
atomic
atomic
2.0.0
basic_transactions
nft_operations
medium
ERC721 Approve
Approve another address to transfer a specific ERC721 NFT token on your behalf. Technical context: - Use ERC721's approve(address to, uint256 tokenId) function - Grants permission for the approved address to transfer the specific NFT - Only one address can be approved per token at a time - Setting approval to address(...
[ "Approve address {spender_address} to transfer NFT token ID {token_id} from {nft_name} collection (contract: {nft_address})", "Grant approval to {spender_address} for my {nft_name} NFT #{token_id} at contract {nft_address}", "Please approve {spender_address} to manage my NFT with token ID {token_id} from the {n...
BSC
mainnet
[ "nft", "erc721", "approve", "authorization", "onchain" ]
[ "nft_address", "nft_name", "spender_address", "token_id" ]
{"nft_address": {"description": "ERC721 NFT contract address", "generation": {"addresses": ["0x0a8901b0E25DEb55A87524f0cC164E9644020EBA"], "comment": "PancakeSquad NFT on BSC Mainnet", "method": "from_list"}, "role": "nft_contract", "type": "address"}, "nft_name": {"description": "Human-readable name of the NFT collect...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.4}, {"description": "Approved address set correctly", "expected_approved": "{spender_address}", "type": "approval_check", "weight": 0.4}, {"description": "Correct function selector for approve", "expecte...
{}
{}
{}
{"erc_standard": "ERC721", "estimated_gas": 80000, "network": "mainnet", "requires_contract": true, "tags": ["nft", "erc721", "approve", "authorization", "onchain"]}
basic_transactions/nft_operations/erc721_approve.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Approve another address to transfer a specific ERC721 NFT token on your behalf.", "", "Technical context:", "- Use ERC721's approve(address to, uint256 tokenId) function", "- Grants permission for the approved addr...
erc721_safe_transfer
atomic
atomic
2.0.0
basic_transactions
nft_operations
medium
ERC721 Safe Transfer
Safely transfer an ERC721 NFT token to another address using safeTransferFrom. Technical context: - Use ERC721's safeTransferFrom(address from, address to, uint256 tokenId) function - Safe transfer checks if recipient is a contract and verifies it can receive NFTs - If recipient is a contract, it must implement onERC7...
[ "Safely transfer NFT token ID {token_id} from {nft_name} (contract {nft_address}) to address {to_address}", "Use safeTransferFrom to transfer {nft_name} NFT #{token_id} (contract: {nft_address}) to {to_address}", "Please safely transfer the NFT with token ID {token_id} from {nft_name} NFT collection at {nft_add...
BSC
mainnet
[ "nft", "erc721", "safe_transfer", "ownership", "onchain" ]
[ "nft_address", "nft_name", "to_address", "token_id" ]
{"nft_address": {"description": "ERC721 NFT contract address", "generation": {"addresses": ["0x0a8901b0E25DEb55A87524f0cC164E9644020EBA"], "comment": "PancakeSquad NFT on BSC Mainnet", "method": "from_list"}, "role": "nft_contract", "type": "address"}, "nft_name": {"description": "Human-readable name of the NFT collect...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "NFT ownership transferred to recipient", "expected_new_owner": "{to_address}", "type": "nft_transfer", "weight": 0.4}, {"comment": "safeTransferFrom(address,address,uint256)", "descr...
{}
{}
{}
{"erc_standard": "ERC721", "estimated_gas": 150000, "network": "mainnet", "requires_contract": true, "tags": ["nft", "erc721", "safe_transfer", "ownership", "onchain"]}
basic_transactions/nft_operations/erc721_safe_transfer.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Safely transfer an ERC721 NFT token to another address using safeTransferFrom.", "", "Technical context:", "- Use ERC721's safeTransferFrom(address from, address to, uint256 tokenId) function", "- Safe transfer che...
erc721_set_approval_for_all
atomic
atomic
2.0.0
basic_transactions
nft_operations
medium
ERC721 Set Approval For All
Approve or revoke an operator to manage all of your ERC721 NFTs in a collection. Technical context: - Use ERC721's setApprovalForAll(address operator, bool approved) function - Grants/revokes permission for the operator to transfer ALL your NFTs in this collection - More efficient than approving each token individuall...
[ "Grant operator approval to address {operator_address} for all my NFTs in the {nft_name} collection (contract: {nft_address})", "Set approval for all NFTs in {nft_name} (contract {nft_address}) to operator {operator_address}", "Please approve {operator_address} as an operator for all my {nft_name} NFTs at contr...
BSC
mainnet
[ "nft", "erc721", "approval_for_all", "operator", "batch_authorization", "onchain" ]
[ "approved", "nft_address", "nft_name", "operator_address" ]
{"approved": {"description": "True to grant approval, false to revoke", "generation": {"comment": "Default to granting approval (true)", "method": "fixed", "value": true}, "role": "approval_status", "type": "boolean"}, "nft_address": {"description": "ERC721 NFT contract address", "generation": {"addresses": ["0x0a8901b...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.4}, {"description": "Operator approval status set correctly", "expected_approved": "{approved}", "type": "approval_for_all_check", "weight": 0.4}, {"description": "Correct function selector for setApprov...
{}
{}
{}
{"erc_standard": "ERC721", "estimated_gas": 80000, "network": "mainnet", "requires_contract": true, "tags": ["nft", "erc721", "approval_for_all", "operator", "batch_authorization", "onchain"]}
basic_transactions/nft_operations/erc721_set_approval_for_all.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Approve or revoke an operator to manage all of your ERC721 NFTs in a collection.", "", "Technical context:", "- Use ERC721's setApprovalForAll(address operator, bool approved) function", "- Grants/revokes permissio...
erc721_transfer
atomic
atomic
2.0.0
basic_transactions
nft_operations
medium
ERC721 NFT Transfer
Transfer an ERC721 NFT token to another address using the transferFrom function. Technical context: - ERC721 is the standard for non-fungible tokens (NFTs) - Function signature: transferFrom(address from, address to, uint256 tokenId) - The 'from' address must be the current owner of the NFT - The caller must be the ow...
[ "Transfer NFT token {token_id} from contract {nft_address} to address {to_address}", "Send NFT #{token_id} at {nft_address} to {to_address}", "Transfer ERC721 token {token_id} from {nft_address} to {to_address}", "I want to transfer NFT {token_id} (contract: {nft_address}) to {to_address}" ]
BSC
mainnet
[ "erc721", "nft", "transfer", "ownership", "intermediate" ]
[ "nft_address", "nft_name", "to_address", "token_id" ]
{"nft_address": {"description": "ERC721 NFT contract address", "generation": {"comment": "Use dynamically deployed ERC721 test NFT contract from environment", "env_key": "erc721_token_address", "method": "from_env"}, "role": "contract", "type": "address"}, "nft_name": {"description": "NFT collection name for natural la...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"description": "Transaction calls correct NFT contract", "expected": "{nft_address}", "type": "contract_call", "weight": 0.2}, {"description": "Correct transferFrom function signature", "expected": ...
{}
{}
{}
{"contract_requirements": {"contract_type": "ERC721", "note": "Agent must own the NFT to transfer", "required_functions": ["transferFrom", "ownerOf", "balanceOf"]}, "estimated_gas": 100000, "requires_contract": true, "requires_nft_ownership": true, "tags": ["erc721", "nft", "transfer", "ownership", "intermediate"]}
basic_transactions/nft_operations/erc721_transfer.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Transfer an ERC721 NFT token to another address using the transferFrom function.", "", "Technical context:", "- ERC721 is the standard for non-fungible tokens (NFTs)", "- Function signature: transferFrom(address fr...
query_nft_balance
atomic
atomic
basic_transactions
nft_queries
easy
Query NFT Balance
Query the number of NFTs owned by a specific address by calling the ERC721 balanceOf(address) function. This function returns the total count of NFTs owned by the address, which is useful for checking ownership before transfers or displaying user collections. Note that ERC721 balanceOf returns the count of NFTs, while ...
[ "Query the NFT balance for address {{query_address}} from contract {{nft_address}}", "Check how many NFTs address {{query_address}} owns in the collection at {{nft_address}}", "Get the NFT count for address {{query_address}} from the ERC721 contract {{nft_address}}", "Find out how many tokens {{query_address}...
BSC
mainnet
[ "erc721", "nft", "balance", "balanceOf", "query" ]
[ "expected_balance", "nft_address", "query_address" ]
{"expected_balance": {"description": "Expected NFT balance (test account owns 10 NFTs)", "generation": {"method": "fixed", "value": 10}, "type": "integer"}, "nft_address": {"description": "ERC721 NFT contract address", "generation": {"env_key": "erc721_token_address", "method": "from_env"}, "type": "address"}, "query_a...
{"rules": [{"condition": "success", "error_message": "Failed to query NFT balance", "field": "query_execution", "weight": 40}, {"condition": "has_required_fields", "error_message": "Missing required fields in query result", "field": "return_format", "required_fields": ["balance"], "weight": 30}, {"condition": "matches_...
{}
{}
{}
{"estimated_gas": 0, "learning_objectives": ["Understand the ERC721 balanceOf(address) function", "Learn the difference between ERC721 and ERC1155 balanceOf", "Master querying NFT ownership counts", "Understand how to verify user NFT holdings", "Learn about NFT collection management"], "notes": ["ERC721 balanceOf(addre...
basic_transactions/nft_queries/query_nft_balance.json
{"blockchain": "bsc", "category": "basic_transactions", "description": "Query the number of NFTs owned by a specific address by calling the ERC721 balanceOf(address) function. This function returns the total count of NFTs owned by the address, which is useful for checking ownership before transfers or displaying user c...
query_nft_owner
atomic
atomic
basic_transactions
nft_queries
easy
Query NFT Owner
Query the owner of a specific NFT token by calling the ERC721 ownerOf(tokenId) function. This is a fundamental operation for checking NFT ownership before transfers or other operations. The function returns the address of the current owner.
[ "Query the owner of NFT token ID {{token_id}} from contract {{nft_address}}", "Check who owns token {{token_id}} in the NFT collection at {{nft_address}}", "Get the owner address for NFT #{{token_id}} from {{nft_address}}", "Find out who currently owns token {{token_id}} in the ERC721 contract {{nft_address}}...
BSC
mainnet
[ "erc721", "nft", "owner", "query", "ownerOf" ]
[ "expected_owner", "nft_address", "token_id" ]
{"expected_owner": {"description": "Expected owner address (test account)", "generation": {"env_key": "test_address", "method": "from_env"}, "type": "address"}, "nft_address": {"description": "ERC721 NFT contract address", "generation": {"env_key": "erc721_token_address", "method": "from_env"}, "type": "address"}, "tok...
{"rules": [{"condition": "success", "error_message": "Failed to query NFT owner", "field": "query_execution", "weight": 40}, {"condition": "has_required_fields", "error_message": "Missing required fields in query result", "field": "return_format", "required_fields": ["owner"], "weight": 30}, {"condition": "matches_expe...
{}
{}
{}
{"estimated_gas": 0, "learning_objectives": ["Understand the ERC721 ownerOf() function", "Learn to query NFT ownership information", "Master address comparison and checksum addresses", "Understand the importance of ownership verification in NFT operations"], "notes": ["ownerOf(tokenId) returns the address of the owner"...
basic_transactions/nft_queries/query_nft_owner.json
{"blockchain": "bsc", "category": "basic_transactions", "description": "Query the owner of a specific NFT token by calling the ERC721 ownerOf(tokenId) function. This is a fundamental operation for checking NFT ownership before transfers or other operations. The function returns the address of the current owner.", "diff...
query_nft_token_uri
atomic
atomic
basic_transactions
nft_queries
easy
Query NFT Token URI
Query the metadata URI of a specific NFT token by calling the ERC721 tokenURI(tokenId) function. The token URI typically points to a JSON file containing the NFT's metadata such as name, description, image, and attributes. This is essential for displaying NFT information in wallets and marketplaces.
[ "Query the token URI for NFT token ID {{token_id}} from contract {{nft_address}}", "Get the metadata URI for token {{token_id}} in the NFT collection at {{nft_address}}", "Retrieve the tokenURI for NFT #{{token_id}} from {{nft_address}}", "Find the metadata location for token {{token_id}} in the ERC721 contra...
BSC
mainnet
[ "erc721", "nft", "metadata", "tokenURI", "query" ]
[ "nft_address", "token_id" ]
{"nft_address": {"description": "ERC721 NFT contract address", "generation": {"env_key": "erc721_token_address", "method": "from_env"}, "type": "address"}, "token_id": {"description": "NFT token ID to query URI for", "generation": {"max": 10, "method": "random", "min": 1}, "type": "integer"}}
{"rules": [{"condition": "success", "error_message": "Failed to query NFT token URI", "field": "query_execution", "weight": 40}, {"condition": "has_required_fields", "error_message": "Missing required fields in query result", "field": "return_format", "required_fields": ["tokenURI"], "weight": 30}, {"condition": "is_va...
{}
{}
{}
{"estimated_gas": 0, "learning_objectives": ["Understand the ERC721 tokenURI() function", "Learn about NFT metadata storage and URIs", "Master handling string return types from smart contracts", "Understand the importance of metadata in NFT ecosystems", "Learn about IPFS, HTTP, and data URIs for NFT metadata"], "notes"...
basic_transactions/nft_queries/query_nft_token_uri.json
{"blockchain": "bsc", "category": "basic_transactions", "description": "Query the metadata URI of a specific NFT token by calling the ERC721 tokenURI(tokenId) function. The token URI typically points to a JSON file containing the NFT's metadata such as name, description, image, and attributes. This is essential for dis...
query_bnb_balance
atomic
atomic
2.0.0
basic_transactions
queries
easy
Query BNB Balance
Query the BNB balance of a specific address using eth_getBalance RPC call. Technical context: - Use provider.getBalance(address) to query balance - The return value is in Wei (1 BNB = 10^18 Wei) - This is a read-only operation, no transaction is required - Balance should be returned as BigInt or string Key considerat...
[ "Query the BNB balance of address {query_address}", "Check the BNB balance for {query_address}", "Get the BNB balance of {query_address}", "What is the BNB balance of address {query_address}?" ]
BSC
mainnet
[ "query", "balance", "bnb", "read-only", "basic" ]
[ "expected_balance", "query_address" ]
{"expected_balance": {"description": "Expected BNB balance in BNB (will be set via Anvil)", "generation": {"comment": "Random balance between 0.5 and 50 BNB", "decimals": 3, "max": 50.0, "method": "random", "min": 0.5}, "role": "expected_result", "type": "number"}, "query_address": {"description": "Address to query BNB...
{"post_conditions": [{"description": "Query executed successfully", "type": "query_success", "weight": 0.3}, {"description": "Return value format is correct (contains balance_wei)", "type": "return_format", "weight": 0.3}, {"description": "Balance value matches chain state", "type": "balance_correctness", "weight": 0.4...
{}
{}
{}
{"estimated_gas": 0, "operation_type": "query", "requires_contract": false, "tags": ["query", "balance", "bnb", "read-only", "basic"]}
basic_transactions/queries/query_bnb_balance.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Query the BNB balance of a specific address using eth_getBalance RPC call.", "", "Technical context:", "- Use provider.getBalance(address) to query balance", "- The return value is in Wei (1 BNB = 10^18 Wei)", "- T...
query_erc20_allowance
atomic
atomic
2.0.0
basic_transactions
queries
easy
Query ERC20 Token Allowance
Query the ERC20 token allowance granted by an owner to a spender by calling the allowance function. Technical context: - Use contract.allowance(owner, spender) to query the approved amount - The return value is in token's smallest unit (considering decimals) - This is a read-only view function, no transaction is requi...
[ "Query the {token_symbol} allowance that {owner_address} has approved for {spender_address}", "Check how much {token_symbol} {spender_address} is allowed to spend from {owner_address}", "Get the allowance of {token_symbol} (token address: {token_address}) from owner {owner_address} to spender {spender_address}"...
BSC
mainnet
[ "query", "allowance", "erc20", "read-only", "approval" ]
[ "expected_allowance", "owner_address", "spender_address", "token_address", "token_decimals", "token_symbol" ]
{"expected_allowance": {"description": "Expected allowance in tokens (will be set via Anvil)", "generation": {"comment": "Random allowance between 100 and 10000 tokens", "decimals": 2, "max": 10000.0, "method": "random", "min": 100.0}, "role": "expected_result", "type": "number"}, "owner_address": {"description": "Toke...
{"post_conditions": [{"description": "Query executed successfully", "type": "query_success", "weight": 0.3}, {"description": "Return value format is correct (contains allowance_raw)", "type": "return_format", "weight": 0.3}, {"description": "Allowance value matches chain state", "type": "allowance_correctness", "weight...
{}
{}
{}
{"erc_standard": "ERC20", "estimated_gas": 0, "operation_type": "query", "requires_contract": true, "tags": ["query", "allowance", "erc20", "read-only", "approval"]}
basic_transactions/queries/query_erc20_allowance.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Query the ERC20 token allowance granted by an owner to a spender by calling the allowance function.", "", "Technical context:", "- Use contract.allowance(owner, spender) to query the approved amount", "- The return...
query_erc20_balance
atomic
atomic
2.0.0
basic_transactions
queries
easy
Query ERC20 Token Balance
Query the ERC20 token balance of a specific address by calling the balanceOf function. Technical context: - Use contract.balanceOf(address) to query token balance - The return value is in token's smallest unit (considering decimals) - This is a read-only view function, no transaction is required - Balance should be re...
[ "Query the {token_symbol} balance of address {query_address}", "Check the {token_symbol} token balance for {query_address}", "Get the balance of {token_symbol} (token address: {token_address}) for {query_address}", "What is the {token_symbol} balance of address {query_address}?" ]
BSC
mainnet
[ "query", "balance", "erc20", "read-only", "basic" ]
[ "expected_balance", "query_address", "token_address", "token_decimals", "token_symbol" ]
{"expected_balance": {"description": "Expected token balance in tokens (will be set via Anvil)", "generation": {"comment": "Random balance between 10 and 5000 tokens", "decimals": 2, "max": 5000.0, "method": "random", "min": 10.0}, "role": "expected_result", "type": "number"}, "query_address": {"description": "Address ...
{"post_conditions": [{"description": "Query executed successfully", "type": "query_success", "weight": 0.3}, {"description": "Return value format is correct (contains balance_raw)", "type": "return_format", "weight": 0.3}, {"description": "Balance value matches chain state", "type": "balance_correctness", "weight": 0.4...
{}
{}
{}
{"erc_standard": "ERC20", "estimated_gas": 0, "operation_type": "query", "requires_contract": true, "tags": ["query", "balance", "erc20", "read-only", "basic"]}
basic_transactions/queries/query_erc20_balance.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "basic_transactions", "description": ["Query the ERC20 token balance of a specific address by calling the balanceOf function.", "", "Technical context:", "- Use contract.balanceOf(address) to query token balance", "- The return value is in token's small...
query_nft_approval_status
atomic
atomic
basic_transactions
queries
easy
Query NFT Approval Status
Query the approved address for a specific NFT token ID before transfer
[ "Check who is approved to transfer NFT token #{token_id} from the {nft_symbol} collection at {nft_address}", "Query the approval status for NFT #{token_id} in the {nft_symbol} collection", "Find out which address is authorized to manage NFT token {token_id} from contract {nft_address}", "Get the approved oper...
BSC
mainnet
[ "query", "nft", "erc721", "approval", "read-only" ]
[ "expected_approved_address", "nft_address", "nft_symbol", "token_id" ]
{"expected_approved_address": {"description": "Expected approved address (randomly generated)", "generation": {"comment": "Random address to be set as approved operator", "method": "random"}, "role": "validation", "type": "address"}, "nft_address": {"description": "ERC721 NFT contract address", "generation": {"comment"...
{"checks": [{"description": "Query executed successfully", "name": "query_execution", "points": 30}, {"description": "Return format correct (includes approved_address field)", "name": "return_format", "points": 30}, {"description": "Approved address matches expected value", "name": "approval_correctness", "points": 40}...
{}
{}
{}
{"contract_type": "erc721", "estimated_gas": 24000, "learning_objectives": ["Query NFT approval status using getApproved()", "Understand ERC721 approval mechanism", "Handle address return types"], "operation_type": "query", "requires_contract": true, "requires_native_token": false, "tags": ["query", "nft", "erc721", "a...
basic_transactions/queries/query_nft_approval_status.json
{"blockchain": "bsc", "category": "basic_transactions", "description": "Query the approved address for a specific NFT token ID before transfer", "difficulty": "easy", "id": "query_nft_approval_status", "metadata": {"contract_type": "erc721", "estimated_gas": 24000, "learning_objectives": ["Query NFT approval status usi...
query_token_metadata
atomic
atomic
basic_transactions
token_info_queries
easy
Query Token Metadata
Query comprehensive metadata of an ERC20 token by calling multiple view functions: name(), symbol(), decimals(), and totalSupply(). This demonstrates batch querying capabilities and handling of standard ERC20 token information. Note that some non-standard tokens may not implement all these functions, so proper error ha...
[ "Query the metadata for token at {{token_address}} including name, symbol, decimals, and total supply", "Get comprehensive information about the ERC20 token at {{token_address}}", "Retrieve token details (name, symbol, decimals, totalSupply) for {{token_address}}", "Check the basic information of token {{toke...
BSC
mainnet
[ "erc20", "token", "metadata", "query", "batch-query" ]
[ "expected_decimals", "expected_name", "expected_symbol", "token_address" ]
{"expected_decimals": {"description": "Expected token decimals", "generation": {"method": "fixed", "value": 18}, "type": "integer"}, "expected_name": {"description": "Expected token name", "generation": {"method": "fixed", "value": "Tether USD"}, "type": "string"}, "expected_symbol": {"description": "Expected token sym...
{"rules": [{"condition": "success", "error_message": "Failed to query token metadata", "field": "query_execution", "weight": 25}, {"condition": "has_required_fields", "error_message": "Missing required fields in query result", "field": "return_format", "required_fields": ["name", "symbol", "decimals", "totalSupply"], "...
{}
{}
{}
{"estimated_gas": 0, "learning_objectives": ["Understand standard ERC20 token metadata functions", "Learn to query multiple contract functions efficiently", "Master parsing different return types (string, uint8, uint256)", "Understand the importance of decimals in token representation", "Learn to handle non-standard ER...
basic_transactions/token_info_queries/query_token_metadata.json
{"blockchain": "bsc", "category": "basic_transactions", "description": "Query comprehensive metadata of an ERC20 token by calling multiple view functions: name(), symbol(), decimals(), and totalSupply(). This demonstrates batch querying capabilities and handling of standard ERC20 token information. Note that some non-s...
query_token_total_supply
atomic
atomic
basic_transactions
token_info_queries
easy
Query Token Total Supply
Query the total supply of an ERC20 token by calling the totalSupply() function. The total supply represents the total amount of tokens that exist, returned in the smallest unit (wei). Understanding decimals is crucial for proper display of the human-readable total supply.
[ "Query the total supply of token at {{token_address}}", "Get the total supply for the ERC20 token at {{token_address}} with {{token_decimals}} decimals", "Check how many tokens exist in total for {{token_address}}", "Retrieve the totalSupply of token {{token_address}}" ]
BSC
mainnet
[ "erc20", "token", "totalSupply", "query", "supply" ]
[ "token_address", "token_decimals", "token_symbol" ]
{"token_address": {"description": "ERC20 token contract address to query total supply for (USDT on BSC)", "generation": {"method": "fixed", "value": "0x55d398326f99059fF775485246999027B3197955"}, "type": "address"}, "token_decimals": {"description": "Token decimals for formatting (USDT uses 18 decimals on BSC)", "gener...
{"rules": [{"condition": "success", "error_message": "Failed to query token total supply", "field": "query_execution", "weight": 40}, {"condition": "has_required_fields", "error_message": "Missing required fields in query result", "field": "return_format", "required_fields": ["totalSupply"], "weight": 30}, {"condition"...
{}
{}
{}
{"estimated_gas": 0, "learning_objectives": ["Understand the ERC20 totalSupply() function", "Learn to query token supply information", "Master unit conversion with decimals (wei to token units)", "Understand the difference between totalSupply and circulating supply", "Learn proper formatting of large numbers"], "notes"...
basic_transactions/token_info_queries/query_token_total_supply.json
{"blockchain": "bsc", "category": "basic_transactions", "description": "Query the total supply of an ERC20 token by calling the totalSupply() function. The total supply represents the total amount of tokens that exist, returned in the smallest unit (wei). Understanding decimals is crucial for proper display of the huma...
add_liquidity_bnb_token
atomic
atomic
2.0.0
defi_operations
pancakeswap_liquidity
medium
PancakeSwap Add Liquidity - BNB + Token
Add liquidity to a BNB/Token pair on PancakeSwap V2. IMPORTANT: You must query the pair's current reserves first using Factory.getPair() to get the pair address, then call pair.getReserves() to get reserve amounts. Calculate the optimal token amount using the formula: optimalTokenAmount = (amountBNB × reserveToken) / r...
[ "Add {amount_bnb} BNB and {amount_token} {token_symbol} as liquidity to PancakeSwap", "Provide liquidity to PancakeSwap: {amount_bnb} BNB + {amount_token} {token_symbol}", "Deposit {amount_bnb} BNB and {amount_token} {token_symbol} into PancakeSwap liquidity pool", "Add liquidity pair on PancakeSwap: {amount_...
bsc
[ "defi", "dex", "liquidity", "pancakeswap", "amm", "lp-token" ]
[ "amount_bnb", "amount_token", "router_address", "slippage", "token_address", "token_decimals", "token_symbol" ]
{"amount_bnb": {"description": "Amount of BNB to add as liquidity (in BNB, e.g., 0.1)", "generation": {"decimals": 3, "max": 0.05, "method": "random", "min": 0.01}, "role": "transfer_amount", "type": "number"}, "amount_token": {"description": "Desired amount of tokens to add as liquidity (in human-readable format)", "g...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.3}, {"address": "{router_address}", "description": "Correct PancakeSwap Router called", "type": "contract_call", "weight": 0.15}, {"description": "Correct function addLiquidityETH called", "selector": "0...
{}
{}
{}
{"common_pitfalls": ["Not approving token before adding liquidity", "Not sending BNB value with the transaction", "Setting amountTokenMin/amountETHMin too high", "Not accounting for current pool ratio", "Forgetting to set deadline parameter"], "complexity": "medium", "estimated_gas": "200000-250000", "learning_objectiv...
defi_operations/pancakeswap_liquidity/add_liquidity_bnb_token.json
{"blockchain": {"contract_address": "{{router_address}}", "function_name": "addLiquidityETH", "function_signature": "addLiquidityETH(address,uint256,uint256,uint256,address,uint256)", "network": "bsc"}, "category": "defi_operations", "description": "Add liquidity to a BNB/Token pair on PancakeSwap V2. IMPORTANT: You mu...
add_liquidity_tokens
atomic
atomic
2.0.0
defi_operations
pancakeswap_liquidity
medium
PancakeSwap Add Liquidity - Token + Token
Add liquidity to a Token/Token pair on PancakeSwap V2. IMPORTANT: You must query the pair's current reserves first using Factory.getPair() to get the pair address, then call pair.getReserves() to get reserve amounts. Determine which token is token0 and which is token1 by calling pair.token0(). Calculate the optimal amo...
[ "Add {amount_token_a} {token_a_symbol} and {amount_token_b} {token_b_symbol} as liquidity to PancakeSwap", "Provide liquidity to PancakeSwap: {amount_token_a} {token_a_symbol} + {amount_token_b} {token_b_symbol}", "Deposit {amount_token_a} {token_a_symbol} and {amount_token_b} {token_b_symbol} into PancakeSwap ...
bsc
[ "defi", "dex", "liquidity", "pancakeswap", "amm", "lp-token", "token-pair" ]
[ "amount_token_a", "amount_token_b", "router_address", "slippage", "token_a_address", "token_a_decimals", "token_a_symbol", "token_b_address", "token_b_decimals", "token_b_symbol" ]
{"amount_token_a": {"description": "Desired amount of first token to add as liquidity", "generation": {"method": "fixed", "value": 10.0}, "role": "transfer_amount", "type": "number"}, "amount_token_b": {"description": "Desired amount of second token to add as liquidity", "generation": {"method": "fixed", "value": 10.0}...
{"post_conditions": [], "pre_conditions": [], "rules": [{"description": "Transaction must be successfully executed and confirmed", "type": "transaction_success"}, {"description": "Both tokens must have been approved for Router (or have existing allowance)", "spender": "{{router_address}}", "tokens": ["{{token_a_address...
{}
{}
{}
{"common_pitfalls": ["Not approving both tokens before adding liquidity", "Using the wrong token order (tokenA vs tokenB)", "Setting amountMin values too high based on wrong token", "Sending BNB value (this is not a payable function)", "Not querying reserves to calculate optimal ratios", "Forgetting to set deadline par...
defi_operations/pancakeswap_liquidity/add_liquidity_tokens.json
{"blockchain": {"contract_address": "{{router_address}}", "function_name": "addLiquidity", "function_signature": "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)", "network": "bsc"}, "category": "defi_operations", "description": "Add liquidity to a Token/Token pair on PancakeSwap V2. IMPOR...
remove_liquidity_bnb_token
atomic
atomic
2.0.0
defi_operations
pancakeswap_liquidity
medium
PancakeSwap Remove Liquidity - BNB + Token
Remove liquidity from a BNB/Token pair on PancakeSwap V2. This task requires: 1. Query the LP token address for the WBNB/Token pair from PancakeSwap Factory using Factory.getPair(WBNB, token) 2. Check your current LP token balance using LPToken.balanceOf(agent) 3. Calculate the liquidity amount to remove based on perc...
[ "Remove {liquidity_percentage}% of my liquidity from the BNB/{token_symbol} pool on PancakeSwap", "Withdraw liquidity from PancakeSwap: {liquidity_percentage}% from BNB-{token_symbol} pair", "Remove {liquidity_percentage}% LP tokens from the BNB/{token_symbol} liquidity pool" ]
bsc
[ "defi", "dex", "liquidity", "pancakeswap", "amm", "lp-token", "remove" ]
[ "liquidity_percentage", "router_address", "slippage", "token_address", "token_decimals", "token_symbol" ]
{"liquidity_percentage": {"description": "Percentage of LP tokens to remove (0-100)", "generation": {"method": "fixed", "value": 50.0}, "role": "parameter", "type": "number"}, "router_address": {"description": "PancakeSwap Router V2 contract address", "generation": {"method": "fixed", "value": "0x10ED43C718714eb63d5aA5...
{"post_conditions": [], "pre_conditions": [], "rules": [{"description": "Transaction must be successfully executed and confirmed", "type": "transaction_success"}, {"description": "LP token must have been approved for Router", "spender": "{{router_address}}", "type": "lp_token_approval"}, {"contract": "{{router_address}...
{}
{}
{}
{"common_pitfalls": ["Not approving LP tokens before removing liquidity", "Sending BNB value with transaction (this is NOT payable)", "Using wrong token address (should use Token, not WBNB)", "Setting amountTokenMin/amountETHMin too high", "Not querying reserves to estimate output amounts", "Forgetting to set deadline ...
defi_operations/pancakeswap_liquidity/remove_liquidity_bnb_token.json
{"blockchain": {"contract_address": "{{router_address}}", "function_name": "removeLiquidityETH", "function_signature": "removeLiquidityETH(address,uint256,uint256,uint256,address,uint256)", "network": "bsc"}, "category": "defi_operations", "description": "Remove liquidity from a BNB/Token pair on PancakeSwap V2.\n\nThi...
remove_liquidity_tokens
atomic
atomic
2.0.0
defi_operations
pancakeswap_liquidity
medium
Remove Liquidity from Token-Token Pool
Remove liquidity from a PancakeSwap V2 pool with two ERC20 tokens (Token A + Token B). This task requires: 1. Query the LP token address for the Token A/Token B pair from PancakeSwap Factory 2. Check current LP token balance 3. Calculate the liquidity amount to remove (can be a fixed amount or percentage) 4. Query the...
[ "Remove liquidity from the {token_a_symbol}/{token_b_symbol} pool on PancakeSwap", "Withdraw {liquidity_percentage}% of my liquidity from the {token_a_symbol}-{token_b_symbol} pool", "Remove {liquidity_amount} LP tokens from the {token_a_symbol}/{token_b_symbol} pool" ]
bsc_mainnet
[ "defi", "pancakeswap", "liquidity", "remove", "amm", "dex" ]
[ "liquidity_percentage", "router_address", "slippage", "token_a_address", "token_a_decimals", "token_a_symbol", "token_b_address", "token_b_decimals", "token_b_symbol" ]
{"liquidity_percentage": {"description": "Percentage of LP tokens to remove (0-100)", "generation": {"method": "fixed", "value": 50.0}, "role": "parameter", "type": "number"}, "router_address": {"description": "PancakeSwap Router V2 address", "generation": {"method": "fixed", "value": "0x10ED43C718714eb63d5aA57B78B5470...
{"expected_state_changes": [{"description": "LP token balance should decrease by liquidity amount", "type": "lp_balance_decrease"}, {"description": "Token A balance should increase", "type": "token_a_increase"}, {"description": "Token B balance should increase", "type": "token_b_increase"}], "post_conditions": [], "pre...
{}
{}
{}
{"approval_spender": "PancakeSwap Router V2", "approval_target": "LP Token", "estimated_gas": 200000, "learning_objectives": ["Understanding liquidity removal from AMM pools", "LP token mechanics and redemption", "Slippage protection for liquidity removal", "Multi-step DeFi operations (query, approve, remove)"], "requi...
defi_operations/pancakeswap_liquidity/remove_liquidity_tokens.json
{"blockchain": {"contracts": [{"address": "0x10ED43C718714eb63d5aA57B78B54704E256024E", "functions": ["removeLiquidity(address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline)"], "name": "PancakeSwap Router V2"}, {"address": "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73...
query_pair_reserves
atomic
atomic
defi_operations
pancakeswap_queries
easy
Query PancakeSwap Pair Reserves
Query the reserve amounts of both tokens in a PancakeSwap liquidity pair
[ "Get the reserves of the {token0_symbol}/{token1_symbol} pair at {pair_address}", "Query the liquidity reserves for pair {pair_address}", "Check the reserve0 and reserve1 for the PancakeSwap pair {pair_address}", "What are the current reserves of the {token0_symbol}/{token1_symbol} liquidity pair?" ]
BSC
mainnet
[ "query", "defi", "pancakeswap", "liquidity", "reserves", "read-only" ]
[ "pair_address", "token0_address", "token0_decimals", "token0_symbol", "token1_address", "token1_decimals", "token1_symbol" ]
{"pair_address": {"description": "PancakeSwap pair contract address", "generation": {"comment": "USDT/BUSD LP pair on BSC", "method": "fixed", "value": "0x7EFaEf62fDdCCa950418312c6C91Aef321375A00"}, "role": "contract", "type": "address"}, "token0_address": {"description": "Token0 address in the pair", "generation": {"a...
{"checks": [{"description": "Query executed successfully", "name": "query_execution", "points": 30}, {"description": "Return format correct (includes reserve0, reserve1, blockTimestampLast)", "name": "return_format", "points": 30}, {"description": "Reserve values match actual on-chain data", "name": "reserves_correctne...
{}
{}
{}
{"contract_type": "pancakeswap_pair", "estimated_gas": 30000, "learning_objectives": ["Query PancakeSwap pair reserves using getReserves()", "Understand liquidity pool reserve structure", "Distinguish between token0 and token1", "Handle tuple return values (reserve0, reserve1, blockTimestampLast)"], "operation_type": "...
defi_operations/pancakeswap_queries/query_pair_reserves.json
{"blockchain": "bsc", "category": "defi_operations", "description": "Query the reserve amounts of both tokens in a PancakeSwap liquidity pair", "difficulty": "easy", "id": "query_pair_reserves", "metadata": {"contract_type": "pancakeswap_pair", "estimated_gas": 30000, "learning_objectives": ["Query PancakeSwap pair res...
query_swap_input_amount
atomic
atomic
defi_operations
pancakeswap_queries
medium
Query Swap Input Amount
Calculate the required input amount to achieve a target output amount before executing a swap on PancakeSwap. This involves calling the Router's getAmountsIn function with the desired output amount and token path.
[ "Query how much {{token_in_symbol}} is needed to get exactly {{amount_out}} {{token_out_symbol}} on PancakeSwap", "Calculate the input amount required to receive {{amount_out}} {{token_out_symbol}} when swapping from {{token_in_symbol}}", "Check how much {{token_in_symbol}} tokens are needed to get {{amount_out...
BSC
mainnet
[ "defi", "pancakeswap", "swap", "query", "router", "getAmountsIn" ]
[ "amount_out", "router_address", "token_in_address", "token_in_decimals", "token_in_symbol", "token_out_address", "token_out_decimals", "token_out_symbol" ]
{"amount_out": {"description": "Desired output amount (in token units, not wei)", "generation": {"decimals": 2, "max": 100, "method": "random", "min": 10}, "type": "number"}, "router_address": {"description": "PancakeSwap V2 Router address", "generation": {"method": "fixed", "value": "0x10ED43C718714eb63d5aA57B78B54704...
{"rules": [{"condition": "success", "error_message": "Failed to query swap input amount", "field": "query_execution", "weight": 30}, {"condition": "has_required_fields", "error_message": "Missing required fields in query result", "field": "return_format", "required_fields": ["amounts", "amount_in", "amount_out"], "weig...
{}
{}
{}
{"estimated_gas": 0, "learning_objectives": ["Understand how to use PancakeSwap Router's getAmountsIn function", "Learn to calculate required input amount for a target output", "Master reverse swap calculation with path arrays", "Understand the importance of slippage consideration in DeFi swaps"], "operation_type": "qu...
defi_operations/pancakeswap_queries/query_swap_input_amount.json
{"blockchain": "bsc", "category": "defi_operations", "description": "Calculate the required input amount to achieve a target output amount before executing a swap on PancakeSwap. This involves calling the Router's getAmountsIn function with the desired output amount and token path.", "difficulty": "medium", "id": "quer...
query_swap_output_amount
atomic
atomic
defi_operations
pancakeswap_queries
medium
Query Swap Output Amount
Query the expected output amount for a token swap before executing the trade
[ "Calculate how much {token_out_symbol} you will receive for {amount_in} {token_in_symbol} on PancakeSwap", "Query the output amount for swapping {amount_in} {token_in_symbol} to {token_out_symbol}", "Get the estimated output for a {token_in_symbol} to {token_out_symbol} swap with input amount {amount_in}", "W...
BSC
mainnet
[ "query", "defi", "pancakeswap", "swap", "price", "read-only" ]
[ "amount_in", "router_address", "token_in_address", "token_in_decimals", "token_in_symbol", "token_out_address", "token_out_decimals", "token_out_symbol" ]
{"amount_in": {"description": "Input amount in tokens", "generation": {"comment": "Random input amount between 10-100 tokens", "decimals": 2, "max": 100, "method": "random", "min": 10}, "role": "parameter", "type": "number"}, "router_address": {"description": "PancakeSwap Router contract address", "generation": {"comme...
{"checks": [{"description": "Query executed successfully", "name": "query_execution", "points": 30}, {"description": "Return format correct (includes amounts array)", "name": "return_format", "points": 30}, {"description": "Output amount matches expected value from router", "name": "output_amount_correctness", "points"...
{}
{}
{}
{"contract_type": "pancakeswap_router", "estimated_gas": 50000, "learning_objectives": ["Query swap output amounts using getAmountsOut()", "Understand swap path array structure", "Parse array return values from smart contracts", "Calculate expected output before executing trades"], "operation_type": "query", "requires_...
defi_operations/pancakeswap_queries/query_swap_output_amount.json
{"blockchain": "bsc", "category": "defi_operations", "description": "Query the expected output amount for a token swap before executing the trade", "difficulty": "medium", "id": "query_swap_output_amount", "metadata": {"contract_type": "pancakeswap_router", "estimated_gas": 50000, "learning_objectives": ["Query swap ou...
swap_exact_bnb_for_tokens
atomic
atomic
2.0.0
defi_operations
pancakeswap_swap
easy
PancakeSwap Swap - BNB to Token
Swap BNB for ERC20 tokens using PancakeSwap V2 Router's swapExactETHForTokens function. Technical context: - PancakeSwap V2 Router (BSC Mainnet): 0x10ED43C718714eb63d5aA57B78B54704E256024E - Function signature: swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payabl...
[ "Swap {amount_in} BNB for {token_symbol} tokens on PancakeSwap", "Exchange {amount_in} BNB to {token_symbol} using PancakeSwap Router", "Convert {amount_in} BNB to {token_symbol} tokens through PancakeSwap V2", "Trade {amount_in} BNB for {token_symbol} on PancakeSwap with {slippage}% slippage tolerance" ]
BSC
mainnet
[ "pancakeswap", "swap", "dex", "amm", "defi", "bnb-to-token" ]
[ "amount_in", "router_address", "slippage", "token_address", "token_decimals", "token_symbol", "wbnb_address" ]
{"amount_in": {"description": "Amount of BNB to swap", "generation": {"decimals": 4, "max": 0.01, "method": "random", "min": 0.001}, "role": "swap_amount", "type": "number", "unit": "BNB"}, "router_address": {"description": "PancakeSwap V2 Router contract address", "generation": {"method": "fixed", "value": "0x10ED43C7...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.25}, {"address": "{router_address}", "description": "Correct PancakeSwap Router called", "type": "contract_called", "weight": 0.15}, {"description": "Correct function swapExactETHForTokens called", "sele...
{}
{}
{}
{"dex": "PancakeSwap V2", "difficulty_notes": ["Basic DEX swap operation", "Requires understanding of payable functions", "Requires understanding of swap paths", "Requires setting deadline parameter"], "estimated_gas": 200000, "network": "mainnet", "requires_contract": true, "swap_type": "exact_input", "tags": ["pancak...
defi_operations/pancakeswap_swap/swap_exact_bnb_for_tokens.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "defi_operations", "description": ["Swap BNB for ERC20 tokens using PancakeSwap V2 Router's swapExactETHForTokens function.", "", "Technical context:", "- PancakeSwap V2 Router (BSC Mainnet): 0x10ED43C718714eb63d5aA57B78B54704E256024E", "- Function sign...
swap_exact_tokens_for_bnb
atomic
atomic
2.0.0
defi_operations
pancakeswap_swap
medium
PancakeSwap Swap - Token to BNB
Swap ERC20 tokens for BNB using PancakeSwap V2 Router's swapExactTokensForETH function. Technical context: - PancakeSwap V2 Router (BSC Mainnet): 0x10ED43C718714eb63d5aA57B78B54704E256024E - Function signature: swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) ...
[ "Swap {amount_in} {token_symbol} for BNB on PancakeSwap", "Exchange {amount_in} {token_symbol} to BNB using PancakeSwap Router", "Convert {amount_in} {token_symbol} tokens to BNB through PancakeSwap V2", "Trade {amount_in} {token_symbol} for BNB on PancakeSwap with {slippage}% slippage tolerance" ]
BSC
mainnet
[ "pancakeswap", "swap", "dex", "amm", "defi", "token-to-bnb", "approval-required" ]
[ "amount_in", "router_address", "slippage", "token_address", "token_decimals", "token_symbol", "wbnb_address" ]
{"amount_in": {"description": "Amount of tokens to swap", "generation": {"decimals": 2, "max": 5.0, "method": "random", "min": 0.5}, "role": "swap_amount", "type": "number", "unit": "token"}, "router_address": {"description": "PancakeSwap V2 Router contract address", "generation": {"method": "fixed", "value": "0x10ED43...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.25}, {"address": "{router_address}", "description": "Token approved to Router (or approval check passed)", "type": "token_approval", "weight": 0.2}, {"address": "{router_address}", "description": "Correc...
{}
{}
{}
{"dex": "PancakeSwap V2", "difficulty_notes": ["Requires understanding of token approval mechanism", "Two-step process: approve + swap", "Requires understanding of swap paths", "Must handle BNB balance change correctly (minus gas)"], "estimated_gas": 180000, "network": "mainnet", "requires_approval": true, "requires_co...
defi_operations/pancakeswap_swap/swap_exact_tokens_for_bnb.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "defi_operations", "description": ["Swap ERC20 tokens for BNB using PancakeSwap V2 Router's swapExactTokensForETH function.", "", "Technical context:", "- PancakeSwap V2 Router (BSC Mainnet): 0x10ED43C718714eb63d5aA57B78B54704E256024E", "- Function sign...
swap_exact_tokens_for_tokens
atomic
atomic
2.0.0
defi_operations
pancakeswap_swap
medium
PancakeSwap Swap - Token to Token
Swap one ERC20 token for another using PancakeSwap V2 Router's swapExactTokensForTokens function. Technical context: - PancakeSwap V2 Router (BSC Mainnet): 0x10ED43C718714eb63d5aA57B78B54704E256024E - Function signature: swapExactTokensForTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, ui...
[ "Swap {amount_in} {token_in_symbol} for {token_out_symbol} on PancakeSwap", "Exchange {amount_in} {token_in_symbol} to {token_out_symbol} using PancakeSwap Router", "Convert {amount_in} {token_in_symbol} tokens to {token_out_symbol} through PancakeSwap V2", "Trade {amount_in} {token_in_symbol} for {token_out_...
BSC
mainnet
[ "pancakeswap", "swap", "dex", "amm", "defi", "token-to-token", "approval-required", "multi-hop" ]
[ "amount_in", "router_address", "slippage", "token_in_address", "token_in_decimals", "token_in_symbol", "token_out_address", "token_out_decimals", "token_out_symbol", "wbnb_address" ]
{"amount_in": {"description": "Amount of input tokens to swap", "generation": {"decimals": 2, "max": 5.0, "method": "random", "min": 0.5}, "role": "swap_amount", "type": "number", "unit": "token"}, "router_address": {"description": "PancakeSwap V2 Router contract address", "generation": {"method": "fixed", "value": "0x...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.2}, {"address": "{router_address}", "description": "Input token approved to Router (or approval check passed)", "type": "token_approval", "weight": 0.15}, {"address": "{router_address}", "description": "...
{}
{}
{}
{"dex": "PancakeSwap V2", "difficulty_notes": ["Requires understanding of token approval mechanism", "Two-step process: approve + swap", "Requires understanding of swap paths", "May need multi-hop routing through WBNB", "Must track two different token balances"], "estimated_gas": 200000, "network": "mainnet", "requires...
defi_operations/pancakeswap_swap/swap_exact_tokens_for_tokens.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "defi_operations", "description": ["Swap one ERC20 token for another using PancakeSwap V2 Router's swapExactTokensForTokens function.", "", "Technical context:", "- PancakeSwap V2 Router (BSC Mainnet): 0x10ED43C718714eb63d5aA57B78B54704E256024E", "- Fun...
swap_multihop_routing
atomic
atomic
2.0.0
defi_operations
pancakeswap_swap
hard
PancakeSwap Multi-hop Routing Swap
Execute a multi-hop token swap on PancakeSwap Router V2. This operation involves swapping tokens through multiple intermediate tokens to achieve better liquidity and pricing. The swap path must be: CAKE → WBNB → USDT → BUSD (4 tokens). You must use the exact input amount specified in the task. Call getAmountsOut() firs...
[ "Swap {amount_in} {token_start_symbol} for {token_end_symbol} on PancakeSwap using a multi-hop routing path through WBNB and USDT", "Execute a multi-hop token swap: exchange {amount_in} {token_start_symbol} to {token_end_symbol} via intermediate tokens for better liquidity", "Perform a complex token swap on Pan...
bsc
[ "defi", "dex", "swap", "pancakeswap", "multihop", "routing", "optimization" ]
[ "amount_in", "router_address", "slippage", "token_end_address", "token_end_decimals", "token_end_symbol", "token_start_address", "token_start_decimals", "token_start_symbol", "usdt_address", "wbnb_address" ]
{"amount_in": {"description": "Amount of starting tokens to swap (in human-readable format, e.g., 1.5)", "generation": {"method": "fixed", "value": 2.0}, "role": "transfer_amount", "type": "number"}, "router_address": {"description": "PancakeSwap Router V2 contract address", "generation": {"method": "fixed", "value": "...
{"post_conditions": [], "pre_conditions": [], "rules": [{"description": "Transaction must be successfully executed and confirmed", "type": "transaction_success"}, {"description": "Starting token must have been approved for Router (or have existing allowance)", "spender": "{{router_address}}", "token": "{{token_start_ad...
{}
{}
{}
{"common_pitfalls": ["Using inefficient routing paths", "Not accounting for cumulative slippage", "Insufficient allowance for input token", "Not checking liquidity at each hop", "Incorrect path order or missing intermediate tokens"], "complexity": "high", "estimated_gas": "250000-300000", "learning_objectives": ["Under...
defi_operations/pancakeswap_swap/swap_multihop_routing.json
{"blockchain": {"contract_address": "{{router_address}}", "function_name": "swapExactTokensForTokens", "function_signature": "swapExactTokensForTokens(uint256,uint256,address[],address,uint256)", "network": "bsc"}, "category": "defi_operations", "description": "Execute a multi-hop token swap on PancakeSwap Router V2. T...
swap_tokens_for_exact_tokens
atomic
atomic
2.0.0
defi_operations
pancakeswap_swap
hard
PancakeSwap Swap - Exact Output (Token to Token)
Swap tokens to receive an exact amount of output tokens using PancakeSwap V2 Router's swapTokensForExactTokens function. Technical context: - PancakeSwap V2 Router (BSC Mainnet): 0x10ED43C718714eb63d5aA57B78B54704E256024E - Function signature: swapTokensForExactTokens(uint amountOut, uint amountInMax, address[] callda...
[ "Swap tokens to get exactly {amount_out} {token_out_symbol} on PancakeSwap", "Exchange tokens for precisely {amount_out} {token_out_symbol} using PancakeSwap Router", "Buy exactly {amount_out} {token_out_symbol} with {token_in_symbol} through PancakeSwap V2", "Trade {token_in_symbol} for exactly {amount_out} ...
BSC
mainnet
[ "pancakeswap", "swap", "dex", "amm", "defi", "token-to-token", "exact-output", "approval-required", "multi-hop", "advanced" ]
[ "amount_out", "router_address", "slippage", "token_in_address", "token_in_decimals", "token_in_symbol", "token_out_address", "token_out_decimals", "token_out_symbol", "wbnb_address" ]
{"amount_out": {"description": "Exact amount of output tokens to receive", "generation": {"decimals": 2, "max": 3.0, "method": "random", "min": 0.5}, "role": "exact_output_amount", "type": "number", "unit": "token"}, "router_address": {"description": "PancakeSwap V2 Router contract address", "generation": {"method": "f...
{"post_conditions": [{"description": "Transaction executed successfully", "type": "transaction_success", "weight": 0.2}, {"address": "{router_address}", "description": "Input token approved to Router with sufficient amount", "type": "token_approval", "weight": 0.15}, {"address": "{router_address}", "description": "Corr...
{}
{}
{}
{"dex": "PancakeSwap V2", "difficulty_notes": ["Requires understanding of exact output swaps (opposite of exact input)", "Must calculate amountInMax correctly using getAmountsIn", "Approval must cover the maximum possible input (amountInMax)", "More complex slippage calculation (input side, not output side)", "Must val...
defi_operations/pancakeswap_swap/swap_tokens_for_exact_tokens.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "defi_operations", "description": ["Swap tokens to receive an exact amount of output tokens using PancakeSwap V2 Router's swapTokensForExactTokens function.", "", "Technical context:", "- PancakeSwap V2 Router (BSC Mainnet): 0x10ED43C718714eb63d5aA57B78...
emergency_withdraw
atomic
atomic
2.0.0
defi_operations
staking_farming
easy
Emergency Withdraw from Staking Pool
Emergency withdraw all staked LP tokens from a farming pool, forfeiting all accumulated rewards. This is an emergency function to quickly retrieve staked assets without claiming rewards. IMPORTANT: This is a SimpleRewardPool contract with emergencyWithdraw() function. - Contract function: emergencyWithdraw() - NO PARA...
[ "Emergency withdraw all staked LP tokens from the pool at {pool_address}", "Quickly retrieve all LP tokens from staking pool {pool_address} (forfeit rewards)", "Execute emergency withdrawal from farming pool {pool_address}", "Unstake all USDT/BUSD LP tokens immediately, forfeiting CAKE rewards" ]
BSC
mainnet
[ "emergency", "withdraw", "unstake", "farming", "defi" ]
[ "chain_id", "lp_token_address", "pool_address", "reward_token_address", "user_address" ]
{"chain_id": {"description": "Blockchain network ID (56 for BSC Mainnet)", "example": 56, "generation": {"method": "fixed", "value": 56}, "role": "parameter", "type": "integer"}, "lp_token_address": {"description": "LP token address (USDT/BUSD pair)", "example": "0x7EFaEf62fDdCCa950418312c6C91Aef321375A00", "generation...
{}
{}
{}
{}
{}
defi_operations/staking_farming/emergency_withdraw.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "defi_operations", "contracts": {"cake_token": {"abi_functions": ["function balanceOf(address account) external view returns (uint256)"], "address": "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82", "name": "PancakeSwap Token (CAKE)"}, "lp_token": {"abi_fun...
harvest_rewards
atomic
atomic
2.0.0
defi_operations
staking_farming
medium
Harvest Farming Rewards
Harvest (claim) accumulated farming rewards from a staking pool. This operation collects the rewards earned from staking without unstaking the principal. IMPORTANT: This is a SimpleRewardPool contract with a harvest() function. - Contract function: harvest() - NO PARAMETERS - This function claims all pending rewards f...
[ "Harvest farming rewards from the pool at {pool_address}", "Claim accumulated rewards from the farming pool", "Collect farming rewards without unstaking", "Harvest CAKE rewards from the staking pool" ]
BSC
mainnet
[ "harvest", "farming", "rewards", "defi", "yield" ]
[ "chain_id", "pool_address", "reward_token_address", "user_address" ]
{"chain_id": {"description": "Blockchain network ID (56 for BSC Mainnet)", "example": 56, "generation": {"method": "fixed", "value": 56}, "role": "parameter", "type": "integer"}, "pool_address": {"description": "SimpleRewardPool contract address", "dynamic": true, "generation": {"env_key": "simple_reward_pool_address",...
{}
{}
{}
{}
{}
defi_operations/staking_farming/harvest_rewards.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "defi_operations", "contracts": {"cake_token": {"abi_functions": ["function balanceOf(address account) external view returns (uint256)", "function transfer(address to, uint256 amount) external returns (bool)"], "address": "0x0E09FaBB73Bd3Ade0a17ECC321fD...
stake_lp_tokens
atomic
atomic
2.0.0
defi_operations
staking_farming
medium
Stake LP Tokens to Farming Pool
Stake LP (Liquidity Provider) tokens to a SimpleLPStaking farming pool to earn rewards. LP tokens are obtained by providing liquidity to a DEX pair (e.g., USDT/BUSD on PancakeSwap). IMPORTANT: This is a SimpleLPStaking contract, NOT a MasterChef-style contract. - Contract function: deposit(uint256 _amount) - ONLY ONE ...
[ "Stake {stake_amount} USDT/BUSD LP tokens in the SimpleLPStaking pool", "Deposit {stake_amount} LP tokens to the LP staking pool to earn farming rewards", "Stake {stake_amount} USDT/BUSD LP tokens using the simple_lp_staking contract", "Put {stake_amount} liquidity provider tokens into the LP staking pool to ...
BSC
mainnet
[ "staking", "farming", "lp_tokens", "defi", "yield" ]
[ "chain_id", "lp_token_address", "pool_address", "stake_amount", "user_address" ]
{"chain_id": {"description": "Blockchain network ID (56 for BSC Mainnet)", "example": 56, "generation": {"method": "fixed", "value": 56}, "role": "parameter", "type": "integer"}, "lp_token_address": {"description": "LP token address (USDT/BUSD pair)", "example": "0x7EFaEf62fDdCCa950418312c6C91Aef321375A00", "generation...
{}
{}
{}
{}
{}
defi_operations/staking_farming/stake_lp_tokens.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "defi_operations", "contracts": {"lp_token": {"abi_functions": ["function approve(address spender, uint256 amount) external returns (bool)", "function allowance(address owner, address spender) external view returns (uint256)", "function balanceOf(addres...
stake_single_token
atomic
atomic
2.0.0
defi_operations
staking_farming
medium
Stake Single Token to Syrup Pool
Stake CAKE tokens to a PancakeSwap Syrup Pool to earn rewards. This operation requires approving the Syrup Pool contract to spend your CAKE tokens, then calling the deposit function with the pool ID and amount. You need to query the pool information to get the staking token address and ensure you have sufficient balanc...
[ "Stake {stake_amount} CAKE tokens in the SimpleStaking pool", "Deposit {stake_amount} CAKE to the simple_staking contract to earn rewards", "Put {stake_amount} CAKE tokens into the single-token staking pool", "Stake {stake_amount} CAKE in the single token farming pool to start earning" ]
BSC
mainnet
[ "staking", "farming", "pancakeswap", "defi", "yield" ]
[ "chain_id", "pool_address", "stake_amount", "token_address", "user_address" ]
{"chain_id": {"description": "Blockchain network ID (56 for BSC Mainnet)", "example": 56, "generation": {"method": "fixed", "value": 56}, "role": "parameter", "type": "integer"}, "pool_address": {"description": "SimpleStaking contract address", "dynamic": true, "generation": {"env_key": "simple_staking_address", "metho...
{}
{}
{}
{}
{}
defi_operations/staking_farming/stake_single_token.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "defi_operations", "contracts": {"cake_token": {"abi_functions": ["function approve(address spender, uint256 amount) external returns (bool)", "function allowance(address owner, address spender) external view returns (uint256)", "function balanceOf(addr...
unstake_lp_tokens
atomic
atomic
2.0.0
defi_operations
staking_farming
medium
Unstake LP Tokens from Farming Pool
Withdraw (unstake) LP tokens from a farming pool. This operation retrieves your staked LP tokens back to your wallet. Technical context: - Uses SimpleRewardPool contract's withdraw() function - Function signature: withdraw(uint256 _amount) - The withdraw function will also automatically harvest any pending rewards - L...
[ "Unstake {unstake_amount} USDT/BUSD LP tokens from the SimpleRewardPool", "Withdraw {unstake_amount} LP tokens from the simple_reward_pool contract", "Remove {unstake_amount} LP tokens from the reward pool staking", "Unstake {unstake_amount} USDT/BUSD LP tokens from the reward distribution pool" ]
BSC
mainnet
[ "unstake", "withdraw", "farming", "lp-tokens", "defi", "staking" ]
[ "lp_token_address", "pool_address", "unstake_amount", "user_address" ]
{"lp_token_address": {"description": "LP token contract address (USDT/BUSD pair)", "generation": {"method": "fixed", "value": "0x7EFaEf62fDdCCa950418312c6C91Aef321375A00"}, "role": "staked_token", "type": "address"}, "pool_address": {"description": "SimpleRewardPool contract address", "generation": {"env_key": "simple_...
{}
{}
{}
{}
{"contract_type": "SimpleRewardPool", "estimated_gas": 150000, "network": "mainnet", "notes": ["The withdraw function also harvests pending rewards automatically", "Focus is on LP token withdrawal, rewards are a side effect", "Partial withdrawal is supported"], "requires_contract": true, "tags": ["unstake", "withdraw",...
defi_operations/staking_farming/unstake_lp_tokens.json
{"blockchain": {"chain": "BSC", "network": "mainnet"}, "category": "defi_operations", "description": ["Withdraw (unstake) LP tokens from a farming pool. This operation retrieves your staked LP tokens back to your wallet.", "", "Technical context:", "- Uses SimpleRewardPool contract's withdraw() function", "- Function s...
query_pending_rewards
atomic
atomic
defi_operations
staking_queries
medium
Query Pending Rewards
Query the pending rewards earned by a user in a staking pool. This involves calling the SimpleRewardPool contract's pendingReward function to retrieve the accumulated rewards that can be harvested. Rewards accumulate over time based on the user's staked amount and the pool's reward rate.
[ "Query the pending rewards for address {{query_address}} in the SimpleRewardPool", "Check how much rewards {{query_address}} has earned in the reward pool at {{pool_address}}", "Get the accumulated rewards for user {{query_address}} from the SimpleRewardPool contract", "Retrieve pending CAKE rewards for addre...
BSC
mainnet
[ "defi", "staking", "farming", "rewards", "query", "pendingReward" ]
[ "expected_pending_rewards", "pool_address", "query_address", "reward_token_decimals" ]
{"expected_pending_rewards": {"description": "Expected pending rewards amount (in token units, not wei)", "generation": {"decimals": 3, "max": 50, "method": "random", "min": 0.1}, "type": "number"}, "pool_address": {"description": "SimpleRewardPool contract address", "generation": {"env_key": "simple_reward_pool_addres...
{"rules": [{"condition": "success", "error_message": "Failed to query pending rewards", "field": "query_execution", "weight": 30}, {"condition": "has_required_fields", "error_message": "Missing required fields in query result", "field": "return_format", "required_fields": ["pending_rewards"], "weight": 30}, {"condition...
{}
{}
{}
{"estimated_gas": 0, "learning_objectives": ["Understand how to query pending rewards from staking pools", "Learn to call pendingReward function to get accumulated rewards", "Master handling time-based reward accumulation", "Understand the difference between staked amount and earned rewards", "Learn proper unit convers...
defi_operations/staking_queries/query_pending_rewards.json
{"blockchain": "bsc", "category": "defi_operations", "description": "Query the pending rewards earned by a user in a staking pool. This involves calling the SimpleRewardPool contract's pendingReward function to retrieve the accumulated rewards that can be harvested. Rewards accumulate over time based on the user's stak...
query_staked_amount
atomic
atomic
defi_operations
staking_queries
easy
Query Staked Amount
Query the staked amount of a user in a staking contract. This involves calling the staking contract's userInfo function to retrieve the user's staked balance and deposit time.
[ "Query the staked amount for address {{query_address}} in the SimpleStaking contract", "Check how much {{query_address}} has staked in the staking pool at {{pool_address}}", "Get the staked balance for user {{query_address}} from the SimpleStaking contract", "Retrieve staking information for address {{query_a...
BSC
mainnet
[ "defi", "staking", "query", "userInfo" ]
[ "expected_staked_amount", "pool_address", "query_address", "token_decimals" ]
{"expected_staked_amount": {"description": "Expected staked amount (in token units, not wei)", "generation": {"decimals": 2, "max": 100, "method": "random", "min": 1}, "type": "number"}, "pool_address": {"description": "SimpleStaking contract address", "generation": {"env_key": "simple_staking_address", "method": "from...
{"rules": [{"condition": "success", "error_message": "Failed to query staked amount", "field": "query_execution", "weight": 30}, {"condition": "has_required_fields", "error_message": "Missing required fields in query result", "field": "return_format", "required_fields": ["staked_amount", "deposit_time"], "weight": 30},...
{}
{}
{}
{"estimated_gas": 0, "learning_objectives": ["Understand how to query staking contract state", "Learn to call userInfo function to get user's staked balance", "Master parsing struct return values from smart contracts", "Understand the structure of staking data (amount, depositTime)"], "operation_type": "query", "prereq...
defi_operations/staking_queries/query_staked_amount.json
{"blockchain": "bsc", "category": "defi_operations", "description": "Query the staked amount of a user in a staking contract. This involves calling the staking contract's userInfo function to retrieve the user's staked balance and deposit time.", "difficulty": "easy", "id": "query_staked_amount", "metadata": {"estimate...