Deploy Hash of the document/file on Ethereum blockchain and let anyone or only authorized signers(address) to sign the hash of the document thus completing document signature process.
Project live at: https://decentralmind.github.io/signthedoc
Contract Deployment address:-
From now on only solidity files and it's helper javascript files will be updated. React code will not be updated. I want to solely focus on solidity now. Solidity code is fine and will be updated on regular basis. I'll soon deploy it on Main Ethereum Network.
git clone https://github.com/decentralMind/sign-the-doc
Go inside project directory where package.json is included and install the packages.
cd sign-the-doc/client
npm install
npm install -g @truffle/hdwallet-provider
npm install -g chai
npm install -g chai-bn
npm install -g semver
npm install -g dotenv
- MetaMask(https://metamask.io/)
- Official Installation tutorial video(https://www.youtube.com/watch?v=ZIGUC9JAAw8)
Ganache is a personal Ethereum blockchain which you can use to run tests, execute commands, and inspect state while controlling how the chain operates.
There are two versions available(Desktop and Command line version).
You can choose one of the version below.
- Desktop version:-
- Download and install Desktop version.
- Open Ganache desktop client.
- Click setting icon at the top right corner.
- Click Sever and choose port: 8545.
- Click ACCOUNTS & KEYS.
- Enter the same 12 word seed phrase used on MetaMask.
- Command Line Version:-
- Download and install Command Line version.
- Run follow command with same 12 word seed phrase used on MetaMask.
ganache-cli -m "same 12 word seed phrase used on Metamask"
This step is not necessary if you are deploying at local Ganache client, jump to step 9 below for local deployment.
However if you are planning to deploy to live tesnet without downloading whole chain and running your own node, use Infura.
Infura Setup instruction:-
(This instruction is for https://infura.io/).
- Register and Setup INFURA HERE.
- Click Create New Project after successful registration process.
- Name it SignTheDoc('or any name').
- Click VIEW PROJECT.
- Choose Ropsten from ENDPOINT Dropdown.
- Copy the ENDPOINT Link.
Skip this step for local Ganache deployment, jump to step 9.
Dotenv is a zero-dependency module that loads environment variables from a .env file into process.env. Storing configuration in the environment separate from code is based on The Twelve-Factor App methodology. (https://github.com/motdotla/dotenv)
- Create .env file on project root folder.
- Inside .env file create variable SEED12 without var/let/const and assign same 12 word seed phrase used on Metamask example: SEED12 = "Your 12 word seed from MetaMask".
- Inside .evv create variable name ROPSTEN(or any test network) without var/let/const and assign it with Infura ENDPOINT Link.(If you don't have a link follow above step 6.) example: ROPSTEN = "ROPSTEN infura endpoint"
Skip this step for local Ganache deployment, jump to step 9.
I've commented out kovan and rinkeby network. However, you can initialize the kovan and rinkeby network following similar above step 7 procedure.
- Local Ganache deployment
cd sign-the-doc
truffle compile && truffle migrate
- Ropsten deployment
cd sign-the-doc
truffle compile && truffle migrate --network ropsten
Go into root project directory and run test.
cd sign-the-doc
truffle test
If everything is alright, all test should pass.
Go into root project directory.
cd sign-the-doc
cd client
npm start
Visit localhost:3000 on your browser. App should be running.
creator: decentralMind@gmail.com