CVE-2023-46232 (Rust, published 2023-10-25T22:15Z)
Description: value: era-compiler-vyper is the EraVM Vyper compiler for zkSync Era, a layer 2 rollup that uses zero-knowledge proofs to scale Ethereum. Prior to era-compiler-vype version 1.3.10, a bug prevented the initialization of the first immutable variable for Vyper contracts meeting certain criteria. The problem arises when there is a String or Array with more 256-bit words allocated than initialized. It results in the second word’s index unset, that is effectively set to 0, so the first immutable value with the actual 0 index is overwritten in the ImmutableSimulator. Version 1.3.10 fixes this issue by setting all indexes in advance. The problem will go away, but it will get more expensive if the user allocates a lot of uninitialized space, e.g. `String[4096]`. Upgrading and redeploying affected contracts is the only way of working around the issue.

Severity: nan (CVSS v3 base score: 5.3)
Weakness: NVD-CWE-noinfo \u2014 Insufficient Information
There is insufficient information about the issue to classify it; details are unkown or unspecified.
Repository: https://github.com/matter-labs/era-compiler-vyper
Files changed:
CHANGELOG.md
Cargo.lock
Cargo.toml
README.md
src/build/contract.rs
src/project/contract/llvm_ir.rs
src/project/contract/vyper/expression/instruction/assert.rs
src/project/contract/vyper/expression/instruction/clamp.rs
src/project/contract/vyper/expression/instruction/create.rs
src/project/contract/vyper/expression/instruction/exit_to.rs
src/project/contract/vyper/expression/instruction/goto.rs
src/project/contract/vyper/expression/instruction/if.rs
src/project/contract/vyper/expression/instruction/immutable.rs
src/project/contract/vyper/expression/instruction/label.rs
src/project/contract/vyper/expression/instruction/mod.rs
src/project/contract/vyper/expression/instruction/offset.rs
src/project/contract/vyper/expression/instruction/repeat.rs
src/project/contract/vyper/expression/instruction/return.rs
src/project/contract/vyper/expression/instruction/revert.rs
src/project/contract/vyper/expression/instruction/seq.rs
src/project/contract/vyper/expression/instruction/set.rs
src/project/contract/vyper/expression/instruction/with.rs
src/project/contract/vyper/expression/mod.rs
src/project/contract/vyper/function.rs
src/project/contract/vyper/mod.rs
src/project/contract/zkasm.rs
src/project/mod.rs
src/tests/mod.rs
src/vyper/mod.rs
src/zkvyper/arguments.rs
src/zkvyper/main.rs
Commit message: Release v1.3.10


Vulnerable code:
- The vyper v1.3.9 support
version = "1.0.2"
checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41"
version = "1.0.72"
checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854"
version = "2.3.3"
checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42"
version = "0.20.4"
checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848"
version = "1.4.0"
checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
version = "1.0.79"
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
version = "1.3.1"
source = "git+https://github.com/matter-labs/era-compiler-common?branch=main#a6c5b02e4f149f82f1c3821a6f258363308abd2a"
source = "git+https://github.com/matter-labs/era-compiler-llvm-context?branch=main#7d20d1323787ff50fb043cb4f798b3d9a9369ae8"
version = "1.3.9"
version = "0.9.4"
checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747"
version = "1.8.1"
checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
version = "0.3.1"
checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
version = "0.11.1"
checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8"
version = "0.12.1"
checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf"
version = "0.7.0"
checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c"
version = "1.1.0"
checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7"
version = "0.5.1"
checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443"
version = "0.3.2"
checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c"
version = "0.2.147"
checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
version = "0.1.33"
checksum = "f4ac0e912c8ef1b735e92369695618dc5b1819f5a7bf3f167301a3ba1cea515e"
version = "0.4.3"
checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0"
version = "0.4.19"
checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
version = "2.5.0"
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
version = "0.1.37"
checksum = "4e2894987a3459f3ffb755608bd82188f8ed00d0ae077f1edea29c068d639d98"
version = "0.4.3"
checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
version = "0.4.3"
checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d"
version = "0.2.15"
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
version = "2.3.1"
checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909"
version = "2.3.1"
checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27"
version = "0.10.1"
checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373"
version = "1.0.66"
checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
version = "1.0.31"
checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0"
version = "0.6.2"
checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb"
version = "1.9.1"
checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575"
version = "0.3.3"
checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310"
version = "0.7.4"
checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2"
version = "0.38.4"
checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5"
 "bitflags 2.3.3",
version = "1.1.0"
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
version = "1.0.171"
checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9"
version = "1.0.171"
checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682"
 "syn 2.0.26",
version = "1.0.103"
checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b"
version = "2.0.26"
checksum = "45c3457aacde3c65315de5031ec191ce46604304d2446e803d71ade03308d970"
version = "1.0.43"
checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42"
version = "1.0.43"
checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f"
 "syn 2.0.26",
version = "0.19.14"
checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a"
version = "1.0.11"
checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c"
version = "0.48.1"
checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f"
version = "0.48.0"
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
version = "0.48.0"
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
version = "0.48.0"
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
version = "0.48.0"
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
version = "0.48.0"
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
version = "0.48.0"
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
version = "0.48.0"
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
version = "0.5.0"
checksum = "81fac9742fd1ad1bd9643b991319f72dd031016d44b77039a26977eb667141e7"
version = "0.2.0"
checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214"
source = "git+https://github.com/matter-labs/era-zkevm_opcode_defs?branch=v1.3.2#2f69c6975a272e8c31d2d82c136a4ea81df25115"
 "bitflags 2.3.3",
version = "1.3.9"
    "Alex Zarudnyy <a.zarudnyy@matterlabs.dev>",
serde_json = { version = "1.0", features = [ "arbitrary_precision", "unbounded_depth" ]}
once_cell = "1.17"
An extra output format string.
See `vyper --help` for available options.
Cannot be used with combined or standard JSON modes.  
Cannot be used with combined or standard JSON modes.  
    pub build: compiler_llvm_context::Build,
    pub fn new(build: compiler_llvm_context::Build) -> Self {
            compiler_common::EXTENSION_ZKEVM_ASSEMBLY
            compiler_common::EXTENSION_ZKEVM_BINARY
        let context = compiler_llvm_context::Context::<compiler_llvm_context::DummyDependency>::new(
        context: &mut compiler_llvm_context::Context<D>,
        D: compiler_llvm_context::Dependency + Clone,
    context: &mut compiler_llvm_context::Context<'ctx, D>,
    D: compiler_llvm_context::Dependency + Clone,
    context: &mut compiler_llvm_context::Context<'ctx, D>,
    D: compiler_llvm_context::Dependency + Clone,
    context: &mut compiler_llvm_context::Context<'ctx, D>,
    D: compiler_llvm_context::Dependency + Clone,
    let address_dirty_pointer = compiler_llvm_context::Pointer::new_with_offset(
        compiler_llvm_context::AddressSpace::Heap,
    let calldata_offset = context.field_const(compiler_llvm_context::HEAP_AUX_OFFSET_EXTERNAL_CALL);
        (compiler_llvm_context::DEPLOYER_CALL_HEADER_SIZE + compiler_common::BYTE_LENGTH_FIELD)
            as u64,
    let hash_input_offset_pointer = compiler_llvm_context::Pointer::new_with_offset(
        compiler_llvm_context::AddressSpace::HeapAuxiliary,
        context.field_const(compiler_llvm_context::DEPLOYER_CALL_HEADER_SIZE as u64),
    let address_input_offset_pointer = compiler_llvm_context::Pointer::new_with_offset(
        compiler_llvm_context::AddressSpace::HeapAuxiliary,
        Some(salt) => compiler_llvm_context::create::create2(
        None => {
            compiler_llvm_context::create::create(context, value, calldata_offset, calldata_length)
        }
    let return_data_size = context.get_global(compiler_llvm_context::GLOBAL_RETURN_DATA_SIZE)?;
    compiler_llvm_context::return_data::copy(
        context: &mut compiler_llvm_context::Context<D>,
        D: compiler_llvm_context::Dependency + Clone,
            .ok_or_else(|| {
                anyhow::anyhow!(
                    "Block `{}` has no `{}` prefix",
                    label_name,
                    crate::r#const::LABEL_DESTINATION_PREFIX
                )
            })?;
        context: &mut compiler_llvm_context::Context<D>,
        D: compiler_llvm_context::Dependency + Clone,

            let value = expression.into_llvm_value(context)?.expect("Always exists");
            arguments.push(value);
        context: &mut compiler_llvm_context::Context<D>,
        D: compiler_llvm_context::Dependency + Clone,
        context: &mut compiler_llvm_context::Context<D>,
        D: compiler_llvm_context::Dependency + Clone,
        context: &mut compiler_llvm_context::Context<'ctx, D>,
        D: compiler_llvm_context::Dependency + Clone,
    context: &mut compiler_llvm_context::Context<'ctx, D>,
    D: compiler_llvm_context::Dependency + Clone,
    let immutable_value =
        compiler_llvm_context::immutable::load(context, immutable_offset_value.into_int_value())?;
    let heap_pointer = compiler_llvm_context::Pointer::new_with_offset(
        compiler_llvm_context::AddressSpace::Heap,
    pub fn declare<D>(&self, context: &mut compiler_llvm_context::Context<D>) -> anyhow::Result<()>
        D: compiler_llvm_context::Dependency + Clone,
        context: &mut compiler_llvm_context::Context<D>,
        D: compiler_llvm_context::Dependency + Clone,
            compiler_llvm_context::r#return::stop(context)?;
        context: &mut compiler_llvm_context::Context<'ctx, D>,
        D: compiler_llvm_context::Dependency + Clone,
        context: &mut compiler_llvm_context::Context<'ctx, D>,
        D: compiler_llvm_context::Dependency + Clone,
                compiler_llvm_context::arithmetic::addition(
                compiler_llvm_context::arithmetic::subtraction(
                compiler_llvm_context::arithmetic::multiplication(
                compiler_llvm_context::arithmetic::division(
                compiler_llvm_context::arithmetic::remainder(
                compiler_llvm_context::arithmetic::division_signed(
                compiler_llvm_context::arithmetic::remainder_signed(
                compiler_llvm_context::comparison::compare(
                compiler_llvm_context::comparison::compare(
                compiler_llvm_context::comparison::compare(
                compiler_llvm_context::comparison::compare(
                compiler_llvm_context::comparison::compare(
                compiler_llvm_context::comparison::compare(
                compiler_llvm_context::comparison::compare(
                compiler_llvm_context::comparison::compare(
                compiler_llvm_context::comparison::compare(
                compiler_llvm_context::comparison::compare(
                compiler_llvm_context::comparison::compare(
                compiler_llvm_context::bitwise::or(
                compiler_llvm_context::bitwise::xor(
                compiler_llvm_context::bitwise::xor(
                compiler_llvm_context::bitwise::and(
                compiler_llvm_context::bitwise::shift_left(
                compiler_llvm_context::bitwise::shift_right(
                compiler_llvm_context::bitwise::shift_right_arithmetic(
                compiler_llvm_context::bitwise::byte(
                compiler_llvm_context::math::add_mod(
                compiler_llvm_context::math::mul_mod(
                compiler_llvm_context::math::exponent(
                compiler_llvm_context::math::sign_extend(
                let function = compiler_llvm_context::Runtime::keccak256(context);
                let pointer_one = compiler_llvm_context::Pointer::new_with_offset(
                    compiler_llvm_context::AddressSpace::Heap,
                let function = compiler_llvm_context::Runtime::keccak256(context);
                let pointer_one = compiler_llvm_context::Pointer::new_with_offset(
                    compiler_llvm_context::AddressSpace::Heap,
                let pointer_two = compiler_llvm_context::Pointer::new_with_offset(
                    compiler_llvm_context::AddressSpace::Heap,
                let function = compiler_llvm_context::Runtime::keccak256(context);
                compiler_llvm_context::memory::load(context, arguments[0].into_int_value())
                    .map(Some)
                compiler_llvm_context::memory::store(
                compiler_llvm_context::memory::store_byte(
                compiler_llvm_context::storage::load(context, arguments[0].into_int_value())
                    .map(Some)
                compiler_llvm_context::storage::store(
                compiler_llvm_context::immutable::load(context, arguments[0].into_int_value())
                    .map(Some)
                compiler_llvm_context::immutable::store(
                    compiler_llvm_context::CodeType::Deploy => {
                    compiler_llvm_context::CodeType::Runtime => {
                        compiler_llvm_context::calldata::load(
                    compiler_llvm_context::CodeType::Deploy => {
                    compiler_llvm_context::CodeType::Runtime => {
                        compiler_llvm_context::calldata::size(context).map(Some)
                    compiler_llvm_context::CodeType::Deploy => {
                        compiler_llvm_context::calldata::size(context)?
                    compiler_llvm_context::CodeType::Runtime => {
                compiler_llvm_context::calldata::copy(
                    Some(compiler_llvm_context::CodeType::Deploy) => {
                        compiler_llvm_context::calldata::load(
                    Some(compiler_llvm_context::CodeType::Runtime) => {
                        compiler_llvm_context::immutable::load(
                    Some(compiler_llvm_context::CodeType::Deploy) => {
                        compiler_llvm_context::calldata::copy(
                    Some(compiler_llvm_context::CodeType::Runtime) => immutable::load_bytes(
                    compiler_llvm_context::CodeType::Deploy => {
                        compiler_llvm_context::calldata::size(context).map(Some)
                    compiler_llvm_context::CodeType::Runtime => {
                            compiler_llvm_context::zkevm_general::code_source(context)?;
                        compiler_llvm_context::ext_code::size(context, code_source.into_int_value())
                            .map(Some)
                if let compiler_llvm_context::CodeType::Runtime = context
                compiler_llvm_context::calldata::copy(
            Self::RETURNDATASIZE => compiler_llvm_context::return_data::size(context).map(Some),
                compiler_llvm_context::return_data::copy(
                compiler_llvm_context::ext_code::size(context, arguments[0].into_int_value())
                    .map(Some)
                compiler_llvm_context::ext_code::hash(context, arguments[0].into_int_value())
                    .map(Some)
            Self::STOP => compiler_llvm_context::r#return::stop(context).map(|_| None),
            Self::INVALID => compiler_llvm_context::r#return::invalid(context).map(|_| None),
                compiler_llvm_context::event::log(
                compiler_llvm_context::event::log(
                compiler_llvm_context::event::log(
                compiler_llvm_context::event::log(
                compiler_llvm_context::event::log(
                compiler_llvm_context::call::default(
                compiler_llvm_context::call::default(
                compiler_llvm_context::call::default(
            Self::CALLVALUE => compiler_llvm_context::ether_gas::value(context).map(Some),
            Self::GAS => compiler_llvm_context::ether_gas::gas(context).map(Some),
                compiler_llvm_context::ether_gas::balance(context, address).map(Some)
                compiler_llvm_context::ether_gas::balance(context, address).map(Some)
            Self::GASLIMIT => compiler_llvm_context::contract_context::gas_limit(context).map(Some),
            Self::GASPRICE => compiler_llvm_context::contract_context::gas_price(context).map(Some),
            Self::ORIGIN => compiler_llvm_context::contract_context::origin(context).map(Some),
            Self::CHAINID => compiler_llvm_context::contract_context::chain_id(context).map(Some),
                compiler_llvm_context::contract_context::block_number(context).map(Some)
                compiler_llvm_context::contract_context::block_timestamp(context).map(Some)
                compiler_llvm_context::contract_context::block_hash(context, index).map(Some)
                compiler_llvm_context::contract_context::difficulty(context).map(Some)
            Self::COINBASE => compiler_llvm_context::contract_context::coinbase(context).map(Some),
            Self::BASEFEE => compiler_llvm_context::contract_context::basefee(context).map(Some),
            Self::MSIZE => compiler_llvm_context::contract_context::msize(context).map(Some),
    context: &mut compiler_llvm_context::Context<'ctx, D>,
    D: compiler_llvm_context::Dependency + Clone,
        context: &mut compiler_llvm_context::Context<D>,
        D: compiler_llvm_context::Dependency + Clone,
        context: &mut compiler_llvm_context::Context<D>,
        D: compiler_llvm_context::Dependency + Clone,
        compiler_llvm_context::r#return::r#return(
        context: &mut compiler_llvm_context::Context<D>,
        D: compiler_llvm_context::Dependency + Clone,
        compiler_llvm_context::r#return::revert(
        context: &mut compiler_llvm_context::Context<'ctx, D>,
        D: compiler_llvm_context::Dependency + Clone,
impl<D> compiler_llvm_context::WriteLLVM<D> for Seq
    D: compiler_llvm_context::Dependency + Clone,
    fn into_llvm(mut self, context: &mut compiler_llvm_context::Context<D>) -> anyhow::Result<()> {
        context: &mut compiler_llvm_context::Context<D>,
        D: compiler_llvm_context::Dependency + Clone,
        context: &mut compiler_llvm_context::Context<'ctx, D>,
        D: compiler_llvm_context::Dependency + Clone,
        context: &mut compiler_llvm_context::Context<'ctx, D>,
        D: compiler_llvm_context::Dependency + Clone,
use compiler_llvm_context::Dependency;
use compiler_llvm_context::WriteLLVM;
impl<D> WriteLLVM<D> for Function
    D: Dependency + Clone,
    fn declare(&mut self, context: &mut compiler_llvm_context::Context<D>) -> anyhow::Result<()> {
            .set_vyper_data(compiler_llvm_context::FunctionVyperData::default());
    fn into_llvm(self, context: &mut compiler_llvm_context::Context<D>) -> anyhow::Result<()> {
use compiler_llvm_context::Dependency;
use compiler_llvm_context::WriteLLVM;
        let mut context = compiler_llvm_context::Context::<DependencyData>::new(
impl<D> WriteLLVM<D> for Contract
    D: Dependency + Clone,
    fn declare(&mut self, context: &mut compiler_llvm_context::Context<D>) -> anyhow::Result<()> {
        let mut entry = compiler_llvm_context::EntryFunction::default();
        let mut runtime =
            compiler_llvm_context::Runtime::new(compiler_llvm_context::AddressSpace::HeapAuxiliary);
        compiler_llvm_context::DeployCodeFunction::new(
            compiler_llvm_context::DummyLLVMWritable::default(),
        compiler_llvm_context::RuntimeCodeFunction::new(
            compiler_llvm_context::DummyLLVMWritable::default(),
            compiler_llvm_context::Runtime::FUNCTION_DEPLOY_CODE,
            compiler_llvm_context::Runtime::FUNCTION_RUNTIME_CODE,
            compiler_llvm_context::Runtime::FUNCTION_ENTRY,
                .set_vyper_data(compiler_llvm_context::FunctionVyperData::default());
    fn into_llvm(mut self, context: &mut compiler_llvm_context::Context<D>) -> anyhow::Result<()> {
                let vyper_data =
                    compiler_llvm_context::ContextVyperData::new(immutables_size as usize, false);
            .map(|(label, expression)| (label, expression, compiler_llvm_context::CodeType::Deploy))
            .collect::<Vec<(String, Expression, compiler_llvm_context::CodeType)>>();
                    (label, expression, compiler_llvm_context::CodeType::Runtime)
                .collect::<Vec<(String, Expression, compiler_llvm_context::CodeType)>>(),
                .strip_suffix(format!("_{}", compiler_llvm_context::CodeType::Deploy).as_str())
                .strip_suffix(format!("_{}", compiler_llvm_context::CodeType::Runtime).as_str())
        compiler_llvm_context::DeployCodeFunction::new(deploy_code).into_llvm(context)?;
        compiler_llvm_context::RuntimeCodeFunction::new(runtime_code).into_llvm(context)?;
impl Dependency for DependencyData {
        let build = compiler_llvm_context::build_assembly_text(
            LLVMIRContract::new(compiler_llvm_context::LLVM_VERSION, source_code).into(),
            compiler_llvm_context::LLVM_VERSION,
            ZKASMContract::new(compiler_llvm_context::ZKEVM_VERSION, source_code).into(),
            compiler_llvm_context::ZKEVM_VERSION,
            let forwarder_build = compiler_llvm_context::Build::new(
    compiler_llvm_context::initialize_target();
    pub const SUPPORTED_VERSIONS: [semver::Version; 2] =
        [semver::Version::new(0, 3, 3), semver::Version::new(0, 3, 9)];
    pub fn standard_json(&self, input: StandardJsonInput) -> anyhow::Result<StandardJsonOutput> {
        if !optimize {
        if !optimize {
    /// See `vyper --help` for available options.
    /// Cannot be used with combined or standard JSON modes.
    /// Cannot be used with combined or standard JSON modes.
    compiler_llvm_context::initialize_target();
            let metadata = compiler_llvm_context::MetadataHash::from_str(metadata_hash.as_str())?;
            metadata != compiler_llvm_context::MetadataHash::None

Fixed code:
## [1.3.10] - 2023-09-13

### Fixed

- An issue with uninitialized immutable values

- The vyper v0.3.9 support
version = "1.0.5"
checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783"
version = "1.0.75"
checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
version = "2.4.0"
checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635"
version = "1.0.1"
checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c"
version = "1.5.0"
checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
version = "1.0.83"
checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
dependencies = [
 "libc",
]
version = "1.3.3"
source = "git+https://github.com/matter-labs/era-compiler-common?branch=main#aac58a37982885dd09f7d4fa838c16a96ef23683"
source = "git+https://github.com/matter-labs/era-compiler-llvm-context?branch=main#419bd6067c1e1f0bc64acb7cb5307d8398dfbe2a"
version = "1.3.10"
 "which",
version = "0.9.5"
checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f"
version = "1.9.0"
checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
version = "0.3.3"
checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd"
version = "0.13.0"
checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60"
version = "0.14.1"
checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee"
version = "0.8.0"
checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534"
version = "2.0.0"
checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
[[package]]
name = "home"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb"
dependencies = [
 "windows-sys",
]

version = "0.6.0"
checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f"
version = "0.4.0"
checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd"
version = "0.2.148"
checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b"
version = "0.1.35"
checksum = "3979b5c37ece694f1f5e51e7ecc871fdb0f517ed04ee45f88d15d6d553cb9664"
version = "0.4.7"
checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128"
version = "0.4.20"
checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
version = "2.6.3"
checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c"
version = "0.1.39"
checksum = "fa01922b5ea280a911e323e4d2fd24b7fe5cc4042e0d2cda3c40775cdc4bdc9c"
version = "0.4.4"
checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0"
version = "0.4.4"
checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214"
version = "0.2.16"
checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2"
version = "3.6.5"
checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb"
version = "3.6.5"
checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260"
version = "0.12.1"
checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66"
version = "1.0.67"
checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328"
version = "1.0.33"
checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
version = "0.7.0"
checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
version = "1.9.5"
checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47"
version = "0.3.8"
checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795"
version = "0.7.5"
checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da"
version = "0.38.13"
checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662"
 "bitflags 2.4.0",
version = "1.2.0"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
version = "1.0.188"
checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e"
version = "1.0.188"
checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2"
 "syn 2.0.33",
version = "1.0.107"
checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65"
version = "2.0.33"
checksum = "9caece70c63bfba29ec2fed841a09851b14a235c60010fa4de58089b6c025668"
version = "1.0.48"
checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7"
version = "1.0.48"
checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35"
 "syn 2.0.33",
version = "0.19.15"
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
version = "1.0.12"
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "which"
version = "4.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
dependencies = [
 "either",
 "home",
 "once_cell",
 "rustix",
]

version = "0.48.5"
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
version = "0.48.5"
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
version = "0.48.5"
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
version = "0.48.5"
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
version = "0.48.5"
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
version = "0.48.5"
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
version = "0.48.5"
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
version = "0.48.5"
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
version = "0.5.15"
checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc"
version = "0.5.1"
checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed"
dependencies = [
 "tap",
]
source = "git+https://github.com/matter-labs/era-zkevm_opcode_defs?branch=v1.3.2#a40648727910621b46a1023d940befefb0469cba"
 "bitflags 2.4.0",
version = "1.3.10"
    "Oleksandr Zarudnyi <a.zarudnyy@matterlabs.dev>",
serde_json = { version = "1.0", features = [ "arbitrary_precision", "unbounded_depth" ] }
once_cell = "1.17"
which = "4.4"
An extra output format string.  
See `vyper --help` for available options including combined JSON mode.
Cannot be used with combined JSON mode.  
Use this mode at your own risk, as LLVM IR input validation is not implemented.  
Cannot be used with combined JSON mode.  
Use this mode at your own risk, as EraVM assembly input validation is not implemented.  
    pub build: compiler_llvm_context::EraVMBuild,
    pub fn new(build: compiler_llvm_context::EraVMBuild) -> Self {
            compiler_common::EXTENSION_ERAVM_ASSEMBLY
            compiler_common::EXTENSION_ERAVM_BINARY
        let context = compiler_llvm_context::EraVMContext::<
            compiler_llvm_context::EraVMDummyDependency,
        >::new(
        context: &mut compiler_llvm_context::EraVMContext<D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
    context: &mut compiler_llvm_context::EraVMContext<'ctx, D>,
    D: compiler_llvm_context::EraVMDependency + Clone,
    context: &mut compiler_llvm_context::EraVMContext<'ctx, D>,
    D: compiler_llvm_context::EraVMDependency + Clone,
    context: &mut compiler_llvm_context::EraVMContext<'ctx, D>,
    D: compiler_llvm_context::EraVMDependency + Clone,
    let address_dirty_pointer = compiler_llvm_context::EraVMPointer::new_with_offset(
        compiler_llvm_context::EraVMAddressSpace::Heap,
    let calldata_offset =
        context.field_const(compiler_llvm_context::eravm_const::HEAP_AUX_OFFSET_EXTERNAL_CALL);
        (compiler_llvm_context::eravm_const::DEPLOYER_CALL_HEADER_SIZE
            + compiler_common::BYTE_LENGTH_FIELD) as u64,
    let hash_input_offset_pointer = compiler_llvm_context::EraVMPointer::new_with_offset(
        compiler_llvm_context::EraVMAddressSpace::HeapAuxiliary,
        context.field_const(compiler_llvm_context::eravm_const::DEPLOYER_CALL_HEADER_SIZE as u64),
    let address_input_offset_pointer = compiler_llvm_context::EraVMPointer::new_with_offset(
        compiler_llvm_context::EraVMAddressSpace::HeapAuxiliary,
        Some(salt) => compiler_llvm_context::eravm_evm_create::create2(
        None => compiler_llvm_context::eravm_evm_create::create(
            context,
            value,
            calldata_offset,
            calldata_length,
        ),
    let return_data_size =
        context.get_global(compiler_llvm_context::eravm_const::GLOBAL_RETURN_DATA_SIZE)?;
    compiler_llvm_context::eravm_evm_return_data::copy(
        context: &mut compiler_llvm_context::EraVMContext<D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
            .unwrap_or(label_name.as_str());
        context: &mut compiler_llvm_context::EraVMContext<D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
            if let Some(value) = expression.into_llvm_value(context)? {
                arguments.push(value);
            }
        context: &mut compiler_llvm_context::EraVMContext<D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
        context: &mut compiler_llvm_context::EraVMContext<D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
        context: &mut compiler_llvm_context::EraVMContext<'ctx, D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
    context: &mut compiler_llvm_context::EraVMContext<'ctx, D>,
    D: compiler_llvm_context::EraVMDependency + Clone,
    let immutable_value = compiler_llvm_context::eravm_evm_immutable::load(
        context,
        immutable_offset_value.into_int_value(),
    )?;
    let heap_pointer = compiler_llvm_context::EraVMPointer::new_with_offset(
        compiler_llvm_context::EraVMAddressSpace::Heap,
    pub fn declare<D>(
        &self,
        context: &mut compiler_llvm_context::EraVMContext<D>,
    ) -> anyhow::Result<()>
        D: compiler_llvm_context::EraVMDependency + Clone,
        context: &mut compiler_llvm_context::EraVMContext<D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
            compiler_llvm_context::eravm_evm_return::stop(context)?;
    /// The LLL IR `symbol` instruction.
    Symbol([Box<Expression>; 1]),
        context: &mut compiler_llvm_context::EraVMContext<'ctx, D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
        context: &mut compiler_llvm_context::EraVMContext<'ctx, D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
            Self::Symbol(_inner) => Ok(None),
                compiler_llvm_context::eravm_evm_arithmetic::addition(
                compiler_llvm_context::eravm_evm_arithmetic::subtraction(
                compiler_llvm_context::eravm_evm_arithmetic::multiplication(
                compiler_llvm_context::eravm_evm_arithmetic::division(
                compiler_llvm_context::eravm_evm_arithmetic::remainder(
                compiler_llvm_context::eravm_evm_arithmetic::division_signed(
                compiler_llvm_context::eravm_evm_arithmetic::remainder_signed(
                compiler_llvm_context::eravm_evm_comparison::compare(
                compiler_llvm_context::eravm_evm_comparison::compare(
                compiler_llvm_context::eravm_evm_comparison::compare(
                compiler_llvm_context::eravm_evm_comparison::compare(
                compiler_llvm_context::eravm_evm_comparison::compare(
                compiler_llvm_context::eravm_evm_comparison::compare(
                compiler_llvm_context::eravm_evm_comparison::compare(
                compiler_llvm_context::eravm_evm_comparison::compare(
                compiler_llvm_context::eravm_evm_comparison::compare(
                compiler_llvm_context::eravm_evm_comparison::compare(
                compiler_llvm_context::eravm_evm_comparison::compare(
                compiler_llvm_context::eravm_evm_bitwise::or(
                compiler_llvm_context::eravm_evm_bitwise::xor(
                compiler_llvm_context::eravm_evm_bitwise::xor(
                compiler_llvm_context::eravm_evm_bitwise::and(
                compiler_llvm_context::eravm_evm_bitwise::shift_left(
                compiler_llvm_context::eravm_evm_bitwise::shift_right(
                compiler_llvm_context::eravm_evm_bitwise::shift_right_arithmetic(
                compiler_llvm_context::eravm_evm_bitwise::byte(
                compiler_llvm_context::eravm_evm_math::add_mod(
                compiler_llvm_context::eravm_evm_math::mul_mod(
                compiler_llvm_context::eravm_evm_math::exponent(
                compiler_llvm_context::eravm_evm_math::sign_extend(
                let function = compiler_llvm_context::EraVMRuntime::keccak256(context);
                let pointer_one = compiler_llvm_context::EraVMPointer::new_with_offset(
                    compiler_llvm_context::EraVMAddressSpace::Heap,
                let function = compiler_llvm_context::EraVMRuntime::keccak256(context);
                let pointer_one = compiler_llvm_context::EraVMPointer::new_with_offset(
                    compiler_llvm_context::EraVMAddressSpace::Heap,
                let pointer_two = compiler_llvm_context::EraVMPointer::new_with_offset(
                    compiler_llvm_context::EraVMAddressSpace::Heap,
                let function = compiler_llvm_context::EraVMRuntime::keccak256(context);
                compiler_llvm_context::eravm_evm_memory::load(
                    context,
                    arguments[0].into_int_value(),
                )
                .map(Some)
                compiler_llvm_context::eravm_evm_memory::store(
                compiler_llvm_context::eravm_evm_memory::store_byte(
                compiler_llvm_context::eravm_evm_storage::load(
                    context,
                    arguments[0].into_int_value(),
                )
                .map(Some)
                compiler_llvm_context::eravm_evm_storage::store(
                compiler_llvm_context::eravm_evm_immutable::load(
                    context,
                    arguments[0].into_int_value(),
                )
                .map(Some)
                compiler_llvm_context::eravm_evm_immutable::store(
                    compiler_llvm_context::EraVMCodeType::Deploy => {
                    compiler_llvm_context::EraVMCodeType::Runtime => {
                        compiler_llvm_context::eravm_evm_calldata::load(
                    compiler_llvm_context::EraVMCodeType::Deploy => {
                    compiler_llvm_context::EraVMCodeType::Runtime => {
                        compiler_llvm_context::eravm_evm_calldata::size(context).map(Some)
                    compiler_llvm_context::EraVMCodeType::Deploy => {
                        compiler_llvm_context::eravm_evm_calldata::size(context)?
                    compiler_llvm_context::EraVMCodeType::Runtime => {
                compiler_llvm_context::eravm_evm_calldata::copy(
                    Some(compiler_llvm_context::EraVMCodeType::Deploy) => {
                        compiler_llvm_context::eravm_evm_calldata::load(
                    Some(compiler_llvm_context::EraVMCodeType::Runtime) => {
                        compiler_llvm_context::eravm_evm_immutable::load(
                    Some(compiler_llvm_context::EraVMCodeType::Deploy) => {
                        compiler_llvm_context::eravm_evm_calldata::copy(
                    Some(compiler_llvm_context::EraVMCodeType::Runtime) => immutable::load_bytes(
                    compiler_llvm_context::EraVMCodeType::Deploy => {
                        compiler_llvm_context::eravm_evm_calldata::size(context).map(Some)
                    compiler_llvm_context::EraVMCodeType::Runtime => {
                            compiler_llvm_context::eravm_general::code_source(context)?;
                        compiler_llvm_context::eravm_evm_ext_code::size(
                            context,
                            code_source.into_int_value(),
                        )
                        .map(Some)
                if let compiler_llvm_context::EraVMCodeType::Runtime = context
                compiler_llvm_context::eravm_evm_calldata::copy(
            Self::RETURNDATASIZE => {
                compiler_llvm_context::eravm_evm_return_data::size(context).map(Some)
            }
                compiler_llvm_context::eravm_evm_return_data::copy(
                compiler_llvm_context::eravm_evm_ext_code::size(
                    context,
                    arguments[0].into_int_value(),
                )
                .map(Some)
                compiler_llvm_context::eravm_evm_ext_code::hash(
                    context,
                    arguments[0].into_int_value(),
                )
                .map(Some)
            Self::STOP => compiler_llvm_context::eravm_evm_return::stop(context).map(|_| None),
            Self::INVALID => {
                compiler_llvm_context::eravm_evm_return::invalid(context).map(|_| None)
            }
                compiler_llvm_context::eravm_evm_event::log(
                compiler_llvm_context::eravm_evm_event::log(
                compiler_llvm_context::eravm_evm_event::log(
                compiler_llvm_context::eravm_evm_event::log(
                compiler_llvm_context::eravm_evm_event::log(
                compiler_llvm_context::eravm_evm_call::default(
                compiler_llvm_context::eravm_evm_call::default(
                compiler_llvm_context::eravm_evm_call::default(
            Self::CALLVALUE => compiler_llvm_context::eravm_evm_ether_gas::value(context).map(Some),
            Self::GAS => compiler_llvm_context::eravm_evm_ether_gas::gas(context).map(Some),
                compiler_llvm_context::eravm_evm_ether_gas::balance(context, address).map(Some)
                compiler_llvm_context::eravm_evm_ether_gas::balance(context, address).map(Some)
            Self::GASLIMIT => {
                compiler_llvm_context::eravm_evm_contract_context::gas_limit(context).map(Some)
            }
            Self::GASPRICE => {
                compiler_llvm_context::eravm_evm_contract_context::gas_price(context).map(Some)
            }
            Self::ORIGIN => {
                compiler_llvm_context::eravm_evm_contract_context::origin(context).map(Some)
            }
            Self::CHAINID => {
                compiler_llvm_context::eravm_evm_contract_context::chain_id(context).map(Some)
            }
                compiler_llvm_context::eravm_evm_contract_context::block_number(context).map(Some)
                compiler_llvm_context::eravm_evm_contract_context::block_timestamp(context)
                    .map(Some)
                compiler_llvm_context::eravm_evm_contract_context::block_hash(context, index)
                    .map(Some)
                compiler_llvm_context::eravm_evm_contract_context::difficulty(context).map(Some)
            }
            Self::COINBASE => {
                compiler_llvm_context::eravm_evm_contract_context::coinbase(context).map(Some)
            }
            Self::BASEFEE => {
                compiler_llvm_context::eravm_evm_contract_context::basefee(context).map(Some)
            }
            Self::MSIZE => {
                compiler_llvm_context::eravm_evm_contract_context::msize(context).map(Some)
    context: &mut compiler_llvm_context::EraVMContext<'ctx, D>,
    D: compiler_llvm_context::EraVMDependency + Clone,
        context: &mut compiler_llvm_context::EraVMContext<D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
        context: &mut compiler_llvm_context::EraVMContext<D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
        compiler_llvm_context::eravm_evm_return::r#return(
        context: &mut compiler_llvm_context::EraVMContext<D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
        compiler_llvm_context::eravm_evm_return::revert(
        context: &mut compiler_llvm_context::EraVMContext<'ctx, D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
impl<D> compiler_llvm_context::EraVMWriteLLVM<D> for Seq
    D: compiler_llvm_context::EraVMDependency + Clone,
    fn into_llvm(
        mut self,
        context: &mut compiler_llvm_context::EraVMContext<D>,
    ) -> anyhow::Result<()> {
        context: &mut compiler_llvm_context::EraVMContext<D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
        context: &mut compiler_llvm_context::EraVMContext<'ctx, D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
        context: &mut compiler_llvm_context::EraVMContext<'ctx, D>,
        D: compiler_llvm_context::EraVMDependency + Clone,
use compiler_llvm_context::EraVMDependency;
use compiler_llvm_context::EraVMWriteLLVM;
impl<D> EraVMWriteLLVM<D> for Function
    D: EraVMDependency + Clone,
    fn declare(
        &mut self,
        context: &mut compiler_llvm_context::EraVMContext<D>,
    ) -> anyhow::Result<()> {
            .set_vyper_data(compiler_llvm_context::EraVMFunctionVyperData::default());
    fn into_llvm(self, context: &mut compiler_llvm_context::EraVMContext<D>) -> anyhow::Result<()> {
use compiler_llvm_context::EraVMDependency;
use compiler_llvm_context::EraVMWriteLLVM;
        let mut context = compiler_llvm_context::EraVMContext::<DependencyData>::new(
impl<D> EraVMWriteLLVM<D> for Contract
    D: EraVMDependency + Clone,
    fn declare(
        &mut self,
        context: &mut compiler_llvm_context::EraVMContext<D>,
    ) -> anyhow::Result<()> {
        let mut entry = compiler_llvm_context::EraVMEntryFunction::default();
        let mut runtime = compiler_llvm_context::EraVMRuntime::new(
            compiler_llvm_context::EraVMAddressSpace::HeapAuxiliary,
        );
        compiler_llvm_context::EraVMDeployCodeFunction::new(
            compiler_llvm_context::EraVMDummyLLVMWritable::default(),
        compiler_llvm_context::EraVMRuntimeCodeFunction::new(
            compiler_llvm_context::EraVMDummyLLVMWritable::default(),
            compiler_llvm_context::EraVMRuntime::FUNCTION_DEPLOY_CODE,
            compiler_llvm_context::EraVMRuntime::FUNCTION_RUNTIME_CODE,
            compiler_llvm_context::EraVMRuntime::FUNCTION_ENTRY,
                .set_vyper_data(compiler_llvm_context::EraVMFunctionVyperData::default());
    fn into_llvm(
        mut self,
        context: &mut compiler_llvm_context::EraVMContext<D>,
    ) -> anyhow::Result<()> {
                let vyper_data = compiler_llvm_context::EraVMContextVyperData::new(
                    immutables_size as usize,
                    false,
                );
            .map(|(label, expression)| {
                (
                    label,
                    expression,
                    compiler_llvm_context::EraVMCodeType::Deploy,
                )
            })
            .collect::<Vec<(String, Expression, compiler_llvm_context::EraVMCodeType)>>();
                    (
                        label,
                        expression,
                        compiler_llvm_context::EraVMCodeType::Runtime,
                    )
                .collect::<Vec<(String, Expression, compiler_llvm_context::EraVMCodeType)>>(),
                .strip_suffix(format!("_{}", compiler_llvm_context::EraVMCodeType::Deploy).as_str())
                .strip_suffix(
                    format!("_{}", compiler_llvm_context::EraVMCodeType::Runtime).as_str(),
                )
        compiler_llvm_context::EraVMDeployCodeFunction::new(deploy_code).into_llvm(context)?;
        compiler_llvm_context::EraVMRuntimeCodeFunction::new(runtime_code).into_llvm(context)?;
impl EraVMDependency for DependencyData {
        let build = compiler_llvm_context::eravm_build_assembly_text(
            LLVMIRContract::new(
                compiler_llvm_context::eravm_const::LLVM_VERSION,
                source_code,
            )
            .into(),
            compiler_llvm_context::eravm_const::LLVM_VERSION,
            ZKASMContract::new(
                compiler_llvm_context::eravm_const::ZKEVM_VERSION,
                source_code,
            )
            .into(),
            compiler_llvm_context::eravm_const::ZKEVM_VERSION,
            let forwarder_build = compiler_llvm_context::EraVMBuild::new(
    compiler_llvm_context::initialize_target(compiler_llvm_context::Target::EraVM);
    pub const SUPPORTED_VERSIONS: [semver::Version; 2 /* 3 */] = [
        semver::Version::new(0, 3, 3),
        semver::Version::new(0, 3, 9),
        // semver::Version::new(0, 3, 10),
    ];
        if self.version.default >= semver::Version::new(0, 3, 10) {
            command.arg("--no-optimize");
        }
    pub fn standard_json(
        &self,
        mut input: StandardJsonInput,
    ) -> anyhow::Result<StandardJsonOutput> {
        if self.version.default >= semver::Version::new(0, 3, 10) {
            input.settings.optimize = false;
        }
        if !optimize || self.version.default >= semver::Version::new(0, 3, 10) {
        if !optimize || self.version.default >= semver::Version::new(0, 3, 10) {
    /// See `vyper --help` for available options including combined JSON mode.
    /// Cannot be used with combined JSON mode.
    /// Use this mode at your own risk, as LLVM IR input validation is not implemented.
    /// Cannot be used with combined JSON modes.
    /// Use this mode at your own risk, as EraVM assembly input validation is not implemented.
    compiler_llvm_context::initialize_target(compiler_llvm_context::Target::EraVM); // TODO: pass from CLI
            let metadata =
                compiler_llvm_context::EraVMMetadataHash::from_str(metadata_hash.as_str())?;
            metadata != compiler_llvm_context::EraVMMetadataHash::None