Advertisement
EvenoR

Allora Update

Jul 28th, 2024 (edited)
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.16 KB | None | 0 0
  1. 1.
  2. rm -rf allora.sh allora-chain/ basic-coin-prediction-node/
  3.  
  4. 2.
  5. wget https://raw.githubusercontent.com/dxzenith/allora-worker-node/main/allora.sh && chmod +x allora.sh && ./allora.sh
  6.  
  7. 3.
  8. nano docker-compose.yml
  9.  
  10. 4.
  11.  
  12. docker compose build
  13. docker compose down
  14. docker compose up -d
  15.  
  16. 5.
  17.  
  18. network_height=$(curl -s -X 'GET' 'https://allora-rpc.testnet-1.testnet.allora.network/abci_info?' -H 'accept: application/json' | jq -r .result.response.last_block_height) && \
  19. curl --location 'http://localhost:6000/api/v1/functions/execute' --header 'Content-Type: application/json' --data '{
  20.    "function_id": "bafybeigpiwl3o73zvvl6dxdqu7zqcub5mhg65jiky2xqb4rdhfmikswzqm",
  21.    "method": "allora-inference-function.wasm",
  22.    "parameters": null,
  23.    "topic": "5",
  24.    "config": {
  25.        "env_vars": [
  26.            {
  27.                "name": "BLS_REQUEST_PATH",
  28.                "value": "/api"
  29.            },
  30.            {
  31.                "name": "ALLORA_ARG_PARAMS",
  32.                "value": "ETH"
  33.            },
  34.            {
  35.                "name": "ALLORA_BLOCK_HEIGHT_CURRENT",
  36.                "value": "'"${network_height}"'"
  37.            }
  38.        ],
  39.        "number_of_nodes": -1,
  40.        "timeout": 10
  41.    }
  42. }' | jq
  43.  
  44.  
  45. 6.
  46.  
  47.  
  48. network_height=$(curl -s -X 'GET' 'https://allora-rpc.testnet-1.testnet.allora.network/abci_info?' -H 'accept: application/json' | jq -r .result.response.last_block_height) && \
  49. curl --location 'http://localhost:6000/api/v1/functions/execute' --header 'Content-Type: application/json' --data '{
  50.    "function_id": "bafybeigpiwl3o73zvvl6dxdqu7zqcub5mhg65jiky2xqb4rdhfmikswzqm",
  51.    "method": "allora-inference-function.wasm",
  52.    "parameters": null,
  53.    "topic": "6",
  54.    "config": {
  55.        "env_vars": [
  56.            {
  57.                "name": "BLS_REQUEST_PATH",
  58.                "value": "/api"
  59.            },
  60.            {
  61.                "name": "ALLORA_ARG_PARAMS",
  62.                "value": "ETH"
  63.            },
  64.            {
  65.                "name": "ALLORA_BLOCK_HEIGHT_CURRENT",
  66.                "value": "'"${network_height}"'"
  67.            }
  68.        ],
  69.        "number_of_nodes": -1,
  70.        "timeout": 10
  71.    }
  72. }' | jq
  73.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement