1/5
## Vyper Built-in Interfaces This lesson will explore the built-in interfaces provided by the Vyper compiler. The first interface we will look at is the `IERC20` interface. This interface comes built-in with the Vyper compiler. We can import and implement this interface in our contract. ```python from ethereum.erc20 import IERC20 implements: IERC20 ``` In the code above, we import the `IERC20` interface from the `ethereum.erc20` library and then implement the interface. The `implements` keyword in Vyper makes sure our contract will not compile unless it adds all the functions of the `IERC20` interface. The interface ensures our contract will be compatible with the ERC20 standard. Vyper comes with a large number of interfaces that are commonly used on the Ethereum blockchain. We will be exploring these in more detail as the course progresses. We can also make our own interfaces and implement them in our contracts. This can be beneficial when we want to make our own standards. For example, we could make an interface called `my_interface.vyi`. ```python # my_interface.vyi ``` We can then import and implement this interface in our smart contract to ensure our contract follows our custom standard. We are going to create a deployment script so that we can deploy our first token. We will come back to this code later and look at the interfaces in more detail. ```python # deploy.py ```
A comprehensive guide to Vyper built-in interfaces. This lesson delves into the significance of these interfaces in ensuring a robust and secure development process for your contracts, emphasizing their importance in Vyper's compilation logic and token standards implementation.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Python basics
Introduction to Web3.py
Introduction to Titanoboa
Introduction to Moccasin
How to create an ERC-20
How to test Python code and Vyper smart contract
How to deploy Vyper smart contracts on ZKsync using Moccasin
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
On-chain Data Analyst
$59,000 - $139,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on April 21, 2025
Duration: 2h 20min
Duration: 1h 51min
Duration: 58min
Duration: 2h 23min
Duration: 53min
Duration: 2h 24min
Duration: 28min
Duration: 1h 54min
Duration: 11min
Course Overview
About the course
Python basics
Introduction to Web3.py
Introduction to Titanoboa
Introduction to Moccasin
How to create an ERC-20
How to test Python code and Vyper smart contract
How to deploy Vyper smart contracts on ZKsync using Moccasin
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
On-chain Data Analyst
$59,000 - $139,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on April 21, 2025
Testimonials
Read what our students have to say about this course.
Chainlink
Chainlink
Gustavo Gonzalez
Solutions Engineer at OpenZeppelin
Francesco Andreoli
Lead Devrel at Metamask
Albert Hu
DeForm Founding Engineer
Radek
Senior Developer Advocate at Ceramic
Boidushya
WalletConnect
Idris
Developer Relations Engineer at Axelar