Skip to content

Commit

Permalink
add zero-address checks to Ticket and ControlledToken (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamescg committed Jul 12, 2021
1 parent 65f81f8 commit 0af7e60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions contracts/token/ControlledToken.sol
Expand Up @@ -37,6 +37,7 @@ contract ControlledToken is ERC20PermitUpgradeable, ControlledTokenInterface {
virtual
initializer
{
require(address(_controller) != address(0), "ControlledToken/controller-not-zero");
__ERC20_init(_name, _symbol);
__ERC20Permit_init("PoolTogether ControlledToken");
controller = _controller;
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/Ticket.sol
Expand Up @@ -41,9 +41,9 @@ contract Ticket is ControlledToken, TicketInterface {
override
initializer
{
require(address(_controller) != address(0), "Ticket/controller-not-zero");
ControlledToken.initialize(_name, _symbol, _decimals, _controller);
sortitionSumTrees.createTree(TREE_KEY, MAX_TREE_LEAVES);

emit Initialized(
_name,
_symbol,
Expand Down

0 comments on commit 0af7e60

Please sign in to comment.