cast wallet sign --ledger gives an "Error: \noperation `sign_hash` is not supported by the signer\n"
Component
Cast
Have you ensured that all of these are up to date?
- [X] Foundry
- [X] Foundryup
What version of Foundry are you on?
forge 0.2.0 (f0d9eec 2024-04-30T00:16:44.393198000Z)
What command(s) is the bug in?
cast wallet sign --ledger
Operating System
macOS (Apple Silicon)
Describe the bug
When running cast wallet sign --ledger .... the following is returned in the console
"Error: \noperation sign_hash is not supported by the signer\n"
Nothing is displayed on the ledger hardware key visor to sign.
We have ensured ledger live software is up to date and this command/script file used to work in the past so it sounds like something has changed.
Any thoughts?
@mattsse @Evalir I didn't include the rest of the flags of the cast command because they are too long to add here
also I did foundryup -C 2cb8757 to try this on an older foundry version and the exact same command works
They are very important, please include all the flags except for the actual data if you can't put it here.
So, as tested in today's release of foundry, the same error appears.
To give more context to the issue, this is being done within this lib https://github.com/ind-igo/forge-safe
This library used to work until last week's version of foundry (we can't recall exactly when, as the last time we've used this library to batch send operations to a Safe was beginning of April, more or less)
This comes in the context of this function https://github.com/ind-igo/forge-safe/blob/4ce820bad668846207f34b6f439021ad151f0a1e/src/BatchScript.sol#L195-L234 which signs a batch to be sent to a safe for execution
The below ffi call results in '0'x for the signature as nothing is triggered in the ledger hardware side to be signed. The error shown in the console is, as described in the title \noperation sign_hash is not supported by the signer\n appears in the logs.
VM::ffi([“bash”, “-c”, “cast wallet sign --ledger --mnemonic-index 0 --data ‘{\“domain\“:{\“chainId\“:1,\“verifyingContract\“:\“0xd26b38a64C812403fD3F87717624C80852cD6D61\“},\“message\“:{\“baseGas\“:0,\“data\“:\“0x8d80ff0a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000106800722669cbe532f08bb4eb81127e6ef386627e90be00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b049d57d64e0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000a86a0000000000000000000000000000000000000000000000000000000000000089000000000000000000000000000000000000000000000000000000000000a4b1000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000002105000000000000000000000000000000000000000000000000000000000000000600000000000000000000000014e613ac84a31f709eadbdf89c6cc390fdc9540a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009eb100000000000000000000000000000000000000000000000000000000000036ee80000000000000000000000000000000000000000000000000000000000030d4000000000000000000000000000000000000000000000000000000000000cc62f0000000000000000000000000000000000000000000000000000000751e911c000000000000000000000000000000000000000000000000000000000b2d05e0000000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000001e84800000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000dbbf5000000000000000000000000ff3eeb22b5e3de6e705b44749c2559d704923fd7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cf8500000000000000000000000000000000000000000000000000000000000030d400000000000000000000000000000000000000000000000000000000000030d40000000000000000000000000000000000000000000000000000000000016cc0c00000000000000000000000000000000000000000000000000000000d267867f00000000000000000000000000000000000000000000000000000005d21dba0000000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000001e8480000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000027100000000000000000000000000000000000000000000000000000000000092aaa0000000000000000000000007bac85a8a13a4bcd8abb3eb7d6b4d632c5a57676000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000aae600000000000000000000000000000000000000000000000000000000000030d400000000000000000000000000000000000000000000000000000000000030d40000000000000000000000000000000000000000000000000000000000011140a0000000000000000000000000000000000000000000000000000000004d744580000000000000000000000000000000000000000000000000000000ba43b740000000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000001e8480000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000027100000000000000000000000000000000000000000000000000000000000091fda0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002625a00000000000000000000000000000000000000000000000000000000000155cc000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000001940ab0000000000000000000000000000000000000000000000000000003affd126000000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000001e848000000000000000000000000000000000000000000000000000000000000027100000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000014d86a0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000864700000000000000000000000000000000000000000000000000000000000030d400000000000000000000000000000000000000000000000000000000000030d4000000000000000000000000000000000000000000000000000000000001a2fb20000000000000000000000000000000000000000000000000000003affd1260000000000000000000000000000000000000000000000000000000000003d090000000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000001e848000000000000000000000000000000000000000000000000000000000000027100000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000009e8180000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000927c00000000000000000000000000000000000000000000000000000000000030d400000000000000000000000000000000000000000000000000000000000030d40000000000000000000000000000000000000000000000000000000000011fc9a0000000000000000000000000000000000000000000000000000003affd1260000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000001e84800000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000e07aa0017a332dc7b40ae701485023b219e9d6f493a2514000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000648d336654ab437a16135e856111e538dc45051dd9c2778c6069d25a22fb9ac4766c356aa1000000000000000000000000722669cbe532f08bb4eb81127e6ef386627e90be00000000000000000000000000000000000000000000000000000000000000010017a332dc7b40ae701485023b219e9d6f493a2514000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000648d336654ab437a16135e856111e538dc45051dd9c2778c6069d25a22fb9ac4766c356aa1000000000000000000000000722669cbe532f08bb4eb81127e6ef386627e90be00000000000000000000000000000000000000000000000000000000000000380017a332dc7b40ae701485023b219e9d6f493a2514000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000648d336654ab437a16135e856111e538dc45051dd9c2778c6069d25a22fb9ac4766c356aa1000000000000000000000000722669cbe532f08bb4eb81127e6ef386627e90be000000000000000000000000000000000000000000000000000000000000a86a0017a332dc7b40ae701485023b219e9d6f493a2514000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000648d336654ab437a16135e856111e538dc45051dd9c2778c6069d25a22fb9ac4766c356aa1000000000000000000000000722669cbe532f08bb4eb81127e6ef386627e90be00000000000000000000000000000000000000000000000000000000000000890017a332dc7b40ae701485023b219e9d6f493a2514000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000648d336654ab437a16135e856111e538dc45051dd9c2778c6069d25a22fb9ac4766c356aa1000000000000000000000000722669cbe532f08bb4eb81127e6ef386627e90be000000000000000000000000000000000000000000000000000000000000a4b10017a332dc7b40ae701485023b219e9d6f493a2514000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000648d336654ab437a16135e856111e538dc45051dd9c2778c6069d25a22fb9ac4766c356aa1000000000000000000000000722669cbe532f08bb4eb81127e6ef386627e90be000000000000000000000000000000000000000000000000000000000000000a0017a332dc7b40ae701485023b219e9d6f493a2514000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000648d336654ab437a16135e856111e538dc45051dd9c2778c6069d25a22fb9ac4766c356aa1000000000000000000000000722669cbe532f08bb4eb81127e6ef386627e90be0000000000000000000000000000000000000000000000000000000000002105000000000000000000000000000000000000000000000000\“,\“gasPrice\“:0,\“gasToken\“:\“0x0000000000000000000000000000000000000000\“,\“nonce\“:9,\“operation\“:1,\“refundReceiver\“:\“0x0000000000000000000000000000000000000000\“,\“safeTxGas\“:0,\“to\“:\“0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761\“,\“value\“:0},\“primaryType\“:\“SafeTx\“,\“types\“:{\“EIP712Domain\“:[{\“name\“:\“verifyingContract\“,\“type\“:\“address\“},{\“name\“:\“chainId\“,\“type\“:\“uint256\“}],\“SafeTx\“:[{\“name\“:\“to\“,\“type\“:\“address\“},{\“name\“:\“value\“,\“type\“:\“uint256\“},{\“name\“:\“data\“,\“type\“:\“bytes\“},{\“name\“:\“operation\“,\“type\“:\“uint8\“},{\“name\“:\“safeTxGas\“,\“type\“:\“uint256\“},{\“name\“:\“baseGas\“,\“type\“:\“uint256\“},{\“name\“:\“gasPrice\“,\“type\“:\“uint256\“},{\“name\“:\“gasToken\“,\“type\“:\“address\“},{\“name\“:\“refundReceiver\“,\“type\“:\“address\“},{\“name\“:\“nonce\“,\“type\“:\“uint256\“}]}}’“])