This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* RPC: https://rpc.tomochain.com mainnet, https://testnet.tomochain.com testnet | |
* chainId: 88 mainnet, 89 testnet | |
*/ | |
const Web3 = require('web3') | |
const rpc = 'https://testnet.tomochain.com' | |
const chainId = 89 | |
const pkey = 'YOUR_PKEY' // token holder pkey |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* RPC: https://rpc.tomochain.com mainnet, https://rpc.testnet.tomochain.com testnet | |
* chainId: 88 mainnet, 89 testnet | |
*/ | |
const Web3 = require('web3') | |
const rpc = 'https://rpc.testnet.tomochain.com' | |
const chainId = 89 | |
const pkey = 'YOUR_PKEY' // token holder pkey |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* RPC: https://rpc.tomochain.com mainnet, https://testnet.tomochain.com testnet | |
* chainId: 88 mainnet, 89 testnet | |
* Owner address: balance at least 50000 TOMO | |
* Coinbase is node address. You can create a empty wallet with https://wallet.testnet.tomochain.com | |
*/ | |
const rpc = 'https://testnet.tomochain.com' | |
chainId = 89 | |
const pkey = '[OWNER_PKEY]' // include 0x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -sSL https://get.docker.com/ | sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# get tomochain container id | |
container_id=$(docker ps -q -f "name=tomochain") | |
cur_date=$(date +%Y-%m-%d) | |
# remove all peers | |
echo "\n----------------Save logs to /tmn/tomochain-${cur_date}.log----------------\n" | |
docker logs $container_id &> /tmp/tomochain-${cur_date}.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# get tomochain container id | |
container_id=$(docker ps -q -f "name=tomochain") | |
# remove all peers | |
echo "\n------------------------\n!! Removing all peers\n------------------------\n" | |
docker exec -t $container_id tomo attach data/tomo.ipc --exec "for (i = 0; i < admin.peers.length; i++) { admin.removePeer(admin.peers[i].id) }" | |
# add TomoChain peers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# get tomochain container id | |
container_id=$(docker ps -q -f "name=tomochain") | |
# remove first peer | |
echo "\n------------------------\n!! Removing all peers\n------------------------\n" | |
docker exec -t $container_id tomo attach data/tomo.ipc --exec "for (i = 0; i < admin.peers.length; i++) { admin.removePeer(admin.peers[i].id) }" | |
# restart node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"config": { | |
"chainId": 89, | |
"homesteadBlock": 1, | |
"eip150Block": 2, | |
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", | |
"eip155Block": 3, | |
"eip158Block": 3, | |
"byzantiumBlock": 4, | |
"clique": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x7B5F70cd5311B3039BA0b83e8B54B6dEf943Fb7E |