Search in sources :

Example 41 with AccountCapsule

use of org.tron.core.capsule.AccountCapsule in project java-tron by tronprotocol.

the class AccountStore method getBlackhole.

/**
 * Min TRX account.
 */
public AccountCapsule getBlackhole() {
    byte[] data = dbSource.getData(ByteString.copyFrom(ByteArray.fromHexString(ACCOUNT_BLACKHOLE_ADDRESS)).toByteArray());
    AccountCapsule accountCapsule = new AccountCapsule(data);
    return accountCapsule;
}
Also used : AccountCapsule(org.tron.core.capsule.AccountCapsule)

Example 42 with AccountCapsule

use of org.tron.core.capsule.AccountCapsule in project java-tron by tronprotocol.

the class AccountStore method getZion.

/**
 * Get foundation account info.
 */
public AccountCapsule getZion() {
    byte[] data = dbSource.getData(ByteString.copyFrom(ByteArray.fromHexString(ACCOUNT_ZION_ADDRESS)).toByteArray());
    AccountCapsule accountCapsule = new AccountCapsule(data);
    return accountCapsule;
}
Also used : AccountCapsule(org.tron.core.capsule.AccountCapsule)

Aggregations

AccountCapsule (org.tron.core.capsule.AccountCapsule)42 ContractExeException (org.tron.core.exception.ContractExeException)22 ContractValidateException (org.tron.core.exception.ContractValidateException)20 TransactionResultCapsule (org.tron.core.capsule.TransactionResultCapsule)16 Test (org.junit.Test)15 InvalidProtocolBufferException (com.google.protobuf.InvalidProtocolBufferException)9 DateTime (org.joda.time.DateTime)7 ByteString (com.google.protobuf.ByteString)5 Before (org.junit.Before)5 AssetIssueCapsule (org.tron.core.capsule.AssetIssueCapsule)5 BalanceInsufficientException (org.tron.core.exception.BalanceInsufficientException)5 WitnessCapsule (org.tron.core.capsule.WitnessCapsule)3 Args (org.tron.core.config.args.Args)3 GenesisBlock (org.tron.core.config.args.GenesisBlock)3 Contract (org.tron.protos.Contract)3 AccountStore (org.tron.core.db.AccountStore)2 TransferAssetContract (org.tron.protos.Contract.TransferAssetContract)2 RamUsageEstimator (com.carrotsearch.sizeof.RamUsageEstimator)1 Lists (com.google.common.collect.Lists)1 Maps (com.google.common.collect.Maps)1