Skip to content

LensPlaysGames/idek_wats_a_dapp_or_web3

Repository files navigation

Lensr’s first very simple web3 dApp

Just a little dApp where digital goods might be exchanged via the Ethereum blockchain. Fetches active account from current web3 provider, and allows to create products of any non-zero price with any name, and purchasing of those products from any other account as many times as wanted. This is ideal for digital goods, for example.

Originated from the Truffle “Pet Shop” Tutorial (forked starter kit from an article about that tutorial at dappuniversity.com).

./screenshot1.png

Building

Dependencies:

With a working directory of the root of this repository, run the following commands.

This will install all of the required dependencies not listed above.

npm install

This will compile the smart contracts.

npx truffle compile

This will migrate the smart contracts, so that they are ready to be deployed to a blockchain.

npx truffle migrate

NOTE: Further migrations should probably be done with --reset flag.

Running it Locally

Dependencies:

Follow the steps to setup a default Ganache workspace (press the quickstart button when you launch the application). After that, add it as a custom network to MetaMask using the RPC URL from Ganache. Don’t forget to import at least two accounts from Ganache (by copying private key) into MetaMask; there needs to be at least one seller and one buyer.

With the imported MetaMask accounts connected to the custom local blockchain hosted within Ganache, all that’s left is to start the website so we can actually interact with it.

npm run start

That should open up your browser to your locally hosted version of the dApp!

Running Tests

npx truffle test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks