Skip to content

Commit

Permalink
Fix PaymentSplitterFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGreatHB committed Sep 2, 2021
1 parent 1745cf6 commit a109b6c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions contracts/PaymentSplitterFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ contract PaymentSplitterFactory is ProxyFactory, IPaymentSplitterFactory {
constructor() {
PaymentSplitter target = new PaymentSplitter();
address[] memory payees = new address[](1);
payees[0] = address(0);
payees[0] = msg.sender;
uint256[] memory shares = new uint256[](1);
shares[0] = uint256(0);
shares[0] = 1;
target.initialize("", payees, shares);
_target = address(target);
}
Expand All @@ -30,7 +30,7 @@ contract PaymentSplitterFactory is ProxyFactory, IPaymentSplitterFactory {
abi.encodeWithSignature("initialize(string,address[],uint256[])", title, payees, shares)
);

emit DeployPaymentSplitter(owner, title, payees, shares);
emit DeployPaymentSplitter(owner, title, payees, shares, splitter);
}

function isPaymentSplitter(address query) external view override returns (bool result) {
Expand Down
8 changes: 7 additions & 1 deletion contracts/interfaces/IPaymentSplitterFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
pragma solidity >=0.5.0;

interface IPaymentSplitterFactory {
event DeployPaymentSplitter(address indexed owner, string title, address[] payees, uint256[] shares);
event DeployPaymentSplitter(
address indexed owner,
string title,
address[] payees,
uint256[] shares,
address splitter
);

function deployPaymentSplitter(
address owner,
Expand Down

0 comments on commit a109b6c

Please sign in to comment.