The static method sendFundsEIP1559(...) from Transfer should be accessed in a static way

66 Views Asked by At

I am trying to make a transfer using the function sendFundsEIP1559() from the org.web3j.tx.Transfer package like this:

    org.web3j.tx.Transfer testTansfer = new org.web3j.tx.Transfer(web3j, transactionManager);
     
     RemoteCall<TransactionReceipt> remoteCall = testTansfer.sendFundsEIP1559(
                web3j, 
                objCredentials, 
                "0xc60e4Ae2EfE9B8f991E6967cF317Cc39c634ggb9", 
                BigDecimal.valueOf(objTransfer.getTokens()), 
                Convert.Unit.WEI, 
                contractGasProvider.getGasLimit(FUNC_TRANSFER), 
                contractGasProvider.getGasPrice(FUNC_TRANSFER),
                null);

But I got the error:

The static method sendFundsEIP1559(Web3j, Credentials, String, BigDecimal, Convert.Unit, BigInteger, BigInteger, BigInteger) from the type Transfer should be accessed in a static way

I need to set the Transfer constructor previously because it´s necesary to set the provider, chainId, etc.

The versions of web3j and java that I use are:

web3j: 4.8.4

Java: 8

Has anyone had this happen before?

0

There are 0 best solutions below