thxprotocol / modules-solidity

Default Asset Pools are connected to an ERC20 contract. The pool is controlled by a permissioned (OAuth2.0) REST API which is responsible for paying the gas costs used to manage the pool. Access to the pool is managed with a flexible role-based access mechanism. Pools can hold various reward configurations for the connected ERC20 tokent contract and will manage the distribution of those token rewards with a withdrawal system. The poll system used to govern the reward configuration and withdrawals is optional.
4 stars 3 forks source link

Provide method in asset pool factory contract to re-initialize default facets #7

Closed peterpolman closed 2 years ago

peterpolman commented 2 years ago

Afaics the initilize method could just be called again with a new defaultCut. Only problem currently is that it will append the existing defaultCut by pushing onto it. Deleting the array before pushing on it in the initialise method should solve it I guess.

delete defaultCut;
peterpolman commented 2 years ago

https://github.com/thxprotocol/modules-solidity/blob/main/contracts/AssetPoolFactory/AssetPoolFactoryFacet.sol#L23