ind-igo / forge-safe

117 stars 25 forks source link

Add Trezor support #1

Open jordaniza opened 1 year ago

jordaniza commented 1 year ago

Hey @ind-igo, thanks for this. I'd like to use it with my Trezor and happy to PR into the repo instead of forking.

Just reviewing the BatchScript.sol file and want to double check the implementation approach with you to confirm I'm not missing anything:

https://github.com/ind-igo/forge-safe/blob/main/src/BatchScript.sol#L68 Add hash of "trezor" as an option

https://github.com/ind-igo/forge-safe/blob/main/src/BatchScript.sol#L158 Add trezor to switch statement - I am assuming trezor supports the mnemonic index flag but I can't see documentation on it?

Cheers

ind-igo commented 1 year ago

Hey @jordaniza,

Yes, I believe this is correct, although you will also have to add another if block at https://github.com/ind-igo/forge-safe/blob/main/src/BatchScript.sol#L202 to be able to pass in the proper trezor cli args to cast.