{"uid":"cap_mbYN_oky3mhWmmHvBOMc7","slug":"x402-bazaar-evm-function-selector-encoder-db3c370f","name":"x402 Bazaar — EVM Function Selector Encoder","description":"Computes the 4-byte selector for a function signature (e.g. transfer(address,uint256) → 0xa9059cbb). The inverse of the decoder — useful for agents building or matching calldata. Paid via x402: $0.005 in USDC on Base (eip155:8453) to 0x973a31858f4d2125f48c880542da11a2796f12d6. Returns 402 with payment requirements; pay and retry.","url":"https://api.relai.fi/relay/1782567677091/api/x402/encode-selector","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"pathParams":{"type":"object"},"queryParams":{"type":"object","required":["signature"],"properties":{"signature":{"type":"string","description":"Function signature"}}}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_N9MVm5rEAxAv1GuGdkd2n","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the 4-byte ABI selector (e.g. 0xa9059cbb) from a Solidity function signature string, paid via x402 micropayment","exampleAgentPrompt":"What's the 4-byte ABI selector for the Solidity function signature transfer(address,uint256)?","exampleUseCases":null,"resultDescription":"Returns the 4-byte hexadecimal function selector (e.g. 0xa9059cbb) derived from the Keccak-256 hash of the provided function signature. Useful for constructing or matching EVM calldata. Accessed via x402 micropayment flow: first call returns HTTP 402 with payment instructions, client pays $0.005 USDC on Base, then retries to receive the selector.","failureModes":["Invalid or malformed function signature returns an error","Missing or incorrect x402 payment header returns HTTP 402 with payment requirements","Payment to wrong address or wrong chain (not eip155:8453) may result in failed payment verification","Signature with unsupported Solidity types may produce unexpected results","Network timeout on relai.fi relay layer"],"whenToPreferThis":"Use this endpoint when an AI agent needs to dynamically compute or verify EVM function selectors for calldata construction, ABI matching, or smart contract interaction — especially when you need the inverse of a selector decoder. Prefer this over offline Keccak hashing when operating in an agentic context that already supports x402 micropayments on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:32:18.665Z","isFirstParty":false}