Skip to content

Latest commit

 

History

History
255 lines (195 loc) · 25.6 KB

CHANGELOG.md

File metadata and controls

255 lines (195 loc) · 25.6 KB

🕓 Changelog

0.1.1 (Unreleased)

♻️ Refactoring

🥢 Test Coverage

  • Tokens
    • erc20: Use native halmos createCalldata cheat code. (#273)
    • erc721: Use native halmos createCalldata cheat code. (#273)
    • erc1155: Use native halmos createCalldata cheat code. (#273)

👀 Full Changelog

0.1.0 (26-06-2024)

Important

The aggregating pull request used to implement the subsequent changes is #207.

💥 New Features

🥢 Test Coverage

  • Tokens
    • erc20:
      • Add echidna-based erc20 property tests. (#239)
      • Add halmos-based erc20 symbolic tests. (#240)
    • erc721:
      • Add echidna-based erc721 property tests. (#239)
      • Add halmos-based erc721 symbolic tests. (#240)
    • erc1155: Add halmos-based erc1155 symbolic tests. (#240)
  • Utility Functions
    • math: Add halmos-based math symbolic tests. (#240)

❗️ Breaking Changes

  • The file names of 🐍 snekmate module and mock contracts use the snake case notation (e.g. my_module.vy or my_module_mock.vy), whilst the 🐍Vyper interface files .vyi use the Pascal case notation prefixed with I (e.g. IMyInterface.vyi). (#242)
  • The mathematical utility functions _log_2, _log_10, and _log_256 are 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 no cancun support, you must compile — using the shanghai EVM version as an example — the main contract that uses the 🐍 snekmate module contracts with the --evm-version shanghai option; e.g. vyper --evm-version shanghai src/snekmate/tokens/mocks/erc20_mock.vy, or add the # pragma evm-version shanghai directive to the main contract that uses the 🐍 snekmate module contracts:
# pragma version ~=0.4.0
# pragma evm-version shanghai

...

👀 Full Changelog

0.0.5 (07-03-2024)

💥 New Features

♻️ Refactoring

  • Utility Functions
    • Math: Refactor the is_negative function into a proper sign function that returns the indication of the sign of a 32-byte signed integer. (#187)
    • Math: Rename the recently added sign function to signum to avoid any ambiguity with cryptographic signing utility functions. (#188)
    • Math: Optimise the zero point threshold in wad_exp. (#189)

🔖 Release Management

  • Implement snekmate-namespaced distribution package building for TestPyPI and PyPI. (#204)
  • Implement src layout to enable an enhanced local pip install git+https://github.com/pcaversaccio/snekmate.git@<branch> building. (#206)

👀 Full Changelog

0.0.4 (13-10-2023)

🔒 Security Fixes

  • Utility Functions
    • Multicall: Remove the multicall_value_self function as the msg.value should not be trusted. (#167)

👀 Full Changelog

0.0.3 (12-10-2023)

💥 New Features

♻️ Refactoring

  • Extensions
    • ERC4626:
      • Remove the non-standard increase_allowance and decrease_allowance functions. (#160)
      • Optimise the method used to factor powers of two out of the denominator in _mul_div. (#162)
  • Tokens
    • ERC20:
      • Optimise the set_minter function to save one SLOAD. (#154)
      • Remove the non-standard increase_allowance and decrease_allowance functions. (#160)
    • ERC721: Optimise the set_minter function to save one SLOAD. (#154)
    • ERC1155: Optimise the set_minter function to save one SLOAD. (#154)
  • Utility Functions
    • Math: Optimise the method used to factor powers of two out of the denominator in mul_div. (#153)
  • 🐍Vyper Contract Deployer
    • VyperDeployer: If you want to leverage 🐍 snekmate's VyperDeployer contract for your own testing, ensure that you compile the 🐍Vyper contracts with the same EVM version as configured in your foundry.toml file. The VyperDeployer contract offers two overloaded deployContract functions that allow the configuration of the target EVM version. Please note that since 🐍Vyper version 0.3.8 the default EVM version is set to shanghai. (#161)

🥢 Test Coverage

❗️ 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 version 0.3.8 is set to shanghai (i.e. the EVM includes the PUSH0 instruction). If you intend to deploy on an EVM chain with no PUSH0 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 version 0.3.10 (see PR #3493). Please refer to here to learn more about the different options none, codesize, and gas (default).

👀 Full Changelog

0.0.2 (07-06-2023)

💥 New Features

  • General
    • All 🐍 snekmate contracts now contain an Ethereum Natural Language Specification Format (NatSpec) custom field @custom:contract-name. The underlying rationale is that the block explorers plan to use @custom:contract-name as contract name and @title as fallback. (#124)
  • Extensions
  • Tokens
  • Utility Functions

♻️ Refactoring

  • General
    • All 🐍 snekmate contracts are now guaranteed to compile with the 🐍Vyper CLI flags userdoc and devdoc, and, if using the Ape framework, with ape compile. (#126)
  • Extensions
    • ERC4626:
      • Add implements interface ERC20Detailed and ERC4626. (#125)
      • Use of the ternary operator introduced in 🐍Vyper 0.3.8 in the constructor for the immutable variable assignment of _UNDERLYING_DECIMALS instead of an if-else statement. (#128)
  • Tokens
    • ERC20: Add implements interface ERC20Detailed. (#125)
    • ERC721: Add implements interface IERC721Metadata. (#125)
  • Utility Functions
    • Base64: Use the shift operators >> and << introduced in 🐍Vyper 0.3.8 instead of the shift instruction. (#127)
    • ECDSA: Use the shift operators >> and << introduced in 🐍Vyper 0.3.8 instead of the shift instruction. (#127)
    • SignatureChecker: Use the shift operators >> and << introduced in 🐍Vyper 0.3.8 instead of the shift instruction. (#127)
    • Math:
      • Use directly 🐍 snekmate's log_2 function in the internal calculation of wad_cbrt. (#91)
      • Use the shift operators >> and << introduced in 🐍Vyper 0.3.8 instead of the shift instruction. (#127)
      • Use of the ternary operator introduced in 🐍Vyper 0.3.8 in the function ceil_div instead of an if-else statement. (#128)

❗️ Breaking Change

  • 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 version 0.3.8 is set to shanghai (i.e. the EVM includes the PUSH0 instruction). If you intend to deploy on an EVM chain with no PUSH0 support, you must compile the 🐍 snekmate contracts with the --evm-version paris option; e.g. vyper --evm-version paris utils/Math.vy. (#122)

👀 Full Changelog

0.0.1 (06-03-2023)

💥 New Features

  • Authentication
  • Extensions
    • ERC4626: Modern and gas-efficient ERC-4626 tokenised vault implementation. (#74)
  • Tokens
    • ERC20: Modern and gas-efficient ERC-20 + EIP-2612 implementation. (#17)
    • ERC721: Modern and gas-efficient ERC-721 + EIP-4494 implementation. (#20)
    • ERC1155: Modern and gas-efficient ERC-1155 implementation. (#31)
  • Utility Functions