Coverage Summary for Class: TransferInvoke (org.ethereum.vm.program.invoke)
Class |
Class, %
|
Method, %
|
Line, %
|
TransferInvoke |
0%
(0/1)
|
0%
(0/8)
|
0%
(0/12)
|
1 /*
2 * This file is part of RskJ
3 * Copyright (C) 2017 RSK Labs Ltd.
4 * (derived from ethereumJ library, Copyright (c) 2016 <ether.camp>)
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 package org.ethereum.vm.program.invoke;
21
22 import org.ethereum.util.ByteUtil;
23 import org.ethereum.vm.DataWord;
24
25 public class TransferInvoke implements InvokeData {
26 private final DataWord ownerAddress;
27 private final DataWord callerAddress;
28 private final long gas;
29 private final DataWord callValue;
30
31 public TransferInvoke(DataWord callerAddress, DataWord ownerAddress, long gas, DataWord callValue) {
32 this.callerAddress = callerAddress;
33 this.ownerAddress = ownerAddress;
34 this.gas = gas;
35 this.callValue = callValue;
36 }
37
38 @Override
39 public DataWord getOwnerAddress() {
40 return this.ownerAddress;
41 }
42
43 @Override
44 public DataWord getCallerAddress() {
45 return this.callerAddress;
46 }
47
48 @Override
49 public long getGas() {
50 return this.gas;
51 }
52
53 @Override
54 public DataWord getCallValue() {
55 return this.callValue;
56 }
57
58 @Override
59 public DataWord getDataSize() {
60 return DataWord.ZERO;
61 }
62
63 @Override
64 public DataWord getDataValue(DataWord indexData) {
65 return DataWord.ZERO;
66 }
67
68 @Override
69 public byte[] getDataCopy(DataWord offsetData, DataWord lengthData) {
70 return ByteUtil.EMPTY_BYTE_ARRAY;
71 }
72 }