Add a Machine

Clone the setup from our GitHub Repository:

Clone this github repository https://github.com/brahmGAN/ganchain-provider-setup-v2.git via the following command:

git clone https://github.com/brahmGAN/ganchain-provider-setup-v2.git

Use the cd command to navigate to the directory where the add_machine.js script is saved. (It will be inside the add_machine folder of the cloned directory). Repository for the provider and the machine is the same.

cd ganchain-provider-setup-v2/add_machine/

Install Node Js and NPM:

Run the following command in your terminal to install node js and npm if they are not already installed.

command -v npm >/dev/null 2>&1 || (curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt-get install -y nodejs)

Install Required Packages:

npm install

Run AddMachine Script:

Note: Replace <WALLET_ADDRESS> & <PRIVATE_KEY> with your specific values

<WALLET ADDRESS> is the EVM address of the provider wallet. <PRIVATE_KEY> is the private key of the above wallet.

Replace all of the above in the following command and run it:

node add_machine.js -w "<WALLET_ADDRESS>"  -p "<PRIVATE_KEY>"

Example:

node add_machine.js -w "0xF89860E37131c564F39862Aa42DD7c9Ed213198b"  -p "0x7f25c1f6658fd0b86d9d7a62736a7983c78ab3d0e45909947bb32dd1f1ff0778"

Wait for the above command to run completely, it can take 2 to 30 minutes depending on your GPU type. Finally you will get the following message (if the script runs successfully):

"Drill Test Complete, machineId: <Your_Machine_Id>" **Keep this machine id intact for the next step.**

Last updated