Change This To The Following:: A Complete Guide to Understanding This Blockchain Concept

// fallback – use your fallback strategy (local node / hosted node + in-dapp id mgmt / fail) window.web3 = new Web3(new Web3.providers.HttpProvider(“http://127.0.0.1:7545”)); 5.

Now we can test using the truffle test command as shown here: $ truffle test Using network ‘development’.

A Complete Guide to Understanding This Blockchain Concept

TestMetacoin testInitialBalanceUsingDeployedContract (164ms) testInitialBalanceWithNewMetaCoin (73ms) Contract: MetaCoin should put 10000 MetaCoin in the first account should call a function that depends on a linked library (248ms) should send coin correctly (185ms) 5 passing (1s) 6.

Once testing is completed we can migrate to the blockchain using the following command.

Migration will use the settings available in truffle.js that we edited in step 2 to point to the port where Ganache is running.

This is achieved by issuing the command: $ truffle migrate The output is shown below.

Notice that when migration runs it will reflect on Ganache; balance of accounts will go down and you can also view transactions that have been executed.

Also notice that the account shown in the screenshot corresponds with what is shown in Ganache: Truffle migration Also, notice that the migration shown in the preceding screenshot is reflected in Ganache with the accounts shown previously.

Why This Matters for Blockchain Technology

In Ganache, the list of accounts is displayed. screenshot:

Key Points to Remember

  • Change this to the following: // fallback – use your fallback strategy (local node / hosted node + in-dapp id mgmt / fail) window.web3 = new Web3(new Web3.providers.HttpProvider(“http://127.0.0.1:7545”)); 5.
  • Now we can test using the truffle test command as shown here: $ truffle test Using network ‘development’.
  • TestMetacoin testInitialBalanceUsingDeployedContract (164ms) testInitialBalanceWithNewMetaCoin (73ms) Contract: MetaCoin should put 10000 MetaCoin in the first account should call a function that depends on a linked library (248ms) should send coin correctly (185ms) 5 passing (1s) 6.
  • Once testing is completed we can migrate to the blockchain using the following command.

Conclusion

Change this to the following represents one of the many innovative layers that make blockchain technology so powerful and transformative. As distributed systems continue to evolve, a solid understanding of these core concepts becomes increasingly valuable — not just for developers, but for anyone building, investing in, or working alongside blockchain-powered systems.

Whether you are just starting your blockchain journey or deepening existing expertise, mastering these fundamentals gives you the tools to think clearly about decentralized systems and make smarter decisions in this rapidly evolving space.