Contract constructor

Contract({
  1. required Map params,
  2. dynamic messenger,
  3. Wallet? wallet,
  4. ContractStatus? status = ContractStatus.INITIALISED,
  5. bool? toDS = false,
})

Implementation

Contract(
    {required Map params,
    Messenger? messenger,
    Wallet? wallet,
    ContractStatus? status = ContractStatus.INITIALISED,
    bool? toDS = false}) {
  this.code = params['code'] ?? '';
  this.init = params['init'] ?? [];
  this.version = params['version'] ?? 0;
  this.transaction = params['transaction'] ?? null;
  this.contractAddress = params['ContractAddress'] ?? '';
  this.status = params['status'] ?? status;
  // factory
  this.messenger = messenger;
  this.wallet = wallet;
  this.toDS = toDS;
}