1/5
## Deployment of First Vyper Smart Contract In this lesson, we'll be deploying our first Vyper smart contract. We'll be using `remix.ethereum.org` (aka the Remix IDE) to build our code base here. You should follow along coding with us, and even try to do some coding yourself as we go on here. Remember, both on Cyfrin Updraft and on YouTube, you can change the speed of the video so that it matches your pace. ### Smart Contract Code The smart contract code we will be deploying is: ```python # I'm a comment! # SPDX-License-Identifier: MIT # @version ^0.4.0 my_favorite_number: uint256 struct Person: favorite_number: uint256 name: String[100] # Static Array/List list_of_people: public Person[5] list_of_people_index: uint256 name_to_favorite_number: HashMap[String[100], uint256] @external def store(favorite_number: uint256): self.my_favorite_number = favorite_number @external @view def retrieve() -> uint256: return self.my_favorite_number @external def add_person(name: String[100], favorite_number: uint256): new_person: Person = Person(favorite_number, name) self.list_of_people[self.list_of_people_index] = new_person self.list_of_people_index += 1 self.name_to_favorite_number[name] = favorite_number ``` ### Deploying the Smart Contract 1. **Paste the code:** Open Remix IDE and create a new file. Paste the code from the code block above into the new file. 2. **Compile:** Click the "Compile" button to compile the code. 3. **Deploy:** Click the "Deploy" button to deploy the contract to the blockchain. We're excited for you to complete your first smart contract deployment! Remember to check the [Remix Favorites CU GitHub repository](https://github.com/Cyfrin/remix-favorites-cu) for the code and additional resources.
A practical guide to deploying your first Vyper smart contract - This lesson will walk you through deploying your first Vyper smart contract using the Remix IDE. It covers the basics of the Remix IDE and how to deploy your contract, as well as best practices for building smart contracts.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
The basics of blockchain transactions, how to send and receive money on a blockchain network.
How to write Python based smart contracts using Vyper.
How to read and understand Vyper smart contracts.
Vyper data structures, arrays, structs, hash maps.
How to build a smart contract application and deploy on ZKsync with 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)
Web3 engineer, educator, and Cyfrin co-founder. Patrick's smart contract development and security courses have helped hundreds of thousands of engineers kickstarting their careers into web3.
Last updated on March 21, 2025
Duration: 2h 08min
Duration: 2h 32min
Duration: 24min
Course Overview
About the course
The basics of blockchain transactions, how to send and receive money on a blockchain network.
How to write Python based smart contracts using Vyper.
How to read and understand Vyper smart contracts.
Vyper data structures, arrays, structs, hash maps.
How to build a smart contract application and deploy on ZKsync with 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)
Web3 engineer, educator, and Cyfrin co-founder. Patrick's smart contract development and security courses have helped hundreds of thousands of engineers kickstarting their careers into web3.
Last updated on March 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