Questions tagged [web3-java]

For the web3j java library and related Java issues

Ethereum client library for Java (web3j). Web3j provides code generation tools for Java and Android applications to deploy and interact with smart contracts on the blockchain.

Documentation: https://docs.web3j.io/latest/

Note - This is NOT for web3js, which is the JavaScript version of the Ethereum client library.

160 questions
0
votes
1 answer

How does Ethereum Smart Contract work on Mobile Client

I want to deploy a smart contract on server and interact with it using mobile client. I'm not familiar with how does that work but after some research, I found something like below: If we compare communication through web services in mobile client,…
Jaymin Soni
  • 116
  • 5
0
votes
1 answer

Web3j call contract method without credentials

Already implemented the same solution in javascript(web3js) and c#(nethereum) and both of them allow to load smart contract with abi and deployed contract address. Right now I'm working in java environment(web3j) and to load smart contract I need to…
pisk1
  • 147
  • 1
  • 10
0
votes
1 answer

Conversion from int to DeafultBlockParameter

I am using Infura and web3j to query the Ethereum blockchain. My aim is to get information about certain blocks so i'm using the function web3.eth.getBlockByNumber, however it gives me incompatible types error: int cannot be converted to…
mzaidi
  • 109
  • 1
  • 10
0
votes
1 answer

How do I run the Web3J Smart Contract example?

I'm trying to run the Web3j example available at https://github.com/web3j/sample-project-gradle Unfortunately, there is hardly any information available on how to build and run the example, and newbies have to contend with learning Gradle in…
0
votes
1 answer

Is it possible to change Ethereum wallet password using Java(web3j)?

I have created an ether wallet address using Java(web3j). Now i want to change the wallet password but, i am not able to change it. Is there any possible way to change the Ether wallet password using Java(web3j)?
0
votes
2 answers

How to use mnemonic to recovery my ethereum wallet

I use web3j to create my ethereum wallet.the Code just like down import org.web3j.crypto.Bip39Wallet; import org.web3j.crypto.Credentials; import org.web3j.crypto.ECKeyPair; import org.web3j.crypto.WalletUtils; wallet =…
0
votes
1 answer

How to call Ethereum smart contract methods through transactions?

I'm able to make transactions in Ethereum using Java and Web3j. Now I would like to be able to interact with a smart contract. But since I'm having problems building the wrapper, I would like to know if I can do it by sending data in the…
killezio
  • 308
  • 1
  • 12
0
votes
1 answer

Sending public transactions with Web3j's Quorum client

How does one send public transactions using Web3j's quorum client? Currently I am sending private transactions with this code, and even if my "privyFor" list is empty it is sent as a private transaction. HttpService httpService =…
Breedly
  • 12,838
  • 13
  • 59
  • 83
0
votes
1 answer

How to call the smart contract methods from android app using web3j

I want to call the smart contract methods from an Android app. I deployed the smart contract using truffle framework in my private network. I also created a wrapper class for the deployed smart contract using web3j commands. It creates a .java file…
vijju
  • 462
  • 9
  • 30
0
votes
1 answer

Setting the hex-encoded data field in a Web3j Ethereum transaction

I'm writing a Web3j app and I'd like to perform a transfer of funds and put a short text string in the hex-encoded data field of the transaction. I'm successfully transferring the funds, but there doesn't seem to be a parameter to put this extra…
Sander Smith
  • 1,371
  • 4
  • 20
  • 30
0
votes
1 answer

Using java web3j to create wallet but how then connect to private running blockchain?

I'm using the java web3j lib and creating a new wallet file using: WalletUtils.generateFullNewWalletFile() With: Web3j web3 = Web3j.build(new HttpService()); ... I'm connecting to my local private blockchain running geth. The question is. How can…
ArgV
  • 175
  • 3
  • 13
0
votes
1 answer

Cant download ethereum Events with web3j

When i try download Events from blockhain: Web3j web3 = Web3j.build(new HttpService("https://rinkeby.infura.io/naqTNN4B2QavbM4vZI3q")); Credentials credentials…
Dmitry
  • 536
  • 1
  • 4
  • 9
0
votes
1 answer

Web3j cannot connect from docker container

I have a java application in docker container. It try to connect to my private blockchain using web bean. And there is some problem: Unable to determine sync status of node I thought that the port is not accessible, but it is open to all. If I…
0
votes
1 answer

Can I consolidate all deposited ether to one wallet address without additional transactions?

I am making an application in which I am creating a different Ethereum wallet address for a user in the Ethereum blockchain using web3J. I have also created one address say as my organisation wallet. When a user deposits some ether in their…
Abhishek saini
  • 507
  • 1
  • 8
  • 29
0
votes
1 answer

RxJava how to observe on mainThread in older versions? I dont have access to AndroidSchedulers.mainThread()

Im building a project using web3. web3j.ethGetBalance("0x2910543af39aba0cd09dbb2d50200b3e800a63d2", latestBlock) .observable() .subscribeOn(rx.schedulers.Schedulers.io()) //This needs to be on the main thread! …
MrRed
  • 677
  • 1
  • 6
  • 21
1 2 3
10
11