Skip to main content

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
1 answer
25 views

ERC20 payment mechanism solution

I want to implement payment mechanism on my web site . after too many search on internet . i understood payment gateways like cryptomus or bitpay generate new address peer payment order . then never ...
mah454's user avatar
  • 101
0 votes
0 answers
30 views

How to connect deployed Smart contract in java

im completely new with blockchain, My Front end Team have successfully communicated the smart contract and able to call the method that is available in Smart contract, so the thing is smart contract ...
Abdul's user avatar
  • 1
0 votes
1 answer
25 views

migration from go-ethereum to java

Our application is written using go-ethereum . We rely on few go packages from https://github.com/ethereum/go-ethereum/blob/master/accounts/abi: https://github.com/ethereum/go-ethereum/blob/master/...
Begemotik's user avatar
1 vote
1 answer
386 views

How to call smart contracts in Web3j

I wrote this code in TS using web3 library: // ABI = my deployed SmartContract as json ABI const daiToken = new web3.eth.Contract(Abi as AbiItem[], smartContractAdress) const smartContractFunction = ...
Paweł Krupski's user avatar
0 votes
0 answers
52 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
74 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
1 answer
100 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
339 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
  • 345
1 vote
2 answers
397 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
653 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
  • 129
1 vote
0 answers
397 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
294 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
1 answer
59 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
1 answer
164 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
273 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
361 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
94 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
155 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
282 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
1 answer
288 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
562 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
48 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
578 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
627 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
1k 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
805 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
37 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
444 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
107 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
507 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
116 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
569 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
79 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
1k 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
197 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
962 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
151 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
287 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
2k 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
468 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
142 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
213 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
1k 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
1 vote
0 answers
326 views

How do I get the transfer/transaction history of an erc20 token using web3j givin an address

I am not sure how to view the the txhistory of an erc20 token for a specific address. I use a java token wrapper for my erc20 toke as below: public class ERC20 extends Contract { public static final ...
HashTables's user avatar
2 votes
1 answer
1k views

How to specify Solidity version in web3j?

I have a simple java maven project whose pom.xml looks like: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" ...
Ram Patra's user avatar
  • 141