Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 03:00
    JalalSordo starred web3j/web3j
  • 00:02
    liubaojunsh starred web3j/web3j
  • Sep 19 02:04
    stale[bot] labeled #1456
  • Sep 19 02:04
    stale[bot] labeled #1456
  • Sep 19 02:04
    stale[bot] commented #1456
  • Sep 19 02:04
    stale[bot] commented #1456
  • Sep 18 23:08
    rbrick starred web3j/web3j
  • Sep 18 22:02
    stale[bot] unlabeled #1481
  • Sep 18 22:02
    stale[bot] unlabeled #1481
  • Sep 18 20:10
    0xean commented #1426
  • Sep 18 20:10
    0xean commented #1426
  • Sep 18 09:48
    Kabie starred web3j/web3j
  • Sep 18 08:08
    duxl starred web3j/web3j
  • Sep 17 18:54
    caoanlong starred web3j/web3j
  • Sep 17 18:24
  • Sep 17 15:56
    yuvanesh-srib starred web3j/web3j
  • Sep 17 15:46
    mahima-manik commented #1487
  • Sep 17 15:46
    mahima-manik commented #1487
  • Sep 17 15:33
    yuvanesh-samsung starred web3j/web3j
  • Sep 17 15:19
    kenanduman1988 starred web3j/web3j
Mindaugas Rolius
@mindro
i would use personal api if your node supports it
falconwoods
@falconwoods
i would use personal api if your node supports it
 private String sendTX(Credentials credentials, String contractAddress, String funData) {
        BigInteger nonce = getNonce(admin.getAddress());
        DefaultGasProvider gp = new DefaultGasProvider();

        RawTransaction rawTransaction = RawTransaction.createTransaction(nonce, gp.getGasPrice(), gp.getGasLimit(), contractAddress, funData);
        byte[] signedMessage = TransactionEncoder.signMessage(rawTransaction, credentials);
        String hexValue = Numeric.toHexString(signedMessage);

        try {
            EthSendTransaction response = web3.ethSendRawTransaction(hexValue).send();
            String hash = response.getTransactionHash();
            return hash;
        } catch (Exception ex) {
            throw new ServiceException(ServiceExceptionEnum.CONTRACT_CALL_FAIL.getCode(), ex.getMessage());
        }
    }
Write a function. Seems work. Need to dig into tomorrow.
Anyway, thanks mate
falconwoods
@falconwoods
Web3j still not support revertReason in TrasactionReceipt?
Is there any alternatives to web3j in java?
danielmedvec
@danielmedvec
3b6c93e270979d8d85caec729584b8e1.png
danielmedvec
@danielmedvec
Fixed, my provider was wrong
Marcin Perlikowski
@0h41

Hi there, did anyone encounter:

A problem was found with the configuration of task ':npmInstall' (type 'NpmInstallTask').
No value has been specified for property 'packageJsonFile'.

I can't find a solution anywhere
V. Lukoyanov
@lukoyanov

Hey! Does anyone know how to call a smart-contract function with a two-dimensional array in the signature with web3j?

function foo(address[] memory a1, address[][] memory path)

Thanks.

Evan Saulpaugh
@esaulpaugh
esaulpaugh/headlong will do the encoding with new Function("foo(address[],address[][])").encodeCallWithArgs(a, b); if that helps
V. Lukoyanov
@lukoyanov
@esaulpaugh thanks, looks neat.
chkim
@zzeororo
Hi, Is there any way to get EIP-1559's new transaction fields (ex maxFeePerGas)
igorsimjanoski
@igorsimjanoski
Hi, how can i deploy smart contract in web3j 4.8.5 via Java smart contract wrappers (YourSmartContract.deploy(..)) in blockchain where EIP-1559 is rolled out, for ex: ropsten.
I see that Contract.executeTransaction is using ManagedTransaction.send and noT ManagedTransaction.sendEIP1559
Veljko
@Mihailovic_gitlab
Hi everyone. I'm new to using web3j and crypto in general, but I'll keep short with my questions. I'm at a point where I created my wallet with WalletUtils.generateNewWalletFile. I connected on kovan network via infura and I asked on kovan network faucet some eth. As far as I found out on the web, weth has the same hash on all test nets. The thing is that even after more than half of the day, I still don't get anything with balanceOf from weth contract. My end goal is to use Uniswap v2 api for swaping, but I'm kinda stuck on this problem. I would appreciate any help, since I can't find examples for this on the web with web3j. Thanks!
Flavius Belisarius
@noGasforEth_twitter
Has anyone ever seen this error with CL? Also can't get local web3j version but global seems right. Exception in thread "main" java.lang.IllegalArgumentException: Input string is NULL or empty
Veljko
@Mihailovic_gitlab
Can someone tell me if I can connect to infura with WebSocketService? I'm constantly getting WebSocketNotConnectedException and my wss link is ok
igorsimjanoski
@igorsimjanoski
hi, is 'eth_feeHistory' implemented in latest web3j release?
Steve Duong
@toidv
Hi, please help to release supporting EIP1559 transactions for Android library
falconwoods
@falconwoods
Send tx in Polygon testnet and got this error "only replay-protected (eip-155) transactions allowed over rpc"
Is there any one come across this issue?
falconwoods
@falconwoods
but readonly methods works fine
Jeroen Ost
@jeroenost
You need to use a different API. Most chains have moved past EIP-155. It's about including the chain id in the transaction before signing in order to avoid the transaction from chain A to be rebroadcasted and executed on chain B (eth classic / eth). For this in web3j use a RawTransactionManager that you instantiate with a constructor that has the chain id of you chain (in this case Polygon testnet 80001 if it's Mumbai)
new RawTransactionManager (web3j, credentials, 80001) and then use this transaction manager in the load or deploy method of your java wrapper object for the solidity class
falconwoods
@falconwoods

You need to use a different API. Most chains have moved past EIP-155. It's about including the chain id in the transaction before signing in order to avoid the transaction from chain A to be rebroadcasted and executed on chain B (eth classic / eth). For this in web3j use a RawTransactionManager that you instantiate with a constructor that has the chain id of you chain (in this case Polygon testnet 80001 if it's Mumbai)

It works!! Thank you so much mate!

Jeroen Ost
@jeroenost
You're welcome!
wei qi
@Godghost_gitlab
0xd0b3bfc1ebffb2c922a467a1db3a745338d112bb
Kare Nuorteva
@kare
Hello
Any chance to get solc 0.8.6 supported? web3j/solidity-gradle-plugin#41
Alex Dupre
@alexdupre
Hello, I see that there is a generateSendTxForCalls codegen flag, but not generateCallsForSendTx, that seems much more useful to me. Am I missing something or are you ok if I implement it?
While I was looking at the SolidityFunctionWrapper code, I immediately found an issue: https://github.com/web3j/web3j/blob/master/codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java#L147
The two parameters are inverted.
Alex Dupre
@alexdupre
As far as I can see the support for generateSendTxForCalls is quite broken
Alex Dupre
@alexdupre
Not tested yet in production, just in unit tests, but this is my proposal: alexdupre/web3j@4e31d0d
Any comment?
neokosmo01
@neokosmo01
Is there any way I can get the hash algorithm use on blockchain?
for example ETH, by using web3j
Amin Limbada
@loxator
Hello I am trying to implement a simple ETH/DAI swapper but am running into some troubles which are better explained here, any and all help is greatly appreciated - https://ethereum.stackexchange.com/questions/107914/how-to-approve-swapexacttokensforeth-from-uniswaprouter-v2-before-invoking-it/107915#107915
Kevin Campos
@kevinmcampos
is just me, or it's a impossible task to translate a input data in web3j? XD
William Phan
@WilliamPhan_Lotus_gitlab
Hi
how can I call a proxy function in smart contract?
For example, I want to call getReserveData function from this contract https://kovan.etherscan.io/address/0xe0fba4fc209b4948668006b2be61711b7f465bae#code
But I got an issue: ERROR Error: Uncaught (in promise): Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.
michaelscheung
@michaelscheung
For some reason I can only stream past blocks/transactions. Subscribing to future transaction or pending transactions returns a code -32005 error or fails with Cannot invoke "org.web3j.protocol.core.methods.response.EthBlock$Block.getNumber()" because the return value of "org.web3j.protocol.core.methods.response.EthBlock.getBlock()" is null I'm on the polygon network
michaelscheung
@michaelscheung
replayPastAndFutureTransactionsFlowable will replay transactions without a problem until it reaches the latest block and switches to listening for future transactions.
https://ethereum.stackexchange.com/questions/99211/trying-to-switch-dapp-to-matic this seems to indicate that code -32005 is some kind limit exceeded error, although it seems like it might be erroneous
michaelscheung
@michaelscheung
I figured it out. For anyone that encounters the same issue, the problem was with the RPC. https://rpc-mainnet.maticvigil.com results in errors, but https://matic-mainnet.chainstacklabs.com works just fine
Don
@DonXuShao
Hello,I am a new comer, I reported an error when COMPILING the contract using Solc tool in the first step, can someone help me?
image.png
It says I can't find my contract files, but they're in this folder
Christopher McGregor
@chrismcgregor
ethEstimateGas