diff --git a/.github/workflows/trunk_check.yml b/.github/workflows/trunk_check.yml index c5bea96e..0f1d9484 100644 --- a/.github/workflows/trunk_check.yml +++ b/.github/workflows/trunk_check.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - run: rustup update - name: Rust cache diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index cc3251be..6a82e2cb 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -2,18 +2,18 @@ # To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml version: 0.1 cli: - version: 1.22.7 + version: 1.22.8 # Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins) plugins: sources: - id: trunk - ref: v1.6.4 + ref: v1.6.6 uri: https://github.com/trunk-io/plugins # Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes) runtimes: enabled: - go@1.21.0 - - node@18.12.1 + - node@18.20.5 - python@3.10.8 downloads: - name: rust @@ -61,28 +61,28 @@ lint: read_output_from: stdout run_linter_from: workspace enabled: - - cspell@8.15.4 + - cspell@8.17.1 - dotenv-linter@3.3.0 - - actionlint@1.7.3 + - actionlint@1.7.4 - black@24.10.0 - cairo@SYSTEM - - rustfmt@2024-10-31 - - clippy@2024-10-31 - - checkov@3.2.269 + - rustfmt@1.65.0 + - clippy@1.65.0 + - checkov@3.2.342 - git-diff-check - - hadolint@2.12.0 + - hadolint@2.12.1-beta - isort@5.13.2 - - markdownlint@0.42.0 - - osv-scanner@1.9.0 - - oxipng@9.1.2 - - prettier@3.3.3 - - ruff@0.7.1 + - markdownlint@0.43.0 + - osv-scanner@1.9.2 + - oxipng@9.1.3 + - prettier@3.4.2 + - ruff@0.8.3 - shellcheck@0.10.0 - shfmt@3.6.0 - solidity@SYSTEM - taplo@0.9.3 - - trivy@0.56.2 - - trufflehog@3.82.13 + - trivy@0.58.0 + - trufflehog@3.87.2 - yamllint@1.35.1 actions: diff --git a/cairo/ethereum/cancun/fork_types.cairo b/cairo/ethereum/cancun/fork_types.cairo index 5ae20770..2249b8c5 100644 --- a/cairo/ethereum/cancun/fork_types.cairo +++ b/cairo/ethereum/cancun/fork_types.cairo @@ -1,10 +1,25 @@ from starkware.cairo.common.alloc import alloc from ethereum_types.bytes import Bytes20, Bytes256, Bytes, BytesStruct -from ethereum_types.numeric import Uint, U256, U256Struct +from ethereum_types.numeric import Uint, U256, U256Struct, bool from ethereum.crypto.hash import Hash32 using Address = Bytes20; + +struct SetAddressDictAccess { + key: Address, + prev_value: bool, + new_value: bool, +} + +struct SetAddressStruct { + dict_ptr_start: SetAddressDictAccess*, + dict_ptr: SetAddressDictAccess*, +} + +struct SetAddress { + value: SetAddressStruct*, +} using Root = Hash32; using VersionedHash = Hash32; diff --git a/cairo/tests/test_serde.py b/cairo/tests/test_serde.py index 17dd290b..70daecbc 100644 --- a/cairo/tests/test_serde.py +++ b/cairo/tests/test_serde.py @@ -168,6 +168,7 @@ def test_type( Tuple[Mapping[Bytes, Bytes], ...], Set[Uint], Mapping[Address, Account], + Set[Address], ], ): assume(no_empty_sequence(b)) diff --git a/cairo/tests/utils/args_gen.py b/cairo/tests/utils/args_gen.py index fdd065a2..76878eed 100644 --- a/cairo/tests/utils/args_gen.py +++ b/cairo/tests/utils/args_gen.py @@ -129,6 +129,7 @@ ("ethereum", "cancun", "blocks", "TupleLog"): Tuple[Log, ...], ("ethereum", "cancun", "blocks", "Receipt"): Receipt, ("ethereum", "cancun", "fork_types", "Address"): Address, + ("ethereum", "cancun", "fork_types", "SetAddress"): Set[Address], ("ethereum", "cancun", "fork_types", "Root"): Root, ("ethereum", "cancun", "fork_types", "Account"): Account, ("ethereum", "cancun", "fork_types", "Bloom"): Bloom,