Skip to content

Commit

Permalink
DecentHats is wearer of TopHat until end of transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgall committed Jul 5, 2024
1 parent d7ae2de commit 396e1e3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contracts/DecentHats.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ contract DecentHats {
Hat[] calldata _hats
) public {
uint256 topHatId = hats.mintTopHat(
msg.sender,
address(this),
_topHatDetails,
_topHatImageURI
);
Expand Down Expand Up @@ -121,5 +121,7 @@ contract DecentHats {
++i;
}
}

hats.transferHat(topHatId, address(this), msg.sender);
}
}
2 changes: 2 additions & 0 deletions contracts/interfaces/hats/IHats.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ interface IHats {
uint256 _hatId,
address _wearer
) external returns (bool success);

function transferHat(uint256 _hatId, address _from, address _to) external;
}
2 changes: 2 additions & 0 deletions contracts/mock/MockHats.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ contract MockHats is IHats {
function mintHat(uint256, address) external pure returns (bool success) {
success = true;
}

function transferHat(uint256, address, address) external {}
}

0 comments on commit 396e1e3

Please sign in to comment.