Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for executing transactions in scripting mode #419

Merged
merged 18 commits into from
Jun 26, 2024

Conversation

falvaradorodriguez
Copy link
Contributor

@falvaradorodriguez falvaradorodriguez commented Jun 19, 2024

Closes #36

Points of interest:

  • Added send_ether, send-erc20, send-erc721, send-custom and tx-builder commands. The first commands allow to execute transactions and the second, by importing a file generated by the tx_builder, can execute tx batches using the MultiSendCallOnly contract.
  • The logic of the tx_builder_file_decoder is developed based on what I know is done in the front end tx_builder. Added here: Add support for executing transactions from tx-builder json file #426
  • A script_mode no_input property is added to safe_operator to raise exceptions that terminate execution instead of just displaying the error message (prompt mode).
  • Updated the Readme file with the examples of the added commands.

@safe-global safe-global deleted a comment from coveralls Jun 19, 2024
@safe-global safe-global deleted a comment from coveralls Jun 20, 2024
@safe-global safe-global deleted a comment from coveralls Jun 20, 2024
@safe-global safe-global deleted a comment from coveralls Jun 20, 2024
@falvaradorodriguez falvaradorodriguez marked this pull request as ready for review June 20, 2024 12:23
@falvaradorodriguez falvaradorodriguez requested a review from a team as a code owner June 20, 2024 12:23
@coveralls
Copy link

Coverage Status

coverage: 88.843% (+1.6%) from 87.279%
when pulling 8d82f8a on support_scripting
into dbea553 on main.

@safe-global safe-global deleted a comment from coveralls Jun 20, 2024
@coveralls
Copy link

Coverage Status

coverage: 88.804% (+1.5%) from 87.279%
when pulling ee7a27c on support_scripting
into dbea553 on main.

@fmrsabino fmrsabino added the in review Someone is reviewing this Pull Request label Jun 24, 2024
src/safe_cli/safe_cli.py Outdated Show resolved Hide resolved
src/safe_cli/main.py Outdated Show resolved Hide resolved
src/safe_cli/main.py Outdated Show resolved Hide resolved
src/safe_cli/safe_cli.py Show resolved Hide resolved
src/safe_cli/main.py Show resolved Hide resolved
src/safe_cli/operators/safe_operator.py Outdated Show resolved Hide resolved
src/safe_cli/operators/safe_operator.py Outdated Show resolved Hide resolved
src/safe_cli/tx_builder/tx_builder_file_decoder.py Outdated Show resolved Hide resolved
@fmrsabino fmrsabino removed the in review Someone is reviewing this Pull Request label Jun 24, 2024
@coveralls
Copy link

Coverage Status

coverage: 88.812% (+1.5%) from 87.279%
when pulling 1e1d354 on support_scripting
into dbea553 on main.

@coveralls
Copy link

Coverage Status

coverage: 87.771% (+0.5%) from 87.279%
when pulling d8319c9 on support_scripting
into f84bc0e on main.

@falvaradorodriguez falvaradorodriguez changed the title Support scripting Adding support for executing transactions in scripting mode Jun 25, 2024
@coveralls
Copy link

Coverage Status

coverage: 87.771% (+0.5%) from 87.279%
when pulling 040622f on support_scripting
into d9ac0c1 on main.

@fmrsabino fmrsabino added the in review Someone is reviewing this Pull Request label Jun 25, 2024
Copy link
Contributor

@fmrsabino fmrsabino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job 👏

I was considered additionally that the purpose of this PR, in addition to the "attended-mode" was to support scripting. In that case I think having a --no-input flag or similar should be added (initially to the commands that require it but in the future for it to be a global parameter).

src/safe_cli/main.py Show resolved Hide resolved
@fmrsabino fmrsabino removed the in review Someone is reviewing this Pull Request label Jun 25, 2024
@coveralls
Copy link

Coverage Status

coverage: 87.46% (+0.2%) from 87.279%
when pulling f9b5250 on support_scripting
into d9ac0c1 on main.

@fmrsabino fmrsabino added the in review Someone is reviewing this Pull Request label Jun 26, 2024
src/safe_cli/main.py Outdated Show resolved Hide resolved
src/safe_cli/main.py Outdated Show resolved Hide resolved
@coveralls
Copy link

Coverage Status

coverage: 87.47% (+0.2%) from 87.279%
when pulling da2c9ae on support_scripting
into a9427b2 on main.

@coveralls
Copy link

Coverage Status

coverage: 87.47% (+0.2%) from 87.279%
when pulling da2c9ae on support_scripting
into a9427b2 on main.

Copy link
Contributor

@fmrsabino fmrsabino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 👏 👏 👏

@fmrsabino fmrsabino removed the in review Someone is reviewing this Pull Request label Jun 26, 2024
@falvaradorodriguez falvaradorodriguez merged commit ddd66d6 into main Jun 26, 2024
14 checks passed
@falvaradorodriguez falvaradorodriguez deleted the support_scripting branch June 26, 2024 12:41
@github-actions github-actions bot locked and limited conversation to collaborators Jun 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support scripting
3 participants