Hello, our team relies heavily on creating contracts on the fly from a “registry contract”. We have decided to move from truffle suite to open zeppelin SDK (and CLI), however it seems that the App.sol (solc version 0.5.0) used to create contracts on the fly is not supported in OZ3.0 (using solc version 0.6.0), is it possible to bridge these functionalities or it is not the best practice ? Do OZ 3.0 has new practices for creating contracts on the fly?
Environment
Details
Code to reproduce
For example, the following does not compile, due to upgrades require 0.5.0 but contracts-ethereum-package requires 0.6.0, since we have decided to move to 0.6.0, it is better that we do not fall back to 0.5.0 and an older open zeppelin contracts version
pragma solidity >=0.4.21 <=0.6.2;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts-ethereum-package/contracts/access/AccessControl.sol";
import "./Token.sol";
import "@openzeppelin/upgrades/contracts/application/App.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/Initializable.sol";
contract TokenFactory is AccessControlUpgradeSafe {
App private app;
struct TokenRecord {
address addr;
string name;
string symbol;
uint8 decimals;
}
mapping(string => address) nameMap;
mapping(string => address) symbolMap;
bytes32 public constant WHITELIST_ADMIN_ROLE = keccak256("WHITELIST_ADMIN_ROLE");
TokenRecord[] records;
event InstanceCreated(address);
function initialize(App _app) public initializer {
app = _app;
}
....