21 min read
While this guide demonstrates deployment on the Ethereum Sepolia testnet, the smart contract code is compatible with any EVM-based blockchain. Feel free to adapt the deployment process for other networks like Base, Optimism, Avalanche, and more. See all the chains QuickNode supports here.
Please note that the code presented in this guide is intended for educational purposes and as a starting point for development. It has not been thoroughly tested for production use. If you're interested in the Solidity version, check out this guide.
Overview
ApeWorX, or simply "ape", is a powerful and flexible development framework for smart contract development on EVM-compatible blockchains. In this guide, we'll create and deploy an ERC4626-compliant staking vault smart contract written in Vyper and test it using the ApeWorX framework.
Let's get started!
What You Will Need
- Basic knowledge of smart contracts and Python
- Python 3.9 or later
- ApeWorX/eth-ape installed
- A code editor (e.g., VSCode)
- An QuickNode Ethereum Sepolia endpoint (create one here)
- An Ethereum wallet with ETH on the Sepolia network (you can use the QuickNode Faucet to get some test ETH)
Dependency | Version |
---|---|
Python | ^3.9.2 |
pip | 24.2 |
eth-ape | 0.8.10 |
What You Will Do
- Learn about ApeWorX/ape
- Create and deploy an ERC-20 token using Ape
- Create and deploy an ERC-4626 staking vault contract to stake an ERC-20 token
- Test depositing and withdrawing shares on the staking vault smart contract
What is Ape (ApeWorX)
Ape is a Python-based development framework and smart contract tool suite for the Ethereum ecosystem. It provides a comprehensive set of tools for writing, testing, and deploying smart contracts. Ape supports multiple languages for smart contract development, including Solidity and Vyper. This guide will focus on creating smart contracts with Vyper, a contract-oriented, pythonic programming language that targets the Ethereum Virtual Machine (EVM). Vyper is designed to be more secure and easier to audit than Solidity, making it an excellent choice for new developers.