-
Notifications
You must be signed in to change notification settings - Fork 219
Description
this is simulate error of firstRevert
"firstRevert": {
"txHash": "0x7d7423dc76877f947bfcb7ea87ed20357f9b5275dcd6b575119245ced5c0d6f2",
"gasUsed": 22087,
"gasPrice": "0",
"gasFees": "0",
"fromAddress": "0xF727aDCef4C8e1D348ACD16e815538FcB0403E1b",
"toAddress": "0xC1c4301C5bd4eBe2C04817aC815AaceB4DeDA8DB",
"coinbaseDiff": "0",
"ethSentToCoinbase": "0",
"error": "execution reverted",
"revert": "\u0000\u0000\u0000",
"value": null
}
the code follow:
this is the transation create:
this is calldata:
const calldata = ethers.utils.solidityPack(
['address', 'address', 'uint128', 'uint128', 'uint8'],
[
'0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', //weth
'0x538a69cbb33F94EcB35B21dFa778577B5714Af4B', //pair address
ethers.utils.parseUnits('0.5', 18),
ethers.utils.parseUnits('19899100', 18),
1,
]
);
const transaction = {
chainId: 5,
type: 2,
to: "0xC1c4301C5bd4eBe2C04817aC815AaceB4DeDA8DB", //test4 address
data:calldata, //⬅️
value: ethers.utils.parseEther("0"),
maxFeePerGas: GWEI * 100n,
gasLimit: 3000000,
}