wrap method
wrap wraps MAS coin to WMAS
Implementation
Future<(String, bool)> wrap(double amount) async {
final params = Args();
const targetFunction = "deposit";
final functionParameters = params.serialise();
final maximumGas = toMAS(BigInt.from(GasLimit.MAX_GAS_CALL.value));
final smartContracAddress = getTokenAddress(TokenName.WMAS, grpc.isBuildnet);
return await grpc.scCall(
account: grpc.account,
fee: minimumFee,
coins: amount,
maximumGas: maximumGas,
smartContracAddress: smartContracAddress,
functionName: targetFunction,
functionParameters: functionParameters,
);
}