Advertisement
CryptoLifestyler

Untitled

Jan 27th, 2020
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.78 KB | None | 0 0
  1. Editing the JSON File
  2.  
  3. Transcript
  4.  
  5. 00:00 Now we are going to use, Sudo nano to access the settings.json file. Type ''sudo nano settings.json''
  6.  
  7. 00:18 Here are the important settings that we are going to edit. First we are going to change the title of the instance. This will be the header title for our explorer. I will name this Vision X Block Explorer
  8.  
  9. 00:44 Then we move down to the coin name. We will name this Vision X.
  10.  
  11. 00:54 Then our coin symbol or ticker. I will name this VSX as we did in our source code renaming.
  12.  
  13. 01:01 After that. You can see we have the locations of 2 image files. One is for a PNG and the other is for the favicon ico. These can both be changed if you want to introduce your logo to the explorer. The easiest way to replace these images. Is to use a client like Bitvize. If you don't you would have to make a repo with the images. And pull them from GitHub to the correct location. Then delete the old images. Making sure you keep the image names and sizes the same. Bitvise is the easiest option though. For this tutorial, I will not be replacing images.
  14.  
  15. 01:43 Next we can see the themes. Currently the theme is set to Slate. There are many themes for you to choose from. My favorite is Darkly. This is the one I will choose. Replace the word Slate with your desired theme.
  16.  
  17. 02:04 Now the next is the port to listen to requests. We are going to leave this on 3001. You may change this if you want.
  18.  
  19. 02:13 Below that are the database settings. These do not need changing.
  20.  
  21. 02:25 We need to change the wallet settings. The username and password must match the configuration file of our QT. Remember I set mine to user and password so it was easy to remember. So under user. I will change the username to user. And the password will be changed to password.
  22.  
  23. 02:51 After that, we can see the port number. This is currently set at 11995. We need to add our RPC port number. If you forget this, it will not work. If you can't remember your RPC port number, you need to look at your source code again. You will find it in the file named chainparamsbase.cpp. I remember I set this one to the same as the default port but with a 1 in front, I will look at the peers to see our default port. This is why it's helpful to have an RPC port number similar to your default port. Or note all ports down somewhere. I can see our default port is 7369. So I know I set the RPC port to 17369.
  24.  
  25. 03:49 Next we have the confirmation. This is set to 40. Our confirmations are 51. Let's change that.
  26.  
  27. 03:57 Under that is the menu settings. These are all the things you want to display on your explorer. Such as; api, markets, richlist and social media platforms. You want to keep api and richlist on true. If your coin is listed on an exchange, you can keep markets to true. And in the markets section below, add the API for your coin. As we don't have markets or social media right now, we will set them to false.
  28.  
  29. 04:33 Now for the important part. In order for our explorer to get a record of our blockchain. It needs to have a base point to work from. This is why we created a transaction at the beginning of this video. We need to get some information about this transaction. And replace the information here. We need the wallet address. We need the block hash and the transaction hash. And we need the block height. Here the block height is called block index.
  30.  
  31. 05:06 So let's go to our QT and get that information. Head to transactions and find the one we sent, at the beginning of this video. Then double click on it to see the transaction information. We need to copy the wallet address.
  32.  
  33. 05:32 Now return to the json file and insert it into the correct place. Head to transactions and find the one we sent, at the beginning of this video. Then double click on it to see the transaction information. We need to copy the wallet address. Now return to the json file and insert it here.
  34.  
  35. 05:40 Now we need the transaction hash. This can be found in the same place. Head back to the previous transaction info box. And copy the transaction ID . Leave the dash three zero's. Those are not needed. Paste it into here.
  36.  
  37. 06:11 Now we need to get the block hash. To find this information, we need to use the debug console. First copy the transaction hash.
  38.  
  39. 06:21 Then head to the debug console. Here we are going to type ''gettransaction''. Leave a space, and then paste in your transaction hash. Hit enter.
  40.  
  41. 06:38 Now you will see all the information relating to that transaction. Scrolling up, we are looking for the block hash. Copy this and return to our json file. Replace the current block hash with our new one.
  42.  
  43. 07:05 Now we need the block index or block height.To get this, Copy the block hash and return to the debug console.Type ''getblock''. Followed by a space. And paste in your block hash. Hit enter. Then find the block height. Our height for this transaction is 480. Copy this. That means our transaction was processed on block 480.
  44.  
  45. 07:43 Replace the info in the json file. Scroll down and we get to the movement settings. This is where the explorer flags any large movements of your coin. You can set this to any amount. For example. If you want everyone to see when a new masternode is getting set up. You can set the high flag for your masternode collateral. In our case it is set to 10,000. So, whenever someone transfers 10,000 to a new wallet address. The explorer will show it in the movement tab. This has it's benefits.
  46.  
  47. 08:24 Under this, we see the social network information. Here you add the links to your Facebook, Twitter etc. We do not have any so we will move on.
  48.  
  49. 08:35 Now we need to add the genesis information. We need the genesis tx and the genesis hash. Let's go back to our debug console. Type ''getblockhash 0''. This will give us the genesis block hash. Copy this and paste it into our settings dot json.
  50.  
  51. 09:07 And now we need our genesis TX. Copy the genesis hash and go back to the console. In the console. Type ''get block''. Followed by a space. And paste in the genesis block hash. Scroll up and you will see the TX. Copy and paste this into the json file.
  52.  
  53. 09:37 Scrolling down further. We can see some setting for the network hash. We can change the units, depending on how many miners will mine your coin. I recommend keeping this at ''G''. With most coins, you should work with Gigahash.
  54.  
  55. 09:55 And finally we have some address labels. Remove the comments and use, if you want to show the wallet address of your pre-mine. Or your charity fund address etc.
  56.  
  57. 10:07 Right. That's all the settings done for our explorer. We need to exit this file and save it. To do that. Hold control plus X. Then Y for yes. Then enter.
  58.  
  59. 10:20 That is the end of this stage. Move on to the next tutorial to start the explorer.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement