kovrichard / cephalocoin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cephalocoin

1. Description

Cephalocoin is a project to show how easy it is to create a cryptocurrency that complies with popular standards but does something completely unexpected.

Cephalocoin will look different almost each time you look at it, just like most of the cephalopods do, hence the name.

2. Development

2.1 Requirements

2.2 Environment

The development environment is inside the container. Edit the files outside, then build and deploy them with the help of the Makefile. Testing is also possible with it.

Build the container first then start it:

make cbuild
make start

2.3 Useful commands

On Windows, use nmake instead of make.

Check out the Makefile for the most used commands.

2.3.1 Deploying the contract

Compile first, then deploy to the local blockchain:

make compile
make deploy

2.3.2 Testing the contract

make test

2.3.3 Get addresses from the Truffle console:

let addresses = await web3.eth.getAccounts()

or use the command make addresses

2.4 Connecting to the local blockchain with Metamask

Add a network to Metamask:

  • Network name: Local blockchain
  • New RPC URL: http://127.0.0.1:8545
    • If it says that another network already uses this ID, simply delete the network
    • The colliding network will probably be the predefined Localhost 8545, which you will just create yourself
  • Chain ID: 1337 (could be different for you)
  • Currency Symbol: ETH
  • Block Explorer URL: leave blank

Import one of the addresses generated by ganache

  • It Metamask, click your profile picture
  • Click Import Account
  • Paste the corresponding private key from keys.json

3. Files

3.1 keys.json

It contains the private keys of the test addresses that ganache generated

3.2 cephalocoin-abi.json

It contains the ABI of cephalocoin. Use it with web3 or ethers, when you want to access the contract's functions.

4. License

The content is licensed under MIT.

About

License:MIT License


Languages

Language:Solidity 58.7%Language:JavaScript 37.4%Language:Makefile 3.1%Language:Dockerfile 0.8%