deploy method
Implementation
Future<Contract> deploy(
{int? gasLimit,
BigInt? gasPrice,
Account? account,
String? passphrase,
int maxAttempts = 20,
int interval = 1000,
bool toDS = false}) async {
var defaultGasLimit = 2500000000;
var defaultGasPrice = BigInt.from(100000000);
if (this.init == null) {
throw 'Cannot deploy without code or ABI.';
}
try {
this.setDeployPayload(
gasLimit: gasLimit ?? defaultGasLimit,
gasPrice: gasPrice ?? defaultGasPrice,
toDS: toDS);
await this.sendContract(
account: account ?? this.signer, passphrase: passphrase);
await this.confirmTx(maxAttempts: maxAttempts, interval: interval);
return this;
} catch (err) {
rethrow;
}
}