ethers.js icon indicating copy to clipboard operation
ethers.js copied to clipboard

estimateGas does not support eip-4844.

Open iteyelmp opened this issue 2 years ago • 4 comments

Ethers Version

6.12.1

Search Terms

No response

Describe the Problem

When obtaining the gasLimit of eip-4844 type transaction, need to bring blobVersionedHashes.

blobhash estimated gas error.

image

bytes32 dataHash = blobhash(blobIdx); require(dataHash != 0, "failed to get blob hash");

Code Snippet

No response

Contract ABI

No response

Errors

No response

Environment

Ethereum (mainnet/ropsten/rinkeby/goerli)

Environment (Other)

No response

iteyelmp avatar May 11 '24 06:05 iteyelmp

I believe you absolutely correct. I will experiment with this and get a fix asap.

ricmoo avatar May 16 '24 14:05 ricmoo

FYI, I've deployed the follow contract to sepolia:

contract TestBolb {
    function test() public view returns (bytes32) {
        bytes32 dataHash = blobhash(0);
        require(dataHash != 0, "failed to get blob hash");
        return dataHash;
    }
}

which indeed demonstrates the issue.

ricmoo avatar May 16 '24 20:05 ricmoo

The biggest issue right now is that Etherscan's proxy API doesn't support passing hashes along. I'll contact them, but for now will throw an unsupported operations error in the event someone tries passing blobVersionedHashes along to that particular provider.

ricmoo avatar May 30 '24 21:05 ricmoo

Added in v6.12.2. Let me know if you still have any issues.

Thanks! :)

ricmoo avatar Jun 02 '24 05:06 ricmoo