wake.ir.expressions.new_expression
module
#
NewExpression
class
#
Bases: ExpressionAbc
A new expression may create:
- a new contract, e.g.
new ERC20()
, - a new array, e.g.
new uint[](10)
, - a new
bytes
orstring
, e.g.new bytes(10)
.
Source code in wake/ir/expressions/new_expression.py
children: Iterator[TypeNameAbc]
property
#
Yields:
Type | Description |
---|---|
TypeNameAbc
|
Direct children of this node. |
type_name: TypeNameAbc
property
#
Is:
- UserDefinedTypeName referencing ContractDefinition when creating a new contract,
- ArrayTypeName when creating a new array,
- ElementaryTypeName when creating new
bytes
orstring
.
Returns:
Type | Description |
---|---|
TypeNameAbc
|
Type name of the object to be created. |