generator library
Classes
- Web3ContractGenerator
- The builder class which does the code generation.
Functions
-
abiFuncToMethod(
ContractFunction func, {bool nullable = false}) → String -
convert a
ContractFragment
to a source code fragment of a dart proxy implementation. -
abiOutputToReturnType(
List< FunctionParameter> outputs) → String -
Convert
List<FunctionParameter>
to a dart source code fragment of the equivalent web3dart return type (using TupleX where necessary). -
abiToMethods(
ContractAbi abi, {bool nullable = true}) → String -
genWholeW3ContractFile(
String abiString, String fileNameWithExt, {bool nonNullableEnabled = false}) → String - Generate the whole output file as a string.
-
paramAddParamName(
FunctionParameter param, int nth_param) → Tuple2< FunctionParameter, String> -
Convert a
FunctionParameter
to a source code fragment of the equivalent web3dart type. -
web3ContractGen(
BuilderOptions opts) → Builder - The generator the builder actually uses.
-
web3TypesToDart(
String web3Ty) → String -
wrap<
T> (String returnType, {bool nullable = false}) → String -
Wrap the dart source code fragment of a type in
Future
. i.e.Future<${type}>
.