Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Del: name, owner #15

Merged
merged 1 commit into from
Sep 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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