Skip to content

Commit

Permalink
Merge pull request #15 from meTokens/hub
Browse files Browse the repository at this point in the history
Del: name, owner
  • Loading branch information
Carl Farterson authored Sep 6, 2021
2 parents c018f2f + 83471ee commit 68889fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 3 additions & 9 deletions contracts/Hub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ contract Hub is Ownable, Initializable {


function register(
string calldata _name,
address _owner,
address _vaultFactory,
address _curve,
address _token,
Expand All @@ -61,14 +59,12 @@ contract Hub is Ownable, Initializable {
bytes memory _encodedVaultAdditionalArgs
) external {
// TODO: access control
require(vaultRegistry.isApproved(_vaultFactory), "_vaultFactory not approved");
// require(curveRegistry.isActive(_curve), "_curve not approved"); TODO

require(curveRegistry.isActive(_curve), "_curve !approved");
require(vaultRegistry.isApproved(_vaultFactory), "_vaultFactory !approved");
require(_refundRatio < PRECISION, "_refundRatio > PRECISION");

// Store value set base paramaters to `{CurveName}.sol`
// TODO: validate encoding with an additional parameter in function call (ie. count)
// https://docs.soliditylang.org/en/v0.8.0/units-and-global-variables.html#abi-encoding-and-decoding-functions
// abi.encodePacked();
ICurve(_curve).register(count, _encodedValueSetArgs);

// Create new vault
Expand All @@ -78,8 +74,6 @@ contract Hub is Ownable, Initializable {

// Save the hub to the registry
HubDetails storage newHubDetails = hubs[count++];
newHubDetails.name = _name;
newHubDetails.owner = _owner;
newHubDetails.active = true;
newHubDetails.vault = vault;
newHubDetails.curve = _curve;
Expand Down
2 changes: 0 additions & 2 deletions contracts/libs/Details.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ struct MeTokenDetails {
}

struct HubDetails {
string name;
address owner;
bool active;

address vault;
Expand Down

0 comments on commit 68889fe

Please sign in to comment.