Crate foundry_compilers_artifacts

Source
Expand description

Meta crate reexporting all artifacts types.

Re-exports§

pub use foundry_compilers_artifacts_solc as solc;
pub use foundry_compilers_artifacts_vyper as vyper;

Modules§

ast
Bindings for the Solidity and Yul ASTs.
bytecode
Bytecode related types.
configurable
contract
Contract related types.
error
hh
Hardhat support
output_selection
Bindings for standard json output selection.
remappings
serde_helpers
Serde helpers.
sourcemap
sources

Structs§

ArrayTypeName
An array type name.
Assignment
An assignment expression.
Ast
Represents the AST field in the solc output
BinaryOperation
A binary operation.
Block
A block of statements.
Break
The break keyword.
Bytecode
CompactBytecode
CompactContract
The general purpose minimal representation of a contract’s abi with bytecode Unlike CompactContractSome all fields are optional so that every possible compiler output can be represented by it
CompactContractBytecode
Minimal representation of a contract with a present abi and bytecode.
CompactContractBytecodeCow
A CompactContractBytecode that is either owns or borrows its content
CompactContractRef
Helper type to serialize while borrowing from Contract
CompactContractRefSome
Minimal representation of a contract with a present abi and bytecode that borrows.
CompactContractSome
Minimal representation of a contract’s artifact with a present abi and bytecode.
CompactDeployedBytecode
Compiler
CompilerOutput
Output type solc produces
Conditional
A conditional expression.
ConfigurableContractArtifact
Represents the Artifact that ConfigurableArtifacts emits.
Continue
The continue keyword.
Contract
Represents a compiled solidity contract
ContractBytecode
Minimal representation of a contract with a present abi and bytecode.
ContractBytecodeSome
Minimal representation of a contract with a present abi and bytecode.
ContractDefinition
A contract definition.
Creation
DebuggingSettings
Debugging settings for solc
DeployedBytecode
DevDoc
DoWhileStatement
A do while statement.
Doc
DocLibraries
ElementaryTypeName
ElementaryTypeNameExpression
EmitStatement
An emit statement.
EnumDefinition
An enum definition.
EnumValue
An enum value.
Error
ErrorDefinition
A custom error definition.
ErrorDoc
EventDefinition
An event definition.
EventDoc
Evm
Ewasm
ExpressionStatement
An expression statement.
ExternalInlineAssemblyReference
A reference to an external variable or slot in an inline assembly block.
ForStatement
A for statement.
FunctionCall
A function call expression.
FunctionCallOptions
A function call options expression (e.g. x.f{gas: 1}).
FunctionDebugData
FunctionDefinition
A function definition.
FunctionIdentifierPath
A wrapper around IdentifierPath for the UsingForDirective.
FunctionTypeName
A function type name.
GasEstimates
GeneratedSource
Identifier
An identifier.
IdentifierPath
An identifier path.
IfStatement
An if statement.
ImportDirective
An import directive.
IndexAccess
An index access.
IndexRangeAccess
An index range access.
InheritanceSpecifier
An inheritance specifier.
InlineAssembly
A block of inline assembly.
Item
Libraries
A wrapper type for all libraries in the form of <file>:<lib>:<addr>
Literal
A literal value.
LosslessMetadata
A helper type that ensures lossless (de)serialisation so we can preserve the exact String metadata value that’s being hashed by solc
LowFidelitySourceLocation
Represents the source location of a node: <start byte>:<length>:<source index>.
Mapping
A mapping type.
MemberAccess
Member access.
Metadata
Bindings for solc contract metadata
MetadataSettings
Compiler settings
MetadataSource
MetadataSources
Compilation source files/source units, keys are file names
MethodDoc
ModelCheckerSettings
Model checker settings for solc
ModifierDefinition
A modifier definition.
ModifierInvocation
A modifier or base constructor invocation.
NewExpression
A new expression.
Node
Offsets
Byte offsets into the bytecode. Linking replaces the 20 bytes located there.
Optimizer
OptimizerDetails
Output
OutputContracts
A wrapper helper type for the Contracts type alias
OverloadedOperator
OverrideSpecifier
An override specifier.
ParameterList
A parameter list.
PlaceholderStatement
A placeholder statement (_)
PragmaDirective
A pragma directive.
RelativeRemapping
A relative Remapping that’s aware of the current location
RelativeRemappingPathBuf
The path part of the Remapping that knows the path of the file it was configured in, if any.
Remapping
The solidity compiler can only reference files that exist locally on your computer. So importing directly from GitHub (as an example) is not possible.
Return
A return statement.
RevertStatement
A revert statement.
SecondarySourceLocation
Settings
SettingsMetadata
SolcAbi
SolcInput
Input type solc expects.
Source
Content of a solidity file
SourceFile
SourceFiles
A wrapper type for a list of source files: path -> SourceFile.
SourceUnit
The root node of a Solidity AST.
Sources
An ordered list of files and their source.
StandardJsonCompilerInput
A CompilerInput representation used for verify
Storage
StorageLayout
Represents the storage-layout section of the CompilerOutput if selected.
StorageType
StructDefinition
A struct definition.
StructuredDocumentation
Structured documentation (NatSpec).
SymbolAlias
A symbol alias.
TryCatchClause
A try/catch clause.
TryStatement
A try/catch statement.
TupleExpression
A tuple expression.
TypeDescriptions
A type description.
UnaryOperation
A unary operation.
UncheckedBlock
An unchecked block.
UserDefinedTypeName
A user defined type name.
UserDefinedValueTypeDefinition
A user defined value type definition.
UserDoc
UsingForDirective
A using for directive.
VariableDeclaration
A variable declaration.
VariableDeclarationStatement
A variable declaration statement.
WhileStatement
A while statement.
YulDetails

Enums§

AssemblyReferenceSuffix
An assembly reference suffix.
AssignmentOperator
Assignment operators.
BinaryOperator
Binary operators.
BlockOrStatement
BytecodeHash
Determines the hash method for the metadata hash that is appended to the bytecode.
BytecodeObject
Represents the bytecode of a contracts that might be not fully linked yet.
ContractDefinitionPart
ContractKind
All Solidity contract kinds.
Documentation
ElementaryOrRawTypeName
EofVersion
Available EOF versions.
EvmVersion
EVM versions.
Expression
ExpressionOrVariableDeclarationStatement
FunctionCallKind
Function call kinds.
FunctionKind
Function kinds.
IdentifierOrIdentifierPath
InlineAssemblyFlag
Inline assembly flags.
LiteralKind
Literal kinds.
ModelCheckerEngine
Which model checker engine to run.
ModelCheckerInvariant
Which model checker invariants to check.
ModelCheckerSolver
Which model checker solvers to check.
ModelCheckerTarget
Which model checker targets to check.
ModifierInvocationKind
Modifier invocation kinds.
Mutability
Variable mutability specifier.
NodeType
RemappingError
RevertStrings
How to treat revert (and require) reason strings.
Severity
The severity of the error.
SolcLanguage
Languages supported by the Solc compiler.
SourceCompilationKind
Represents the state of a filtered Source.
SourceUnitPart
StateMutability
Function mutability specifier.
Statement
StorageLocation
Storage location specifier.
TypeName
UnaryOperator
Unary operators.
UserDefinedTypeNameOrIdentifierPath
UserDocNotice
UsingForFunctionItem
Visibility
Visibility specifier.

Constants§

SOLIDITY
YUL

Functions§

deserialize_bytes
deserialize_opt_bytes
serialize_bytecode_without_prefix
This will serialize the bytecode data without a 0x prefix, which the ethers::types::Bytes adds by default.

Type Aliases§

Contracts
file -> (contract name -> Contract)
FileToContractsMap
Solidity files are made up of multiple source units, a solidity contract is such a source unit, therefore a solidity file can contain multiple contracts: (1-N*) relationship.