gizatechxyz / scarb-agent

All you need to build provable web3 Agents!
https://orion-giza.gitbook.io/scarb-agent
Apache License 2.0
4 stars 0 forks source link

Implement multi-server configuration support for Cairo hints #4

Closed raphaelDkhn closed 4 months ago

raphaelDkhn commented 4 months ago

This PR builds upon the changes introduced in PR #25.

This PR implements support for multiple server configurations. This feature is particularly useful when different hints need to run on various server ports.

Key changes include:

  1. Enhanced scarb-hints-run and scarb-hints-test to support multiple server configurations.

  2. Introduced a new servers.json file for defining multiple server configurations. This file:

    • Can be placed in the project root or specified in the Scarb.toml file, similarly to Oracle.lock.
    • Is automatically generated by scarb-hints-new.
    • Uses the following format:
      {
       "oracle1": "http://127.0.0.1:3000",
       "oracle2": "http://127.0.0.1:3001"
      }
  3. Updated documentation and examples to reflect the new multi-server approach.