safe-global / safe-cli

Command line utility for Safe
MIT License
203 stars 68 forks source link

[DOC] Adding scripting mode documentation to safe-docs #434

Open falvaradorodriguez opened 1 month ago

falvaradorodriguez commented 1 month ago

The new options implemented in https://github.com/safe-global/safe-cli/issues/36 need to be added to the safe-cli documentation in safe-docs.

Currently only the interactive mode is documented, and the direct commands as well as the tx-builder command need to be documented.

sebastiendan commented 1 month ago

Hey @falvaradorodriguez, any chance I could get some guidelines for tx-builder while the doc is being worked on? I couldn't find details regarding the file that the command expects (what it should contain, etc.).

falvaradorodriguez commented 1 month ago

Hey @falvaradorodriguez, any chance I could get some guidelines for tx-builder while the doc is being worked on? I couldn't find details regarding the file that the command expects (what it should contain, etc.).

Hi @sebastiendan, you can generate and export one of these JSON files from the Transaction Builder app on the Safe website.

Screenshot 2024-07-16 at 16 22 45

sebastiendan commented 1 month ago

@falvaradorodriguez So you mean the tx-builder command is not a replacement for the UI, but a complementing tool? (basically I'm looking for a way with safe-cli to create and propose a transaction, for it to be later multisig-ed in Safe Wallet)

falvaradorodriguez commented 1 month ago

@falvaradorodriguez So you mean the tx-builder command is not a replacement for the UI, but a complementing tool? (basically I'm looking for a way with safe-cli to create and propose a transaction, for it to be later multisig-ed in Safe Wallet)

Sorry, I didn't express myself well. Yes, safe-cli replaces the interface. What I meant to say was that you could generate a JSON example from there as we don't have documentation on how to generate it at the moment.

Anyway, if you are looking to propose a transaction, this may help.

Even here shows some examples of how to directly use the commands to create and propose a transaction.

sebastiendan commented 1 month ago

@falvaradorodriguez I've run some tests, and from what I can see send-custom requires all signers (it basically propose, confirm, and execute all at once).

Edit: same for tx-builder => with a 2-out-2 multisig, I need to pass both private keys, so I cannot just propose the transaction.

falvaradorodriguez commented 1 month ago

@sebastiendan Yes, if you are only looking to propose the transaction, for the moment, from safe-cli it's only possible to do the complete flow (as the main idea is to be a substitute for the interface).

Anyway, you could propose the transaction using the SDK from Python or Js following this example.

As this topic already differs from the initial question, if you still have doubts about this, it might be better to move the question to the appropriate channel. Thanks in advance.