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

[DON'T MERGE] Supra_container #113

Open
wants to merge 5 commits into
base: vm_upgrade_branch
Choose a base branch
from

Conversation

axiongsupra
Copy link

No description provided.

@so-kkroy22 so-kkroy22 force-pushed the vm_upgrade_branch branch 3 times, most recently from afeeb2a to 3f1f382 Compare October 28, 2024 05:54
use supra_framework::system_addresses;

struct AddressToContainerMap has key, store {
address_container_map: SimpleMap<address, vector<u64>>,

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 {

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]>
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.

2 participants