Skip to main content

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
18 votes
3 answers
3k 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 ...
madhan siva's user avatar
7 votes
1 answer
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.
Sagar Jethi's user avatar
1 vote
2 answers
8k views

EthersJS Listening to events with NodeJS Strange Errors

I am trying to listen to blockchain events using ethers on NodeJS. I've looked around for few tutorials and copied the code from one of them. Currently the code i have is: const ethers = require("...
Akall's user avatar
  • 473
8 votes
2 answers
6k 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 ...
Fortune's user avatar
  • 532
6 votes
1 answer
3k 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 ...
ashwin's user avatar
  • 389
5 votes
2 answers
7k 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 ...
srikanth's user avatar
3 votes
1 answer
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 , ...
Abhiram mishra's user avatar
1 vote
2 answers
5k 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; } ...
pradipta goldar's user avatar
17 votes
3 answers
23k 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 ...
rsingh's user avatar
  • 171
8 votes
2 answers
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)?
Aman C's user avatar
  • 993
7 votes
1 answer
4k 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 ...
Doug Hou's user avatar
  • 173
6 votes
3 answers
3k 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 ...
lfrickel's user avatar
4 votes
3 answers
4k 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 ...
Moe Elsharif's user avatar
2 votes
1 answer
480 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.
Ilya Serbis's user avatar
2 votes
3 answers
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&...
Abhiram mishra's user avatar
2 votes
2 answers
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 ...
madhan siva's user avatar
7 votes
2 answers
2k views

Use uint40 for time in Solidity?

My question is: Should I use uint40 for time in Solidity? All the examples I've seen use uint256 for time, however, I think it's too wasteful -- while using uint32 is maybe a little aggressive due to ...
Jerry Ji's user avatar
  • 371
6 votes
1 answer
7k 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....
wannamit's user avatar
  • 151
2 votes
2 answers
5k 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 ...
Frank Kong's user avatar
1 vote
2 answers
2k views

Could not find artifacts for ./Election from any sources

I tried solutions provided in ethereum stack, but nothing worked for me. My smart contract file: pragma solidity ^0.4.15; contract Election { string public candidate; function Eletion () ...
Satish Ganta's user avatar