There are several cast commands which can potentially receive lengthy arguments. Those are often limited by the underlying host OS to a couple of kilobytes, which, in some situations, might not be enough.
One alternative is to receive such arguments via stdin. It can be formatted as JSON, which is a format already in use for the output of some cast commands. For example:
This stemmed from an application I'm developing, called Bugless.
We were using go-ethereum to sign transactions to anvil, but then we changed the underlying framework, and opted to sign transactions with cast instead.
The problem is that some transactions can be quite big, and cast doesn't work because of the argument size limit imposed by the underlying OS, Linux.
If cast doesn't implement a workaround, we might rewrite our CLI tool using viem.
Component
Cast
Describe the feature you would like
There are several
cast
commands which can potentially receive lengthy arguments. Those are often limited by the underlying host OS to a couple of kilobytes, which, in some situations, might not be enough.One alternative is to receive such arguments via
stdin
. It can be formatted as JSON, which is a format already in use for the output of somecast
commands. For example:Where
arguments.json
might have the following data:Alternatively, arguments can be separated line-by-line...
Where
arguments.txt
might have the following data:Additional context
This stemmed from an application I'm developing, called Bugless. We were using
go-ethereum
to sign transactions toanvil
, but then we changed the underlying framework, and opted to sign transactions withcast
instead. The problem is that some transactions can be quite big, andcast
doesn't work because of the argument size limit imposed by the underlying OS, Linux. Ifcast
doesn't implement a workaround, we might rewrite our CLI tool usingviem
.