I first started GUI version of Ganache. Then I run the following commands to try pet-shop
. http://localhost:3002/ is then opened in my browser, When I click "Adopt" for a dog, I see no transactions in Ganache. Does anybody know whether there is something wrong?
bash> truffle unbox pet-shop
Downloading...
Unpacking...
Setting up...
Unbox successful. Sweet!
Commands:
Compile: truffle compile
Migrate: truffle migrate
Test contracts: truffle test
Run dev server: npm run dev
bash> truffle compile
Compiling ./contracts/Migrations.sol...
Compilation warnings encountered:
/private/var/folders/r7/bvmh1vvx41d63snvgbdz7bl40000gr/T/tmp.RJe3ehbB6u/contracts/Migrations.sol:11:3: Warning: No visibility specified. Defaulting to "public".
function Migrations() {
^ (Relevant source part starts here and spans across multiple lines).
,/private/var/folders/r7/bvmh1vvx41d63snvgbdz7bl40000gr/T/tmp.RJe3ehbB6u/contracts/Migrations.sol:15:3: Warning: No visibility specified. Defaulting to "public".
function setCompleted(uint completed) restricted {
^ (Relevant source part starts here and spans across multiple lines).
,/private/var/folders/r7/bvmh1vvx41d63snvgbdz7bl40000gr/T/tmp.RJe3ehbB6u/contracts/Migrations.sol:19:3: Warning: No visibility specified. Defaulting to "public".
function upgrade(address new_address) restricted {
^ (Relevant source part starts here and spans across multiple lines).
Writing artifacts to ./build/contracts
bash> truffle migrate
Using network 'development'.
Network up to date.
bash> truffle test
Using network 'development'.
0 passing (1ms)
bash> npm run dev
> pet-shop@1.0.0 dev /private/var/folders/r7/bvmh1vvx41d63snvgbdz7bl40000gr/T/tmp.RJe3ehbB6u
> lite-server
** browser-sync config **
{ injectChanges: false,
files: [ './**/*.{html,htm,css,js}' ],
watchOptions: { ignored: 'node_modules' },
server:
{ baseDir: [ './src', './build/contracts' ],
middleware: [ [Function], [Function] ] } }
[Browsersync] Access URLs:
--------------------------------------
Local: http://localhost:3002
External: http://10.10.200.116:3002
--------------------------------------
UI: http://localhost:3003
UI External: http://10.10.200.116:3003
--------------------------------------
[Browsersync] Serving files from: ./src
[Browsersync] Serving files from: ./build/contracts
[Browsersync] Watching files...
18.04.10 08:15:00 200 GET /index.html
18.04.10 08:15:00 200 GET /css/bootstrap.min.css
18.04.10 08:15:00 200 GET /js/bootstrap.min.js
18.04.10 08:15:00 200 GET /js/web3.min.js
18.04.10 08:15:00 200 GET /js/truffle-contract.js
18.04.10 08:15:00 200 GET /js/app.js
18.04.10 08:15:01 200 GET /pets.json
18.04.10 08:15:01 200 GET /images/scottish-terrier.jpeg
18.04.10 08:15:01 200 GET /images/french-bulldog.jpeg
18.04.10 08:15:01 200 GET /images/boxer.jpeg
18.04.10 08:15:01 200 GET /images/golden-retriever.jpeg
18.04.10 08:15:01 404 GET /favicon.ico