Closed wantedsystem closed 1 week ago
Latest commit: a5c1675e66caccba2abcffb8765c18222cd2f139
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
@wantedsystem is attempting to deploy a commit to the Wevm Team on Vercel.
A member of the Team first needs to authorize it.
Attempting to test this end-to-end, but I am running into issues on Linea Sepolia that the method linea_estimateGas
is not available:
$ curl -X POST https://rpc.sepolia.linea.build \
-H "Content-Type: application/json" \
-d '{"id": 1, "jsonrpc": "2.0", "method": "linea_estimateGas", "params": [{"to": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", "value": "0xde0b6b3a7640000"}]}'
> {"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"the method linea_estimateGas does not exist/is not available"}}
What RPC URL can I use to test this end-to-end?
Attempting to test this end-to-end, but I am running into issues on Linea Sepolia that the method
linea_estimateGas
is not available:$ curl -X POST https://rpc.sepolia.linea.build \ -H "Content-Type: application/json" \ -d '{"id": 1, "jsonrpc": "2.0", "method": "linea_estimateGas", "params": [{"to": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", "value": "0xde0b6b3a7640000"}]}' > {"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"the method linea_estimateGas does not exist/is not available"}}
What RPC URL can I use to test this end-to-end?
Hey @jxom It will be available soon -i'll keep you posted
Since there are a few outstanding comments, going to convert this to a draft.
Attempting to test this end-to-end, but I am running into issues on Linea Sepolia that the method
linea_estimateGas
is not available:$ curl -X POST https://rpc.sepolia.linea.build \ -H "Content-Type: application/json" \ -d '{"id": 1, "jsonrpc": "2.0", "method": "linea_estimateGas", "params": [{"to": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", "value": "0xde0b6b3a7640000"}]}' > {"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"the method linea_estimateGas does not exist/is not available"}}
What RPC URL can I use to test this end-to-end?
You can test now for Linea Mainnet
curl https://rpc.linea.build \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0","method": "linea_estimateGas","params": [{"from": "0x91ba6c8DE41deC8E4d4E1C858f00FaE1819990Ca","gas":"0x21000"}],"id": 53}'
And for Linea Sepolia :
curl https://rpc.sepolia.linea.build \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0","method": "linea_estimateGas","params": [{"from": "0x91ba6c8DE41deC8E4d4E1C858f00FaE1819990Ca","gas":"0x21000"}],"id": 53}'
Attempting to test this end-to-end, but I am running into issues on Linea Sepolia that the method
linea_estimateGas
is not available:$ curl -X POST https://rpc.sepolia.linea.build \ -H "Content-Type: application/json" \ -d '{"id": 1, "jsonrpc": "2.0", "method": "linea_estimateGas", "params": [{"to": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", "value": "0xde0b6b3a7640000"}]}' > {"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"the method linea_estimateGas does not exist/is not available"}}
What RPC URL can I use to test this end-to-end?
You can test now for Linea Mainnet
curl https://rpc.linea.build \ -X POST \ -H "Content-Type: application/json" \ -d '{"jsonrpc": "2.0","method": "linea_estimateGas","params": [{"from": "0x91ba6c8DE41deC8E4d4E1C858f00FaE1819990Ca","gas":"0x21000"}],"id": 53}'
And for Linea Sepolia :
curl https://rpc.sepolia.linea.build \ -X POST \ -H "Content-Type: application/json" \ -d '{"jsonrpc": "2.0","method": "linea_estimateGas","params": [{"from": "0x91ba6c8DE41deC8E4d4E1C858f00FaE1819990Ca","gas":"0x21000"}],"id": 53}'
Hey @jxom you had the opportunity to test ?
Superseded by https://github.com/wevm/viem/pull/2665
Linea, a layer 2 blockchain, supports the Ethereum EIP-1559 gas price model, known for making transaction fees more predictable. Unlike the base Ethereum layer, Linea aims to offer a more stable and cost-effective approach to handling transaction fees. For detailed information, you can visit Linea's Gas Fees Documentation.
To further enhance the efficiency of transaction fee calculations, Linea has introduced a new RPC method designed to provide the best gas price estimates. This new method is documented in detail here.
The introduction of this new RPC method necessitates changes in how web3 libraries calculate gas prices. Traditionally, these libraries used the eth_gasPrice method. Linea's update shifts this approach to utilize the newly introduced linea_estimateGas method.
Detailed summary
PR-Codex overview
This PR adds Linea and Linea Testnet chains with gas estimation and fee calculation support.
Detailed summary
lineaEstimateGas
andlineaEstimateFeesPerGas
functions