0.1.0 (Unreleased)
Important
The aggregating pull request used to implement the subsequent changes is #207.
- Authentication
ownable: Makeownablemodule-friendly. (#218)ownable_2step: Makeownable_2stepmodule-friendly. (#219)access_control: Makeaccess_controlmodule-friendly. (#216)
- Extensions
- Governance
timelock_controller: Maketimelock_controllermodule-friendly. (#220)
- Tokens
- Utility Functions
base64: Makebase64module-friendly. (#222)batch_distributor: Makebatch_distributormodule-friendly. (#223)create_address: Makecreate_addressmodule-friendly. (#224)create2_address: Makecreate2_addressmodule-friendly. (#225)ecdsa: Makeecdsamodule-friendly. (#227)p256: Add NIST P-256 (a.k.a. secp256r1) ECDSA verification function. (#243)message_hash_utils: Move theecdsamessage hash methods to a separatemessage_hash_utilslibrary module. (#227)signature_checker: Makesignature_checkermodule-friendly. (#228)eip712_domain_separator: Makeeip712_domain_separatormodule-friendly. (#229)math: Makemathmodule-friendly. (#230)merkle_proof_verification: Makemerkle_proof_verificationmodule-friendly. (#231)multicall: Makemulticallmodule-friendly. (#232)
- 🐍Vyper Contract Deployer
VyperDeployer: Improve error message in the event of a 🐍Vyper compilation error. (#219)
- Tokens
- Utility Functions
- The file names of 🐍 snekmate module and mock contracts use the snake case notation (e.g.
my_module.vyormy_module_mock.vy), whilst the 🐍Vyper interface files.vyiuse the Pascal case notation prefixed withI(e.g.IMyInterface.vyi). (#242) - The mathematical utility functions
_log_2,_log_10, and_log_256are renamed to_log2,_log10, and_log256. (#242) - All 🐍 snekmate contracts now target the new 🐍Vyper default EVM version
cancun(#245). If you intend to deploy on an EVM chain with nocancunsupport, you must compile — using theshanghaiEVM version as an example — the main contract that uses the 🐍 snekmate module contracts with the--evm-version shanghaioption; e.g.vyper --evm-version shanghai src/snekmate/tokens/mocks/erc20_mock.vy, or add the# pragma evm-version shanghaidirective to the main contract that uses the 🐍 snekmate module contracts:
# pragma version ~=0.4.0
# pragma evm-version shanghai
...0.0.5 (07-03-2024)
- Governance
TimelockController: A multi-role-based timelock controller reference implementation. (#195)
- Utility Functions
Math: Refactor theis_negativefunction into a propersignfunction that returns the indication of the sign of a 32-byte signed integer. (#187)Math: Rename the recently addedsignfunction tosignumto avoid any ambiguity with cryptographic signing utility functions. (#188)Math: Optimise the zero point threshold inwad_exp. (#189)
- Implement
snekmate-namespaced distribution package building for TestPyPI and PyPI. (#204) - Implement
srclayout to enable an enhanced localpip install git+https://github.com/pcaversaccio/snekmate.git@<branch>building. (#206)
0.0.4 (13-10-2023)
- Utility Functions
0.0.3 (12-10-2023)
- Extensions
- Tokens
- Utility Functions
- 🐍Vyper Contract Deployer
VyperDeployer: If you want to leverage 🐍 snekmate'sVyperDeployercontract for your own testing, ensure that you compile the 🐍Vyper contracts with the same EVM version as configured in yourfoundry.tomlfile. TheVyperDeployercontract offers two overloadeddeployContractfunctions that allow the configuration of the target EVM version. Please note that since 🐍Vyper version0.3.8the default EVM version is set toshanghai. (#161)
- Utility Functions
MerkleProofVerificationTest: Add an additional test for a possiblemulti_proof_verifyinvariant violation. (#137)
- 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.8is set toshanghai(i.e. the EVM includes thePUSH0instruction). If you intend to deploy on an EVM chain with noPUSH0support, you must compile the 🐍 snekmate contracts with the--evm-version parisoption; e.g.vyper --evm-version paris utils/Math.vy, or add the# pragma evm-version parisdirective 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 optimizedirective 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).
0.0.2 (07-06-2023)
- General
- All 🐍 snekmate contracts now contain an Ethereum Natural Language Specification Format (NatSpec)
customfield@custom:contract-name. The underlying rationale is that the block explorers plan to use@custom:contract-nameas contract name and@titleas fallback. (#124)
- All 🐍 snekmate contracts now contain an Ethereum Natural Language Specification Format (NatSpec)
- Extensions
- Tokens
- Utility Functions
EIP712DomainSeparator: Implement additionally the interfaceIERC5267. (#129)Math: Addwad_lnandwad_expto the standard mathematical utility functions. (#91)
- General
- All 🐍 snekmate contracts are now guaranteed to compile with the 🐍Vyper CLI flags
userdocanddevdoc, and, if using the Ape framework, withape compile. (#126)
- All 🐍 snekmate contracts are now guaranteed to compile with the 🐍Vyper CLI flags
- Extensions
- Tokens
- Utility Functions
Base64: Use the shift operators>>and<<introduced in 🐍Vyper0.3.8instead of theshiftinstruction. (#127)ECDSA: Use the shift operators>>and<<introduced in 🐍Vyper0.3.8instead of theshiftinstruction. (#127)SignatureChecker: Use the shift operators>>and<<introduced in 🐍Vyper0.3.8instead of theshiftinstruction. (#127)Math:- Use directly 🐍 snekmate's
log_2function in the internal calculation ofwad_cbrt. (#91) - Use the shift operators
>>and<<introduced in 🐍Vyper0.3.8instead of theshiftinstruction. (#127) - Use of the ternary operator introduced in 🐍Vyper
0.3.8in the functionceil_divinstead of anif-elsestatement. (#128)
- Use directly 🐍 snekmate's
- All 🐍 snekmate contracts now target the 🐍Vyper version
0.3.9. 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.8is set toshanghai(i.e. the EVM includes thePUSH0instruction). If you intend to deploy on an EVM chain with noPUSH0support, you must compile the 🐍 snekmate contracts with the--evm-version parisoption; e.g.vyper --evm-version paris utils/Math.vy. (#122)
0.0.1 (06-03-2023)
- Authentication
Ownable: Owner-based access control functions.Ownable2Step: 2-step ownership transfer functions.AccessControl: Multi-role-based access control functions.
- Extensions
- Tokens
- Utility Functions
Base64: Base64 encoding and decoding functions. (#47)BatchDistributor: Batch sending both native and ERC-20 tokens.CreateAddress:CREATEEVM opcode utility function for address calculation.Create2Address:CREATE2EVM opcode utility functions for address calculations.ECDSA: Elliptic curve digital signature algorithm (ECDSA) functions.SignatureChecker: ECDSA and EIP-1271 signature verification functions.EIP712DomainSeparator: EIP-712 domain separator.Math: Standard mathematical utility functions. (#74, #77, #86)MerkleProofVerification: Merkle tree proof verification functions. (#30)Multicall: Multicall functions.