Advertisement
EvenoR

Ritual Node

Oct 10th, 2024 (edited)
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.15 KB | None | 0 0
  1. - - - - - 1 - - - - -
  2. sudo apt update && sudo apt upgrade -y
  3.  
  4. sudo apt install -y curl git jq lz4 build-essential unzip
  5.  
  6. - - - - - 2 - - - - -
  7. sudo apt install -y ca-certificates curl gnupg lsb-release
  8.  
  9. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  10.  
  11. echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  12.  
  13. sudo apt update && sudo apt install -y docker-ce docker-ce-cli containerd.io
  14.  
  15. sudo usermod -aG docker $USER
  16.  
  17. newgrp docker
  18.  
  19. - - - - - 3 - - - - -
  20. sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  21.  
  22. sudo chmod +x /usr/local/bin/docker-compose
  23.  
  24. - - - - - 4 - - - - -
  25. git clone https://github.com/ritual-net/infernet-container-starter
  26.  
  27. cd infernet-container-starter
  28.  
  29. screen -S ritual
  30.  
  31. project=hello-world make deploy-container
  32.  
  33. - - - - - 5 - - - - -
  34. docker container ls
  35.  
  36. - - - - - 6 - - - - -
  37. nano /root/infernet-container-starter/deploy/config.json
  38.  
  39. #"registry_address": "0x3B1554f346DFe5c482Bb4BA31b880c1C18412170"
  40. #"rpc_url": "https://mainnet.base.org/"
  41. #"private_key": "ПРИВАТНЫЙ_КЛЮЧ_КОШЕЛЕК_ММ и добавляем приставку 0х"
  42. #"image": "ritualnetwork/hello-world-infernet:1.0.0"
  43. #так же меняем значения в поле снепшота, как ниже на скрине
  44. #Sleep - 5
  45. Batch_Size - 50
  46. - - - - - 7 - - - - -
  47. nano ~/infernet-container-starter/projects/hello-world/container/config.json
  48.  
  49. #"registry_address": "0x3B1554f346DFe5c482Bb4BA31b880c1C18412170"
  50. #"rpc_url": "https://mainnet.base.org/"
  51. #"private_key": "ПРИВАТНЫЙ_КЛЮЧ_КОШЕЛЕК_ММ и добавляем приставку 0х"
  52. #"image": "ritualnetwork/hello-world-infernet:1.0.0"
  53. - - - - - 8 - - - - -
  54. nano /root/infernet-container-starter/projects/hello-world/contracts/Makefile
  55.  
  56. #sender = ПРИВАТНЫЙ_КЛЮЧ_КОШЕЛЕК_ММ и добавляем приставку 0х
  57. #RPC_URL = https://mainnet.base.org/
  58. - - - - - 9 - - - - -
  59. nano ~/infernet-container-starter/projects/hello-world/contracts/script/Deploy.s.sol
  60.  
  61. #address registry = 0x3B1554f346DFe5c482Bb4BA31b880c1C18412170;
  62.  
  63. - - - - - 10 - - - - -
  64. nano /root/infernet-container-starter/deploy/config.json
  65.  
  66. "snapshot_sync": {
  67.    "sleep": 2,
  68.    "batch_size": 10000,
  69.    "starting_sub_id": 100000
  70. },
  71. - - - - - 11 - - - - -
  72. nano ~/infernet-container-starter/projects/hello-world/container/config.json
  73. "snapshot_sync": {
  74.    "sleep": 2,
  75.    "batch_size": 10000,
  76.    "starting_sub_id": 100000
  77. },
  78. - - - - - 12 - - - - -
  79.  
  80. nano ~/infernet-container-starter/deploy/docker-compose.yaml
  81.  
  82. - - - - - 13 - - - - -
  83. cd ~/infernet-container-starter/deploy/
  84.  
  85. docker-compose down
  86.  
  87. docker-compose up -d
  88. - - - - - 14 - - - - -
  89. docker logs infernet-node --tail 100
  90. - - - - - 15 - - - - -
  91. cd
  92. mkdir foundry && cd foundry
  93. curl -L https://foundry.paradigm.xyz | bash
  94. source ~/.bashrc
  95. foundryup
  96.  
  97. -----
  98.  
  99. rm -rf ~/infernet-container-starter/projects/hello-world/contracts/lib/forge-std
  100. rm -rf ~/infernet-container-starter/projects/hello-world/contracts/lib/infernet-sdk
  101.  
  102. -----
  103.  
  104. cd
  105. cd ~/infernet-container-starter/projects/hello-world/contracts
  106. forge install --no-commit foundry-rs/forge-std
  107. forge install --no-commit ritual-net/infernet-sdk
  108. cd ../../../
  109. - - - - - 16 - - - - -
  110. docker logs infernet-node --tail 1000
  111.  
  112. cd ~/infernet-container-starter
  113.  
  114. project=hello-world make deploy-contracts
  115. #копируем contract address
  116. - - - - - 17 - - - - -
  117. nano ~/infernet-container-starter/projects/hello-world/contracts/script/CallContract.s.sol
  118. #заменяем saysGm = SaysGM(0x13D69Cf7d6CE4218F646B759Dcf334D82c023d8e) на свой адрес контракта
  119. #сохраняем и выходим из нано
  120. - - - - - 18 - - - - -
  121. project=hello-world make call-contract
  122. - - - - - 19 - - - - -
  123. docker logs  <ИДЕНТИФИКАТОР КОНТЕЙНЕРА> -f
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement