eluv-io / contracts

Eluvio Content Management Smart Contracts
MIT License
10 stars 0 forks source link

Tenant factory #115

Open elv-preethi opened 1 year ago

elv-preethi commented 1 year ago

key points:

TODO:

  1. when checking msg.sender is part of the group: should we check if the user is member of the group or checkAccessRights?
  2. after creating tenant contract, should the user have rights set for the contract? As of now, added tenant contract to have CATERGORY_CONTRACT for access rights.

Update:


* Due to code size limitation in `baseTenantSpace` we need to deploy to `BaseTenantSpaceHelper` contract in order check if the tx.origin is part of `_ELV_GROUP_TENANT_AUTHORITIES` in the constructor. Also, it is used in `baseTenantFactory` constructor as well.
* `BaseTenantSpaceBinProvider` contract returns the `baseTenantSpace` binary and it needs to be deployed before `baseTenantFactory` and provided in `baseTenantFactory` constructor as well. 
* the `baseTenantSpace` size almost reached its maximum code size. So, commented out `setDescription` method  in order to test it. Also `BaseTenantSpaceBinProvider` size also reached maximum. If `setDescription` is used, need to find a way to reduce the code size.