(feat) Improved the Injective Delegation Script #6905
+107
−64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before submitting this PR, please make sure:
A description of the changes proposed in the pull request:
With this change, you can use the delegation script without any modifications as it uses
argparse
to supply the parameters.In addition to
argparse
, the script now also takes both a private key and seed phrase, without showing it on screen (no echo). This improves security (when someone is looking over your shoulder).Also, deprecated functions have been replaced by up-to-date PyInjective functions. We might have to update the dependency in the docker container, though. I will make a separate PR for this.
Current usage:
Tests performed by the developer:
Tested the script with my test trading account (Call was
python hummingbot/connector/exchange/injective_v2/account_delegation_script.py --grantee_address inj1wdgalm0ygdcs4235gw7gqcwzsflpvaqfdq82tj --derivative_market_ids=0x18b2ca44b3d20a3b87c87d3765669b09b73b5e900693896c08394c70e79ab1e7 --grant_expiration_days 1
): https://www.mintscan.io/injective/tx/9D310898642A5270FF969FC537180FD95E41FD60F391AA9A91B8632C5F890773Tips for QA testing: