executeLocal function
Run contract locally.
config
- value from Transport.getBlockchainConfig
account
- boc from makeFullAccountBoc
message
- base64-encoded boc from one of:
- encodeInternalMessage
- createRawExternalMessage
- createExternalMessageWithoutSignature
- UnsignedMessage.signFake
Returns boc, transaction
if everything is ok or
throws ExecuteLocalException if transaction failed, this is not
code-related problem.
or throws error
Implementation
Future<(String, Transaction)> executeLocal({
required String config,
required String account,
required String message,
required DateTime utime,
required bool disableSignatureCheck,
BigInt? overwriteBalance,
int? globalId,
}) async {
final result = await createLib().executeLocal(
account: account,
message: message,
utime: utime.millisecondsSinceEpoch,
globalId: globalId,
config: config,
overwriteBalance: overwriteBalance?.toString(),
disableSignatureCheck: disableSignatureCheck,
);
if (result.length == 1) {
throw ExecuteLocalException(result[0]);
}
return (result[0], Transaction.fromJson(jsonDecode(result[1])));
}