-
Notifications
You must be signed in to change notification settings - Fork 0
share tokens and new deployment process #17
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
base: security-pool-draft
Are you sure you want to change the base?
share tokens and new deployment process #17
Conversation
aebcddb to
5683be8
Compare
| address immutable owner; | ||
| address public owner; | ||
|
|
||
| event Participated(address user, uint256 repAmount, uint256 ethAmount, uint256 totalRepPurchased); | ||
| event FinalizedAuction(address user, uint256 repAmount, uint256 ethAmount); | ||
| event AuctionStarted(uint256 ethAmountToBuy, uint256 repAvailable); | ||
|
|
||
| constructor(address _owner) { | ||
| function setOwner(address _owner) external { | ||
| require(owner == address(0x0), 'owner already set!'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no way to remove the cyclic dependency that results in this being necessary? I really don't like mutable variables if there is any option for immutability. IIUC, the owner should never change, this is just necessary because you have a cyclic dependency between this contract and another?
| uint256 tokenId = shareToken.getTokenId(universeId, outcome); | ||
| uint256 amount = shareToken.burnTokenId(tokenId, msg.sender); | ||
| uint256 totalSupply = shareToken.totalSupplyForUniverse(universeId); | ||
| uint256 ethValue = amount * completeSetCollateralAmount / totalSupply; // this is wrong |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| uint256 ethValue = amount * completeSetCollateralAmount / totalSupply; // this is wrong | |
| uint256 ethValue = amount * completeSetCollateralAmount / totalSupply; // TODO: this is wrong |
| uint256 ethValue = amount * completeSetCollateralAmount / completeSet.totalSupply(); | ||
| completeSet.burn(msg.sender, amount); | ||
| uint256 totalSupply = shareToken.totalSupplyForUniverse(universeId); | ||
| uint256 ethValue = amount * completeSetCollateralAmount / totalSupply; // this is wrong |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| uint256 ethValue = amount * completeSetCollateralAmount / totalSupply; // this is wrong | |
| uint256 ethValue = amount * completeSetCollateralAmount / totalSupply; // TODO: this is wrong |
Uh oh!
There was an error while loading. Please reload this page.