Simple Auction Ethereum dApp with Remix, ganache-cli

in #dapp6 years ago (edited)

This is a part of dApp lecture which is given by Siraj Raval and you can watch at youtube: (it's paid lecture. :-(

What is ganache?

Fast Ethereum RPC client for testing and development
http://truffleframework.com/ganache

Install and run ganache

$ npm install -g ganache-cli
$ ganache-cli

Ganache CLI v6.1.0 (ganache-core: 2.1.0)

Available Accounts
==================
(0) 0x344c68f803328cef5e7f171ed6d9ed81b71f9112
(1) 0x835e033801179c4a70be34f875a470da7c3697a9
(2) 0x75e3ac8d19c0537160813036247165f4de1b97ee
(3) 0x4a5a1e90c97b74c24d48f8b2c9088be8c8913c2f
(4) 0xbabbdcdfe8625dbac9b36a396a61743c970cef85
(5) 0xa375f5a2bbe1de4363941747175d9ca7d57547b9
(6) 0x98ede1efb769fa9f4c2d018d8c4861cd44070ab8
(7) 0xefe28e5219dd8dd87e4f5082971e86f679ebc871
(8) 0xdb168d983d2837342eaec304e5b64dca546e3a44
(9) 0xd20c6d97d41acf3a21e5b3d14269a90c57ff947d

Private Keys
==================
(0) 6b3bdd80180d01575d34c437d6563f1594ab5d1eb8a2ccd943b1ac2a5c3403e2
(1) 38786d57a9c76b4804b73f12348ea736a5207f01dd446f5bbd6e1ed85e3ac02c
(2) 563a1c557390ca44c25f2a1f8c151d317986074118476f824dc98fdaf73b5d14
(3) a2eb24333b6270730b5176b0e741581c128ea0304330daa6a44ca91f9d9ebeb5
(4) a60350ba2a961f24561b6e3f8344bd68dd638847452299b63b495f98471ed66c
(5) 7de03b1f5eda58f169b88c406ca66acc1987d22e5e1311b2fea63aa3dfb55e88
(6) 74c87b26d5292c15e4b86667520bda12a11e072885dae22a35214126e640f065
(7) bc4cc7d1c0003b7b7f71083fa8f71c4a202c94cb40da9734ebcbe34465fb4c6e
(8) a223948431da8d830316a6c345b04d3517867edf207838a680651901de177e72
(9) 32b7d3bdede7c6a371b71cbf65cfc6f8c517c20cef42c958a15dae2d0e819f8e

HD Wallet
==================
Mnemonic:      kitten foster twice poverty claw dish love know trash alarm essay check
Base HD Path:  m/44'/60'/0'/0/{account_index}

Listening on localhost:8545 

Connect Remix with ganache

Remix > Run > Web3 Provider >
Screen Shot 2018-03-25 at 9.24.47 AM.jpg

Screen Shot 2018-03-25 at 9.30.35 AM.jpg

In case of error "Make sure the provider is running and a connection is open (via IPC or RPC)"

It can be resolved by changing https to http
http://remix.ethereum.org/#optimize=false&version=builtin

Now it will show some logs:

net_listening
eth_getBlockByNumber
eth_accounts
net_version
eth_accounts
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
eth_getBalance
net_version
net_version
eth_getBlockByNumber
eth_getBalance
eth_getBalance

Running the dApp on the browser

Screen Shot 2018-03-25 at 10.08.07 AM.jpg

It’s working…

Actually, I added 2 js files to make it work. You can find them at https://github.com/san-lee-ai/simple_auction

Keep it up dApp!

Sort:  

Congratulations @sansteem! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

Upvote this notification to help all Steemit users. Learn why here!

Coin Marketplace

STEEM 0.19
TRX 0.14
JST 0.030
BTC 63569.77
ETH 3424.28
USDT 1.00
SBD 2.50