General programming practice
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Shaun Reed 51bf18980b Rename source file in prototype pattern 1 year ago
..
contracts Add blockchain directory for working on related projects 1 year ago
migrations Add blockchain directory for working on related projects 1 year ago
test Add blockchain directory for working on related projects 1 year ago
.gitignore Add blockchain directory for working on related projects 1 year ago
README.md Rename source file in prototype pattern 1 year ago
example.secrets.json Add blockchain directory for working on related projects 1 year ago
package-lock.json Add blockchain directory for working on related projects 1 year ago
package.json Add blockchain directory for working on related projects 1 year ago
truffle-config.js Add blockchain directory for working on related projects 1 year ago

README.md

A template project for getting started working on the Ethereum blockchain. This project comes with basic packages for compiling and deploying Solidity contracts with Truffle.

Run cp example.secrets.json secrets.json and fill out the copied secrets.json with your information.

From this directory, run npm install to install required packages.

From there, we can create any contracts and deploy to development or public networks...

Development Deploy

npx truffle develop
truffle(develop)> migrate

Compiling your contracts...
===========================
> Compiling ./contracts/Migrations.sol
> Artifacts written to /home/kapper/Code/klips/blockchain/eth/truffle-solidity/build/contracts
> Compiled successfully using:
   - solc: 0.8.0+commit.c7dfd78e.Emscripten.clang



Starting migrations...
======================
> Network name:    'develop'
> Network id:      5777
> Block gas limit: 6721975 (0x6691b7)


1_initial_migration.js
======================

   Deploying 'Migrations'
   ----------------------
   > transaction hash:    0xa82aeb7e6e3839f06321edc4b41fdb92e70f87b9a989f846fd465623deda4139
   > Blocks: 0            Seconds: 0
   > contract address:    0xD79FAf957cC8d3d6c7f8fc10875D8aF75e4eE9F1
   > block number:        1
   > block timestamp:     1620058221
   > account:             0xcFE4341F1DFEbdff039642e1A26032755F38ADA5
   > balance:             99.995114
   > gas used:            244300 (0x3ba4c)
   > gas price:           20 gwei
   > value sent:          0 ETH
   > total cost:          0.004886 ETH


   > Saving migration to chain.
   > Saving artifacts
   -------------------------------------
   > Total cost:            0.004886 ETH


Summary
=======
> Total deployments:   1
> Final cost:          0.004886 ETH


- Blocks: 0            Seconds: 0
- Saving migration to chain.

truffle(develop)> .exit

Public Network Deploy

To deploy, you need ETH on a wallet connected to ropsten. Metamask is the wallet I use. I explain how to configure metamask on ropsten on Knoats - Solidity

Give yourself test Ethereum with the Ropsten ETH Faucet

To deploy to ropsten test network, and verify using truffle-verify-plugin -

npx truffle migrate --network ropsten
npx truffle run verify Migrations --network ropsten

For a guide on how I configured this project, see Knoats - Solidity

An example ERC20 token can be found at shaunrd0/karma