deployScore method
deployContract: only available in android, on ios the sdk not support yet to deploy a SCORE by choose the zip file contain the source code the sample token zip file contain in source code, pls download it to your phone
final transactionResult = await FlutterIconNetwork.instance.deployScore(
privateKey: privateKey, initIcxSupply: "10");
Implementation
Future<TransactionResult> deployScore({String privateKey, String initIcxSupply}) async {
if(Platform.isIOS) {
return null;
}
Uint8List fileBytes = await readFile();
final String result = await _channel.invokeMethod('deployScore',
{'private_key': privateKey, 'init_icx_supply': initIcxSupply, "host": host, "network_id": _networkId, 'content': fileBytes});
print("FlutterIconNetwork deployScore $result");
return transactionResultFromJson(result);
}