Coverage Summary for Class: TraceAction (co.rsk.rpc.modules.trace)

Class Class, % Method, % Line, %
TraceAction 0% (0/1) 0% (0/12) 0% (0/25)


1 /* 2  * This file is part of RskJ 3  * Copyright (C) 2018 RSK Labs Ltd. 4  * 5  * This program is free software: you can redistribute it and/or modify 6  * it under the terms of the GNU Lesser General Public License as published by 7  * the Free Software Foundation, either version 3 of the License, or 8  * (at your option) any later version. 9  * 10  * This program is distributed in the hope that it will be useful, 11  * but WITHOUT ANY WARRANTY; without even the implied warranty of 12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13  * GNU Lesser General Public License for more details. 14  * 15  * You should have received a copy of the GNU Lesser General Public License 16  * along with this program. If not, see <http://www.gnu.org/licenses/>. 17  */ 18  19 package co.rsk.rpc.modules.trace; 20  21 import com.fasterxml.jackson.annotation.JsonGetter; 22 import com.fasterxml.jackson.annotation.JsonInclude; 23  24 @JsonInclude(JsonInclude.Include.NON_NULL) 25 public class TraceAction { 26  private final CallType callType; 27  private final String from; 28  private final String to; 29  private final String gas; 30  private final String input; 31  private final String init; 32  private final String value; 33  private final String address; 34  private final String refundAddress; 35  private final String balance; 36  private final String creationMethod; 37  38  public TraceAction( 39  CallType callType, 40  String from, 41  String to, 42  String gas, 43  String input, 44  String init, 45  String creationMethod, 46  String value, 47  String address, 48  String refundAddress, 49  String balance) { 50  this.callType = callType; 51  this.from = from; 52  this.to = to; 53  this.gas = gas; 54  this.input = input; 55  this.init = init; 56  this.creationMethod = creationMethod; 57  this.value = value; 58  this.address = address; 59  this.refundAddress = refundAddress; 60  this.balance = balance; 61  } 62  63  @JsonGetter("callType") 64  public String getCallType() { 65  if (this.callType == CallType.NONE) { 66  return null; 67  } 68  69  return this.callType.name().toLowerCase(); 70  } 71  72  @JsonGetter("from") 73  public String getFrom() { 74  return this.from; 75  } 76  77  @JsonGetter("to") 78  public String getTo() { 79  return this.to; 80  } 81  82  @JsonGetter("gas") 83  public String getGas() { 84  return this.gas; 85  } 86  87  @JsonGetter("input") 88  public String getInput() { 89  return this.input; 90  } 91  92  @JsonGetter("creationMethod") 93  public String getCreationMethod() { 94  return this.creationMethod; 95  } 96  97  @JsonGetter("init") 98  public String getInit() { 99  return this.init; 100  } 101  102  @JsonGetter("value") 103  public String getValue() { 104  return this.value; 105  } 106  107  @JsonGetter("balance") 108  public String getBalance() { return this.balance; } 109  110  @JsonGetter("address") 111  public String getAddress() { return this.address; } 112  113  @JsonGetter("refundAddress") 114  public String getRefundAddress() { return this.refundAddress; } 115 }