ethereumbook
ethereumbook copied to clipboard
Metamask was not detected!
Hi there. I was trying to make Auction Dapp from chapter 12. When I run the application I got an error like this: "Metamask was not detected!" (Even though installed metamask.)
In the backend section: scripts:
truffle compile
truffle deploy --network ropsten
result:
Starting migrations...
======================
> Network name: 'develop'
> Network id: 5777
> Block gas limit: 6721975 (0x6691b7)
1_initial_migration.js
======================
Replacing 'Migrations'
----------------------
> transaction hash: 0x9c4449b50257bf5aa69d7e3d0c9ee8017a296d4c38affc9441e30f32a4dd8366
> Blocks: 0 Seconds: 0
> contract address: 0xB3dC0ee3855B39DFc89A15ddf1a5ef3c56789bD3
> block number: 6
> block timestamp: 1622892865
> account: 0x38264D8C539Ee9B9Afb675Db6b714B8797ED513D
> balance: 99.990917914
> gas used: 225225 (0x36fc9)
> gas price: 2 gwei
> value sent: 0 ETH
> total cost: 0.00045045 ETH
> Saving migration to chain.
> Saving artifacts
-------------------------------------
> Total cost: 0.00045045 ETH
2_deploy_contracts.js
=====================
Replacing 'AuctionRepository'
-----------------------------
> transaction hash: 0x15f252555050cdacc46906c3f296236760a3f66981278f6e6656f12a4c3f74d7
> Blocks: 0 Seconds: 0
> contract address: 0xF7773e8C6249f034Eb617F5b8f30cC5Dfc0b86aE
> block number: 8
> block timestamp: 1622892865
> account: 0x38264D8C539Ee9B9Afb675Db6b714B8797ED513D
> balance: 99.986473612
> gas used: 2179788 (0x2142cc)
> gas price: 2 gwei
> value sent: 0 ETH
> total cost: 0.004359576 ETH
Replacing 'DeedRepository'
--------------------------
> transaction hash: 0x2c950af3274e88059e3e6dffe43de6c052deb89b63a6fc3a2fb39a2cf326f1f1
> Blocks: 0 Seconds: 0
> contract address: 0xb388dB0D91617BcD50A7909d41f790Ad09F569cb
> block number: 9
> block timestamp: 1622892866
> account: 0x38264D8C539Ee9B9Afb675Db6b714B8797ED513D
> balance: 99.982791454
> gas used: 1841079 (0x1c17b7)
> gas price: 2 gwei
> value sent: 0 ETH
> total cost: 0.003682158 ETH
> Saving migration to chain.
> Saving artifacts
-------------------------------------
> Total cost: 0.008041734 ETH
Summary
=======
> Total deployments: 3
> Final cost: 0.008492184 ETH
In frontend section: ethereumbook/code/auction_dapp/frontend/src/config.js
var DeedRepository = require('./contracts/DeedRepository')
var AuctionRepository = require('./contracts/AuctionRepository')
module.exports = {
JSONRPC_ENDPOINT: 'http://52.59.238.144:8545',
JSONRPC_WS_ENDPOINT: 'ws://52.59.238.144:8546', //'ws://52.59.238.144:8546',
BZZ_ENDPOINT: 'http://52.59.238.144:8500',
SHH_ENDPOINT: 'ws://52.59.238.144:8546',
DEEDREPOSITORY_ADDRESS: '0xb388dB0D91617BcD50A7909d41f790Ad09F569cb',
AUCTIONREPOSITORY_ADDRESS: '0xF7773e8C6249f034Eb617F5b8f30cC5Dfc0b86aE',
DEEDREPOSITORY_ABI: DeedRepository.abi,
AUCTIONREPOSITORY_ABI: AuctionRepository.abi,
GAS_AMOUNT: 500000,
//whisper settings
WHISPER_SHARED_KEY: '0x8bda3abeb454847b515fa9b404cede50b1cc63cfdeddd4999d074284b4c21e15'
}
// web3.eth.sendTransaction({from: web3.eth.accounts[0], to: "0x6f0023D1CFe5A7A56F96e61E0169B775Ac97f90E" , value: web3.utils.toWei(1, 'ether'), gasLimit: 21000, gasPrice: 20000000000})
I installed all npm dependencies. ethereumbook/code/auction_dapp/frontend/src
npm run dev
I have the same issue
$ npm -v
6.4.1
$ node -v
v8.15.1
See https://github.com/ethereumbook/ethereumbook/issues/1123