Questions tagged [java]

Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

org.web3j.protocol.exceptions.TransactionException: Transaction receipt was not generated after 600 seconds

Yesterday I could deploy the code successfully, but today onwards I am facing the below error. I tried to reduce/increase the gas fees yet the error is still not resolved. If anyone is willing to ...
Selva Kumar's user avatar
0 votes
1 answer
37 views

How to construct an OpenSea order hash in Java?

my code to construct an default order hash as follow: public class BuildTest { public static void main(String[] args) throws IOException { StructuredDataEncoder dataEncoder = new ...
221 1's user avatar
  • 1
0 votes
0 answers
129 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
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
121 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
54 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
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
1 vote
1 answer
445 views

Read USDT transactions and balance on the Tron network(TRC20) with Java (Spring)

How can I read USDT transactions and balance on the Tron network(TRC20) with Java (Spring) for several addresses?
softweng's user avatar
1 vote
0 answers
278 views

How to quickly get private keys from mnemonic phrases

I need to get private keys (ethereum/bitcoin and other currencies) from mnemonic phrases as fast as possible. At the moment I am using BitcoinJ library: Set<BigInteger> privateKeys = new HashSet&...
Cosmo773's user avatar
0 votes
1 answer
140 views

Provided address undefined is invalid, the capitalization checksum test failed, or it's an indirect IBAN address which can't be converted

I'm building a Dapp and when i im click the mint button i get this error Error: Provided address undefined is invalid, the capitalization checksum test failed, or it's an indirect IBAN address which ...
bela jonas's user avatar
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
0 votes
1 answer
43 views

Send project id from IPFS Infura Java Android

In this tutorial show how in the following code how to connect to the infura project using android devices, but today this code shows the error "project id is required" Is there a way to ...
gabrielfalieri's user avatar
0 votes
0 answers
56 views

Java IPFS Infura error 401 - Unauthorized

I`m tring to connect with ipfs infura, but send me the response code 401 I created an IPFS project and I have my projectId and secretKey protected void onCreate(Bundle savedInstanceState) { ...
gabrielfalieri's user avatar
0 votes
1 answer
121 views

Failed to resolve: java-ipfs-http-client:1.3.3

I'm trying to implement IPFS for Java and I came across an error of "Failed to resolve: com.github.ipfs:1.3.3' build.gradle file Here i added implementation 'java-ipfs-http-client:1.3.3 plugins {...
gabrielfalieri'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
1 answer
208 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
1 answer
61 views

Error: Could not find truffle/DeployedAddresses.sol from any sources;

I am working an a blockchain sample project, and I am trying to write a test for my contract and deploy it into Ganache. So, I have to add something like this: import "truffle/DeployedAddresses....
Erfankam's user avatar
  • 101
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
0 votes
0 answers
11 views

Need your help guys! [duplicate]

I'm Starting out Solidity, do you have any advice, or learning materials you can share with me.
Precious Ben-Okoli'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
0 votes
0 answers
47 views

web3j : The term 'web3j' is not recognized as the name of a cmdlet, function, script file, or operable program

Im trying to generate the java code of a contract using web3j but it keeps telling me i dont have web3 installed or its either not working, but i already did npm install web3. also when i check the ...
Ale26's user avatar
  • 1
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
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
1 vote
0 answers
385 views

Authorization using Metamask - Signing and validating - can you find any weaknesses in this approach?

I would like to develop a webapp (frontend: ReactJs, backend: Spring Boot) in which users can interact without logging in in the traditional sense of the word (username + password) but instead using ...
user19505302'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 vote
3 answers
896 views

How to load smart contract with web3j [duplicate]

In the documentation of web3j (https://docs.web3j.io/4.8.7/smart_contracts/interacting_with_smart_contract/) it has only the example of calling the contract after deploying. Is there any function in ...
yk.'s user avatar
  • 11
1 vote
1 answer
703 views

how to use the value of msg.value and msg.sender of a contract, when a function calls a different contract

I'm studing Solidity and tring to understand how it works. Starting from Safe Remote Purchase in the "Solidity section by example" the doc (https://docs.soliditylang.org/en/v0.8.12/solidity-...
juole's user avatar
  • 13
1 vote
0 answers
26 views

Stable release of Hyperledger Besu won't compile

I cloned a fresh copy of Hyperledger Besu from the GitHub repo and when I opened it in Eclipse, it said that there are 148 errors and that the project won't compile. It also said that there are 108 ...
pdmoerman's user avatar
  • 131
0 votes
1 answer
332 views

org.web3j.protocol.exceptions.ClientConnectionException: Invalid response received: 403; error code: 1020

I have very simple java code using web3j library. I am using mumbai test network for polygon. After calling String chainId = web3j.netVersion().send().getNetVersion(); line I get error that is written ...
Tornike Maridashvili's user avatar
3 votes
1 answer
2k views

Error while using ERC-20 java library: "only replay-protected (EIP-155) transactions allowed over RPC"

I am trying to make simple transaction using ERC-20 java library. I use mumbai test network for polygon. Code transfers stablecoin from one wallet from another. During approve method call I get ...
Tornike Maridashvili's user avatar
0 votes
1 answer
90 views

Cannot resolve symbol "ipfs' android

Hello i am trying to send some files from android to IPFS.I am following this article on medium but can't import packages that are required ` import io.ipfs.api.IPFS; import io.ipfs.api.MerkleNode; ...
gojic's user avatar
  • 147
2 votes
2 answers
301 views

Monitor for all events

It is possible to monitor for all events that happens on Ethereum network or Binance Smart Chain network (BSC). I know that would be a lot of data however I would like later to filter that data. If ...
Robert's user avatar
  • 121
0 votes
1 answer
102 views

Start and HTTP JSON-RPC geth on android?

Is it possible to change the code in /mobile to allow for a json-rpc api to be spawned on an android? Or is there something I need to do in Java with the NodeConfig? I already managed to run a light-...
Markus Haas's user avatar
1 vote
0 answers
490 views

Can I get the IPFS hash from file (without uploading it & with java)?

As far as I'm concerned IPFS client uses the resulting SHA-256 hash from files, and also compatible with others, to index them in the IPFS Protocol. My problem is that I'm not sure how to consistently ...
Alexander Herranz's user avatar
1 vote
0 answers
77 views

Trouble implementing ERC20 payment service in android application

I have been following this tutorial (https://medium.datadriveninvestor.com/a-primer-to-ethereum-token-development-using-java-and-web3j-52b24cc6c403) but seem to keep running into errors when it comes ...
studentQuestionMTU's user avatar
0 votes
1 answer
825 views

Web3j, how to correctly byte encode multiple data?

I am interacting with a smart contract and i do not understand correctly how to encode the data using Web3j to interact with the smart contract since I had never interacted with a contract that ...
Hackuz's user avatar
  • 1
1 vote
0 answers
177 views

Web3j - How to read the contract without credentials?

I'm using Web3j to interact with my deployed smart contract. I've deployed my contract onto the testnet and can interact with it, however using the generated wrapper code, it requires my wallet. Web3j ...
DIRTY DAVE's user avatar
1 vote
0 answers
20 views

How can I add an option to pay with cryptocurrency in an android app using Java? [duplicate]

For my college assignment I have been tasked with creating an app that among other things allows a user to pay for services using an ICO Token (ERC20 contract), How do I go about doing this? The ...
studentQuestionMTU's user avatar
8 votes
1 answer
857 views

How to verify signature in NodeJs via web3j?

I am sending an EIP_712 signature from metamask to the java backend (web3j) and I need to verify it on backend java application. In this topics it is discussed the support of EIP-712 in java (web3j): ...
reza ghasemi's user avatar
1 vote
1 answer
99 views

Encode String to byte[] to invoke method via web3j

I have a method in a contract that receives a bytes object. Web3J generated code in Java translates it to a byte[] object as parameters. I have the correct String "0x....." thet represents ...
Andrean's user avatar
  • 111
0 votes
0 answers
183 views

How can there be multiple FROM addresses in one contract?

As I understood, there cannot be several senders for eth. How to make such a contract? For example, here is a transaction with several addresses, this is a swap, but it's still not clear how: https://...
Nataliia's user avatar
1 vote
1 answer
4k views

How do I add minting functions to my webpage?

I'm looking at adding a mint function on my website so that users can directly mint from my website straight to the contract such as this: https://campfirebear.club/mint is this just written in JS ? ...
james h's user avatar
  • 11
0 votes
1 answer
1k views

Java Keccak 256 hashing implementation of multiple inputs

What's the best way to achieve the equivalent hashing in Java as below in Solidity? keccak256(abi.encodePacked(arg1,arg2,...))
Ev3rlasting's user avatar
0 votes
2 answers
443 views

how to build Defi app from A to Z

I'm a java developer and a newbie with blockchain. I want to build a simple Defi app with a simple smart contract. please tell me know steps by steps to do that? how to setup environment? which the ...
Jay Tran's user avatar
1 vote
4 answers
1k views

Get the same result of abi.encode function in Java

let say we have the following function in solidity: function tryAbiEncode (address _address, uint8 _amount) public pure returns (bytes memory) { return abi.encode("\x19Ethereum Signed ...
Mohamad Ghanem's user avatar
1 vote
0 answers
110 views

Error processing transaction request: Number can only safely store up to 53 bits

I have the following code (in clojure): 212 (def CGP 213 (reify ContractGasProvider 214 (getGasPrice [_ contract-func] (BigInteger. "1")) 215 (getGasLimit [_ contract-func] (...
zendevil.eth's user avatar
0 votes
1 answer
203 views

transactions signed always reverted

I don't know how to send a signed transaction against a method payable in Ganache, can someone help me??? When I call the method in Remix it works fine but from Java I get the Hash of the transaction ...
Ormeño's user avatar
1 vote
1 answer
2k views

Encoding ABI function signature in Java using web3j?

Is there a generic way to simply take an ABI function, something like: { "name":"foo", "inputs":{ "interalType":"uint256", "...
K.Niemczyk's user avatar
2 votes
2 answers
960 views

How to access already deployed Smart Contract using Java?

I would like to get information about token. For example total supply and so on. For this I need the contract. However what is the way to actually load it/access it from Java? Checking examples in ...
Darlyn's user avatar
  • 121