16trust / 100

Abi Encode

by Vextorium in Onchain & crypto

x402 APIFailing, checked 3 h ago

Encode a contract function call (calldata) from its signature and arguments, e.g. transfer(address,uint256) with [to, amount]: selector and hex data ready to sign or simulate.

POST https://api.vextorium.com/v1/abi-encode

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
0.0%
Response time
- typical, - slowest 5%
Last check
3 h ago: Amount "0.003" is not in atomic token units
Next check
any minute now

How to call it

# bash or zsh: see the payment challenge (nothing is charged)
curl -g -i -X POST 'https://api.vextorium.com/v1/abi-encode' \
  -H 'content-type: application/json' \
  --data-raw '{"arguments":["0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf",1000000],"function":"transfer(address,uint256)"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.vextorium.com%2Fv1%2Fabi-encode
const res = await pay("https://api.vextorium.com/v1/abi-encode", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: "{\"arguments\":[\"0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf\",1000000],\"function\":\"transfer(address,uint256)\"}",
});
console.log(await res.json());

Example input

{
  "arguments": [
    "0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf",
    1000000
  ],
  "function": "transfer(address,uint256)"
}

Example output

{
  "bytes": 68,
  "calldata": "0xa9059cbb0000000000000000000000007e5f4552091a69125d5dfcb7b8c2659029395bdf00000000000000000000000000000000000000000000000000000000000f4240",
  "function": "transfer(address,uint256)",
  "selector": "0xa9059cbb"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoAmount "0.003" is not in atomic token units402151 ms$0.003
7 h agoAmount "0.003" is not in atomic token units40278 ms$0.003
12 h agoAmount "0.003" is not in atomic token units40280 ms$0.003
16 h agoAmount "0.003" is not in atomic token units402123 ms$0.003
20 h agoAmount "0.003" is not in atomic token units402132 ms$0.003
24 h agoAmount "0.003" is not in atomic token units40281 ms$0.003
28 h agoAmount "0.003" is not in atomic token units40290 ms$0.003
32 h agoAmount "0.003" is not in atomic token units40292 ms$0.003
36 h agoAmount "0.003" is not in atomic token units40290 ms$0.003
40 h agoAmount "0.003" is not in atomic token units402232 ms$0.003
45 h agoAmount "0.003" is not in atomic token units40294 ms$0.003
2 days agoAmount "0.003" is not in atomic token units40280 ms$0.003
2 days agoAmount "0.003" is not in atomic token units40274 ms$0.003
2 days agoAmount "0.003" is not in atomic token units40281 ms$0.003
3 days agoAmount "0.003" is not in atomic token units40283 ms$0.003