- Install MSYS2 from Official Webisite
- Follow the instructions in the Official Webisite to update the packages
- Start MSYS2 with MinGW-w64
- Install required softwares via run
pacman -S git make mingw-w64-x86_64-gcc mingw-w64-x86_64-go
- Run
git clone https://github.com/vechain/thor.git
- Run
make dep
- Run
make clean
- Run
make all
libotony/thor:v1.8.0-beta.2
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
import { HDNode } from 'thor-devkit' | |
const words = 'denial kitchen pet squirrel other broom bar gas better priority spoil cross' | |
const hdNode = HDNode.fromMnemonic(words.split(' ')) | |
for (let i = 0; i < 10; i++){ | |
const priv = hdNode.derive(i).privateKey | |
console.log('0x'+ priv?.toString('hex')) | |
} |
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
// npm i @vechain/connex-framework @vechain/connex-driver thor-devkit | |
const { Framework } = require('@vechain/connex-framework') | |
const { Driver, SimpleNet, SimpleWallet } = require('@vechain/connex-driver') | |
const { abi } = require('thor-devkit') | |
const energy = '0x0000000000000000000000000000456e65726779' | |
const energyABI = [{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"su |
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
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
"" close; | |
} | |
upstream BACKEND { | |
server 127.0.0.1:8669; | |
keepalive 64; | |
} |
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
{ | |
"launchTime": 1617091200, | |
"gasLimit": 10000000, | |
"extraData": "193 TestNet", | |
"accounts": [ | |
{ | |
"address": "0xa477d5b50daf4c673308da10eecfc817eb9f5f21", | |
"balance": "50000000000000000000000000000", | |
"energy": "1000000000000000000000000000" | |
}, |
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
const originPriv = Buffer.from('c962bfd916c0f8d4c1866b11a24802815cf58ba981354fad0ac734d0217cfe73', 'hex') | |
const txOrigin = cry.publicKeyToAddress(cry.secp256k1.derivePublicKey(originPriv)) | |
const delegatorPriv = Buffer.from('dce1443bd2ef0c2631adc1c67e5c93f13dc23a41c18b536effbbdcbcdb96fb65', 'hex') | |
const delegator = cry.publicKeyToAddress(cry.secp256k1.derivePublicKey(delegatorPriv)) | |
const tx = new Transaction({ | |
chainTag: 0x27, | |
blockRef: '0x002b99c540c4e267', | |
expiration: 30 * 8640, // Expires after 30 days |
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 -o /dev/null -s -w "namelookup: %{time_namelookup}s\nconnect: %{time_connect}s\nappconnect: %{time_appconnect}s\npretransfer: %{time_pretransfer}s\nredirect: %{time_redirect}s\nstarttransfer: %{time_starttransfer}s\n-------------------------\ntotal: %{time_total}s\n" --resolve "explore.vechain.org:443:164.90.187.219" https://explore.vechain.org/blocks/0x00634e680262af793cdab1b5a520282336f9eefb7f4a7b2d73f60fc02a2de1c5/ |
- Create a file
solidity@4.rb
- Run
brew install ./solidity@4.rb
If you would like to find other versions of solidity
, go to the homebrew-ethereum, find the version you need to install, replace the version
and sha256
in the file, then install.
- At least one
MasterNode
- At least one
Rich Account
- At least two public nodes that can connect each other
Executor
Can be an address orExecutor Contract
(Vote contract among steering committee)
Here we change genesis/testnet.go
, this will allow us to build a network with peer to peer network. Furthermore you can change genesis/devnet.go
to run a dev-net in solo mode, this allows you to do test locally.
NewerOlder