diff --git a/crates/codegen/language/definition/src/compiler/analysis/references.rs b/crates/codegen/language/definition/src/compiler/analysis/references.rs index 8e3f266458..6448d5dcb0 100644 --- a/crates/codegen/language/definition/src/compiler/analysis/references.rs +++ b/crates/codegen/language/definition/src/compiler/analysis/references.rs @@ -41,8 +41,10 @@ pub(crate) fn analyze_references(analysis: &mut Analysis) { check_item(analysis, item, &enablement); } - for built_in in &language.built_ins { - check_built_in(analysis, built_in, &enablement); + for built_in_context in &language.built_ins { + for built_in in &built_in_context.definitions { + check_built_in(analysis, built_in, &enablement); + } } } diff --git a/crates/codegen/language/definition/src/model/built_ins.rs b/crates/codegen/language/definition/src/model/built_ins.rs index 741b88b390..31d8ffac95 100644 --- a/crates/codegen/language/definition/src/model/built_ins.rs +++ b/crates/codegen/language/definition/src/model/built_ins.rs @@ -6,6 +6,13 @@ use strum_macros::EnumDiscriminants; use crate::model::VersionSpecifier; +#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] +#[derive_spanned_type(Clone, Debug, ParseInputTokens, WriteOutputTokens)] +pub struct BuiltInContext { + pub name: String, + pub definitions: Vec, +} + #[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] #[derive_spanned_type(Clone, Debug, EnumDiscriminants, ParseInputTokens, WriteOutputTokens)] pub enum BuiltIn { diff --git a/crates/codegen/language/definition/src/model/manifest.rs b/crates/codegen/language/definition/src/model/manifest.rs index cfe1ef7c82..2bcb1eb610 100644 --- a/crates/codegen/language/definition/src/model/manifest.rs +++ b/crates/codegen/language/definition/src/model/manifest.rs @@ -6,7 +6,8 @@ use indexmap::IndexSet; use semver::Version; use serde::{Deserialize, Serialize}; -use crate::model::{BuiltIn, Field, Identifier, Item, TriviaParser, VersionSpecifier}; +use super::BuiltIn; +use crate::model::{BuiltInContext, Field, Identifier, Item, TriviaParser, VersionSpecifier}; #[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] #[derive_spanned_type(Clone, Debug, ParseInputTokens, WriteOutputTokens)] @@ -25,7 +26,7 @@ pub struct Language { pub versions: IndexSet, pub sections: Vec
, - pub built_ins: Vec, + pub built_ins: Vec, } impl Language { @@ -125,22 +126,24 @@ impl Language { } }; - for item in &self.built_ins { - match item { - BuiltIn::BuiltInFunction { item } => { - add_spec(&item.enabled); - } - BuiltIn::BuiltInType { item } => { - add_spec(&item.enabled); - for field in &item.fields { - add_spec(&field.enabled); + for context in &self.built_ins { + for item in &context.definitions { + match item { + BuiltIn::BuiltInFunction { item } => { + add_spec(&item.enabled); } - for function in &item.functions { - add_spec(&function.enabled); + BuiltIn::BuiltInType { item } => { + add_spec(&item.enabled); + for field in &item.fields { + add_spec(&field.enabled); + } + for function in &item.functions { + add_spec(&function.enabled); + } + } + BuiltIn::BuiltInVariable { item } => { + add_spec(&item.enabled); } - } - BuiltIn::BuiltInVariable { item } => { - add_spec(&item.enabled); } } } diff --git a/crates/codegen/language/internal_macros/src/derive/spanned.rs b/crates/codegen/language/internal_macros/src/derive/spanned.rs index 81a3cc43aa..3907a3efd1 100644 --- a/crates/codegen/language/internal_macros/src/derive/spanned.rs +++ b/crates/codegen/language/internal_macros/src/derive/spanned.rs @@ -111,6 +111,7 @@ fn get_spanned_type(input: Type) -> Type { // These are model Types that have a derived 'SpannedXXX' type. // Let's use that instead: "BuiltIn" + | "BuiltInContext" | "BuiltInField" | "BuiltInFunction" | "BuiltInParameter" diff --git a/crates/codegen/runtime/generator/src/built_ins/mod.rs b/crates/codegen/runtime/generator/src/built_ins/mod.rs index 638a89fe8b..d384fdec63 100644 --- a/crates/codegen/runtime/generator/src/built_ins/mod.rs +++ b/crates/codegen/runtime/generator/src/built_ins/mod.rs @@ -3,7 +3,7 @@ use std::rc::Rc; use anyhow::Result; use codegen_language_definition::model::{ - BuiltIn, BuiltInField, BuiltInFunction, BuiltInType, Language, + BuiltIn, BuiltInContext, BuiltInField, BuiltInFunction, BuiltInType, Language, }; use infra_utils::codegen::CodegenFileSystem; use semver::Version; @@ -12,13 +12,23 @@ pub fn render_built_ins( file_system: &mut CodegenFileSystem, language: &Rc, output_dir: &Path, - render_fn: impl Fn(&[BuiltIn]) -> String, + render_fn: impl Fn(&[BuiltInContext]) -> String, ) -> Result<()> { let versions = language.collect_built_ins_versions(); let file_extension = language.file_extension.clone().unwrap_or_default(); for version in &versions { - let built_ins = filter_built_ins_for_version(&language.built_ins, version); - let contents = render_fn(&built_ins); + let built_in_contexts = language + .built_ins + .iter() + .map(|context| { + let definitions = filter_built_ins_for_version(&context.definitions, version); + BuiltInContext { + definitions, + ..context.clone() + } + }) + .collect::>(); + let contents = render_fn(&built_in_contexts); let output_path = output_dir.join(format!("{version}{file_extension}")); file_system.write_file(output_path, contents)?; diff --git a/crates/solidity/inputs/language/bindings/rules.msgb b/crates/solidity/inputs/language/bindings/rules.msgb index f6b54ffcf2..9e39f620dc 100644 --- a/crates/solidity/inputs/language/bindings/rules.msgb +++ b/crates/solidity/inputs/language/bindings/rules.msgb @@ -105,9 +105,9 @@ inherit .star_extension ;; internal contract named '%BuiltIns%' (renamed from '$BuiltIns$') so we need ;; to export all its members and type members directly as a source unit ;; definition. -;; __SLANG_SOLIDITY_BUILT_INS_CONTRACT_NAME__ keep in sync with built-ins generation. +;; __SLANG_SOLIDITY_BUILT_INS_CONTRACT_NAME__ keep in sync with language definition. @source_unit [SourceUnit [SourceUnitMembers - [SourceUnitMember @contract [ContractDefinition name: ["%BuiltIns%"]]] + [SourceUnitMember @contract [ContractDefinition name: ["%SolidityBuiltIns%"]]] ]] { if (is-system-file FILE_PATH) { edge @source_unit.defs -> @contract.instance diff --git a/crates/solidity/inputs/language/src/bindings.rs b/crates/solidity/inputs/language/src/bindings.rs index 51984435bd..0e6a9bc49f 100644 --- a/crates/solidity/inputs/language/src/bindings.rs +++ b/crates/solidity/inputs/language/src/bindings.rs @@ -1,55 +1,56 @@ use std::fmt::{Error, Write}; -use codegen_language_definition::model::BuiltIn; +use codegen_language_definition::model::{BuiltIn, BuiltInContext}; -pub fn render_built_ins(built_ins: &[BuiltIn]) -> String { - try_render_built_ins(built_ins).expect("Failed to render built-ins") +pub fn render_built_ins(built_in_contexts: &[BuiltInContext]) -> String { + try_render_built_ins(built_in_contexts).expect("Failed to render built-ins") } -fn try_render_built_ins(built_ins: &[BuiltIn]) -> Result { +fn try_render_built_ins(built_in_contexts: &[BuiltInContext]) -> Result { let mut buffer = String::new(); - // __SLANG_SOLIDITY_BUILT_INS_CONTRACT_NAME__ keep in sync with binding rules - writeln!(buffer, "contract $BuiltIns$ {{")?; - for item in built_ins { - match item { - BuiltIn::BuiltInFunction { item } => { - writeln!( - buffer, - " function {name}({parameters}) public{return_type};", - name = item.name, - parameters = item.parameters.join(", "), - return_type = item - .return_type - .as_ref() - .map(|return_type| format!(" returns ({return_type})")) - .unwrap_or_default(), - )?; - } - BuiltIn::BuiltInType { item } => { - writeln!(buffer, " struct {name} {{", name = item.name)?; - for field in &item.fields { - writeln!(buffer, " {field_def};", field_def = field.definition)?; - } - for function in &item.functions { + for context in built_in_contexts { + writeln!(buffer, "contract {context} {{", context = context.name)?; + for item in &context.definitions { + match item { + BuiltIn::BuiltInFunction { item } => { writeln!( buffer, - " function({parameters}){return_type} {name};", - name = function.name, - return_type = function + " function {name}({parameters}) public{return_type};", + name = item.name, + parameters = item.parameters.join(", "), + return_type = item .return_type - .as_deref() + .as_ref() .map(|return_type| format!(" returns ({return_type})")) .unwrap_or_default(), - parameters = function.parameters.join(", "), )?; } - writeln!(buffer, " }}")?; - } - BuiltIn::BuiltInVariable { item } => { - writeln!(buffer, " {var_def};", var_def = item.definition)?; + BuiltIn::BuiltInType { item } => { + writeln!(buffer, " struct {name} {{", name = item.name)?; + for field in &item.fields { + writeln!(buffer, " {field_def};", field_def = field.definition)?; + } + for function in &item.functions { + writeln!( + buffer, + " function({parameters}){return_type} {name};", + name = function.name, + return_type = function + .return_type + .as_deref() + .map(|return_type| format!(" returns ({return_type})")) + .unwrap_or_default(), + parameters = function.parameters.join(", "), + )?; + } + writeln!(buffer, " }}")?; + } + BuiltIn::BuiltInVariable { item } => { + writeln!(buffer, " {var_def};", var_def = item.definition)?; + } } } + writeln!(buffer, "}}")?; } - writeln!(buffer, "}}")?; Ok(buffer) } diff --git a/crates/solidity/inputs/language/src/definition.rs b/crates/solidity/inputs/language/src/definition.rs index 80830bc363..bbec52a9b3 100644 --- a/crates/solidity/inputs/language/src/definition.rs +++ b/crates/solidity/inputs/language/src/definition.rs @@ -6644,436 +6644,443 @@ codegen_language_macros::compile!(Language( ) ], built_ins = [ - BuiltInFunction( - name = "addmod", - parameters = ["uint x", "uint y", "uint k"], - return_type = "uint" - ), - BuiltInFunction(name = "assert", parameters = ["bool condition"]), - BuiltInFunction( - name = "blockhash", - parameters = ["uint blockNumber"], - return_type = "bytes32", - enabled = From("0.4.22") - ), - BuiltInFunction( - name = "blobhash", - parameters = ["uint index"], - return_type = "bytes32", - enabled = From("0.8.24") - ), - BuiltInFunction( - name = "ecrecover", - parameters = ["bytes32 hash", "uint8 v", "bytes32 r", "bytes32 s"], - return_type = "address" - ), - BuiltInFunction( - name = "gasleft", - parameters = [], - return_type = "uint256", - enabled = From("0.4.22") - ), - BuiltInFunction( - name = "keccak256", - parameters = ["bytes memory"], - return_type = "bytes32" - ), - BuiltInFunction( - name = "log0", - parameters = ["bytes32"], - enabled = Till("0.8.0") - ), - BuiltInFunction( - name = "log1", - parameters = ["bytes32", "bytes32"], - enabled = Till("0.8.0") - ), - BuiltInFunction( - name = "log2", - parameters = ["bytes32", "bytes32", "bytes32"], - enabled = Till("0.8.0") - ), - BuiltInFunction( - name = "log3", - parameters = ["bytes32", "bytes32", "bytes32", "bytes32"], - enabled = Till("0.8.0") - ), - BuiltInFunction( - name = "log4", - parameters = ["bytes32", "bytes32", "bytes32", "bytes32", "bytes32"], - enabled = Till("0.8.0") - ), - BuiltInFunction( - name = "mulmod", - parameters = ["uint x", "uint y", "uint k"], - return_type = "uint" - ), - BuiltInFunction(name = "require", parameters = ["bool condition"]), - BuiltInFunction( - name = "require", - parameters = ["bool condition", "string memory message"], - enabled = From("0.4.22") - ), - BuiltInFunction( - name = "require", - parameters = ["bool condition", "Error error"], - enabled = From("0.8.26") - ), - BuiltInFunction(name = "revert", parameters = []), - BuiltInFunction( - name = "revert", - parameters = ["string memory reason"], - enabled = From("0.4.22") - ), - BuiltInFunction( - name = "ripemd160", - parameters = ["bytes memory"], - return_type = "bytes20" - ), - BuiltInFunction( - name = "selfdestruct", - parameters = ["address payable recipient"] - ), - BuiltInFunction( - name = "sha256", - parameters = ["bytes memory"], - return_type = "bytes32" - ), - BuiltInFunction( - name = "sha3", - parameters = ["bytes memory"], - return_type = "bytes32", - enabled = Till("0.5.0") - ), - BuiltInFunction( - name = "suicide", - parameters = ["address payable recipient"], - enabled = Till("0.5.0") - ), - BuiltInType( - name = "$AbiType", - fields = [], - functions = [ + BuiltInContext( + // __SLANG_SOLIDITY_BUILT_INS_CONTRACT_NAME__ keep in sync with rules file. + name = "$SolidityBuiltIns$", + definitions = [ BuiltInFunction( - name = "decode", - parameters = ["bytes memory encodedData", "$Type[] encodedTypesTuple"], - return_type = "$Any[]", - enabled = From("0.5.0") + name = "addmod", + parameters = ["uint x", "uint y", "uint k"], + return_type = "uint" ), + BuiltInFunction(name = "assert", parameters = ["bool condition"]), BuiltInFunction( - name = "encode", - parameters = ["$Any[] valuesToEncode"], - return_type = "bytes memory", + name = "blockhash", + parameters = ["uint blockNumber"], + return_type = "bytes32", enabled = From("0.4.22") ), BuiltInFunction( - name = "encodeCall", - parameters = [ - "function() functionPointer", - "$Any[] functionArgumentsTuple" - ], - return_type = "bytes memory", - enabled = From("0.8.11") + name = "blobhash", + parameters = ["uint index"], + return_type = "bytes32", + enabled = From("0.8.24") ), BuiltInFunction( - name = "encodePacked", - parameters = ["$Any[] valuesToEncode"], - return_type = "bytes memory", - enabled = From("0.4.22") + name = "ecrecover", + parameters = ["bytes32 hash", "uint8 v", "bytes32 r", "bytes32 s"], + return_type = "address" ), BuiltInFunction( - name = "encodeWithSelector", - parameters = ["bytes4 selector", "$Any[] functionArgumentsTuple"], - return_type = "bytes memory", + name = "gasleft", + parameters = [], + return_type = "uint256", enabled = From("0.4.22") ), BuiltInFunction( - name = "encodeWithSignature", - parameters = ["string memory signature", "$Any[] valuesToEncode"], - return_type = "bytes memory", - enabled = From("0.4.22") - ) - ] - ), - BuiltInType( - name = "$address", - fields = [ - BuiltInField(definition = "uint256 balance"), - BuiltInField(definition = "bytes code", enabled = From("0.8.0")), - BuiltInField(definition = "bytes32 codehash", enabled = From("0.8.0")) - ], - functions = [ - BuiltInFunction( - name = "call", + name = "keccak256", parameters = ["bytes memory"], - return_type = "bool", - enabled = Till("0.5.0") + return_type = "bytes32" ), BuiltInFunction( - name = "call", - parameters = ["bytes memory"], - return_type = "bool, bytes memory", - enabled = From("0.5.0") + name = "log0", + parameters = ["bytes32"], + enabled = Till("0.8.0") ), BuiltInFunction( - name = "callcode", - parameters = ["bytes memory"], - return_type = "bool, bytes memory", - enabled = Till("0.5.0") + name = "log1", + parameters = ["bytes32", "bytes32"], + enabled = Till("0.8.0") ), BuiltInFunction( - name = "delegatecall", - parameters = ["bytes memory"], - return_type = "bool", - enabled = Till("0.5.0") + name = "log2", + parameters = ["bytes32", "bytes32", "bytes32"], + enabled = Till("0.8.0") ), BuiltInFunction( - name = "delegatecall", - parameters = ["bytes memory"], - return_type = "bool, bytes memory", - enabled = From("0.5.0") + name = "log3", + parameters = ["bytes32", "bytes32", "bytes32", "bytes32"], + enabled = Till("0.8.0") ), BuiltInFunction( - name = "send", - parameters = ["uint256 amount"], - return_type = "bool" + name = "log4", + parameters = ["bytes32", "bytes32", "bytes32", "bytes32", "bytes32"], + enabled = Till("0.8.0") ), BuiltInFunction( - name = "staticcall", - parameters = ["bytes memory"], - return_type = "bool, bytes memory", - enabled = From("0.5.0") + name = "mulmod", + parameters = ["uint x", "uint y", "uint k"], + return_type = "uint" ), - BuiltInFunction(name = "transfer", parameters = ["uint256 amount"]) - ] - ), - BuiltInType( - name = "$Array", - fields = [BuiltInField(definition = "uint length")], - functions = [ + BuiltInFunction(name = "require", parameters = ["bool condition"]), BuiltInFunction( - name = "push", - parameters = [], - return_type = "$ValueType", - enabled = From("0.6.0") + name = "require", + parameters = ["bool condition", "string memory message"], + enabled = From("0.4.22") ), BuiltInFunction( - name = "push", - parameters = ["$ValueType element"], - return_type = "uint", - enabled = Till("0.6.0") + name = "require", + parameters = ["bool condition", "Error error"], + enabled = From("0.8.26") ), + BuiltInFunction(name = "revert", parameters = []), BuiltInFunction( - name = "push", - parameters = ["$ValueType element"], - enabled = From("0.6.0") + name = "revert", + parameters = ["string memory reason"], + enabled = From("0.4.22") ), - BuiltInFunction(name = "pop", parameters = []) - ] - ), - BuiltInType( - name = "$FixedArray", - fields = [BuiltInField(definition = "uint length")], - functions = [] - ), - BuiltInType( - name = "$BlockType", - fields = [ - BuiltInField(definition = "uint basefee", enabled = From("0.8.7")), - BuiltInField(definition = "uint blobbasefee", enabled = From("0.8.24")), - BuiltInField(definition = "uint chainid", enabled = From("0.8.0")), - BuiltInField(definition = "address payable coinbase"), - BuiltInField(definition = "uint difficulty"), - BuiltInField(definition = "uint gaslimit"), - BuiltInField(definition = "uint number"), - BuiltInField(definition = "uint prevrandao", enabled = From("0.8.18")), - BuiltInField(definition = "uint timestamp") - ], - functions = [BuiltInFunction( - name = "blockhash", - parameters = ["uint"], - return_type = "bytes32", - enabled = Till("0.5.0") - )] - ), - BuiltInType( - name = "$bytes", - fields = [BuiltInField(definition = "uint length")], - functions = [] - ), - BuiltInType( - name = "$BytesType", - fields = [], - functions = [BuiltInFunction( - name = "concat", - parameters = ["bytes[] bytesToConcatenate"], - return_type = "bytes memory" - )] - ), - BuiltInType( - name = "$CallOptions", - fields = [ - BuiltInField(definition = "uint gas"), - BuiltInField(definition = "uint salt"), - BuiltInField(definition = "uint value") - ], - functions = [], - enabled = From("0.6.2") - ), - BuiltInType( - name = "Error", - fields = [BuiltInField(definition = "string reason")], - functions = [], - enabled = From("0.6.0") - ), - BuiltInType( - name = "$ErrorType", - fields = [BuiltInField(definition = "bytes4 selector")], - functions = [], - enabled = From("0.8.4") - ), - BuiltInType( - name = "$Function", - fields = [], - functions = [ BuiltInFunction( - name = "gas", - parameters = ["uint amount"], - return_type = "function()", - enabled = Till("0.7.0") + name = "ripemd160", + parameters = ["bytes memory"], + return_type = "bytes20" ), BuiltInFunction( - name = "value", - parameters = ["uint amount"], - return_type = "function()", - enabled = Till("0.7.0") - ) - ] - ), - BuiltInType( - name = "$ExternalFunction", - fields = [ - BuiltInField(definition = "address address", enabled = From("0.8.2")), - BuiltInField(definition = "bytes4 selector", enabled = From("0.4.17")) - ], - functions = [ - BuiltInFunction( - name = "gas", - parameters = ["uint amount"], - return_type = "function()", - enabled = Till("0.7.0") + name = "selfdestruct", + parameters = ["address payable recipient"] ), BuiltInFunction( - name = "value", - parameters = ["uint amount"], - return_type = "function()", - enabled = Till("0.7.0") - ) - ] - ), - BuiltInType( - name = "$MessageType", - fields = [ - BuiltInField(definition = "bytes data"), - BuiltInField(definition = "uint256 gas", enabled = Till("0.5.0")), - BuiltInField( - definition = "address payable sender", - enabled = Till("0.8.0") - ), - BuiltInField(definition = "address sender", enabled = From("0.8.0")), - BuiltInField(definition = "bytes4 sig"), - BuiltInField(definition = "uint value") - ], - functions = [] - ), - BuiltInType( - name = "Panic", - fields = [BuiltInField(definition = "uint errorCode")], - functions = [], - enabled = From("0.6.0") - ), - BuiltInType( - name = "$StringType", - fields = [], - functions = [BuiltInFunction( - name = "concat", - parameters = ["string[] stringsToConcatenate"], - return_type = "string memory" - )] - ), - BuiltInType( - name = "$TransactionType", - fields = [ - BuiltInField(definition = "uint gasprice"), - BuiltInField( - definition = "address payable origin", - enabled = Till("0.8.0") + name = "sha256", + parameters = ["bytes memory"], + return_type = "bytes32" ), - BuiltInField(definition = "address origin", enabled = From("0.8.0")) - ], - functions = [] - ), - BuiltInType( - name = "$ContractTypeType", - fields = [ - BuiltInField(definition = "string name"), - BuiltInField(definition = "bytes creationCode", enabled = From("0.5.3")), - BuiltInField(definition = "bytes runtimeCode", enabled = From("0.5.3")), - BuiltInField(definition = "bytes4 interfaceId", enabled = From("0.6.7")) - ], - functions = [] - ), - BuiltInType( - name = "$InterfaceTypeType", - fields = [ - BuiltInField(definition = "string name"), - BuiltInField(definition = "bytes4 interfaceId", enabled = From("0.6.7")) - ], - functions = [] - ), - BuiltInType( - name = "$IntTypeType", - fields = [ - BuiltInField(definition = "int min", enabled = From("0.6.8")), - BuiltInField(definition = "int max", enabled = From("0.6.8")) - ], - functions = [] - ), - BuiltInType( - name = "$UserDefinedValueType", - fields = [], - functions = [ BuiltInFunction( - name = "wrap", - parameters = ["$WrappedType elementaryType"], - return_type = "$UserType" + name = "sha3", + parameters = ["bytes memory"], + return_type = "bytes32", + enabled = Till("0.5.0") ), BuiltInFunction( - name = "unwrap", - parameters = ["$UserType userType"], - return_type = "$WrappedType" - ) - ], - enabled = From("0.8.8") - ), - BuiltInType( - name = "$YulExternal", - fields = [ - // These apply to state and storage variables - BuiltInField(definition = "uint slot"), - BuiltInField(definition = "uint offset"), - // Dynamic calldata arrays also have a length - BuiltInField(definition = "uint length") - ], - functions = [] + name = "suicide", + parameters = ["address payable recipient"], + enabled = Till("0.5.0") + ), + BuiltInType( + name = "$AbiType", + fields = [], + functions = [ + BuiltInFunction( + name = "decode", + parameters = ["bytes memory encodedData", "$Type[] encodedTypesTuple"], + return_type = "$Any[]", + enabled = From("0.5.0") + ), + BuiltInFunction( + name = "encode", + parameters = ["$Any[] valuesToEncode"], + return_type = "bytes memory", + enabled = From("0.4.22") + ), + BuiltInFunction( + name = "encodeCall", + parameters = [ + "function() functionPointer", + "$Any[] functionArgumentsTuple" + ], + return_type = "bytes memory", + enabled = From("0.8.11") + ), + BuiltInFunction( + name = "encodePacked", + parameters = ["$Any[] valuesToEncode"], + return_type = "bytes memory", + enabled = From("0.4.22") + ), + BuiltInFunction( + name = "encodeWithSelector", + parameters = ["bytes4 selector", "$Any[] functionArgumentsTuple"], + return_type = "bytes memory", + enabled = From("0.4.22") + ), + BuiltInFunction( + name = "encodeWithSignature", + parameters = ["string memory signature", "$Any[] valuesToEncode"], + return_type = "bytes memory", + enabled = From("0.4.22") + ) + ] + ), + BuiltInType( + name = "$address", + fields = [ + BuiltInField(definition = "uint256 balance"), + BuiltInField(definition = "bytes code", enabled = From("0.8.0")), + BuiltInField(definition = "bytes32 codehash", enabled = From("0.8.0")) + ], + functions = [ + BuiltInFunction( + name = "call", + parameters = ["bytes memory"], + return_type = "bool", + enabled = Till("0.5.0") + ), + BuiltInFunction( + name = "call", + parameters = ["bytes memory"], + return_type = "bool, bytes memory", + enabled = From("0.5.0") + ), + BuiltInFunction( + name = "callcode", + parameters = ["bytes memory"], + return_type = "bool, bytes memory", + enabled = Till("0.5.0") + ), + BuiltInFunction( + name = "delegatecall", + parameters = ["bytes memory"], + return_type = "bool", + enabled = Till("0.5.0") + ), + BuiltInFunction( + name = "delegatecall", + parameters = ["bytes memory"], + return_type = "bool, bytes memory", + enabled = From("0.5.0") + ), + BuiltInFunction( + name = "send", + parameters = ["uint256 amount"], + return_type = "bool" + ), + BuiltInFunction( + name = "staticcall", + parameters = ["bytes memory"], + return_type = "bool, bytes memory", + enabled = From("0.5.0") + ), + BuiltInFunction(name = "transfer", parameters = ["uint256 amount"]) + ] + ), + BuiltInType( + name = "$Array", + fields = [BuiltInField(definition = "uint length")], + functions = [ + BuiltInFunction( + name = "push", + parameters = [], + return_type = "$ValueType", + enabled = From("0.6.0") + ), + BuiltInFunction( + name = "push", + parameters = ["$ValueType element"], + return_type = "uint", + enabled = Till("0.6.0") + ), + BuiltInFunction( + name = "push", + parameters = ["$ValueType element"], + enabled = From("0.6.0") + ), + BuiltInFunction(name = "pop", parameters = []) + ] + ), + BuiltInType( + name = "$FixedArray", + fields = [BuiltInField(definition = "uint length")], + functions = [] + ), + BuiltInType( + name = "$BlockType", + fields = [ + BuiltInField(definition = "uint basefee", enabled = From("0.8.7")), + BuiltInField(definition = "uint blobbasefee", enabled = From("0.8.24")), + BuiltInField(definition = "uint chainid", enabled = From("0.8.0")), + BuiltInField(definition = "address payable coinbase"), + BuiltInField(definition = "uint difficulty"), + BuiltInField(definition = "uint gaslimit"), + BuiltInField(definition = "uint number"), + BuiltInField(definition = "uint prevrandao", enabled = From("0.8.18")), + BuiltInField(definition = "uint timestamp") + ], + functions = [BuiltInFunction( + name = "blockhash", + parameters = ["uint"], + return_type = "bytes32", + enabled = Till("0.5.0") + )] + ), + BuiltInType( + name = "$bytes", + fields = [BuiltInField(definition = "uint length")], + functions = [] + ), + BuiltInType( + name = "$BytesType", + fields = [], + functions = [BuiltInFunction( + name = "concat", + parameters = ["bytes[] bytesToConcatenate"], + return_type = "bytes memory" + )] + ), + BuiltInType( + name = "$CallOptions", + fields = [ + BuiltInField(definition = "uint gas"), + BuiltInField(definition = "uint salt"), + BuiltInField(definition = "uint value") + ], + functions = [], + enabled = From("0.6.2") + ), + BuiltInType( + name = "Error", + fields = [BuiltInField(definition = "string reason")], + functions = [], + enabled = From("0.6.0") + ), + BuiltInType( + name = "$ErrorType", + fields = [BuiltInField(definition = "bytes4 selector")], + functions = [], + enabled = From("0.8.4") + ), + BuiltInType( + name = "$Function", + fields = [], + functions = [ + BuiltInFunction( + name = "gas", + parameters = ["uint amount"], + return_type = "function()", + enabled = Till("0.7.0") + ), + BuiltInFunction( + name = "value", + parameters = ["uint amount"], + return_type = "function()", + enabled = Till("0.7.0") + ) + ] + ), + BuiltInType( + name = "$ExternalFunction", + fields = [ + BuiltInField(definition = "address address", enabled = From("0.8.2")), + BuiltInField(definition = "bytes4 selector", enabled = From("0.4.17")) + ], + functions = [ + BuiltInFunction( + name = "gas", + parameters = ["uint amount"], + return_type = "function()", + enabled = Till("0.7.0") + ), + BuiltInFunction( + name = "value", + parameters = ["uint amount"], + return_type = "function()", + enabled = Till("0.7.0") + ) + ] + ), + BuiltInType( + name = "$MessageType", + fields = [ + BuiltInField(definition = "bytes data"), + BuiltInField(definition = "uint256 gas", enabled = Till("0.5.0")), + BuiltInField( + definition = "address payable sender", + enabled = Till("0.8.0") + ), + BuiltInField(definition = "address sender", enabled = From("0.8.0")), + BuiltInField(definition = "bytes4 sig"), + BuiltInField(definition = "uint value") + ], + functions = [] + ), + BuiltInType( + name = "Panic", + fields = [BuiltInField(definition = "uint errorCode")], + functions = [], + enabled = From("0.6.0") + ), + BuiltInType( + name = "$StringType", + fields = [], + functions = [BuiltInFunction( + name = "concat", + parameters = ["string[] stringsToConcatenate"], + return_type = "string memory" + )] + ), + BuiltInType( + name = "$TransactionType", + fields = [ + BuiltInField(definition = "uint gasprice"), + BuiltInField( + definition = "address payable origin", + enabled = Till("0.8.0") + ), + BuiltInField(definition = "address origin", enabled = From("0.8.0")) + ], + functions = [] + ), + BuiltInType( + name = "$ContractTypeType", + fields = [ + BuiltInField(definition = "string name"), + BuiltInField(definition = "bytes creationCode", enabled = From("0.5.3")), + BuiltInField(definition = "bytes runtimeCode", enabled = From("0.5.3")), + BuiltInField(definition = "bytes4 interfaceId", enabled = From("0.6.7")) + ], + functions = [] + ), + BuiltInType( + name = "$InterfaceTypeType", + fields = [ + BuiltInField(definition = "string name"), + BuiltInField(definition = "bytes4 interfaceId", enabled = From("0.6.7")) + ], + functions = [] + ), + BuiltInType( + name = "$IntTypeType", + fields = [ + BuiltInField(definition = "int min", enabled = From("0.6.8")), + BuiltInField(definition = "int max", enabled = From("0.6.8")) + ], + functions = [] + ), + BuiltInType( + name = "$UserDefinedValueType", + fields = [], + functions = [ + BuiltInFunction( + name = "wrap", + parameters = ["$WrappedType elementaryType"], + return_type = "$UserType" + ), + BuiltInFunction( + name = "unwrap", + parameters = ["$UserType userType"], + return_type = "$WrappedType" + ) + ], + enabled = From("0.8.8") + ), + BuiltInType( + name = "$YulExternal", + fields = [ + // These apply to state and storage variables + BuiltInField(definition = "uint slot"), + BuiltInField(definition = "uint offset"), + // Dynamic calldata arrays also have a length + BuiltInField(definition = "uint length") + ], + functions = [] + ), + BuiltInVariable(definition = "$Function $placeholder"), + BuiltInVariable(definition = "$AbiType abi"), + BuiltInVariable(definition = "$BlockType block"), + BuiltInVariable(definition = "$BytesType $bytes"), + BuiltInVariable(definition = "$MessageType msg"), + BuiltInVariable(definition = "uint now", enabled = Till("0.7.0")), + BuiltInVariable(definition = "$StringType $string"), + BuiltInVariable(definition = "$TransactionType tx") + ] ), - BuiltInVariable(definition = "$Function $placeholder"), - BuiltInVariable(definition = "$AbiType abi"), - BuiltInVariable(definition = "$BlockType block"), - BuiltInVariable(definition = "$BytesType $bytes"), - BuiltInVariable(definition = "$MessageType msg"), - BuiltInVariable(definition = "uint now", enabled = Till("0.7.0")), - BuiltInVariable(definition = "$StringType $string"), - BuiltInVariable(definition = "$TransactionType tx") + BuiltInContext(name = "$YulBuiltIns$", definitions = []) ] )); diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/binding_rules.rs b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/binding_rules.rs index 28d75105e5..c5390e9144 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/binding_rules.rs +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/binding_rules.rs @@ -110,9 +110,9 @@ inherit .star_extension ;; internal contract named '%BuiltIns%' (renamed from '$BuiltIns$') so we need ;; to export all its members and type members directly as a source unit ;; definition. -;; __SLANG_SOLIDITY_BUILT_INS_CONTRACT_NAME__ keep in sync with built-ins generation. +;; __SLANG_SOLIDITY_BUILT_INS_CONTRACT_NAME__ keep in sync with language definition. @source_unit [SourceUnit [SourceUnitMembers - [SourceUnitMember @contract [ContractDefinition name: ["%BuiltIns%"]]] + [SourceUnitMember @contract [ContractDefinition name: ["%SolidityBuiltIns%"]]] ]] { if (is-system-file FILE_PATH) { edge @source_unit.defs -> @contract.instance diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.4.11.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.4.11.sol index a012478422..d9892d51ad 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.4.11.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.4.11.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) public returns (address); @@ -94,3 +94,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.4.17.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.4.17.sol index 3ad1ac662a..cc4e68a06b 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.4.17.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.4.17.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) public returns (address); @@ -95,3 +95,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.4.22.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.4.22.sol index e0928e5bb4..c2ef8e0bf7 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.4.22.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.4.22.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -103,3 +103,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.5.0.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.5.0.sol index 18996d2bb1..7c2f75bfe0 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.5.0.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.5.0.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -100,3 +100,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.5.3.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.5.3.sol index 5dd4bb0750..9dc31b2105 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.5.3.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.5.3.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -102,3 +102,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.0.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.0.sol index cd27030b12..6e8625aad0 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.0.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.0.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -109,3 +109,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.2.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.2.sol index 8bba63d2df..f9af769bfc 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.2.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.2.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -114,3 +114,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.7.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.7.sol index 73c8732e8d..dff2c356f4 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.7.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.7.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -116,3 +116,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.8.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.8.sol index 4e2c9b3802..868ba286ff 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.8.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.8.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -118,3 +118,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.7.0.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.7.0.sol index fe1b3e5d27..bb99b4f77d 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.7.0.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.7.0.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -113,3 +113,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.0.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.0.sol index c497a9bc17..0631569dd2 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.0.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.0.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -111,3 +111,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.11.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.11.sol index 2924fa5d0f..c4005de7a4 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.11.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.11.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -121,3 +121,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.18.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.18.sol index a9a2bced7a..86967d6274 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.18.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.18.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -122,3 +122,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.2.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.2.sol index 3a753bda51..fdc28984be 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.2.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.2.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -112,3 +112,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.24.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.24.sol index 398f185000..413e12a2ac 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.24.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.24.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -124,3 +124,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.26.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.26.sol index 4b3e9ac0db..e38d1d684c 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.26.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.26.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -125,3 +125,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.4.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.4.sol index a1869696e1..cb2d73f374 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.4.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.4.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -115,3 +115,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.7.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.7.sol index eb32310320..d088bdd3c2 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.7.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.7.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -116,3 +116,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.8.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.8.sol index aadc2f08ae..a235be17df 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.8.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.8.sol @@ -1,6 +1,6 @@ // This file is generated automatically by infrastructure scripts. Please don't edit by hand. -contract $BuiltIns$ { +contract $SolidityBuiltIns$ { function addmod(uint x, uint y, uint k) public returns (uint); function assert(bool condition) public; function blockhash(uint blockNumber) public returns (bytes32); @@ -120,3 +120,5 @@ contract $BuiltIns$ { $StringType $string; $TransactionType tx; } +contract $YulBuiltIns$ { +}