Contract constructor

Contract({
  1. required String contractAddress,
  2. required String contractABI,
  3. required String contractName,
  4. required String rpcURL,
})

Implementation

Contract({
  required this.contractAddress,
  required this.contractABI,
  required this.contractName,
  required this.rpcURL,
  // required this.web3Provider,
}) {
  this.contract = web3.DeployedContract(
    web3.ContractAbi.fromJson(this.contractABI, contractName),
    web3.EthereumAddress.fromHex(this.contractAddress),
  );
  this.client = web3.Web3Client(this.rpcURL, http.Client());
}