The use case: One wants to create a new DAO and simulteneously register a scheme whose constructor requires an avatar address. Currently the only way to register such a scheme is to create the DAO and then propose to add the scheme via SchemeRegistrar.
So this ticket proposes that DAO.new support the provision of a callback that the caller will implement to instantiate a scheme once the avatar address is known. DAO.new will supply the avatar address as a parameter to the callback. The callback will return the new scheme's address and DAO.new will proceed to register it with the new avatar's controller.
The use case: One wants to create a new DAO and simulteneously register a scheme whose constructor requires an avatar address. Currently the only way to register such a scheme is to create the DAO and then propose to add the scheme via
SchemeRegistrar.So this ticket proposes that
DAO.newsupport the provision of a callback that the caller will implement to instantiate a scheme once the avatar address is known.DAO.newwill supply the avatar address as a parameter to the callback. The callback will return the new scheme's address andDAO.newwill proceed to register it with the new avatar's controller.