Files
jxom 9bca4f3dce feat(actions): add Actions.contract.simulate
Adds the simulate action (eth_call against nonpayable/payable functions),
returning the decoded result plus a write-compatible request. Includes
runtime + type tests, simulate/write docs pages and sidebar wiring, and
write.test.ts coverage for broadcasting a simulate request (overloaded and
chain-mismatch variants).
2026-06-27 10:08:43 +10:00

21 lines
632 B
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
/// @dev Deterministic, self-hosted contract exercising write-specific calldata
/// encoding: a `payable` function (so the `value` field can be threaded and
/// asserted on-chain) and an overloaded function (so overload selection by
/// `args` can be verified). Used by the `contract.write` tests.
contract WriteExample {
function pay() external payable {}
function foo() external {}
function foo(uint256 x) external returns (uint256) {
return x;
}
function foo(uint256 x, uint256 y) external returns (uint256) {
return x + y;
}
}