0/5
## Recap of the Section We've learned a lot about proxies and the delegate call functionality of EVM smart contracts in this section. We've learned that you can have a contract whose fallback function will always raw call or reach out to another contract, but kind of borrow its functionality for itself. We learned that there's a very specific implementation slot that we need to use if we want to follow the EIP 1967 guidelines. We learned that we made some gaps in our smart contract in order to reach that specific slot. We learned how to upgrade to a new implementation slot. We didn't work with change admin, but this one is pretty self-explanatory. We were able to see with our little deploy script what deploying and upgrading a contract with a proxy looks like. ```python from src import ERC1967, counter_one, counter_two import boa import warnings def deploy(): implementation = counter_one.deploy() proxy = ERC1967.deploy_implementation(implementation.address, boa.env.eoa) with warnings.catch_warnings(): warnings.simplefilter("ignore") proxy_with_abi = counter_one.at(proxy.address) proxy_with_abi.set_number(77) print(proxy_with_abi.number()) print(implementation.number()) print(proxy_with_abi.version()) # Let's upgrade! implementation_two = counter_two.deploy() proxy.upgrade_to(implementation_two.address) with warnings.catch_warnings(): warnings.simplefilter("ignore") proxy_with_abi = counter_two.at(proxy.address) print(proxy_with_abi.number()) proxy_with_abi.decrement() print(proxy_with_abi.number()) print(proxy_with_abi.version()) def moccasin_main(): deploy() ```
A comprehensive recap of everything we've learned about EVM Proxies. This lesson reviews the concept of using a fallback function for a contract to delegate functionality to another contract, explores how a single contract address can be used while changing the logic underneath, and highlights how to perform upgrades and deploy scripts.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
How to build a DeFi stablecoin and customized NFT
How to deploy your smart contract on ZKsync with Moccasin
Advanced testing techniques like stateful and stateless Python fuzzing
How to write algorithmic trading scripts in Python
Hashing signatures, proxies, delegate calls, upgradable contracts, random numbers, and more!
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 21min
Duration: 1h 58min
Duration: 2h 55min
Duration: 1h 55min
Duration: 46min
Course Overview
About the course
How to build a DeFi stablecoin and customized NFT
How to deploy your smart contract on ZKsync with Moccasin
Advanced testing techniques like stateful and stateless Python fuzzing
How to write algorithmic trading scripts in Python
Hashing signatures, proxies, delegate calls, upgradable contracts, random numbers, and more!
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