base_tenant_factory and base_tenant_space can be created by space contract or member in any group(comma separated) provided in _ELV_GROUP_TENANT_AUTHORITIES metadata.
was able to modify forge-std library to adapt to solidity v0.5.4 and tests are in tests/og/base_content_space.t.sol
base_tenant_space is created using CREATE2 EVM opcode, which requires salt value to be provided.
TODO:
when checking msg.sender is part of the group: should we check if the user is member of the group or checkAccessRights?
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.
* 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.
key points:
_ELV_GROUP_TENANT_AUTHORITIES
metadata.tests/og/base_content_space.t.sol
salt
value to be provided.TODO:
CATERGORY_CONTRACT
for access rights.Update:
added test in elvmaster to test basic flow of creating baseTenantSpace using baseTenantFactory. https://github.com/qluvio/elv-master/pull/945
Size info: