How Blockchain Transactions Work: From Initiation to Immutable Confirmation (Part 2)

Mix IDE Once the contract is written and simulated in the Remix IDE using Ganache, the next step is to use Truffle to initialize a new project and deploy and test it on the PrivateNet (ID 786), already created in earlier sections: 1.

The first step is to create a separate directory for the project: ~$ mkdir ideapatent ~$ cd ideapatent/ 2.

From Initiation to Immutable Confirmation (Part 2)

The next step is to initialize Truffle and create a new project: ~/ideapatent$ truffle init truffle init Downloading…

Commands: Compile: truffle compile Migrate: truffle migrate Test contracts: truffle test It will create a structure as shown here: ├── contracts │ └── Migrations.sol ├── migrations │ └── 1_initial_migration.js ├── test ├── truffle-config.js └── truffle.js 3.

Under the contracts folder, create a file named PatentIdea.sol and put the source code in the file shown earlier.

This is our private network 786 created earlier: module.exports = { networks: { development: { host: ‘localhost’, port: 8545, network_id: 786 5.

Under the ~/ideapatent/migrations folder, create the 2_deploy_contracts.js file so that it looks like the following: 2_deploy_contracts.js var PatentContract = artifacts.require(“PatentIdea”); module.exports = function(deployer) { deployer.deploy(PatentContract); }; 6.

Next, run the compilation using Truffle, as shown here: truffle compile Compiling ./contracts/PatentIdea.sol…

Why This Matters for Blockchain Technology

Ensure that mining is running in the background and deploy to the network, as shown here: $ truffle migrate Using network ‘development’.

Running migration: 1_initial_migration.js Deploying Migrations…

Running migration: 2_deploy_contracts.js Deploying PatentIdea…

Once the contract is deployed, it can be interacted with using the truffle console.

Key Points to Remember

  • Ganache showing all transactions issued via the Remix IDE Once the contract is written and simulated in the Remix IDE using Ganache, the next step is to use Truffle to initialize a new project and deploy and test it on the PrivateNet (ID 786), already created in earlier sections: 1.
  • The first step is to create a separate directory for the project: ~$ mkdir ideapatent ~$ cd ideapatent/ 2.
  • The next step is to initialize Truffle and create a new project: ~/ideapatent$ truffle init truffle init Downloading…
  • Commands: Compile: truffle compile Migrate: truffle migrate Test contracts: truffle test It will create a structure as shown here: ├── contracts │ └── Migrations.sol ├── migrations │ └── 1_initial_migration.js ├── test ├── truffle-config.js └── truffle.js 3.

Going Deeper: Advanced Concepts

Start the truffle console by issuing the following command: $ truffle console 9.

Once the console is up and running, functions from the deployed contract can be called as shown here.

For example, to register a new idea, type the following commands on the geth console: >PatentIdea.deployed().then(function(instance){app = instance}) truffle(development)> PatentIdea.deployed().then(function(instance){app = instance}) undefined >truffle(development)> app.SaveIdeaHash(“hello1”) This will show the output similar to the following:

Conclusion

Ganache showing all transactions issued via the Re 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.