Interface constructor

Interface(
  1. dynamic abi
)

Create a new Interface from a JSON string or object representing abi.

The abi may be a JSON string or the parsed Object (using JSON.parse) which is emitted by the Solidity compiler (or compatible languages).

The abi may also be a Human-Readable Abi, which is a format the Ethers created to simplify manually typing the ABI into the source and so that a Contract ABI can also be referenced easily within the same source file.

Implementation

factory Interface(dynamic abi) {
  assert(abi is List<String> || abi is String, 'ABI must be valid type');
  return Interface._(_InterfaceImpl(abi));
}