No description
Find a file
beeinger 4138d8b5fe docs: replace retired submit-batch-query with HDP POST /tasks
Point PoC request step at current Data Processor API create-task flow.
2026-08-25 12:03:48 +02:00
custom_module Add verification check and handle edge case 2024-10-24 16:35:47 +04:00
.gitignore Initial commit 2024-10-15 18:32:28 +04:00
README.md docs: replace retired submit-batch-query with HDP POST /tasks 2026-08-25 12:03:48 +02:00

Snapshot <> Herodotus DP -- Proof of Concept

1. Build

Build the compiled contract class file:

scarb build

You should see that a new build file has been added:

custom_module \
    src \
       lib.cairo
    target \
       dev \
          custom_module_custom_module.compiled_contract_class.json

2. Upload

Upload the compiled contract class file to the program registry:

curl --location 'https://sharp.api.herodotus.cloud/submit-program?apiKey={API_KEY}' \
--form 'programFile=@"custom_module_custom_module.compiled_contract_class.json"'

This request will return a program hash as a response:

0xaae117f9cdfa4fa4d004f84495c942adebf17f24aec8f86e5e6ea29956b47e

To comfirm if the program is registered, you can query the program registry:

curl --location 'http://program-registery.api.herodotus.cloud/get-metadata?program_hash=0xaae117f9cdfa4fa4d004f84495c942adebf17f24aec8f86e5e6ea29956b47e'

3. Request

/submit-batch-query is retired. Schedule the module through the Data Processor API POST /tasks (auth: X-API-KEY header).

Provide compiled-class input for pub fn main() — see Create task and Upload module.

curl -X POST https://hdp.api.herodotus.cloud/tasks \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: {API_KEY}" \
  -d '{
    "destination_chain_id": 11155111,
    "input": {
      "params": [
        {"visibility": "public", "value": "0x3"},
        {"visibility": "public", "value": "0x5222A4"},
        {"visibility": "public", "value": "0x5222A7"},
        {"visibility": "public", "value": "0x5222C4"},
        {"visibility": "public", "value": "0x13cb6ae34a13a0977f4d7101ebc24b87bb23f0d5"}
      ],
      "compiled_class": { "<<INSERT_COMPILED_CLASS>>": true },
      "entry_points_by_type": {
        "EXTERNAL": [],
        "L1_HANDLER": [],
        "CONSTRUCTOR": []
      }
    }
  }'