write method

Future<String> write(
  1. Credentials credentials,
  2. Transaction? base,
  3. ContractFunction function,
  4. List parameters,
)
inherited

Implementation

Future<String> write(
  Credentials credentials,
  Transaction? base,
  ContractFunction function,
  List<dynamic> parameters,
) {
  final transaction = base?.copyWith(
        data: function.encodeCall(parameters),
        to: self.address,
      ) ??
      Transaction.callContract(
        contract: self,
        function: function,
        parameters: parameters,
      );

  return client.sendTransaction(
    credentials,
    transaction,
    chainId: chainId,
    fetchChainIdFromNetworkId: chainId == null,
  );
}