SmartContract constructor
SmartContract({
- required TronAddress originAddress,
- TronAddress? contractAddress,
- required SmartContractABI? abi,
- required List<
int> bytecode, - BigInt? callValue,
- BigInt? consumeUserResourcePercent,
- String? name,
- BigInt? originEnergyLimit,
- List<
int> ? codeHash, - List<
int> ? trxHash, - int? version,
Create a new SmartContract instance with specified parameters.
Implementation
SmartContract(
{required this.originAddress,
this.contractAddress,
required this.abi,
required List<int> bytecode,
this.callValue,
this.consumeUserResourcePercent,
this.name,
this.originEnergyLimit,
List<int>? codeHash,
List<int>? trxHash,
this.version})
: bytecode = BytesUtils.toBytes(bytecode, unmodifiable: true),
trxHash = BytesUtils.tryToBytes(trxHash, unmodifiable: true),
codeHash = BytesUtils.tryToBytes(codeHash, unmodifiable: true);