foundry icon indicating copy to clipboard operation
foundry copied to clipboard

feat: `cast mktx`

Open ay opened this issue 1 year ago • 1 comments

Motivation

Similar to seth mktx from dapptools, there should be a command to build and sign transactions without broadcasting them. Ideally it should be possible to do this on an offline machine.

Solution

cast mktx is the same as cast send except it prints out a raw hex encoding of the signed transaction instead of broadcasting. This output can then be published with cast publish. It also works without an RPC (for example on an air-gapped machine) if all the required options are set.

I can also update the Foundry book if merged.

Closes #1273

ay avatar Feb 09 '24 00:02 ay

I've added some tests.

ay avatar Feb 09 '24 17:02 ay