Skip to content

Create Admin controller#194

Merged
ethanfrey merged 10 commits intomasterfrom
admin-controller
Dec 21, 2020
Merged

Create Admin controller#194
ethanfrey merged 10 commits intomasterfrom
admin-controller

Conversation

@ethanfrey
Copy link
Copy Markdown
Contributor

@ethanfrey ethanfrey commented Dec 18, 2020

Closes #181

  • Create new package for controllers, outside of cw0
  • Add Admin controller here
  • Integrate it into cw4-group
  • Integrate it into cw4-stake

Follow-Up:

  • Port Hooks/Claim controllers to the same pattern (and move packages) Hooks controller #195
  • More some structs into cw0, so they can be imported by eg. cw4?

@ethanfrey ethanfrey requested a review from maurolacy December 18, 2020 22:51
@ethanfrey
Copy link
Copy Markdown
Contributor Author

@maurolacy curious what you think of this (just focus on cw4-group/srccontracts.rs and controllers/src/admin.rs.

Admin is a trivial example and maybe easy to cut and paste, but I was looking for a format to move these controllers, for maximum composability. So I can port hooks, claims, etc into this format.

@maurolacy
Copy link
Copy Markdown
Contributor

Hi, OK, will take a look tomorrow.

Making slow progress with #163 ... let's talk tomorrow, as I'm almost there with the impl, and have some questions for you. Good thing is that I now have a much better grasp at storage-plus (Map, Prefix and the like).

@ethanfrey
Copy link
Copy Markdown
Contributor Author

Nice. Yeah, storage-plus is a good piece to master and review by usage.

Good to review the api first with real usages. Then the implementation. I am sure there are ways to clean it up. Especially all the length prefixing calls. But best to actually work on the code.

I hope the Key trait makes sense (and you see how this allows us to naively construct indexes)

@ethanfrey ethanfrey marked this pull request as ready for review December 20, 2020 10:06
@ethanfrey ethanfrey merged commit 48aa763 into master Dec 21, 2020
@ethanfrey ethanfrey deleted the admin-controller branch December 21, 2020 16:28
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.

Pull out admin helper/controller into cw0

2 participants