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

Improve farm setup Python scripts. #112

Merged
merged 4 commits into from
Aug 12, 2024
Merged

Improve farm setup Python scripts. #112

merged 4 commits into from
Aug 12, 2024

Conversation

deuszx
Copy link
Collaborator

@deuszx deuszx commented Aug 7, 2024

  • Adds wrap-azero subcommand for easier farm setup where there's A0 as a rewards.
  • Includes increaseAllowance as part of start (farm) subcommand.
  • Remove the requirement for phrase when details subcommand is used.
  • Raises exception if too few rewards are set to be paid for the farm duration.

@@ -102,7 +102,7 @@ def call_contract(chain, keypair, contract_address, metadata_file, method, **kwa
else:
error = receipt.error_message
name, docs = error['name'], error['docs']
print(f'!!! Contract call failed with error {name}: {docs}')
raise ValueError(f'Contract call failed with error {name}: {docs}')
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed to raising an exception so that the call short-circuits.

@deuszx deuszx marked this pull request as ready for review August 9, 2024 15:02
@deuszx deuszx changed the title increaseAllowance of reward tokens in start cmd Improve farm setup Python scripts. Aug 9, 2024
@deuszx deuszx merged commit f1902be into main Aug 12, 2024
1 check passed
@deuszx deuszx deleted the add-farm-script branch August 12, 2024 06:53
ggawryal added a commit that referenced this pull request Aug 16, 2024
Follow-up to #112:
* Add farm contract artifacts: the script looks up contract code by its
hash, and builds are non-deterministic, so to make it work on testnet /
mainnet we have to use exactly the same code hash.
* Add docs for timestamp and AZERO units
* Fix `wrap-azero`
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