diff --git a/tests/eth_estimateGas/eth_estimateGas/estimate-auth-cost-increases-gas.io b/tests/eth_estimateGas/eth_estimateGas/estimate-auth-cost-increases-gas.io new file mode 100644 index 000000000..ed6ab49d5 --- /dev/null +++ b/tests/eth_estimateGas/eth_estimateGas/estimate-auth-cost-increases-gas.io @@ -0,0 +1,7 @@ +// checks that including ephemeral authorizations increases gas +// +// speconly: client response is only checked for schema validity. +>> {"jsonrpc":"2.0","id":1,"method":"eth_estimateGas","params":[{"from":"0x0c2c51a0990aee1d73c1228de158688341557508","nonce":"0x0","to":"0x0100000000000000000000000000000000000000","value":"0x1"}]} +<< {"jsonrpc":"2.0","id":1,"result":"0x5208"} +>> {"jsonrpc":"2.0","id":2,"method":"eth_estimateGas","params":[{"authorizationList":[{"address":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","chainId":"0x1","nonce":"0x0","r":"0x1111111111111111111111111111111111111111111111111111111111111111","s":"0x2222222222222222222222222222222222222222222222222222222222222222","yParity":"0x0"}],"from":"0x0c2c51a0990aee1d73c1228de158688341557508","nonce":"0x0","to":"0x0100000000000000000000000000000000000000","type":"0x4","value":"0x1"}]} +<< {"jsonrpc":"2.0","id":2,"result":"0xb52e"} diff --git a/tests/eth_estimateGas/eth_estimateGas/estimate-blob-tx.io b/tests/eth_estimateGas/eth_estimateGas/estimate-blob-tx.io new file mode 100644 index 000000000..9f8ef9235 --- /dev/null +++ b/tests/eth_estimateGas/eth_estimateGas/estimate-blob-tx.io @@ -0,0 +1,5 @@ +// checks gas estimation for blob transactions (EIP-4844) +// +// speconly: client response is only checked for schema validity. +>> {"jsonrpc":"2.0","id":1,"method":"eth_estimateGas","params":[{"blobVersionedHashes":["0x0100000000000000000000000000000000000000000000000000000000000000"],"from":"0x0c2c51a0990aee1d73c1228de158688341557508","maxFeePerBlobGas":"0x5","nonce":"0x0","to":"0x0100000000000000000000000000000000000000","type":"0x5","value":"0x1"}]} +<< {"jsonrpc":"2.0","id":1,"result":"0x5208"} diff --git a/tests/eth_estimateGas/eth_estimateGas/estimate-calldata-and-auth-floor.io b/tests/eth_estimateGas/eth_estimateGas/estimate-calldata-and-auth-floor.io new file mode 100644 index 000000000..7bc05040c --- /dev/null +++ b/tests/eth_estimateGas/eth_estimateGas/estimate-calldata-and-auth-floor.io @@ -0,0 +1,5 @@ +// checks combined effect of calldata floor and authorization gas cost +// +// speconly: client response is only checked for schema validity. +>> {"jsonrpc":"2.0","id":1,"method":"eth_estimateGas","params":[{"authorizationList":[{"address":"0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","chainId":"0x1","nonce":"0x0","r":"0x1111111111111111111111111111111111111111111111111111111111111111","s":"0x2222222222222222222222222222222222222222222222222222222222222222","yParity":"0x0"}],"from":"0x0c2c51a0990aee1d73c1228de158688341557508","nonce":"0x0","to":"0x0100000000000000000000000000000000000000","type":"0x4","value":"0x1"}]} +<< {"jsonrpc":"2.0","id":1,"result":"0xb52e"} diff --git a/tests/eth_estimateGas/eth_estimateGas/estimate-failed-call.io b/tests/eth_estimateGas/eth_estimateGas/estimate-failed-call.io new file mode 100644 index 000000000..f022c4b6b --- /dev/null +++ b/tests/eth_estimateGas/eth_estimateGas/estimate-failed-call.io @@ -0,0 +1,3 @@ +// estimates a contract call that reverts +>> {"jsonrpc":"2.0","id":1,"method":"eth_estimateGas","params":[{"from":"0x0102030000000000000000000000000000000000","input":"0xff030405","to":"0x17e7eedce4ac02ef114a7ed9fe6e2f33feba1667"}]} +<< {"jsonrpc":"2.0","id":1,"error":{"code":3,"message":"execution reverted","data":"0x77726f6e672d63616c6c6461746173697a65"}} diff --git a/tests/eth_estimateGas/eth_estimateGas/estimate-floor-calldata-cost-dominates.io b/tests/eth_estimateGas/eth_estimateGas/estimate-floor-calldata-cost-dominates.io new file mode 100644 index 000000000..02b90dde6 --- /dev/null +++ b/tests/eth_estimateGas/eth_estimateGas/estimate-floor-calldata-cost-dominates.io @@ -0,0 +1,5 @@ +// ensures floor calldata cost dominates the gas used for trivial execution +// +// speconly: client response is only checked for schema validity. +>> {"jsonrpc":"2.0","id":1,"method":"eth_estimateGas","params":[{"from":"0x0c2c51a0990aee1d73c1228de158688341557508","input":"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff","nonce":"0x0","to":"0x0100000000000000000000000000000000000000","value":"0x1"}]} +<< {"jsonrpc":"2.0","id":1,"result":"0xf545"} diff --git a/tests/eth_estimateGas/eth_estimateGas/estimate-simple-transfer.io b/tests/eth_estimateGas/eth_estimateGas/estimate-simple-transfer.io new file mode 100644 index 000000000..35be3751f --- /dev/null +++ b/tests/eth_estimateGas/eth_estimateGas/estimate-simple-transfer.io @@ -0,0 +1,3 @@ +// estimates a simple transfer +>> {"jsonrpc":"2.0","id":1,"method":"eth_estimateGas","params":[{"from":"0xaa00000000000000000000000000000000000000","to":"0x0100000000000000000000000000000000000000"}]} +<< {"jsonrpc":"2.0","id":1,"result":"0x5208"} diff --git a/tests/eth_estimateGas/eth_estimateGas/estimate-successful-call.io b/tests/eth_estimateGas/eth_estimateGas/estimate-successful-call.io new file mode 100644 index 000000000..347bb8840 --- /dev/null +++ b/tests/eth_estimateGas/eth_estimateGas/estimate-successful-call.io @@ -0,0 +1,5 @@ +// estimates a successful contract call +// +// speconly: client response is only checked for schema validity. +>> {"jsonrpc":"2.0","id":1,"method":"eth_estimateGas","params":[{"from":"0x0102030000000000000000000000000000000000","input":"0xff01","to":"0x17e7eedce4ac02ef114a7ed9fe6e2f33feba1667"}]} +<< {"jsonrpc":"2.0","id":1,"result":"0x5316"}