solidity_parser.ast.solnodes¶
Attributes¶
Classes¶
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
String identifier node |
|
Solidity reference type storage locations |
|
A name-value pair used for calling functions with options |
|
Solidity numerical unit types |
|
Constant value expression that can have an optional unit associated with it |
|
Single operand operation types |
|
Single operand expression |
|
Binary/two operand operation types, including assignment types |
|
Binary/two operand expression |
|
Choice expression that evaluates the given condition and returns one of the two given expressions |
|
New object allocation expression without constructor invocation |
|
Solidity 8 inline array creation |
|
Converts an address to a payable address |
|
Gets the value at the given index from the given array |
|
Gets a subarray at the given start and end indices from the given array |
|
Gets a member field or method from a given object |
|
Invokes the given callee |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Create a collection of name/value pairs. |
|
Create a collection of name/value pairs. |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Create a collection of name/value pairs. |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
Functions¶
|
Module Contents¶
- class solidity_parser.ast.solnodes.AST1Node¶
Bases:
solidity_parser.ast.nodebase.NodeBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Stmt¶
Bases:
AST1NodeBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Expr¶
Bases:
AST1NodeBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Location(*args, **kwds)¶
Bases:
enum.EnumSolidity reference type storage locations
These are used to specify in what type of memory context/area a struct/array/mapping is stored
- MEMORY = 'memory'¶
An location that does not persist between function calls
- STORAGE = 'storage'¶
A location persists between function calls
Contract state variables are stored here also
- CALLDATA = 'calldata'¶
A location that contains the function call arguments for external function call parameters
- __str__()¶
- class solidity_parser.ast.solnodes.NamedArg¶
Bases:
ExprA name-value pair used for calling functions with options
- class solidity_parser.ast.solnodes.Unit(_: str, multiplier: int)¶
Bases:
enum.EnumSolidity numerical unit types
- WEI = ('wei', 1)¶
- GWEI = ('gwei', 1000000000.0)¶
- SZABO = ('szabo', 1000000000000.0)¶
- FINNEY = ('finney', 1000000000000000.0)¶
- ETHER = ('ether', 1e+18)¶
- SECONDS = ('seconds', 1)¶
- MINUTES = ('minutes', 60)¶
- HOURS¶
- DAYS¶
- WEEKS¶
- YEARS¶
- _multiplier_¶
- __str__()¶
- property multiplier: int¶
- class solidity_parser.ast.solnodes.Literal¶
Bases:
ExprConstant value expression that can have an optional unit associated with it
The value may be a python primitive, e.g. an integer, boolean, string, tuple, etc
- value: Any¶
- code_str()¶
- class solidity_parser.ast.solnodes.UnaryOpCode(*args, **kwds)¶
Bases:
enum.EnumSingle operand operation types
- INC = '++'¶
- DEC = '--'¶
- SIGN_POS = '+'¶
- SIGN_NEG = '-'¶
- BOOL_NEG = '!'¶
- BIT_NEG = '~'¶
- DELETE = 'delete'¶
- class solidity_parser.ast.solnodes.UnaryOp¶
Bases:
ExprSingle operand expression
- op: UnaryOpCode¶
- is_pre: bool¶
Whether the operation is pre or post, e.g. ++x or x++
- class solidity_parser.ast.solnodes.BinaryOpCode(*args, **kwds)¶
Bases:
enum.EnumBinary/two operand operation types, including assignment types
- EXPONENTIATE = '**'¶
- MUL = '*'¶
- DIV = '/'¶
- MOD = '%'¶
- ADD = '+'¶
- SUB = '-'¶
- LSHIFT = '<<'¶
- RSHIFT = '>>'¶
- BIT_AND = '&'¶
- BIT_XOR = '^'¶
- BIT_OR = '|'¶
- LT = '<'¶
- GT = '>'¶
- LTEQ = '<='¶
- GTEQ = '>='¶
- EQ = '=='¶
- NEQ = '!='¶
- BOOL_AND = '&&'¶
- BOOL_OR = '||'¶
- ASSIGN = '='¶
- ASSIGN_OR = '|='¶
- ASSIGN_BIT_NEG = '^='¶
- ASSIGN_BIT_AND = '&='¶
- ASSIGN_LSHIFT = '<<='¶
- ASSIGN_RSHIFT = '>>='¶
- ASSIGN_ADD = '+='¶
- ASSIGN_SUB = '-='¶
- ASSIGN_MUL = '*='¶
- ASSIGN_DIV = '/='¶
- ASSIGN_MOD = '%='¶
- class solidity_parser.ast.solnodes.BinaryOp¶
Bases:
ExprBinary/two operand expression
- op: BinaryOpCode¶
- class solidity_parser.ast.solnodes.TernaryOp¶
Bases:
ExprChoice expression that evaluates the given condition and returns one of the two given expressions
If the condition evaluates to false then the left expression is returned, otherwise the right one is
- class solidity_parser.ast.solnodes.New¶
Bases:
ExprNew object allocation expression without constructor invocation
Note that this expression only represents the ‘new X’ part of a new objects creation ‘new X(a,b)’. This expression must then be used as the base object in a constructor call to instantiate it.
- type_name: solidity_parser.ast.types.Type¶
- class solidity_parser.ast.solnodes.NewInlineArray¶
Bases:
ExprSolidity 8 inline array creation
An inline array is one where the elements are explicitly stated in the definition, for example: ‘int[5] foo2 = [1, 0, 0, 0, 0];’
- class solidity_parser.ast.solnodes.PayableConversion¶
Bases:
ExprConverts an address to a payable address
For example: ‘payable(address(myAddressHex))’
- class solidity_parser.ast.solnodes.GetArrayValue¶
Bases:
ExprGets the value at the given index from the given array
- class solidity_parser.ast.solnodes.GetArraySlice¶
Bases:
ExprGets a subarray at the given start and end indices from the given array
- class solidity_parser.ast.solnodes.GetMember¶
Bases:
ExprGets a member field or method from a given object
- class solidity_parser.ast.solnodes.CallFunction¶
Bases:
ExprInvokes the given callee
- special_call_options: list[NamedArg]¶
See https://docs.soliditylang.org/en/v0.8.21/control-structures.html#external-function-calls
- class solidity_parser.ast.solnodes.Var¶
Bases:
AST1NodeBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- var_type: solidity_parser.ast.types.Type¶
- class solidity_parser.ast.solnodes.VarDecl¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- is_lhs_tuple: bool = False¶
- class solidity_parser.ast.solnodes.Parameter¶
Bases:
AST1NodeBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- var_type: solidity_parser.ast.types.Type¶
- __str__()¶
- class solidity_parser.ast.solnodes.ExprStmt¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Block¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- is_unchecked: bool = False¶
- class solidity_parser.ast.solnodes.If¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Catch¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Try¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.While¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.For¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Emit¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- call: CallFunction¶
- class solidity_parser.ast.solnodes.Revert¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- call: CallFunction¶
- class solidity_parser.ast.solnodes.AssemblyStmt¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- code: str¶
- class solidity_parser.ast.solnodes.DoWhile¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Continue¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Break¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Return¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Throw¶
Bases:
StmtBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Modifier¶
Bases:
AST1NodeBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.VisibilityModifierKind(*args, **kwds)¶
Bases:
enum.EnumCreate a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- EXTERNAL = 'external'¶
- PUBLIC = 'public'¶
- INTERNAL = 'internal'¶
- PRIVATE = 'private'¶
- VIRTUAL = 'virtual'¶
- class solidity_parser.ast.solnodes.MutabilityModifierKind(*args, **kwds)¶
Bases:
enum.EnumCreate a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- PURE = 'pure'¶
- CONSTANT = 'constant'¶
- VIEW = 'view'¶
- PAYABLE = 'payable'¶
- IMMUTABLE = 'immutable'¶
- class solidity_parser.ast.solnodes.VisibilityModifier2¶
Bases:
ModifierBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- kind: VisibilityModifierKind¶
- class solidity_parser.ast.solnodes.MutabilityModifier2¶
Bases:
ModifierBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- kind: MutabilityModifierKind¶
- class solidity_parser.ast.solnodes.InvocationModifier¶
Bases:
ModifierBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.OverrideSpecifier¶
Bases:
ModifierBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- arguments: list[solidity_parser.ast.types.UserType]¶
- class solidity_parser.ast.solnodes.SourceUnit¶
Bases:
AST1NodeBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.PragmaDirective¶
Bases:
SourceUnitBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.ImportDirective¶
Bases:
SourceUnitBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- path: str¶
- class solidity_parser.ast.solnodes.GlobalImportDirective¶
Bases:
ImportDirectiveBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.UnitImportDirective¶
Bases:
ImportDirectiveBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.SymbolAlias¶
Bases:
AST1NodeBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.SymbolImportDirective¶
Bases:
ImportDirectiveBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- aliases: list[SymbolAlias]¶
- class solidity_parser.ast.solnodes.ContractPart¶
Bases:
AST1NodeBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.SpecialFunctionKind(*args, **kwds)¶
Bases:
enum.EnumCreate a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- CONSTRUCTOR = '<<constructor>>'¶
- RECEIVE = '<<receive>>'¶
- FALLBACK = '<<fallback>>'¶
- __str__()¶
- class solidity_parser.ast.solnodes.FunctionDefinition¶
Bases:
SourceUnit,ContractPartBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- name: Ident | SpecialFunctionKind¶
- class solidity_parser.ast.solnodes.ModifierDefinition¶
Bases:
ContractPartBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.StructMember¶
Bases:
AST1NodeBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- member_type: solidity_parser.ast.types.Type¶
- class solidity_parser.ast.solnodes.StructDefinition¶
Bases:
SourceUnit,ContractPartBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- members: list[StructMember]¶
- class solidity_parser.ast.solnodes.EnumDefinition¶
Bases:
SourceUnit,ContractPartBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.StateVariableDeclaration¶
Bases:
ContractPartBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- var_type: solidity_parser.ast.types.Type¶
- class solidity_parser.ast.solnodes.ConstantVariableDeclaration¶
Bases:
SourceUnitBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- var_type: solidity_parser.ast.types.Type¶
- class solidity_parser.ast.solnodes.UserValueType¶
Bases:
SourceUnit,ContractPartBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.EventParameter¶
Bases:
AST1NodeBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- var_type: solidity_parser.ast.types.Type¶
- is_indexed: bool¶
- class solidity_parser.ast.solnodes.EventDefinition¶
Bases:
ContractPartBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- is_anonymous: bool¶
- parameters: list[EventParameter]¶
- class solidity_parser.ast.solnodes.ErrorParameter¶
Bases:
AST1NodeBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- var_type: solidity_parser.ast.types.Type¶
- class solidity_parser.ast.solnodes.ErrorDefinition¶
Bases:
SourceUnit,ContractPartBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- parameters: list[ErrorParameter]¶
- class solidity_parser.ast.solnodes.UsingAttachment¶
Bases:
AST1NodeBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.UsingOperatorBinding¶
Bases:
AST1NodeBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- operator: UnaryOpCode | BinaryOpCode¶
- class solidity_parser.ast.solnodes.UsingDirective¶
Bases:
ContractPartBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- override_type: solidity_parser.ast.types.Type¶
- attachments_or_bindings: list[UsingAttachment | UsingOperatorBinding] = []¶
- is_global: bool = False¶
- class solidity_parser.ast.solnodes.InheritSpecifier¶
Bases:
AST1NodeBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.ContractDefinition¶
Bases:
SourceUnitBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- is_abstract: bool¶
- inherits: list[InheritSpecifier]¶
- parts: list[ContractPart]¶
- class solidity_parser.ast.solnodes.InterfaceDefinition¶
Bases:
SourceUnitBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- inherits: list[InheritSpecifier]¶
- parts: list[ContractPart]¶
- class solidity_parser.ast.solnodes.LibraryDefinition¶
Bases:
SourceUnitBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- parts: list[ContractPart]¶
- class solidity_parser.ast.solnodes.CreateMetaType¶
Bases:
ExprBase class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- base_type: solidity_parser.ast.types.Type¶
- solidity_parser.ast.solnodes.has_modifier_kind(node, *kinds: VisibilityModifierKind | MutabilityModifierKind)¶
- type solidity_parser.ast.solnodes.ModFunErrEvt = ModifierDefinition | FunctionDefinition | ErrorDefinition | EventDefinition¶
- type solidity_parser.ast.solnodes.Types = soltypes.VariableLengthArrayType | soltypes.VoidType | soltypes.IntType | soltypes.FunctionType | soltypes.ArrayType | soltypes.BytesType | soltypes.BoolType | soltypes.AnyType | soltypes.MappingType | soltypes.UserType | soltypes.StringType | soltypes.FixedLengthArrayType | soltypes.AddressType | soltypes.ByteType | soltypes.ErrorType¶