83trust / 100
X402 Http Compile
by Remix Project in Onchain & crypto
x402 APIPassing, checked 3 h ago
Compile Solidity contracts with the Remix compiler, supporting multiple files, custom versions, and optimization settings
POST https://api.remix.live/mcp/x402-http/compile
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 208 ms typical, 250 ms slowest 5%
- Last check
- 3 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.remix.live/mcp/x402-http/compile" \
-H "content-type: application/json" \
-d '{"sources":{"MyToken.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract MyToken {\n string public name = \"MyToken\";\n}"}},"version":"v0.8.35+commit.47b9dedd"}'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.remix.live%2Fmcp%2Fx402-http%2Fcompile
const res = await pay("https://api.remix.live/mcp/x402-http/compile", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"sources":{"MyToken.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract MyToken {\n string public name = \"MyToken\";\n}"}},"version":"v0.8.35+commit.47b9dedd"}),
});
console.log(await res.json());Example input
{
"sources": {
"MyToken.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract MyToken {\n string public name = \"MyToken\";\n}"
}
},
"version": "v0.8.35+commit.47b9dedd"
}Example output
{
"contracts": {
"MyToken.sol": {
"MyToken": {
"abi": [],
"evm": {
"bytecode": {
"object": "0x608060405..."
}
}
}
}
},
"success": true,
"version": "v0.8.35+commit.47b9dedd"
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 3 h ago | Passed | 402 | 148 ms | $0.01 |
| 6 h ago | Passed | 402 | 250 ms | $0.01 |
| 10 h ago | Passed | 402 | 208 ms | $0.01 |
| 15 h ago | Passed | 402 | 305 ms | $0.01 |