1

I have a ganache-core server running at port 18545 (part of an npm app) How can I attach to it and see the transactions/blocks in that. I tried running ganache GUI and setting port number as 18545 in settings. But it doesn't show any transactions when actions are performed in the npm app

1

How can I attach to it and see the transactions/blocks in that

Before running your contract, make sure that you have made required changes in the truffle-config.js file.

networks: {
    development: {
     host: "127.0.0.1",     // Localhost (default: none)
     port: 7545,            // Standard Ethereum port (default: none)
     network_id: "5777",       // Any network (default: none)
    },

You can find the network id in the ganache settings. Make sure to add it to your js file.

Then run truffle migrate in the command prompt from the folder where you have saved your contract. Default port no. is 7545 for ganache-GUI and 8545 for ganache-CLI. After following all the above steps, if you are using ganache-GUI then on the top you can look at 4 things accounts, blocks, GasLimit, transactions, and logs.there you just have to click on Transactions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.