Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Oct 22, 2024

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 <106232965+sjoshisupra@users.noreply.github.com>
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.

1 participant