Skip to content

Releases: cakevm/huff-neo

v1.1.1

02 Feb 11:57

Choose a tag to compare

  • Update dependencies to the latest version.

v1.1.0

02 Feb 10:06
b2a1d9d

Choose a tag to compare

  • Support for constants in code tables.
  • Use correct code line for error messages in code tables for built-ins.
  • Switch to Foundry's print function for trace logs.
  • Allow using --target-address to specify the contract address during a test.
  • Disable base fee check for tests.
  • Allow uneven bytes for code tables e.g. 0x1 is valid and results in 0x01 bytecode.
  • Introduce new lexer token type Bytes, as not all hex should be parsed to bytes32.
    • For constants in code tables, the bytes are copied as defined with e.g. leading zeros.
    • For all other cases, leading zeros are removed and the smallest push operation is used.
  • New built-in function __LEFTPAD to a pad a hex input or a function result in a code table to the left in 32 bytes.
    • The function can only be used in a code table.
    • Example: __LEFTPAD(0x123) -> 0000000000000000000000000000000000000000000000000000000000000123
  • Allow to pass a constant as a parameter to __RIGHTPAD or __LEFTPAD.
    • Example: __RIGHTPAD([CONST])
  • Allow to use built-in functions in constant assignment.
    • Example: #define constant FUNC_TEST = __FUNC_SIG("test(uint256)")
    • This solves the issue to define functions with the same name but different arguments.

v1.0.8

29 Jan 18:00

Choose a tag to compare

  • Support built-in function calls in code table (#define table) body.
    • Supported are __BYTES, __FUNC_SIG, and __RIGHTPAD.

v1.0.7

29 Jan 11:58
2b71e97

Choose a tag to compare

  • Add built-in macros for converting a string to bytes and push it to the stack.
    • __BYTES("hello") -> PUSH5 0x68656c6c6f
    • This can also be used here: __RIGHTPAD(__BYTES("hello")).

v1.0.6

28 Jan 21:16

Choose a tag to compare

  • Allow to use --debug for reverting contracts.
  • Refactored parsing for ABI and build-in argument.
    • This is the first step to push more steps into the lexing phase.
  • Extend parsing to allow __FUNC_SIG inside of __RIGHTPAD.
    • Example: __RIGHTPAD(__FUNC_SIG('transfer(address,uint256)')).

v1.0.5

27 Jan 16:28
4c0bfd3

Choose a tag to compare

  • Use foundry's debugger for --debug flag.

v1.0.4

27 Jan 14:19

Choose a tag to compare

  • Rewrite the Huff test module to use anvil and forge features from foundry to fork the mainnet.
    • This is experimental, and there will be some breaking changes.
  • Allow printing logs with -vvv and call traces for tests with -vvvv.
  • Add forge EVM feature flags for testing.
    • Known issues: The CLI reports more features than are actually available.
  • Breaking: Remove the Huff cheat code for logging.
    • The foundry console.log should now be used.
  • Breaking: Remove logs from the test JSON output for now.
  • Fix error reporting for invalid literals during lexing in the test command.
  • Add Cancun as an EVM version and make it the default.
  • Breaking: The -f flag for formatting the output is now replaced with the fork URL. Please use --format instead.
  • Tokio is now used for the test runner to be able to use the db backend from foundry.

v1.0.3

12 Jan 10:53

Choose a tag to compare

  • Remove huff-examples submodule
  • Fix invalid error mapping for import with unmatched jump labels
  • Print unmatched jump labels

v1.0.2

11 Jan 15:54

Choose a tag to compare

  • Use latest stable Rust version 1.84
  • Report error for invalid hex literals 0x0x
  • Improve lexer performance by 1-2% by removing unnecessary cloning
  • Allow to use same name for test and macro or fn

v1.0.1

10 Jan 16:15

Choose a tag to compare

  • Validate that a constant hex literal is not longer than 32 bytes
  • New flatten source algo to determine spans
  • Fix all errors related to invalid source code mapping
  • Limit label duplicate check to containing macro and file