Questions tagged [ethereumj]

For questions regarding the installation or use of EthereumJ, a Java library that implements the Ethereum protocol.

Filter by
Sorted by
Tagged with
16
votes
3answers
2k views

How to get values returned by non constant transaction functions?

As per my understanding when I invoke a constant function without a transaction in a contract and if the function returns some result I am able to get it in EthereumJ or Go-Ethereum, But when a ...
6
votes
1answer
2k views

How to get all ethereum address list which have my token?

I want a list of all ethereum address which have my ERC20 token in their account. Anyone have an idea how to get list address. beause i want give divided to each account which have my ERC20 token.
6
votes
2answers
4k views

LevelDB in Geth, key and values

When parsing through the levelDB or RocksDB (Depending on the client you are using) there are string values representing the key and the value. These are both stored as Byte arrays as well. My ...
1
vote
2answers
4k views

How to initialized struct with member variable type mapping

I have a problem with the below code, specifically samplestruct2 struct samplestruct1 { string name; } struct samplestruct2{ string name; mapping (int => samplestruct1) s1s; } ...
3
votes
1answer
3k views

How to create an account in ethereumj

How to create an external account ( personal.newAccount()) equivalent in the ethereumj ? I know I could use the jsonrpc api to do so ? But I read https://github.com/ethereum/ethereumj/issues/335 , ...
4
votes
2answers
6k views

Send Custom ERC20 Tokens from one Address to another

How to send custom ERC20 tokens from one wallet to another, if i want to send EBTC/ECASH custom ERC20 tokens. I wrote a method that can send the ether from one account to another, how could i do the ...
17
votes
3answers
18k views

'authentication needed: password or unlock' Error when trying to call smart contract method via web3

I am trying to call the smart contract method (deployed on remote ethereum account) from my nodejs DAPP, and getting the following error- Error: authentication needed: password or unlock at ...
8
votes
2answers
4k views

Event on Mining of a new block

Does ethereum generate any event whenever a new block is mined on the chain which can trigger a daemon process(lets say java code)?
7
votes
1answer
3k views

How to get address from private key in java

I use generate a private key in java code HashUtil.sha3("cow".getBytes()) Write to a new private key file: c85ef7d79691fe79573b1a7064c19c1a9819ebdbd1faaab1a8ec92344438aaf4 Then, I use geth account ...
3
votes
3answers
2k views

Is there a way to know the contract creation Address from a the transaction?

I know that in the transaction receipt I can get the contract address by getting a transaction receipt from a generated transaction. But I am wondering since smart contract addresses are ...
2
votes
2answers
1k views

How to transfer ether from one account to another using EthereumJ

For testing purpose in test network we are creating account dynamically using ethereum java (EcKey). I have an account that contains enough ethers. How can i transfer ether from the source account to ...
2
votes
3answers
1k views

Event tracking and decoding from ethereumj

I have an event in the contract , and upon the event fires I could able to see by a java listener as below public void onTransactionExecuted(TransactionExecutionSummary summary) { List<LogInfo&...
2
votes
1answer
628 views

how to call "selfdestruct" if not written in contract, as documentation says its possible

as mentioned in documentation "Even if a contract’s code does not contain a call to selfdestruct, it can still perform that operation using delegatecall or callcode." so my question is how ...
5
votes
3answers
2k views

A problem with filters and events (web3j/TestRPC). SOS! ;)

Help me, please, with this little simple task! I cannot solve this problem for several days. SOS! ;) I'm trying to write a program for filtering events via web3j. I copied to start (for the test) from ...
2
votes
1answer
384 views

Get history of transactions to specific account (EthereumJ)

How to get all the transactions which were received by some specific account (not necessary owned by me)? I need something like the list provided by the Etherscan.
5
votes
1answer
5k views

Convert String to Bytes32 in web3j?

public String solFunction(String str) { byte[] byteValue = DatatypeConverter.parseHexBinary(str); Bytes32 strInBytes = new Bytes32(byteValue); try { Uint256 value = contract....
1
vote
2answers
3k views

How to get public key from private key in Web3j

I am developing Dapp by web3j and I attempt to convert private key to public key. I found this question this question that provides a way converting private key to public key in class ECKey, but I ...