From 83471ee91d63a00ea112196440a17baf2cc831f6 Mon Sep 17 00:00:00 2001 From: Carl Farterson Date: Mon, 6 Sep 2021 14:23:30 -0700 Subject: [PATCH] Del: name, owner --- contracts/Hub.sol | 12 +++--------- contracts/libs/Details.sol | 2 -- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/contracts/Hub.sol b/contracts/Hub.sol index c1496698..507324c4 100644 --- a/contracts/Hub.sol +++ b/contracts/Hub.sol @@ -51,8 +51,6 @@ contract Hub is Ownable, Initializable { function register( - string calldata _name, - address _owner, address _vaultFactory, address _curve, address _token, @@ -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 @@ -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; diff --git a/contracts/libs/Details.sol b/contracts/libs/Details.sol index 9e460cc6..215724b8 100644 --- a/contracts/libs/Details.sol +++ b/contracts/libs/Details.sol @@ -15,8 +15,6 @@ struct MeTokenDetails { } struct HubDetails { - string name; - address owner; bool active; address vault;