Near-One / near-plugins

Implementation of common patterns used for NEAR smart contracts.
Creative Commons Zero v1.0 Universal
27 stars 12 forks source link

Looks great! #1

Closed willemneal closed 1 year ago

willemneal commented 2 years ago

I've been wanting to make something like this so glad to see you've already done it!

A feature I'm currently working on is incorporating access control and DAO council membership. Currently there isn't a great way to get this information in a cross contract call (it returns all the info about the DAO, since it's meant for the front end).

Another idea I've been wanting to develop is to break up the state into components. So instead of one contract at STATE it would be different structs, whose state is loaded in lazily. It would allow contracts to be more composable. Currently this is handled in the sdk with a lot of lazy options, but they are still part of the core state.

Lastly, and the most relevant to the current work in this repo is to add top level #[only(owner)] to an Impl. I find that they are usually grouped together and this would make it a little cleaner.

mfornet commented 1 year ago

A feature I'm currently working on is incorporating access control and DAO council membership.

@willemneal have you had any progress on this. We are planning to work on Access Control Patterns since we want to introduce them both in the bridge and in aurora engine.

Another idea I've been wanting to develop is to break up the state into components. So instead of one contract at STATE it would be different structs, whose state is loaded in lazily. It would allow contracts to be more composable. Currently this is handled in the sdk with a lot of lazy options, but they are still part of the core state.

This is a great idea. Having these lazy options is not great; for example, it is not trivial to migrate on upgrades.

Lastly, and the most relevant to the current work in this repo, is to add top-level #[only(owner)] to an Impl. I find that they are usually grouped, and this would make it a little cleaner.

Makes a lot of sense, both for ownership and pausability! I'll create a separate issue for this. (#3)

willemneal commented 1 year ago

@mfornet check out https://github.com/ahalabs/contract-riffs