-
Notifications
You must be signed in to change notification settings - Fork 2
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
[DON'T MERGE] Supra_container #113
base: vm_upgrade_branch
Are you sure you want to change the base?
Conversation
afeeb2a
to
3f1f382
Compare
use supra_framework::system_addresses; | ||
|
||
struct AddressToContainerMap has key, store { | ||
address_container_map: SimpleMap<address, vector<u64>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this is a map from address
to vector<u64>
, it is supposed to be from module address to container id. Assuming container id to be a unique sequence number, this can be a map address -> u64
, or rather it can be Table<address,u64>
.
//TODO Task for Aosen: how this will be published and how can we get the address back | ||
|
||
/// Add one module address to the container | ||
public fun add_module_to_container(supra_framework: &signer, address: address, module_address: address) acquires AddressToContainerMap { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe creation of module should be up to container owner only. So add_module_to_container
should not need supra_framework: &signer
, it should need approval of owner
, where owner
could be single or multisig authority.
Co-authored-by: Saurabh Joshi <[email protected]>
No description provided.