Authentication
Authorization: Bearer YOUR_ACCESS_KEY
Do not put the access key in a URL or query string.
Endpoints
GET /api/v1/health
GET /api/v1/chains
POST /api/v1/uploads
POST /api/v1/jobs
GET /api/v1/jobs/{jobId}
GET /api/v1/jobs/{jobId}/summary
GET /api/v1/jobs/{jobId}/result
GET /api/v1/jobs/{jobId}/report
Create a compile-only job
curl -X POST https://api.preflight.curveyield.online/api/v1/jobs \
-H "Authorization: Bearer $PREFLIGHTSIM_KEY" \
-H "Content-Type: application/json" \
--data '{
"mode":"compile",
"project":{"type":"github","repository":"owner/repository","ref":"main"},
"compilerVersion":"0.8.30",
"workflow":{"steps":[]}
}'
HTML form-compatible submission
POST /api/v1/jobs also accepts application/x-www-form-urlencoded or multipart/form-data containing one field named request. Its value must be the same JSON request shown above.
Live-fork simulation
{
"mode": "simulate",
"project": {"type":"github","repository":"owner/repository","ref":"main"},
"compilerVersion": "0.8.30",
"chain": "polygon",
"block": "latest",
"workflow": {
"steps": [
{"action":"deploy","alias":"vault","contract":"Vault","args":[]},
{"action":"call","target":"$vault","function":"deposit","args":["1000000"]}
]
}
}
Allowed actions: deploy, call, staticCall, expectRevert, setBalance, transferNative, mine, increaseTime, snapshot, revertSnapshot, assertBalance, assertCall.