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 do you read a value returned by a method in smartcontract using web3j?

I'm using web3j in Android studio to interact with smartcontracts. In my SmartContract i've 2 functions getName() and getAge() and i'm setting age and name in constructor as below: // SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.5.0…
Shoaib Kakal
  • 1,090
  • 2
  • 16
  • 32
0
votes
1 answer

How to Use and Import Blockchain Library (web3j) on Anylogic

I'm a newbie on Anylogic, and I would like to build a Simple supply chain in a scenario where data will be stored in a Blockchain environment. I have some pieces of advice from people that told me to use the web3j library, but I don't have any idea…
0
votes
1 answer

Popper: modifier "popoverArrowMargins" provided an invalid "fn" property, expected "function" but got "undefined"

I keep receiving this Popper: modifier error when I hover my cursor over an OverlayTrigger. The OverlayTrigger displays and operates fine. I just keep getting the Popper: modifier for no reason. I believe it might be a bug with the OverlayTrigger…
0
votes
0 answers

I am trying to make a smart contract transaction. My transactions never gets mined

I have a smart contract deployed. Whenever I try to perform a transaction, the transaction starts, but that's it. The transaction never actually takes place (or "doesn't get mined" might be the right word). For reference, my smart contract function…
0
votes
1 answer

BIP-32 How to convert this derivation path to int[]?

I have the BIP-32 derivation path of m/44'/52752'/0'/0/index, where index >= 0. How do I convert it to an int []? I've tried doing int[] path = {44 | HARDENED_BIT, 52752 | HARDENED_BIT, 0 | HARDENED_BIT, 0}; but this is returning the incorrect…
DIRTY DAVE
  • 2,523
  • 2
  • 20
  • 83
0
votes
1 answer

Solana import wallet using PrivateKey

I am creating one app with functionality to import Ethereum chain wallets and solana wallets with keywords and PrivateKey. For Ethereum chains, i successfully imported the wallet using entered Private Key. I want to do the same for Solana. I am…
Hemangi
  • 11
  • 1
0
votes
1 answer

Web3j Pending Transactions on Polygon Mumbai Network but works with Goerli Testnet Network

I'm having issues with Web3j with the Polygon Mumbai network, I've tried several ways to communicate with a smart contract but it sends the request to the network but the transaction will stay in a pending state for a few mins and then disappear. It…
0
votes
1 answer

Why am I getting "Error processing transaction request: intrinsic gas too low" error when trying to add tUSDT to a particular account?

I am trying to send test USDT to a particular account in Java using the following code: final Web3j web3 = createWeb3If(ethNetworkUrl); final Credentials credentials = Credentials.create(privateKey); final ERC20 usdtContract =…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
0
votes
2 answers

How to get the failed status from solidity require statement

In a solidity method, there is a require statement which is being failed and transaction in web3j is throwing error as "Gas value is not enough". Example: require(providedtimestamp > block.timestamp, "release time is before current time"); But in…
Sravan Kumar
  • 41
  • 2
  • 6
0
votes
1 answer

Web3J "transaction.getTo()" returns null if sent to contract

I'm currently running a full node and am trying to loop through some transactions. Whenever I do so with Web3j and use the EthBlock.TransactionObject and I get to a transaction that contains a contract (Like this one) and use the .getTo() function…
Rodarg
  • 11
  • 3
0
votes
2 answers

How do i import my ethereum wallet using private key in android app with the help of web3j?

Help me out how do i resolve the issue of ethereum smartcontract for getting my wallet when i enter my private key in the text area Use WalletUtils functionality The WalletUtils class can be used to load your credentials from various…
0
votes
1 answer

How can get pending txns and queued txns in txpool from geth by web3j

I have a job scan eth addresses and transfer usdt token. But sometimes transaction cannot transfer and stuck in pending queue in geth. And when the job run again, it still check balance and transfer token again. It makes create a lot of pending…
0
votes
1 answer

Failed to parse plugin descriptor for org.web3j:core:5.0.0

I'm trying to add the web3j library ( version 5.0.0 ) into the generated .jar of a java project, but for some reason I keep getting the error : Failed to parse plugin descriptor for org.web3j:core:5.0.0…
DIIMIIM
  • 557
  • 7
  • 28
0
votes
1 answer

Does Web3j require port forwarding to use?

I am trying to use web3j in java, but when i try to make a web3j object it gives an error Web3j web3j = Web3j.build(new HttpService()); Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/TreeNode i think…
EAOE
  • 65
  • 6