🐍 snekmate v0.0.3
🫡 Summary
🐻Bear markets are made for building and you know what, the 🐍sneeek is shipping today 🔥! You might have heard that Vyper shipped version 0.3.10
eight days ago. But you might not know that the latest Vyper version is a heavily performance-oriented version that, among other things, generates selector tables that now offer O(1) performance 🤯 (see PR #3496). And so that you can take advantage of the latest improvements, I ship 🐍 snekmate version 0.0.3
today targeting the latest Vyper version!
Important: The default EVM version since Vyper version 0.3.8
is set to shanghai
(i.e. the EVM includes the PUSH0
instruction).
👇 Below you find the detailed code changes and the full CHANGELOG
. Don't stop. Push harder. Keep going.
💥 New Features
♻️ Refactoring
- Extensions
- Tokens
- Utility Functions
- Vyper Contract Deployer
VyperDeployer
: If you want to leverage 🐍 snekmate'sVyperDeployer
contract for your own testing, ensure that you compile the Vyper contracts with the same EVM version as configured in yourfoundry.toml
file. TheVyperDeployer
contract offers two overloadeddeployContract
functions that allow the configuration of the target EVM version. Please note that since Vyper version0.3.8
the default EVM version is set toshanghai
. (#161)
🥢 Test Coverage
- Utility Functions
MerkleProofVerificationTest
: Add an additional test for a possiblemulti_proof_verify
invariant violation. (#137)
❗️ Breaking Change
- All 🐍 snekmate contracts now target the Vyper version
0.3.10
(#164). It is strongly recommended to upgrade accordingly your local Vyper version prior to using the 🐍 snekmate contracts. Important: The default EVM version since Vyper version0.3.8
is set toshanghai
(i.e. the EVM includes thePUSH0
instruction). If you intend to deploy on an EVM chain with noPUSH0
support, you must compile the 🐍 snekmate contracts with the--evm-version paris
option; e.g.vyper --evm-version paris utils/Math.vy
, or add the# pragma evm-version paris
directive to the 🐍 snekmate contracts:
# pragma version ^0.3.10
# pragma evm-version paris
# pragma optimize gas
"""
@title Modern and Gas-Efficient ERC-20 + EIP-2612 Implementation
...
"""
# @dev We import and implement the `ERC20` interface,
# which is a built-in interface of the Vyper compiler.
from vyper.interfaces import ERC20
implements: ERC20
...
The
# pragma optimize
directive has also been added in Vyper version0.3.10
(see PR #3493). Please refer to here to learn more about the different optionsnone
,codesize
, andgas
(default).
🙏🏽 New Contributors
- @El-Ku made his first contribution via #154.
- @ControlCplusControlV made his first contribution via #160.
- @zobront made his first contribution via #161.