diff --git a/Cargo.lock b/Cargo.lock index 2b84b01277b3..9f5606dd4f42 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1923,7 +1923,7 @@ dependencies = [ [[package]] name = "ethers" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#806af08f99cac0c7e13f13cd527fc87310dae7c4" +source = "git+https://github.com/gakonst/ethers-rs#1b08a94a858186f825b77517f14bc865cd63a597" dependencies = [ "ethers-addressbook", "ethers-contract", @@ -1938,7 +1938,7 @@ dependencies = [ [[package]] name = "ethers-addressbook" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#806af08f99cac0c7e13f13cd527fc87310dae7c4" +source = "git+https://github.com/gakonst/ethers-rs#1b08a94a858186f825b77517f14bc865cd63a597" dependencies = [ "ethers-core", "once_cell", @@ -1949,7 +1949,7 @@ dependencies = [ [[package]] name = "ethers-contract" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#806af08f99cac0c7e13f13cd527fc87310dae7c4" +source = "git+https://github.com/gakonst/ethers-rs#1b08a94a858186f825b77517f14bc865cd63a597" dependencies = [ "ethers-contract-abigen", "ethers-contract-derive", @@ -1967,7 +1967,7 @@ dependencies = [ [[package]] name = "ethers-contract-abigen" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#806af08f99cac0c7e13f13cd527fc87310dae7c4" +source = "git+https://github.com/gakonst/ethers-rs#1b08a94a858186f825b77517f14bc865cd63a597" dependencies = [ "Inflector", "cfg-if 1.0.0", @@ -1994,7 +1994,7 @@ dependencies = [ [[package]] name = "ethers-contract-derive" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#806af08f99cac0c7e13f13cd527fc87310dae7c4" +source = "git+https://github.com/gakonst/ethers-rs#1b08a94a858186f825b77517f14bc865cd63a597" dependencies = [ "ethers-contract-abigen", "ethers-core", @@ -2008,7 +2008,7 @@ dependencies = [ [[package]] name = "ethers-core" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#806af08f99cac0c7e13f13cd527fc87310dae7c4" +source = "git+https://github.com/gakonst/ethers-rs#1b08a94a858186f825b77517f14bc865cd63a597" dependencies = [ "arrayvec 0.7.2", "bytes", @@ -2041,7 +2041,7 @@ dependencies = [ [[package]] name = "ethers-etherscan" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#806af08f99cac0c7e13f13cd527fc87310dae7c4" +source = "git+https://github.com/gakonst/ethers-rs#1b08a94a858186f825b77517f14bc865cd63a597" dependencies = [ "ethers-core", "ethers-solc", @@ -2058,7 +2058,7 @@ dependencies = [ [[package]] name = "ethers-middleware" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#806af08f99cac0c7e13f13cd527fc87310dae7c4" +source = "git+https://github.com/gakonst/ethers-rs#1b08a94a858186f825b77517f14bc865cd63a597" dependencies = [ "async-trait", "auto_impl 0.5.0", @@ -2083,7 +2083,7 @@ dependencies = [ [[package]] name = "ethers-providers" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#806af08f99cac0c7e13f13cd527fc87310dae7c4" +source = "git+https://github.com/gakonst/ethers-rs#1b08a94a858186f825b77517f14bc865cd63a597" dependencies = [ "async-trait", "auto_impl 1.0.1", @@ -2122,7 +2122,7 @@ dependencies = [ [[package]] name = "ethers-signers" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#806af08f99cac0c7e13f13cd527fc87310dae7c4" +source = "git+https://github.com/gakonst/ethers-rs#1b08a94a858186f825b77517f14bc865cd63a597" dependencies = [ "async-trait", "coins-bip32", @@ -2149,7 +2149,7 @@ dependencies = [ [[package]] name = "ethers-solc" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#806af08f99cac0c7e13f13cd527fc87310dae7c4" +source = "git+https://github.com/gakonst/ethers-rs#1b08a94a858186f825b77517f14bc865cd63a597" dependencies = [ "cfg-if 1.0.0", "dunce", @@ -2677,9 +2677,9 @@ dependencies = [ [[package]] name = "fs_extra" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" [[package]] name = "fsevent-sys" @@ -4978,9 +4978,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" dependencies = [ "unicode-ident", ] @@ -6106,9 +6106,9 @@ dependencies = [ [[package]] name = "solang-parser" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e9653f278d9531b60f042c29732bb835d519943f4167b1e5684c7e820dd9fec" +checksum = "58feb14d4002859db0b744b0915840bae403b8a5675efded3e8adddb6beb85b2" dependencies = [ "itertools", "lalrpop", diff --git a/Cargo.toml b/Cargo.toml index 9056d46daca6..03726b0854ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,4 +70,4 @@ codegen-units = 1 # ethers-solc = { path = "../ethers-rs/ethers-solc" } # [patch.crates-io] -# revm = { path = "../revm/crates/revm" } +# revm = { path = "../revm/crates/revm" } \ No newline at end of file diff --git a/anvil/tests/it/ganache.rs b/anvil/tests/it/ganache.rs index ec682825ef5a..fae4ba3469b9 100644 --- a/anvil/tests/it/ganache.rs +++ b/anvil/tests/it/ganache.rs @@ -3,7 +3,7 @@ use crate::init_tracing; use ethers::{ abi::Address, - contract::{Contract, ContractFactory}, + contract::{Contract, ContractFactory, ContractInstance}, core::k256::SecretKey, prelude::{abigen, Middleware, Signer, SignerMiddleware, TransactionRequest, Ws}, providers::{Http, Provider}, @@ -159,7 +159,7 @@ contract Contract { Provider::::try_from("http://127.0.0.1:8545").unwrap(), ganache_wallet2(), ); - let contract = Contract::new(contract.address(), abi.unwrap(), provider); + let contract = ContractInstance::new(contract.address(), abi.unwrap(), provider); let resp = contract.method::<_, U256>("getSecret", ()).unwrap().legacy().call().await; resp.unwrap_err(); diff --git a/anvil/tests/it/revert.rs b/anvil/tests/it/revert.rs index 57ac91384803..f334392087cb 100644 --- a/anvil/tests/it/revert.rs +++ b/anvil/tests/it/revert.rs @@ -1,6 +1,6 @@ use anvil::{spawn, NodeConfig}; use ethers::{ - contract::{Contract, ContractFactory}, + contract::{ContractFactory, ContractInstance}, middleware::SignerMiddleware, types::U256, utils::WEI_IN_ETHER, @@ -82,7 +82,7 @@ contract Contract { let factory = ContractFactory::new(abi.clone().unwrap(), bytecode.unwrap(), client); let contract = factory.deploy(()).unwrap().send().await.unwrap(); - let contract = Contract::new( + let contract = ContractInstance::new( contract.address(), abi.unwrap(), SignerMiddleware::new(handle.http_provider(), wallets[1].clone()), @@ -139,7 +139,7 @@ async fn test_solc_revert_example() { let factory = ContractFactory::new(abi.clone().unwrap(), bytecode.unwrap(), client); let contract = factory.deploy(()).unwrap().send().await.unwrap(); - let contract = Contract::new( + let contract = ContractInstance::new( contract.address(), abi.unwrap(), SignerMiddleware::new(handle.http_provider(), wallets[1].clone()), @@ -193,7 +193,7 @@ contract Contract { let factory = ContractFactory::new(abi.clone().unwrap(), bytecode.unwrap(), client); let contract = factory.deploy(()).unwrap().send().await.unwrap(); - let contract = Contract::new( + let contract = ContractInstance::new( contract.address(), abi.unwrap(), SignerMiddleware::new(handle.http_provider(), wallets[1].clone()), diff --git a/anvil/tests/it/traces.rs b/anvil/tests/it/traces.rs index 22a5b8ecf6f1..53c86b926c01 100644 --- a/anvil/tests/it/traces.rs +++ b/anvil/tests/it/traces.rs @@ -1,7 +1,7 @@ use crate::fork::fork_config; use anvil::{spawn, NodeConfig}; use ethers::{ - contract::Contract, + contract::ContractInstance, prelude::{ Action, ContractFactory, GethTrace, GethTraceFrame, Middleware, Signer, SignerMiddleware, TransactionRequest, @@ -80,7 +80,7 @@ contract Contract { let factory = ContractFactory::new(abi.clone().unwrap(), bytecode.unwrap(), client); let contract = factory.deploy(()).unwrap().send().await.unwrap(); - let contract = Contract::new( + let contract = ContractInstance::new( contract.address(), abi.unwrap(), SignerMiddleware::new(handle.http_provider(), wallets[1].clone()), @@ -127,7 +127,7 @@ contract Contract { let factory = ContractFactory::new(abi.clone().unwrap(), bytecode.unwrap(), client); let contract = factory.deploy(()).unwrap().send().await.unwrap(); - let contract = Contract::new( + let contract = ContractInstance::new( contract.address(), abi.unwrap(), SignerMiddleware::new(handle.http_provider(), wallets[1].clone()), @@ -144,7 +144,7 @@ contract Contract { GethTraceFrame::Default(traces) => { assert!(!traces.failed); } - GethTraceFrame::CallTracer(_) => { + _ => { unreachable!() } }, diff --git a/chisel/Cargo.toml b/chisel/Cargo.toml index b5a209334ebc..c949ca385de6 100644 --- a/chisel/Cargo.toml +++ b/chisel/Cargo.toml @@ -40,7 +40,7 @@ reqwest = { version = "0.11", default-features = false, features = ["rustls"] } # misc clap = { version = "4.0", features = ["derive", "env", "wrap_help"] } rustyline = "10.0.0" -solang-parser = "=0.2.1" +solang-parser = "=0.2.2" yansi = "0.5.1" strum = { version = "0.24.1", features = ["derive"] } serde = "1.0.145" diff --git a/chisel/src/executor.rs b/chisel/src/executor.rs index d92d098dae0d..770be8b528be 100644 --- a/chisel/src/executor.rs +++ b/chisel/src/executor.rs @@ -597,7 +597,7 @@ impl Type { pt::Type::Uint(size) => Self::Builtin(ParamType::Uint(*size as usize)), pt::Type::Bytes(size) => Self::Builtin(ParamType::FixedBytes(*size as usize)), pt::Type::DynamicBytes => Self::Builtin(ParamType::Bytes), - pt::Type::Mapping(_, _, right) => Self::from_expression(right)?, + pt::Type::Mapping { value, .. } => Self::from_expression(value)?, pt::Type::Function { params, returns, .. } => { let params = map_parameters(params); let returns = returns diff --git a/chisel/src/session_source.rs b/chisel/src/session_source.rs index 58bf9e6a4aa1..963f706d4068 100644 --- a/chisel/src/session_source.rs +++ b/chisel/src/session_source.rs @@ -245,8 +245,8 @@ impl SessionSource { /// source. pub fn compiler_input(&self) -> CompilerInput { let mut sources = Sources::new(); - sources.insert(PathBuf::from("forge-std/Vm.sol"), Source { content: VM_SOURCE.to_owned() }); - sources.insert(self.file_name.clone(), Source { content: self.to_repl_source() }); + sources.insert(PathBuf::from("forge-std/Vm.sol"), Source::new(VM_SOURCE.to_owned())); + sources.insert(self.file_name.clone(), Source::new(self.to_repl_source())); CompilerInput::with_sources(sources).pop().unwrap() } diff --git a/cli/Cargo.toml b/cli/Cargo.toml index c2dfde2fcfce..77e34802bc01 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -23,7 +23,7 @@ ui = { path = "../ui" } # eth ethers = { git = "https://github.com/gakonst/ethers-rs", default-features = false, features = ["rustls"] } -solang-parser = "=0.2.1" +solang-parser = "=0.2.2" # cli clap = { version = "4.0", features = ["derive", "env", "unicode", "wrap_help"] } diff --git a/cli/src/cmd/forge/script/build.rs b/cli/src/cmd/forge/script/build.rs index 881292e378d6..f844508a0711 100644 --- a/cli/src/cmd/forge/script/build.rs +++ b/cli/src/cmd/forge/script/build.rs @@ -285,7 +285,7 @@ pub fn filter_sources_and_artifacts( } if !is_standalone { - target_tree.get(&resolved).map(|source| (id, source.content.clone())) + target_tree.get(&resolved).map(|source| (id, source.content.as_str().to_string())) } else { Some(( id, diff --git a/cli/src/cmd/forge/verify/etherscan/flatten.rs b/cli/src/cmd/forge/verify/etherscan/flatten.rs index c962fa4041fd..0fafc99b1673 100644 --- a/cli/src/cmd/forge/verify/etherscan/flatten.rs +++ b/cli/src/cmd/forge/verify/etherscan/flatten.rs @@ -74,7 +74,7 @@ impl EtherscanFlattenedSource { let input = CompilerInput { language: "Solidity".to_string(), - sources: BTreeMap::from([("contract.sol".into(), Source { content: content.into() })]), + sources: BTreeMap::from([("contract.sol".into(), Source::new(content))]), settings: Default::default(), }; diff --git a/config/src/lib.rs b/config/src/lib.rs index 08656a567b77..d657475b2666 100644 --- a/config/src/lib.rs +++ b/config/src/lib.rs @@ -3846,7 +3846,8 @@ mod tests { ModelCheckerTarget::Assert, ModelCheckerTarget::OutOfBounds ]), - timeout: Some(10000) + timeout: Some(10000), + invariants: None, }) ); @@ -3902,7 +3903,8 @@ mod tests { ModelCheckerTarget::Assert, ModelCheckerTarget::OutOfBounds ]), - timeout: Some(10000) + timeout: Some(10000), + invariants: None, }) ); diff --git a/doc/Cargo.toml b/doc/Cargo.toml index b446fe342ad9..ab948bb34306 100644 --- a/doc/Cargo.toml +++ b/doc/Cargo.toml @@ -37,7 +37,7 @@ tokio = { version = "1", features = ["macros", "rt-multi-thread"] } futures-util = "0.3.4" # misc -solang-parser = "=0.2.1" +solang-parser = "=0.2.2" eyre = "0.6" thiserror = "1.0.30" rayon = "1.5.1" diff --git a/doc/src/writer/as_string.rs b/doc/src/writer/as_string.rs index 5c217f436399..c8e94a7becf9 100644 --- a/doc/src/writer/as_string.rs +++ b/doc/src/writer/as_string.rs @@ -25,8 +25,18 @@ impl AsString for Expression { Type::DynamicBytes => "bytes".to_owned(), Type::Int(n) => format!("int{n}"), Type::Uint(n) => format!("uint{n}"), - Type::Mapping(_, from, to) => { - format!("mapping({} => {})", from.as_string(), to.as_string()) + Type::Mapping { key, key_name, value, value_name, .. } => { + let mut key = key.as_string(); + if let Some(name) = key_name { + key.push(' '); + key.push_str(&name.to_string()); + } + let mut value = value.as_string(); + if let Some(name) = value_name { + value.push(' '); + value.push_str(&name.to_string()); + } + format!("mapping({key} => {value})") } Type::Function { params, attributes, returns } => { let params = params.as_string(); diff --git a/fmt/Cargo.toml b/fmt/Cargo.toml index a5bb38723dd0..82737e352261 100644 --- a/fmt/Cargo.toml +++ b/fmt/Cargo.toml @@ -16,7 +16,7 @@ foundry-config = { path = "../config" } ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false } # parser -solang-parser = "=0.2.1" +solang-parser = "=0.2.2" # misc semver = "1.0.4" diff --git a/fmt/src/chunk.rs b/fmt/src/chunk.rs index 05c20d0ccaf2..badce88db567 100644 --- a/fmt/src/chunk.rs +++ b/fmt/src/chunk.rs @@ -27,6 +27,7 @@ impl From<&str> for Chunk { pub struct SurroundingChunk { pub before: Option, pub next: Option, + pub spaced: Option, pub content: String, } @@ -36,14 +37,24 @@ impl SurroundingChunk { before: Option, next: Option, ) -> Self { - SurroundingChunk { before, next, content: format!("{content}") } + SurroundingChunk { before, next, content: format!("{content}"), spaced: None } + } + + pub fn spaced(mut self) -> Self { + self.spaced = Some(true); + self + } + + pub fn non_spaced(mut self) -> Self { + self.spaced = Some(false); + self } pub fn loc_before(&self) -> usize { self.before.unwrap_or_default() } - pub fn loc_next(&self) -> usize { - self.next.unwrap_or_default() + pub fn loc_next(&self) -> Option { + self.next } } diff --git a/fmt/src/formatter.rs b/fmt/src/formatter.rs index 5c6f8718a7ae..6c3e9a8db767 100644 --- a/fmt/src/formatter.rs +++ b/fmt/src/formatter.rs @@ -887,11 +887,15 @@ impl<'a, W: Write> Formatter<'a, W> { last: SurroundingChunk, mut fun: impl FnMut(&mut Self, bool) -> Result<()>, ) -> Result<()> { - write_chunk!(self, first.loc_before(), first.loc_next(), "{}", first.content)?; + let first_chunk = + self.chunk_at(first.loc_before(), first.loc_next(), first.spaced, first.content); + self.write_chunk(&first_chunk)?; let multiline = !self.try_on_single_line(|fmt| { fun(fmt, false)?; - write_chunk!(fmt, last.loc_before(), last.loc_next(), "{}", last.content)?; + let last_chunk = + fmt.chunk_at(last.loc_before(), last.loc_next(), last.spaced, &last.content); + fmt.write_chunk(&last_chunk)?; Ok(()) })?; @@ -904,7 +908,9 @@ impl<'a, W: Write> Formatter<'a, W> { if !last.content.trim_start().is_empty() { self.write_whitespace_separator(true)?; } - write_chunk!(self, last.loc_before(), last.loc_next(), "{}", last.content)?; + let last_chunk = + self.chunk_at(last.loc_before(), last.loc_next(), last.spaced, &last.content); + self.write_chunk(&last_chunk)?; } Ok(()) @@ -1931,16 +1937,48 @@ impl<'a, W: Write> Visitor for Formatter<'a, W> { _ => write_chunk!(self, loc.start(), "{int}{n}")?, } } - Type::Mapping(loc, from, to) => { - write_chunk!(self, loc.start(), "mapping(")?; + Type::Mapping { loc, key, key_name, value, value_name } => { let arrow_loc = self.find_next_str_in_src(loc.start(), "=>"); - let key_chunk = self.visit_to_chunk(from.loc().start(), arrow_loc, from)?; - self.write_chunk(&key_chunk)?; - write!(self.buf(), " => ")?; - let close_paren_loc = self.find_next_in_src(to.loc().end(), ')'); - let value_chunk = self.visit_to_chunk(to.loc().start(), close_paren_loc, to)?; - self.write_chunk(&value_chunk)?; - write!(self.buf(), ")")?; + let close_paren_loc = + self.find_next_in_src(value.loc().end(), ')').unwrap_or(loc.end()); + let first = SurroundingChunk::new( + "mapping(", + Some(loc.start()), + Some(key.loc().start()), + ); + let last = SurroundingChunk::new(")", Some(close_paren_loc), Some(loc.end())) + .non_spaced(); + self.surrounded(first, last, |fmt, multiline| { + fmt.grouped(|fmt| { + key.visit(fmt)?; + + if let Some(name) = key_name { + let end_loc = arrow_loc.unwrap_or(value.loc().start()); + write_chunk!(fmt, name.loc.start(), end_loc, " {}", name)?; + } else if let Some(arrow_loc) = arrow_loc { + fmt.write_postfix_comments_before(arrow_loc)?; + } + + let mut write_arrow_and_value = |fmt: &mut Self| { + write!(fmt.buf(), "=> ")?; + value.visit(fmt)?; + if let Some(name) = value_name { + write_chunk!(fmt, name.loc.start(), " {}", name)?; + } + Ok(()) + }; + + let rest_str = fmt.simulate_to_string(&mut write_arrow_and_value)?; + let multiline = multiline && !fmt.will_it_fit(rest_str); + fmt.write_whitespace_separator(multiline)?; + + write_arrow_and_value(fmt)?; + + fmt.write_postfix_comments_before(close_paren_loc)?; + fmt.write_prefix_comments_before(close_paren_loc) + })?; + Ok(()) + })?; } Type::Function { .. } => self.visit_source(*loc)?, }, @@ -3626,4 +3664,5 @@ mod tests { test_directory! { TrailingComma } test_directory! { PragmaDirective } test_directory! { Annotation } + test_directory! { MappingType } } diff --git a/fmt/src/solang_ext/ast_eq.rs b/fmt/src/solang_ext/ast_eq.rs index 6a17aab169ca..d94fc7abb5cc 100644 --- a/fmt/src/solang_ext/ast_eq.rs +++ b/fmt/src/solang_ext/ast_eq.rs @@ -483,8 +483,8 @@ derive_ast_eq! { enum Type { Int(int), Uint(int), Bytes(int), - Mapping(loc, expr1, expr2), _ + Mapping{ loc, key, key_name, value, value_name }, Function { params, attributes, returns }, }} derive_ast_eq! { enum Expression { diff --git a/fmt/testdata/MappingType/fmt.sol b/fmt/testdata/MappingType/fmt.sol new file mode 100644 index 000000000000..7f6297cff945 --- /dev/null +++ b/fmt/testdata/MappingType/fmt.sol @@ -0,0 +1,35 @@ +// config: line_length = 40 +contract X { + type Y is bytes32; +} + +type SomeVeryLongTypeName is uint256; + +contract Mapping { + mapping(uint256 => X.Y) mapping1; + mapping( + uint256 key => uint256 value + ) mapping2; + mapping( + uint256 veryLongKeyName + => uint256 veryLongValueName + ) mapping3; + mapping( + string anotherVeryLongKeyName + => uint256 anotherVeryLongValueName + ) mapping4; + mapping( + SomeVeryLongTypeName anotherVeryLongKeyName + => uint256 anotherVeryLongValueName + ) mapping5; + + mapping( + // comment1 + uint256 key => uint256 value + // comment2 + ) mapping6; + mapping( /* comment3 */ + uint256 /* comment4 */ key /* comment5 */ + => /* comment6 */ uint256 /* comment7 */ value /* comment8 */ /* comment9 */ + ) /* comment10 */ mapping7; +} diff --git a/fmt/testdata/MappingType/original.sol b/fmt/testdata/MappingType/original.sol new file mode 100644 index 000000000000..58ebb134d668 --- /dev/null +++ b/fmt/testdata/MappingType/original.sol @@ -0,0 +1,23 @@ +contract X { + type Y is bytes32; +} + +type SomeVeryLongTypeName is uint256; + +contract Mapping { + mapping(uint256 => X.Y) mapping1; + mapping(uint256 key => uint256 value) mapping2; + mapping(uint256 veryLongKeyName => uint256 veryLongValueName) mapping3; + mapping(string anotherVeryLongKeyName => uint256 anotherVeryLongValueName) mapping4; + mapping(SomeVeryLongTypeName anotherVeryLongKeyName => uint256 anotherVeryLongValueName) mapping5; + + mapping( + + // comment1 + uint256 key => uint256 value +// comment2 + ) mapping6; + mapping( /* comment3 */ + uint256 /* comment4 */ key /* comment5 */ => /* comment6 */ uint256 /* comment7 */ value /* comment8 */ /* comment9 */ + ) /* comment10 */ mapping7; +} \ No newline at end of file