Skip to content

send

Send a low-level transaction. Provide [to] for a call/transfer, --data for raw calldata, --value for native value, or any combination.

Supports runtime fields inside smart blocks. Use explicit @helper! expressions or captured outputs; other fields are evaluated at build time.

send [to]
NameTypeEvaluationDescription
[to]addressRuntime in smart blocksTarget address. Omit for a CREATE-style deployment (use the deploy command for address binding).
NameTypeEvaluationDescription
--databytesRuntime in smart blocksPre-encoded calldata or init code; runtime calldata requires a fixed selector from @abi.encodeCall!
--valuenumberRuntime in smart blocksNative value to send (in wei)
--fromaddressBuild timeSender address (requires simulation or connected wallet)
--gasnumberBuild timeGas limit
--max-fee-per-gasnumberBuild timeMax fee per gas (EIP-1559)
--max-priority-fee-per-gasnumberBuild timeMax priority fee per gas (EIP-1559)
--noncenumberBuild timeTransaction nonce override
# Send pre-encoded calldata
set $data @abi.encodeCall("transfer(address,uint256)" 0x44fA8E6f47987339850636F88629646662444217 100e18)
send @token(DAI) --data $data
# Native value transfer
send 0x44fA8E6f47987339850636F88629646662444217 --value 1e18

Like exec, send supports revert captures (-!> / -?!>) on the transaction it sends, and refusal captures (-/> / -?/>) on a failure raised before the send:

set $contract 0x44fA8E6f47987339850636F88629646662444217
set $calldata 0xa3fdfee3
# Assert the call reverts with a specific error
send $contract --data 0xa3fdfee3 -!> Unauthorized()
# Capture the revert reason
send $contract --data $calldata -!> Error(string) [$reason]
# Boolean variable
send $contract --data $calldata -?!> Unauthorized() $e
  • Either <to> or --data must be provided. Sending without either is a no-op and is rejected.
  • Omitting <to> while supplying --data produces a CREATE-style deployment transaction. For deployments where you also want the predicted contract address bound to a variable, use the deploy command instead.
  • exec — call a contract by signature (auto-encodes)
  • deploy — deploy a contract from raw creation bytecode
  • @abi.encodeCall — encode calldata from a signature