unpackInitData function
Unpack data from contractAbi
.
Returns optional public key and json-encoded Map<String, Token>
or throws error.
Implementation
Future<(PublicKey?, Map<String, dynamic>)> unpackInitData({
required String contractAbi,
required String data,
}) async {
final result = await createLib().unpackInitData(
contractAbi: contractAbi,
data: data,
);
return (
result[0] == null ? null : PublicKey(publicKey: result[0]!),
jsonDecode(result[1]!) as Map<String, dynamic>,
);
}