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

TESTCOV: Sputnik Factory: View Functions #125

Open
9 of 15 tasks
TrevorJTClarke opened this issue Feb 25, 2022 · 0 comments · May be fixed by #167
Open
9 of 15 tasks

TESTCOV: Sputnik Factory: View Functions #125

TrevorJTClarke opened this issue Feb 25, 2022 · 0 comments · May be fixed by #167
Labels
C-Testing Unit testing / integration testing P-Medium Priority: Medium

Comments

@TrevorJTClarke
Copy link
Contributor

TrevorJTClarke commented Feb 25, 2022

Create test coverage for the following:

Views

get_dao_list

  • Returns empty array for new factory
  • Returns full list of DAOs
  • NOTE: This method will fail when list gets too long for gas to return on RPC

get_number_daos

  • Returns an integer representing the total amount of DAOs known to factory

get_daos

  • (Needs Impl) Returns default list of DAOs with a max length of 100 & offset of 0.
  • Returns a list of DAOs matching the specified from_index and limit.
  • Capable of returning non-zero indexed list, so pagination can be verified

get_owner

  • Returns a string representing the account that owns the factory
  • Fails if storage is corrupted or no owner

get_default_code_hash

  • Returns the default code_hash for a new DAO
  • Returns the default code_hash that has been updated after new code blob in factory

get_default_version

  • Returns the default metadata version for a new DAO, this will be a simplified semver. Example: [2,0] for V 2.0

get_code

  • Returns an entire code blob based on given code_hash
  • Returns no value if code_hash doesn't exist

get_contracts_metadata

  • Returns the supported list of all factory code_hash + metadata, indicating the supported versions available for DAOs to upgrade
@TrevorJTClarke TrevorJTClarke added P-Medium Priority: Medium C-Testing Unit testing / integration testing labels Feb 25, 2022
@TrevorJTClarke TrevorJTClarke moved this to Ready For Dev in Sputnik Core Feb 25, 2022
This was referenced Mar 22, 2022
@nninkovicSQA nninkovicSQA linked a pull request Mar 22, 2022 that will close this issue
@nninkovicSQA nninkovicSQA removed a link to a pull request Mar 23, 2022
@nninkovicSQA nninkovicSQA linked a pull request Apr 26, 2022 that will close this issue
@nninkovicSQA nninkovicSQA moved this from Ready For Dev to In Progress in Sputnik Core Apr 26, 2022
@nninkovicSQA nninkovicSQA moved this from In Progress to Ready For Dev in Sputnik Core Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Testing Unit testing / integration testing P-Medium Priority: Medium
Projects
Status: Ready For Dev
Development

Successfully merging a pull request may close this issue.

1 participant