for fixed-point types, obviously
compatibility function, since pre-0.5.0 functions don't have node.kind returns undefined if you don't put in a function node
takes a contract definition and asks, does it have a payable fallback function?
similar compatibility function for mutability for pre-0.4.16 versions returns undefined if you don't give it a FunctionDefinition or VariableDeclaration
extract the actual numerical value from a node of type rational. currently assumes result will be integer (currently returns BN)
adds "_ptr" on to the end of type identifiers that might need it; note that this operates on identifiers, not definitions
e.g. uint48 -> 6
size in bytes for explicit type size, or null
if not stated
stack size, in words, of a given type note: this function assumes that UDVTs only ever take up a single word, which is currently true
length of a statically sized array -- please only use for arrays already verified to be static!
see staticLength for explanation
returns basic type class for a variable definition node
e.g.:
t_uint256
becomes uint
t_struct$_Thing_$20_memory_ptr
becomes struct
similar to typeClass, but includes any numeric qualifiers
e.g.:
t_uint256
becomes uint256
for user-defined types -- structs, enums, contracts often you can get these from referencedDeclaration, but not always
Returns the type string, but with location (if any) stripped off the end
For function types; returns internal or external (not for use on other types! will cause an error!) should only return "internal" or "external"
Generated using TypeDoc
only for contract types, obviously! will yield nonsense otherwise!