Skip to content

Validators transactions refactoring#479

Merged
popenta merged 9 commits into
feat/nextfrom
validators-refactoring
Feb 12, 2025
Merged

Validators transactions refactoring#479
popenta merged 9 commits into
feat/nextfrom
validators-refactoring

Conversation

@popenta
Copy link
Copy Markdown
Collaborator

@popenta popenta commented Feb 7, 2025

No description provided.

@popenta popenta self-assigned this Feb 7, 2025
@popenta popenta marked this pull request as draft February 7, 2025 11:43
Base automatically changed from transaction-refactoring to feat/next February 10, 2025 15:06
@popenta popenta marked this pull request as ready for review February 10, 2025 15:48
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀

By the way, can we somehow get rid of the mypy warning?

[mypy] reported by reviewdog 🐶 Cannot find implementation or library stub for module named "pytest" [import-not-found]

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've modified the GH action, should be fine now.



def _read_stdout(capsys: Any) -> str:
return capsys.readouterr().out.strip()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Mypy warning.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

fixed



def _read_stdout(capsys: Any) -> str:
return capsys.readouterr().out.strip()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Mypy warning.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

fixed it

Comment thread multiversx_sdk_cli/config.py Outdated
UNSTAKE_TOKENS = 5000000
UNBOND_TOKENS = 5000000
CLEAN_REGISTERED_DATA = 5000000
RE_STAKE_UNSTAKED_NODES = 5000000
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Restake can be considered as being a single word.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A bit verbose.

Can we have a function that encapsulates this (optional, anyway)?

    if args.nonce is None:
        nonce = cli_shared.get_current_nonce_for_address(sender.address, args.proxy)
    else:
        nonce = int(args.nonce)

    guardian = cli_shared.load_guardian_account(args)
    guardian_address = cli_shared.get_guardian_address(guardian, args)

    relayer = cli_shared.load_relayer_account(args)
    relayer_address = cli_shared.get_relayer_address(relayer, args)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

refactored it a bit.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We don't seem to have the corresponding factory / controller in the SDK and specs. Maybe we can do that (separately, a future PR).

Copy link
Copy Markdown
Collaborator Author

@popenta popenta Feb 12, 2025

Choose a reason for hiding this comment

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

created a task for it.

andreibancioiu
andreibancioiu previously approved these changes Feb 12, 2025
@popenta popenta dismissed andreibancioiu’s stale review February 12, 2025 09:35

The merge-base changed after approval.

andreibancioiu
andreibancioiu previously approved these changes Feb 12, 2025
danielailie
danielailie previously approved these changes Feb 12, 2025
@popenta popenta dismissed stale reviews from danielailie and andreibancioiu February 12, 2025 09:52

The merge-base changed after approval.

@popenta popenta closed this Feb 12, 2025
@popenta popenta reopened this Feb 12, 2025
@popenta popenta merged commit 9c6e0b8 into feat/next Feb 12, 2025
@popenta popenta deleted the validators-refactoring branch February 12, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants