How it works — we send a transaction with an
accessList attached. After it mines, we call eth_getTransactionByHash and check if the accessList is still there. Some wallets silently strip it.Counter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract Counter {
uint256 public count; // slot 0
function increment() external {
count += 1;
}
}transaction params
{
to: "0x635eAFBf44aE56Daae4E86B4204bA84C5f72A974",
data: encodeFunctionData({ abi, functionName: "increment" }),
gasPrice: parseGwei("30"),
accessList: [{
address: "0x635eAFBf44aE56Daae4E86B4204bA84C5f72A974",
storageKeys: ["0x0000000000000000000000000000000000000000000000000000000000000000"] // slot 0
}]
}