Class EthereumWalletTokenAdminService
java.lang.Object
org.exoplatform.wallet.blockchain.service.EthereumWalletTokenAdminService
- All Implemented Interfaces:
org.exoplatform.wallet.service.WalletTokenAdminService,org.exoplatform.wallet.statistic.ExoWalletStatisticService,org.picocontainer.Startable
public class EthereumWalletTokenAdminService
extends Object
implements org.exoplatform.wallet.service.WalletTokenAdminService, org.picocontainer.Startable, org.exoplatform.wallet.statistic.ExoWalletStatisticService
-
Constructor Summary
ConstructorsConstructorDescriptionEthereumWalletTokenAdminService(org.exoplatform.container.PortalContainer container, org.exoplatform.services.cache.CacheService cacheService, org.exoplatform.wallet.service.WalletService walletService, EthereumClientConnector clientConnector) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidorg.exoplatform.wallet.model.WalletcreateAdminAccount(String privateKey, String currentUser) executeReadOperation(String contractAddress, String methodName, Object... arguments) generateHash(String rawTransaction) final BigIntegergetEtherBalanceOf(String address) getStatisticParameters(String operation, Object result, Object... methodArgs) final BigIntegergetTokenBalanceOf(String address) final BigIntegergetTokenBalanceOfFromBlockchain(String address) final booleanisInitializedAccount(org.exoplatform.wallet.model.Wallet wallet) voidretrieveWalletInformationFromBlockchain(org.exoplatform.wallet.model.Wallet wallet, org.exoplatform.wallet.model.ContractDetail contractDetail, Set<String> walletModifications) final org.exoplatform.wallet.model.transaction.TransactionDetailreward(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail, String issuerUsername) org.exoplatform.wallet.model.transaction.TransactionDetailsendEther(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail, String currentUserId) final org.exoplatform.wallet.model.transaction.TransactionDetailsendToken(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail, String issuerUsername) voidstart()voidstop()
-
Constructor Details
-
EthereumWalletTokenAdminService
public EthereumWalletTokenAdminService(org.exoplatform.container.PortalContainer container, org.exoplatform.services.cache.CacheService cacheService, org.exoplatform.wallet.service.WalletService walletService, EthereumClientConnector clientConnector)
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.picocontainer.Startable
-
createAdminAccount
public void createAdminAccount()- Specified by:
createAdminAccountin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService
-
createAdminAccount
public org.exoplatform.wallet.model.Wallet createAdminAccount(String privateKey, String currentUser) throws IllegalAccessException - Specified by:
createAdminAccountin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
IllegalAccessException
-
getAdminWalletAddress
- Specified by:
getAdminWalletAddressin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService
-
isInitializedAccount
public final boolean isInitializedAccount(org.exoplatform.wallet.model.Wallet wallet) throws Exception - Specified by:
isInitializedAccountin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
getTokenBalanceOf
- Specified by:
getTokenBalanceOfin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
getEtherBalanceOf
- Specified by:
getEtherBalanceOfin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
sendEther
public org.exoplatform.wallet.model.transaction.TransactionDetail sendEther(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail, String currentUserId) throws Exception - Specified by:
sendEtherin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
sendToken
public final org.exoplatform.wallet.model.transaction.TransactionDetail sendToken(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail, String issuerUsername) throws Exception - Specified by:
sendTokenin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
reward
public final org.exoplatform.wallet.model.transaction.TransactionDetail reward(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail, String issuerUsername) throws Exception - Specified by:
rewardin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
boostAdminTransactions
public void boostAdminTransactions()- Specified by:
boostAdminTransactionsin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService
-
retrieveWalletInformationFromBlockchain
public void retrieveWalletInformationFromBlockchain(org.exoplatform.wallet.model.Wallet wallet, org.exoplatform.wallet.model.ContractDetail contractDetail, Set<String> walletModifications) throws Exception - Specified by:
retrieveWalletInformationFromBlockchainin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
getStatisticParameters
public Map<String,Object> getStatisticParameters(String operation, Object result, Object... methodArgs) - Specified by:
getStatisticParametersin interfaceorg.exoplatform.wallet.statistic.ExoWalletStatisticService
-
generateHash
- Specified by:
generateHashin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService
-
getTokenBalanceOfFromBlockchain
- Throws:
Exception
-
executeReadOperation
public Object executeReadOperation(String contractAddress, String methodName, Object... arguments) throws Exception - Throws:
Exception
-