forked from tronprotocol/java-tron
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeposit.java
More file actions
96 lines (54 loc) · 2.23 KB
/
Deposit.java
File metadata and controls
96 lines (54 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package org.tron.common.storage;
import org.tron.common.runtime.vm.DataWord;
import org.tron.common.runtime.vm.program.Storage;
import org.tron.core.capsule.AccountCapsule;
import org.tron.core.capsule.BlockCapsule;
import org.tron.core.capsule.BytesCapsule;
import org.tron.core.capsule.ContractCapsule;
import org.tron.core.capsule.TransactionCapsule;
import org.tron.core.db.Manager;
import org.tron.protos.Protocol;
/**
* @author Guo Yonggang
* @since 2018.04
*/
public interface Deposit {
Manager getDbManager();
AccountCapsule createAccount(byte[] address, Protocol.AccountType type);
AccountCapsule createAccount(byte[] address, String accountName, Protocol.AccountType type);
AccountCapsule getAccount(byte[] address);
void createContract(byte[] address, ContractCapsule contractCapsule);
void createContractByNormalAccountIndex(byte[] address, BytesCapsule contractAddress);
ContractCapsule getContract(byte[] address);
void saveCode(byte[] codeHash, byte[] code);
byte[] getCode(byte[] codeHash);
//byte[] getCodeHash(byte[] address);
void addStorageValue(byte[] address, DataWord key, DataWord value);
DataWord getStorageValue(byte[] address, DataWord key);
Storage getStorage(byte[] address);
long getBalance(byte[] address);
long addBalance(byte[] address, long value);
Deposit newDepositChild();
Deposit newDepositNext();
void setParent(Deposit deposit);
void setPrevDeposit(Deposit deposit);
void setNextDeposit(Deposit deposit);
void flush();
void commit();
void putAccount(Key key, Value value);
void putTransaction(Key key, Value value);
void putBlock(Key key, Value value);
void putWitness(Key key, Value value);
void putCode(Key key, Value value);
void putContract(Key key, Value value);
void putContractByNormalAccountIndex(Key key, Value value);
void putStorage(Key key, Storage cache);
void putVotes(Key key, Value value);
void syncCacheFromAccountStore(byte[] address);
void syncCacheFromVotesStore(byte[] address);
TransactionCapsule getTransaction(byte[] trxHash);
BlockCapsule getBlock(byte[] blockHash);
BytesCapsule getContractByNormalAccount(byte[] address);
long computeAfterRunStorageSize();
long getBeforeRunStorageSize();
}