`cast send` 0x prefixed calldata
Component
Cast
Describe the feature you would like
I'd like to be able to send transactions, make eth_calls or do gas estimation with calldata directly instead of passing in a function selector + args. This is useful when handling data that has already been ABI encoded or if the calldata is not following ABI.
seth does have this feature, it would require some refactoring to allow cast to do so but it should definitely be possible.
Additional context
No response
cast call has a --data flag which is mutually exclusive with selector/args, so this should be trivial to add to cast send too
closing as this appears to be solved via --data flag
I don't think this has been resolved, send/estimate has no --data flag
"make eth_calls or do gas estimation with calldata directly instead of passing in a function selector + args" it's useful
I don't think this has been resolved, send/estimate has no --data flag
"make eth_calls or do gas estimation with calldata directly instead of passing in a function selector + args" it's useful
Sorry, I found "sig" has already support calldata: The signature (sig) can be:
A fragment: someFunction(uint256,bytes32) A selector and encoded calldata: 0xcdba2fd40000000000000000000000000000000000000000000000000000000000007a69 Only the function name: in this case Cast will try to fetch the function signature from Etherscan
sorry confused send with call
@DaniPopes we should mirror cast call --data to send|estimate
Actually I think it should be the other way around. Since the sig argument can also be raw calldata, --data is redundant
you can do
cast send $(cast az) 0x1234 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
we're keeping this to update the docs for
[SIG]
The signature of the function to call
to reflect this option