Interacting with other smart contracts

Did you know that your smart contract doesn't have to be lonely out there? Your smart contract can interact with other smart contracts on the blockchain.

The address data type is not only used for normal accounts, but it can also be used for smart contract accounts. So, a smart contract can donate ethers to our donatee via the donation smart contract!

Restart your Ganache; we will start our blockchain anew. Remember your hello.vy Vyper file? We want to deploy our Hello smart contract with a custom name.

Our migration file, migrations/2_deploy_hello.js, is still the same, as shown in the following code:

var Hello = artifacts.require("Hello");module.exports = function(deployer) { deployer.deploy(Hello); ...

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.