Interacting with smart contracts

Just as we did before, you can use the Truffle console to interact with your smart contract, as follows:

$ truffle console

Your smart contract is always given the name Contract. We can access the smart contract using the following statement:


You will get a long output in which you can see abi, bytecode, and so on, as shown in the following screenshot:

Let’s look at the value of the name variable of the smart contract using the following statement:

truffle(development)>"0x3E9417399786347B6Ab38f59d3f00829d6bba7b8").then(function(instance) ...

Get Hands-On Blockchain for Python Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.