This guide will teach you the basic’s of creating a safe crypto currency in Grey Hack. This guide will cover how to create the coin , sample scripts to set up a miner and a SubWallet for your currency. This guide is made by Xen. If you would like to say thank you , мой , trade and use XTC!
Creating the Coin.
First you must register the coin on one of the websites offering such services. Открыть Browser.exe and search Монета in the search engine. Open one of the websites like the ones below
Once on the website navigate to Услуги and register the coin with a coin name + user and pass for configuring the coin. It should look like below.
Это будет стоить 150$ to create the coin. Once the coin is created all the details will be stored in Settings.exe > Accounts if you need them for later reference.
(Badly highlighted in yellow below)
To configure the coin look at the next section: Configuring your coin
Configuring the coin.
Crypto can only be configured via scripting , below are some базовый scripts to set up the coin.
Download blockchain.so and place it in your /lib folder for the code to work.
//Include the blockchain.so lib bc = include_lib("/lib/blockchain.so") // Get coin and store it in the coin variable. Use the details from the previous step. //Usage e.g: coin = bc.get_coin("BTC","myusername","mypassword") coin = bc.get_coin("<CoinName>","<CoinUser>",",<CoinPass>") //Will print "монета" if the coin is gotten successfully , else it will print a string with the error , this is to //make sure the bc.get_coin details are correct print(монета) //Set the reward given at the end of each mine cycle (в этом случае 1 монета) coin.set_reward(1) //Assign the hours (время игры) that each mining cycle lasts. When a cycle ends, it is decided who //gets the reward (in this case 1hr) coin.set_cycle_mining(1) //Assign the web address where people can download your Wallet and Mining Software coin.set_address("link to your website with wallet and miner")
Creating a SubWallet Script
Now you need a place for you and your users to store coins. Скачать wallet script from the shop and register a main Wallet. Anyone wishing to use the coin will need to provide the auto generated pin from the main wallet to create a sub wallet.
While its possible to log into the main wallet and grab the pin via a script function but I do not recommend asking for the mail wallet user and pass and instead my scripts ask for the pin from the wallet script provided by the developer. Your scripts should never call home in any way as it is seen as a security risk for the user
//Include the blockchain.so lib bc = include_lib("/lib/blockchain.so") // Get coin and store it in the coin variable. Use the details from the previous step. //Usage e.g: coin = bc.get_coin("BTC","myusername","mypassword") coin = bc.get_coin("","",",") //Will print "монета" if the coin is gotten successfully , else it will print a string with the error , this is to //make sure the bc.get_coin details are correct print(монета) печать("1.Create a new subwallet ") печать("2.Login ") option = user_input("Вариант: ") // Вариант 1 will create a subwallet using the pin from the wallet script if option == 1 then //Main wallet username to link the subwallet to: walletID = user_input("Enter your main wallet username: ") //Autogenerated Pin from the wallet script walletpin = user_input("Enter the autogenerated pin from your wallet: ") //Username for SubWallet (used for directing the miner) swalletuser = user_input("Enter the username for your BTC Wallet ") //Subwallet pass used for option 2 in this case to verify wallet ownership swalletpass = user_input("Enter the password for your BTC Wallet: ") печать("Creating subwallet with:") печать("Main wallet: " + walletID + " Пользователь: " + swalletuser + " Проходить: " + swalletpass + " . ") x = coin.create_subwallet(walletID,walletpin,swalletuser,swalletpass) печать(х) //Вариант 2 will allow the user tocheck the balance of their subwallet and get some other useful info else if option == 2 then subwallet = coin.get_subwallet(user_input("Wallet User:")) печать(subwallet) pass = subwallet.check_password(user_input("Wallet Pass:")) if pass == true then print("---XTC Wallet---") печать("Добро пожаловать: " + subwallet.get_user) печать("Your XTC Balance is: " + subwallet.get_balance) печать("(Main Wallet)This wallet is linked to: " + subwallet.wallet_username) печать("Your last transaction was: " + subwallet.last_transaction) else if pass == false then print("Wrong Pass") exit end if end if
Creating a Mining Script
This script will be used by you and other user to mine the coin into their SubWallets and therefore into the main wallet. Then you can trade the coins using the wallet script or Stocks.exe
//Include the blockchain.so lib bc = include_lib("/lib/blockchain.so") // Get coin and store it in the coin variable. Use the details from the previous step. //Usage e.g: coin = bc.get_coin("BTC","myusername","mypassword") coin = bc.get_coin("","",",") печать(монета) //Get subwallet to mine to (subwallet username setup in the last step) subwallet = coin.get_subwallet(user_input("Wallet User:")) //Prints subwallet if the wallet was gotten correctly , if there is an error prints the error string print(subwallet) печать("Starting Mining...") //Mine till process is stopped with ctrl-c while 1==1 //Start Mining subwallet.mining //Print the balance and success message when the user running the script mines a chunk print("Chunk mined") печать("Баланс: " + subwallet.get_balance) end while
Please trade and mine XTC if you wish to say thanks for the guide
[Бонус] Coin Creator Info Script
This script should not be published and can be used by coin creators to track coin data.
//Include the blockchain.so lib bc = include_lib("/lib/blockchain.so") // Get coin and store it in the coin variable. Use the details from the previous step. //Usage e.g: coin = bc.get_coin("BTC","myusername","mypassword") coin = bc.get_coin("","",",") //Will print "монета" if the coin is gotten successfully , else it will print a string with the error , this is to //make sure the bc.get_coin details are correct print(монета) печать("Coin Stats") печать("Mined so Far: " + coin.get_mined_coins) печать("Subwallets: ") subwallets = coin.get_subwallets //Show all registered subwallets and their balance x = 0 for wallet in subwallets print(x+1+". " + wallet.get_user + " // " + ул.(wallet.get_balance)) x = x + 1 end for
Это все, чем мы делимся сегодня для этого. Серый Хак гид. Это руководство было первоначально создано и написано Adrian M. 2L-236. На случай, если нам не удастся обновить это руководство, вы можете найти последнее обновление, следуя этому связь.