Skip to content
Merged
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
22 changes: 10 additions & 12 deletions src/core/ElasticDAO.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ contract ElasticDAO is ReentryProtection {
bool public initialized;

event ElasticGovernanceTokenDeployed(address indexed tokenAddress);
event MaxVotingLambdaChanged(address indexed daoAddress, bytes32 settingName, uint256 value);
event ControllerChanged(address indexed daoAddress, bytes32 settingName, address value);
event MaxVotingLambdaChanged(bytes32 settingName, uint256 value);
event ControllerChanged(bytes32 settingName, address value);
event ExitDAO(
address indexed daoAddress,
address indexed memberAddress,
uint256 shareAmount,
uint256 ethAmount
Expand All @@ -41,13 +40,12 @@ contract ElasticDAO is ReentryProtection {
uint256 actualAmount
);
event JoinDAO(
address indexed daoAddress,
address indexed memberAddress,
uint256 shareAmount,
uint256 ethAmount
);
event SeedDAO(address indexed daoAddress, address indexed summonerAddress, uint256 amount);
event SummonedDAO(address indexed daoAddress, address indexed summonedBy);
event SeedDAO(address indexed summonerAddress, uint256 amount);
event SummonedDAO(address indexed summonedBy);

modifier onlyAfterSummoning() {
DAO.Instance memory dao = _getDAO();
Expand Down Expand Up @@ -198,7 +196,7 @@ contract ElasticDAO is ReentryProtection {
tokenContract.burnShares(msg.sender, _deltaLambda);
(bool success, ) = msg.sender.call{ value: ethToBeTransfered }('');
require(success, 'ElasticDAO: Exit Failed');
emit ExitDAO(address(this), msg.sender, _deltaLambda, ethToBeTransfered);
emit ExitDAO(msg.sender, _deltaLambda, ethToBeTransfered);
}

/**
Expand Down Expand Up @@ -270,7 +268,7 @@ contract ElasticDAO is ReentryProtection {
// tokencontract mint shares
bool success = tokenContract.mintShares(msg.sender, _deltaLambda);
require(success, 'ElasticDAO: Mint Shares Failed during Join');
emit JoinDAO(address(this), msg.sender, _deltaLambda, msg.value);
emit JoinDAO(msg.sender, _deltaLambda, msg.value);
}

/**
Expand Down Expand Up @@ -360,7 +358,7 @@ contract ElasticDAO is ReentryProtection {
success = tokenContract.setMinter(controller);
require(success, 'ElasticDAO: Set Minter failed during setController');

emit ControllerChanged(address(this), 'setController', controller);
emit ControllerChanged('setController', controller);
}

/**
Expand All @@ -375,7 +373,7 @@ contract ElasticDAO is ReentryProtection {
dao.maxVotingLambda = _maxVotingLambda;
daoStorage.serialize(dao);

emit MaxVotingLambdaChanged(address(this), 'setMaxVotingLambda', _maxVotingLambda);
emit MaxVotingLambdaChanged('setMaxVotingLambda', _maxVotingLambda);
}

/**
Expand All @@ -402,7 +400,7 @@ contract ElasticDAO is ReentryProtection {
uint256 deltaLambda = ElasticMath.wdiv(deltaE, token.eByL);
ElasticGovernanceToken(token.uuid).mintShares(msg.sender, deltaLambda);

emit SeedDAO(address(this), msg.sender, deltaLambda);
emit SeedDAO(msg.sender, deltaLambda);
}

/**
Expand Down Expand Up @@ -437,7 +435,7 @@ contract ElasticDAO is ReentryProtection {
dao.summoned = true;
daoContract.serialize(dao);

emit SummonedDAO(address(this), msg.sender);
emit SummonedDAO(msg.sender);
}

// Getters
Expand Down