Action constructor

Action({
  1. CreateAccount? createAccount,
  2. DeployContract? deployContract,
  3. FunctionCall? functionCall,
  4. Transfer? transfer,
  5. Stake? stake,
  6. AddKey? addKey,
  7. DeleteKey? deleteKey,
  8. DeleteAccount? deleteAccount,
})

Implementation

factory Action({
  CreateAccount? createAccount,
  DeployContract? deployContract,
  FunctionCall? functionCall,
  Transfer? transfer,
  Stake? stake,
  AddKey? addKey,
  DeleteKey? deleteKey,
  DeleteAccount? deleteAccount,
}) {
  final _result = create();
  if (createAccount != null) {
    _result.createAccount = createAccount;
  }
  if (deployContract != null) {
    _result.deployContract = deployContract;
  }
  if (functionCall != null) {
    _result.functionCall = functionCall;
  }
  if (transfer != null) {
    _result.transfer = transfer;
  }
  if (stake != null) {
    _result.stake = stake;
  }
  if (addKey != null) {
    _result.addKey = addKey;
  }
  if (deleteKey != null) {
    _result.deleteKey = deleteKey;
  }
  if (deleteAccount != null) {
    _result.deleteAccount = deleteAccount;
  }
  return _result;
}