Skip to content

Commit

Permalink
Return address on Nest Staking factory (#15)
Browse files Browse the repository at this point in the history
* Return address on Nest Staking factory

* Update the documentation
  • Loading branch information
zmckinnon authored Sep 16, 2024
1 parent cffad6f commit d09bfc2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nest/src/NestStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ contract NestStaking is Initializable, AccessControlUpgradeable, UUPSUpgradeable
* @param askPrice Price at which users can buy the AggregateToken using CurrencyToken, times the base
* @param bidPrice Price at which users can sell the AggregateToken to receive CurrencyToken, times the base
* @param tokenURI URI of the AggregateToken metadata
* @return address Address of the new AggregateToken
*/
function createAggregateToken(
address owner,
Expand All @@ -74,7 +75,7 @@ contract NestStaking is Initializable, AccessControlUpgradeable, UUPSUpgradeable
uint256 askPrice,
uint256 bidPrice,
string memory tokenURI
) public {
) public returns (address) {
AggregateToken aggregateToken = new AggregateToken();
AggregateTokenProxy aggregateTokenProxy = new AggregateTokenProxy(
address(aggregateToken),
Expand All @@ -85,6 +86,8 @@ contract NestStaking is Initializable, AccessControlUpgradeable, UUPSUpgradeable
);

emit TokenCreated(msg.sender, aggregateTokenProxy);

return (address(aggregateToken));
}

}

0 comments on commit d09bfc2

Please sign in to comment.