Coverage Summary for Class: SuicideInvoke (org.ethereum.vm.program.invoke)
Class |
Class, %
|
Method, %
|
Line, %
|
SuicideInvoke |
0%
(0/1)
|
0%
(0/8)
|
0%
(0/11)
|
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 SuicideInvoke implements InvokeData {
26 private final DataWord ownerAddress;
27 private final DataWord callerAddress;
28 private final DataWord balance;
29
30 public SuicideInvoke(DataWord callerAddress, DataWord ownerAddress, DataWord balance) {
31 this.callerAddress = callerAddress;
32 this.ownerAddress = ownerAddress;
33 this.balance = balance;
34 }
35
36 @Override
37 public DataWord getOwnerAddress() {
38 return this.ownerAddress;
39 }
40
41 @Override
42 public DataWord getCallerAddress() {
43 return this.callerAddress;
44 }
45
46 @Override
47 public long getGas() {
48 return 0L;
49 }
50
51 @Override
52 public DataWord getCallValue() {
53 return this.balance;
54 }
55
56 @Override
57 public DataWord getDataSize() {
58 return DataWord.ZERO;
59 }
60
61 @Override
62 public DataWord getDataValue(DataWord indexData) {
63 return DataWord.ZERO;
64 }
65
66 @Override
67 public byte[] getDataCopy(DataWord offsetData, DataWord lengthData) {
68 return ByteUtil.EMPTY_BYTE_ARRAY;
69 }
70 }