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

feat(cli-tools): Add internal operator and sponsorship commands #2926

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

teogeb
Copy link
Contributor

@teogeb teogeb commented Dec 3, 2024

Needs streamr-dev/network-contracts#949 (and a new dev-chain-fast Docker image generated which contains that feature).

Added these internal commands:

  • sponsorship-sponsor
  • operator-delegate
  • operator-undelegate
  • operator-stake
  • operator-unstake

API

The token amounts are given in full DATA tokens, not in DATA token weis. This is maybe a good approach for end-user tools like this.

Other changes

Ractored some operatorContractUtils method signatures: user authentication is passed as SignerWithProvider instead of Wallet, so that client.getSigner() can be used as an argument. These are internal methods, i.e. this is not a breaking change.

Future improvements

These commands could be normal CLI tools commands, i.e. just not for the internal use. That would be possible if we add support for DataV2 token to the SDK. Currently the only token contract available for operatorContractUtils is the test token contract. (Note that most likely there is no need to have both the DataV2 and TestToken, as DataV2 can be used also for tests.)

@teogeb teogeb force-pushed the cli-tools-internal-operator-and-sponsorship-commands branch from 10f6e88 to b351c5f Compare January 15, 2025 11:13
@teogeb teogeb requested a review from jtakalai January 15, 2025 11:21
@teogeb teogeb marked this pull request as ready for review January 15, 2025 11:21
teogeb added a commit to streamr-dev/network-contracts that referenced this pull request Jan 17, 2025
… value (#949)

The new value is one second. This is better value for development
environment (see e.g. use case in
streamr-dev/network#2926).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli-tools Related to CLI Tools Package node sdk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants