Questions tagged [web3j]

Lightweight Java and Android library for integration with Ethereum clients

Filter by
Sorted by
Tagged with
1 vote
1 answer
19 views

Extract complete Transaction Details of every single transaction

I am creating a Java Backend using Web3J and subscribing to replayPastAndFutureBlocksFlowable from block 1 to latest, and then all subsequent new blocks. From this, I get all the transactions, which ...
Gladiator9120's user avatar
0 votes
0 answers
17 views

Why web3j wallet address is different than hardhat network address which receives tokens

I am just playing with web3j and hardhat I use web3j to generate wallet . This wallet has some address - let's call it A When I'm testing and I receive token in hardhat and check with getTransaction ...
Ivaylo Tonev's user avatar
0 votes
1 answer
50 views

Blockchain Android application

I want to create blockchain based android application. So someone please help me with which language I should code for smart contracts and all. Also tell me that can I run blockchain application in ...
tikker's user avatar
  • 5
0 votes
0 answers
131 views

How to create a Multicall Swap Multihop in JAVA based on Uniswap V3?

Recently Uniswap And Pancakake swap launch thery v3 contracts, so the way of we do a swap changes now. Is there someone that know how to do that in Java or Kotlin? I'm asking for a Multihop, because ...
ronaldoguedess's user avatar
1 vote
1 answer
99 views

How to get hash and signature of payload parameters using java

I want to use openSea's api, but I don't know how to get the hash and signature of this json object using java. https://docs.opensea.io/reference/create-an-order { "parameters": { "...
yuta O's user avatar
  • 11
0 votes
1 answer
37 views

Supporting networks different than Ethereum in Web3j

I'm currently developing Java app that interacts with various networks. I searched it in docs, but without an effect. I would like to know if Web3j supports any other network besides Ethereum like BSC,...
NET_BOT's user avatar
0 votes
1 answer
122 views

Help with RPC call on Polygon Network

I've developed an app to generate random wallet addresses and PvtK using a phrase seed file. My code will check on a list of RPC addresses to verify if some wallet have some balance. The strange is ...
Magno C's user avatar
  • 333
0 votes
0 answers
55 views

An API to get wallet balance for all networks

I'm trying to develop a centralizated way to take a wallet addres balance but I need to know if that address have any money in every chain network ( or most of them ). For now I have to create a WEB3 ...
Magno C's user avatar
  • 333
0 votes
0 answers
60 views

Withdraw USDT or BNB from BSC

how to withdraw USDT (Tether) or BNB from my wallet to a specific address using the Web3j Java Spring framework on the Binance Smart Chain (BSC)?
softweng's user avatar
0 votes
0 answers
36 views

Scalable way to listen dynamically added contracts in web3j

Consider I need to listen to the event logs for a Uniswap's Swap method, which works perfect for a single CA, or even to many if they are known to the time of creation of filter: web3j.ethLogFlowable(...
0xMixer's user avatar
1 vote
1 answer
88 views

FilterException when creating an EthFilter in web3j

I'm using web3j to create a filter to listen to events. Specifically, I want to listen to events of a specific contract between a certain block number and now. This is my code: Web3j web3j = ... ...
Michael's user avatar
  • 225
0 votes
1 answer
93 views

MetaTransactions - MinimalForwarder and Web3j

I'm trying to sign a smart contract function with UserA and send the transaction to the Blockchain with UserB, using web3j. I've tried with web3js and everything worked fine, following the example of ...
SG87's user avatar
  • 1
1 vote
2 answers
159 views

indexing all Ethereum fullnode data in a relational database

I want to develop a web app like etherscan. I realized I have to extract and index all datas in a relational database. I have chosen Posturesql. All Datas I want to save are: block uncle transaction ...
Shahab's user avatar
  • 11
0 votes
2 answers
43 views

what is the best technique to encrypt any document before storing (uploading) on IPFS?

I want to encrypt document before uploading to IPFS and enable more than user to decrypt it and note that the number of users may increase or decrease in any time?
laravel Developer's user avatar
0 votes
1 answer
85 views

How to get hash of transaction **before** it has been mined in web3j?

I have been working on my project where I use web3j. I work with ledger over contract wrappers where the actual call to the ledger is encapsulated over variety of layers. The issue is I need to get a ...
Gleichmut's user avatar
  • 452
0 votes
1 answer
43 views

Web3j fails to deploy simple Vyper Contract to Ganache

I have a simple hello world contract, compiled with Vyper. I use Web3j CLI to make a Java wrapper class from the contract's abi and bin files. When I deploy it, I get a stack underflow error. I know ...
devdanke's user avatar
  • 174
1 vote
3 answers
93 views

How to get all transactons of a specific address?

I am trying to retrieve all transactions for a particular address at once. My current approach is to collect all transactions of all blocks in MySQL DB and issue a query like "SELECT * FROM table ...
Pierogi's user avatar
  • 193
0 votes
0 answers
47 views

Managing frequent transactions in Web3j

I've been trying to figure this out to no avail, and hope someone will be able to shed some light and provide some insight as to how I can go at this issue. I have a backend written in Java Springboot,...
Zi Hang's user avatar
  • 26
2 votes
0 answers
99 views

Filter events with multiple allowed topic values

I'm building a contract listener. I am only interested in 1 particular contract, let's say at address 0x123...789. final EthFilter filter = new EthFilter(DefaultBlockParameterName.LATEST, null, "...
lizardev's user avatar
1 vote
1 answer
51 views

Adding topics to EthFilter throws an invalid argument length error

I am attempting to create an EthFilter which will listen for events from a specific contract final EthFilter filter = new EthFilter(DefaultBlockParameterName.LATEST, null, "0x123...789"); I ...
lizardev's user avatar
0 votes
1 answer
318 views

Where are the transactions in the genesis block?

When I query the genesis block I get this: AttributeDict({'difficulty': 17179869184, 'extraData': HexBytes('0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa'), 'gasLimit': 5000, '...
helpme's user avatar
  • 67
1 vote
0 answers
45 views

org.web3j.protocol.exceptions.TransactionException: {"stack":"TXRejectedError: Exceeds block gas limit

I'm trying to communicate with my deployed contract using web3j. First I should let you know that I have 0 experience in web3j, I'm using it for the first time. Goal: I wanted to simply call that ...
Maifee Ul Asad's user avatar
-1 votes
1 answer
30 views

Is it possible for the polygon to have different nodes have different data?

I use the eth_log to get the event of nft contract on polygon, and if found that some token id data lost. But when i rescan it after some hours , the event data is full. so i doubt that is it possible ...
1234's user avatar
  • 1
1 vote
0 answers
1k views

web3j - Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

I am trying to create java wrappers for smart contracts, but my web3j installation is not working correctly. If I try to create a new web3j project using web3j new I get following error message: ...
Lukas's user avatar
  • 113
0 votes
0 answers
196 views

Get the transaction list from an address using Web3j

I'm trying to fetch all transaction list using WEB3J (JAVA). I know I can get it from Etherscan or Bscscan, but the request is limited to the free plan, (which is just 5 calls per second) I need to ...
ronaldoguedess's user avatar
0 votes
0 answers
109 views

Web3j listen event from a contract

I want to listen to event Sync from a contract. In javascript, I managed like this (this is to understand better what I want): const contract = new web3.eth.Contract(abi, contractAddress); const ...
KunLun's user avatar
  • 197
0 votes
0 answers
32 views

why the tokenId is lost when the eth_log method

Someone knows why the tokenId is lost when the eth_log method is used to monitor the nft contract. Normally, it should be continuous, but there are a few missing in the middle. Rescan the ...
1234's user avatar
  • 1
1 vote
1 answer
81 views

How to stop watching events (web3j)

I am using the following code to listen/watch contract events(web3j): Event TRANSFER_EVENT = new Event("Transfer", Arrays.<TypeReference<?>>asList(new TypeReference<Address>...
Jeff's user avatar
  • 11
0 votes
0 answers
137 views

java.lang.RuntimeException: Error processing transaction request: insufficient funds for gas * price + value

My contract is already deployed on BSC testnet. val web3j = Web3j.build(HttpService("https://data-seed-prebsc-1-s1.binance.org:8545/")) val keyPair = ECKeyPair.create(BigInteger("1234&...
Pavya's user avatar
  • 111
1 vote
0 answers
58 views

java.lang.RuntimeException: Error processing transaction request: transaction underpriced

My contact is already deployed. Then I am trying to call ERC20 Approve method like val greeting: Future<TransactionReceipt> = greeterErc20.approve(BuildConfig.CONTRACT_ADDRESS_10COLOR, amt)....
Pavya's user avatar
  • 111
0 votes
0 answers
63 views

java.net.SocketTimeoutException: Connect timed out while deploying using web3j-quorum on VM Quorum private blockchain

I'm trying to deploy a contract from Window Host Machine to a Quorum Dev Quickstart on VMware Ubuntu. Quorum quorum = Quorum.build(new HttpService("<my-vm-ip-address>:22000")); ...
Duy Hà's user avatar
1 vote
0 answers
210 views

Web3j listening to events with struct as parameter

I've tried to listen my contract event, that contains struct as parameter in my solidity contract: contract ExampleNFT is ERC721URIStorage, Ownable{ using Counters for Counters.Counter; Counters....
Maksim's user avatar
  • 11
0 votes
0 answers
39 views

What is preferred/recommended way to handle ethereum contract events in spring boot?

What is the appropriate way to handle live events (i.e. service/component should keep on listening to events and save it to offchain db (h2/postgres)) How to close event subscription gracefully? ...
Vineeta's user avatar
  • 45
0 votes
1 answer
209 views

How to fix "Unsupported type encountered: tuple" when trying to create smart contract wrapper

I am trying to create Java Wrappers from a Smart Contract, but I always get this error message when trying to create the Java wrappers. Unsupported type encountered: tuple I use web3j for generating ...
Lukas's user avatar
  • 113
0 votes
0 answers
102 views

How to generate java wrapper for solidity contract with openzeppelin imports

I want to create a Java wrapper for my smart contract, but it uses @openzeppelin imports. If I try to run this command solcjs /Users/myuser/Desktop/dao-core-main/contracts/StakingV1.sol --bin --abi --...
Lukas's user avatar
  • 113
0 votes
1 answer
124 views

Change ganache Owner Account in WEB3J from account[0] to account[1]or account[2]

I'm looking for a way to change owner of the smart contracts in java web3j as we do in web3 javascript using from: //using account for transaction in javascript await contract.function(param1, param2, ...
Mustakim Mullick's user avatar
2 votes
0 answers
185 views

Keccak256 hashing of types and values in Java

I'm trying to use the Web3j library (or any other library for that matter) to Keccak256-hash a list of types and a list of values to sign a quote. Specifically, I need to implement the second code ...
Hopscotch's user avatar
3 votes
1 answer
56 views

Problem publishing ethereum transaction after signing

I am trying to publish ethereum raw transaction after signing, with proper gas fees, and chainID. Unexpectedly, some signatures are published but some others fail to publish with error Invalid Sender. ...
MJay's user avatar
  • 140
0 votes
1 answer
105 views

java.util.concurrent.ExecutionException: org.web3j.tx.exceptions.ContractCallException: Unable to convert response

I'm having some trouble with web3j and calling getter functions for structs in java. As per the title, whenever I call the function in web3j, e.g.: Metadata _metadata = complianceContract....
Zi Hang's user avatar
  • 26
0 votes
1 answer
202 views

Call a solidity function which accepts a struct type using Web3J

We are trying to use web3j for encoding the parameters for calling the solidity functions which are deployed in the private ethereum network. Call is done using JSON-RPC. We are able to encode the ...
Ashishkel's user avatar
  • 105
5 votes
1 answer
398 views

web3j is not generating struct inside my solidity contract

I have a struct Question in my smart contract. After generating the java wrapper class of my smart contract using web3j, Inside the wrapper class Question is not recognized, looks like web3j is not ...
Shoaib Kakal's user avatar
0 votes
0 answers
76 views

counter value is always 0 in web3j

I've checked the following getCounter() method in Remix, it's doing what its supposed to do. // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; struct User{ uint counter; bool ...
Shoaib Kakal's user avatar
3 votes
2 answers
840 views

How do i read the value returned by a method in my smart contract in web3j

I'm following a tutorial in which the instructor is calling contract.getConuter().send this returns the value of the counter on smart-contract but in my case, it's returning TranscriptReciept object. ...
Shoaib Kakal's user avatar
0 votes
1 answer
383 views

how to decode a hex string query from ether chain? web3.hexToString is not work

000000200000000000000000000000000000000000000000000000007c73b258cd46ecc90000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000023020033f77feefa7cb2b ...
hilion c's user avatar
0 votes
1 answer
225 views

Can I read ERC-20 token address from token Symbol?

I am able to read token's details directly from the token address using web3py library, however, I want to achieve the vice-versa where I can read the token's address just from the token symbol using ...
Somdip Dey's user avatar
0 votes
1 answer
42 views

Unable to deploy smartcontract using web3j and Rinkbey infura

I'm trying to deploy a smartcontract on Rinkbey. I've followed the official documentation and some tutorials. I implemented the following code in my android studio but contract.deploy returns nothing. ...
Shoaib Kakal's user avatar
0 votes
1 answer
334 views

Why does web3j and javascript keccak256 return different hashes if '0x' is at the start of the string?

We are trying to build a merkle tree in web3j and put the root for verification into the smart contract. Due to this problem we can't generate the same route between web3j and solidity/js... In ...
Neil Collier's user avatar
1 vote
1 answer
370 views

How to find a pancake pair creation date using web3 library?

For eg, in the PancakePair of CAKE/WBNB, the creator's address and transaction hash of the contact creation (which contains the timestamp of the pair's creation) can be found on the top right of this ...
DEEPAK S.V.'s user avatar
1 vote
1 answer
210 views

insufficient funds for gas * price + value in ropsten network with web3j (java)

I have a wallet in metamask in ropsten test network, and I try to send a transaction to another wallet in metamask ropsten network, using Web3j library with java. First, I build a httpServer with ...
Mohamadamin's user avatar
2 votes
1 answer
432 views

Why does Web3j listen to events every 15 seconds?

I use web3j in my Java application. In the smart contract, an event is defined. event sendEvent(string name); I subscribed to that event in my app. contract.sendEventEventFlowable(filter) ....
js developer's user avatar

1
2 3 4 5
9