create_job
Prepare a transaction to create a new job on AGI Alpha. Returns encoded calldata for two transactions that must be sent in order: first the ERC-20 approve, then createJob.
STEP 1 — Build and upload the job spec JSON to IPFS using upload_to_ipfs. The JSON must have this exact structure: { "name": "AGI Job · ", "description": " — ", "image": "https://ipfs.io/ipfs/Qmc13BByj8xKnpgQtwBereGJpEXtosLMLq6BCUjK3TtAd1", "attributes": [ { "trait_type": "Category", "value": "" }, { "trait_type": "Locale", "value": "en-US" } ], "properties": { "schema": "agijobmanager/job-spec/v2", "kind": "job-spec", "version": "1.0.0", "locale": "en-US", "title": "", "category": "<research | development | analysis | creative | other>", "summary": "", "details": "", "tags": ["tag1", "tag2"], "deliverables": ["Concrete thing to deliver"], "acceptanceCriteria": ["Criterion validators will check"], "requirements": ["Any skill or tool requirement"], "payoutAGIALPHA": , "durationSeconds": , "employer": "", "chainId": 1, "contract": "0xB3AAeb69b630f0299791679c063d68d6687481d1", "ensPreview": "—", "ensURI": null, "generatedAt": "<ISO 8601 timestamp>", "createdVia": "" } } Note: "schema" is a plain string tag (not a URL) identifying the format version.
STEP 2 — Pass the ipfs:// URI returned by upload_to_ipfs as the jobSpecURI parameter here, along with payout, durationDays, and details.
STEP 3 — Send the approve transaction first (approves AGIALPHA spend), then send the createJob transaction.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payout | Yes | Payout amount in AGIALPHA tokens (e.g. "1000" for 1000 AGIALPHA) | |
| details | Yes | On-chain description string for the job | |
| jobSpecURI | Yes | IPFS URI pointing to job specification metadata (e.g. ipfs://Qm...). Use upload_to_ipfs first with the job spec JSON. | |
| durationDays | Yes | Job duration in days |