hyperledger-web3j / web3j

Lightweight Java and Android library for integration with Ethereum clients
https://www.web3labs.com/web3j-sdk
Other
5.12k stars 1.69k forks source link

Error processing transaction request: rlp: input list has too many elements for types.LegacyTx #1404

Closed imdsc closed 3 years ago

imdsc commented 3 years ago

_Issuetitle

A clear and concise description of what the issue is. Error processing transaction request: rlp: input list has too many elements for types.LegacyTx

_Issuedescription

Please describe what are you trying to do and why it doesn't work

image

_Issuecontext

Please provide additional information that might be helpful how to resolve it

mohamedelshami commented 3 years ago

Hi @imdsc could you please attach the code snippet so that we can try and reproduce this error?

imdsc commented 3 years ago
 @Test
    public void transferTest() {
        Web3j web3 = Web3j.build(new HttpService(NODE_URL));
        try {
            Credentials credentials = WalletUtils.loadCredentials(WALLET_PASSWORD, WALLET_FILE_PATH);
            String v = web3.web3ClientVersion().send().getWeb3ClientVersion();
            TransactionReceipt transactionReceipt = Transfer.sendFundsEIP1559(
                    web3, credentials, "0x5F7e154537CeEFEe8906B2d0d2D72a9251BC1bef",
                    BigDecimal.valueOf(2),
                    Convert.Unit.ETHER,
                    DefaultGasProvider.GAS_LIMIT,
                    DefaultGasProvider.GAS_PRICE,
                    DefaultGasProvider.GAS_LIMIT)
                    .send();

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
imdsc commented 3 years ago

geth version:Geth/v1.10.2-stable-97d11b01/windows-amd64/go1.16 web3j-core version: 4.8.4

imdsc commented 3 years ago

@mohamedelshami

imdsc commented 3 years ago

image maybe the reason is gasPrice is null

mohamedelshami commented 3 years ago

I don't think so, BaseFee or FeePremium is a substitute for gasPrice in EIP1559.

AlexandrouR commented 3 years ago

@imdsc Hi from my understanding Geth has not implemented EIP 1559 yet

imdsc commented 3 years ago

@imdsc Hi from my understanding Geth has not implemented EIP 1559 yet

ok,thank you.