Skip to content

AbirHamzi/dapp-k8s

 
 

Repository files navigation

Hello Pocteo Dapp

Build a Hello-world decentralized application, or Dapp, on the Ethereum Network.

Dependencies

Install these prerequisites to follow along with the tutorial.

Step 1. Clone the project

$ git clone https://github.com/pocteo/dapp-k8s.git

Step 2. Start Ganache

Start a local blockchain instance:

$ ganache-cli

If you have already a wallet you can start ganache using your mnemonic like this :

$ ganache-cli -m 'your-mnemonic'

It makes the next step which is metamask configuration much more easy.

Step 3. Configure Metamask

  1. Unlock Metamask :

Unlock-metamask

  1. Connect metamask to your local Etherum blockchain provided by Ganache by switching to https://localhost:8545 :

ganache

  1. Import an account provided by ganache :

If you started ganache with ganache-clicommand, each time you start ganache you need to import the private key in metamask to connect to one of 10 accounts that ganache instance gives you. This is why it's recommended to start ganache with your mnemonic .

Step 4. Compile & Deploy Hello-Pocteo Smart Contract

Contracts Deployment in ethereum network is done through an ethereum transaction. Ethereum transaction must have sender and reciever. The sender of the transaction is known as the owner of the contract . This is why we should configure Truffle framework to use our private key in creating an Ethereum transaction to deploy the smart contract.

To do that, you only have to create a file named secret in the root of the project and put your mnemonic inside it.

Fees will be automatically taken from the wallet that truffle is configured to use.

$ cd dapp-k8s
$ truffle compile 
$ truffle migrate development

After contract migration we need the contract abi and address so that we can interact with it . This why you need to change abi and address values in utils.js file. Every time you restart ganache you need to repeat the whole process.

Step 5. Run the Front End Application

Just open index.htmlfile with your browser .

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 81.6%
  • Solidity 9.3%
  • HTML 9.1%