From d09bfc2d1c93b66b3d726276c525ec9d3dddce86 Mon Sep 17 00:00:00 2001 From: Zachary McKinnon Date: Mon, 16 Sep 2024 11:22:22 -0500 Subject: [PATCH] Return address on Nest Staking factory (#15) * Return address on Nest Staking factory * Update the documentation --- nest/src/NestStaking.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nest/src/NestStaking.sol b/nest/src/NestStaking.sol index 3ca5076..df28bb9 100644 --- a/nest/src/NestStaking.sol +++ b/nest/src/NestStaking.sol @@ -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, @@ -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), @@ -85,6 +86,8 @@ contract NestStaking is Initializable, AccessControlUpgradeable, UUPSUpgradeable ); emit TokenCreated(msg.sender, aggregateTokenProxy); + + return (address(aggregateToken)); } }