getExpectedAddress function

Future<(Address, String, String)> getExpectedAddress({
  1. required String tvc,
  2. required String contractAbi,
  3. required int workchainId,
  4. PublicKey? publicKey,
  5. required TokensObject initData,
})

Get address of tvc and contract_abi. Returns list of address, state_init, hash or throws error

Implementation

Future<(Address, String, String)> getExpectedAddress({
  required String tvc,
  required String contractAbi,
  required int workchainId,
  PublicKey? publicKey,
  required TokensObject initData,
}) async {
  final res = await createLib().getExpectedAddress(
    tvc: tvc,
    contractAbi: contractAbi,
    workchainId: workchainId,
    publicKey: publicKey?.publicKey,
    initData: jsonEncode(initData),
  );
  return (Address(address: res[0]), res[1], res[2]);
}