Skip to content

Tags: vyperlang/vyper

Tags

v0.4.1b3

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat[venom]: add venom parser (#4381)

this commit adds a frontend (parser) for venom. it uses the lark
library to define a grammar for venom, and constructs an `IRContext`
which can be used to emit bytecode.

the entry point to the venom compiler is `vyper/cli/venom_main.py`.

possible improvements in the future include:
- make data section optional in the grammar
- make the entry block optional in the grammar (a la llvm)
- add asm and opcodes output formats

---------

Co-authored-by: Harry Kalogirou <harkal@nlogn.eu>
Co-authored-by: Charles Cooper <cooper.charles.m@gmail.com>

v0.4.1b2

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat[lang]: add `module.__at__()` to cast to interface (#4090)

add `module.__at__`, a new `MemberFunctionT`, which allows the user to
cast addresses to a module's interface.

additionally, fix a bug where interfaces defined inline could not
be exported. this is simultaneously fixed as a related bug because
previously, interfaces could come up in export analysis as `InterfaceT`
or `TYPE_T` depending on their provenance. this commit fixes the bug by
making them `TYPE_T` in both imported and inlined provenance.

this also allows `module.__interface__` to be used in export position
by adding it to `ModuleT`'s members. note this has an unwanted side
effect of allowing `module.__interface__` in call position; in other
words, `module.__interface__(<address>)` has the same behavior as
`module.__at__(<address>)` when use as an expression. this can be
addressed in a later refactor.

refactor:
- wrap interfaces in `TYPE_T`
- streamline an `isinstance(t, (VyperType, TYPE_T))` check. TYPE_T` now
  inherits from `VyperType`, so it doesn't need to be listed separately

---------

Co-authored-by: cyberthirst <cyberthirst.eth@gmail.com>

v0.4.1b1

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix[ci]: fix commithash calculation for pypi release (#4309)

there is a mismatch between the commit hash in the binary of the github
release vs the pypi release. for example,
```bash
~ $ vyper --version  # pipx install vyper==0.4.0
0.4.0+commit.e9db8d9
```
```bash
~ $ .vvm/vyper-0.4.0 --version
0.4.0+commit.e9db8d9f
```

this is due to how git computes the shorthash. when checkout is run for
release-pypi.yml, it doesn't fetch the full commit history, and so there
are fewer commits, so `git rev-parse --short HEAD` returns a smaller
fingerprint for the commit hash.

this commit amends the pypi release checkout step so that it matches the
github release workflow.

it also adds a debug step to the relevant workflows so that we can debug
the commit hash during the github action.

v0.4.0

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat[docs]: v0.4.0 release (#4152)

add release notes for v0.4.0 release
slight update to wording of front matter

v0.4.0rc6

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix[venom]: fix list of volatile instructions (#4065)

`create` and `create2` are volatile instructions that were missing. the
other ones were already handled by the case for `output is None` in
`removed_unused_variables`.

misc:
- rename `volatile` to `is_volatile` for uniformity
- use `is_bb_terminator` instead of `in BB_TERMINATORS`

---------

Co-authored-by: Harry Kalogirou <harkal@nlogn.eu>

v0.4.0rc5

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat[tool]!: make cancun the default evm version (#4029)

update tests and change defaults so that cancun is the default evm version

v0.4.0rc4

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore[test]: add macos to test matrix (#4025)

- Expanded the matrix to include macos and windows tests
- Refactor the matrix and removed unnecessary lines
- Remove now-redundant windows job

Note that all because of the way github creates matrix jobs, default
values must be in the top-level matrix definition. The includes section
should contain alternative runs - these will not have all default values
defined, therefore reading from the matrix requires passing default
values again.

v0.4.0rc3

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix[venom]: fix eval of `exp` in sccp (#4009)

fix `exp` evaluation in sccp. the current implementation is incorrect,
which was found by enabling the `venom + -opt-none` pipeline in the CI.
`evm_pow` is correct, as it preserves the correct edge cases when
base/exponent are 0 or 1 (all combinations).

this commit also enables the `venom + -opt-none` and
`venom + -opt-codesize` jobs in the CI, ensuring higher coverage of the
venom pipeline going forward.

v0.4.0rc2

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat[lang]: export interfaces (#3919)

this commit allows exporting of `module.<interface>`, and also adds
`module.__interface__` which gives the interface type of the module.
in particular, this makes it easier for users to export all functions
from a module, since they do not need to list out every single function
manually.

note that since `module.__interface__` is actually an interface type, it
can theoretically be used in type expressions, e.g.,
```vyper
    x: module.__interface__ = module.__interface__(msg.sender)
```

however, it doesn't work yet as some additional work is required to
properly thread the type into the type analysis system
(see related: GH #3943).

this commit includes the restriction that only `implement`ed interfaces
can be exported, this makes the most sense from a UX / user intuition
perspective.

---------

Co-authored-by: cyberthirst <cyberthirst.eth@gmail.com>

v0.4.0rc1

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat[lang]!: add feature flag for decimals (#3930)

hide decimals behind a feature flag. this informally lets us "break the
compatibility contract" with users by moving decimals into
quasi-experimental status; this way we can iterate on the decimals
design faster in the 0.4.x series instead of needing to wait for
breaking releases to make changes.