Starting unbox...
=================
✔ Preparing to download box
✔ Downloading
✔ Cleaning up temporary files
✔ Setting up box
Unbox successful, sweet!
Commands:
Compile: truffle compile
Migrate: truffle migrate
Test contracts: truffle test
Test dapp: cd client && npm test
Run dev server: cd client && npm run start
Build for production: cd client && npm run build
Then you can seed regtest using either qtum-cli or Janus
note that fromhexaddress requires dropping the hex prefix 0x
Qtum block rewards need to be at least 2000 blocks old to be used
# Get base58 address from hexdockerexecqtumd_regtest \qtum-cli \-rpcuser=qtum \-rpcpassword=testpasswd \fromhexaddress63c4953002B935C3CA925af419DFCE86C057AB95> qSeuYqETzKqcVn3seaTRQ1U8jcaR1QHYQj# Seed regtest with Qtumdockerexecqtumd_regtest \qtum-cli \-rpcuser=qtum \-rpcpassword=testpasswd \generatetoaddress2005qSeuYqETzKqcVn3seaTRQ1U8jcaR1QHYQj# Or do it in one commanddockerexecqtumd_regtest \qtum-cli \-rpcuser=qtum \-rpcpassword=testpasswd \generatetoaddress2005`\dockerexecqtumd_regtest \qtum-cli \-rpcuser=qtum \-rpcpassword=testpasswd \fromhexaddress63c4953002B935C3CA925af419DFCE86C057AB95`
Or you can use dev_generatetoaddress Janus RPC call to do this
note that generating this many blocks will cause Janus to timeout waiting for a response from Qtum, but Qtum will still generate the blocks
Now that your local regtest environment has Qtum we can deploy code with truffle
trufflemigrate--networkregtestCompilingyourcontracts...===========================✔Fetchingsolcversionlistfromsolc-bin.Attempt#1> Everything is up to date, there is nothing to compile.Startingmigrations...======================> Network name: 'regtest'> Network id: 8890> Block gas limit: 40000000 (0x2625a00)1_initial_migration.js======================Deploying'Migrations'---------------------->transactionhash:0x867d80074f084e27ae2828dea3bd6384d18d4dd3e8a20bafefa1578dff38a726>Blocks:0Seconds:0>contractaddress:0x676BC04885F727b393b7d8788E54f0BC47888b0c>blocknumber:2008>blocktimestamp:1657302875>account:0x63c4953002B935C3CA925af419DFCE86C057AB95>balance:40099999.836968>gasused:130690 (0x1fe82)>gasprice:400gwei>valuesent:2.690858ETH>totalcost:2.743134ETH>Savingmigrationtochain.>Savingartifacts------------------------------------->Totalcost:2.743134ETH2_deploy_contracts.js=====================Deploying'SimpleStorage'------------------------->transactionhash:0x7e3fa9e99d9954820bf2f12f4335b5dbf19a1bab409a096de61e526225ca60d2>Blocks:0Seconds:0>contractaddress:0xa9052BAfE2d784990F8a99ED69dcB11c147B084C>blocknumber:2010>blocktimestamp:1657302877>account:0x63c4953002B935C3CA925af419DFCE86C057AB95>balance:40099999.779758>gasused:90527 (0x1619f)>gasprice:400gwei>valuesent:2.690442ETH>totalcost:2.7266528ETH>Savingmigrationtochain.>Savingartifacts------------------------------------->Totalcost:2.7266528ETHSummary=======> Total deployments: 2> Final cost: 5.4697868 ETH