Skip to content

Commit

Permalink
👷 return the auction in createAuction
Browse files Browse the repository at this point in the history
  • Loading branch information
cmontecoding committed Oct 25, 2024
1 parent 104330e commit b25bcc5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/AuctionFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,19 @@ contract AuctionFactory {
/// @param _usdc The address for the USDC ERC20 token
/// @param _kwenta The address for the KWENTA ERC20 token
/// @param _startingBid The starting bid amount
/// @dev The newly created auction contract is initialized and added to the auctions array
/// @return newAuction The newly created auction contract
/// @dev The newly created auction contract is initialized and added to the auctions array and returned
function createAuction(
address _owner,
address _usdc,
address _kwenta,
uint256 _startingBid
) external {
) external returns (Auction newAuction) {
address clone = Clones.clone(auctionImplementation);
Auction(clone).initialize(
_owner, _usdc, _kwenta, _startingBid, bidBuffer
);
Auction newAuction =
newAuction =
new Auction(_owner, _usdc, _kwenta, _startingBid, bidBuffer);
auctions.push(address(newAuction));

Expand Down

0 comments on commit b25bcc5

Please sign in to comment.