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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.