diff --git a/src/auction/Auction.sol b/src/auction/Auction.sol index 6fc31d7..c19fe32 100644 --- a/src/auction/Auction.sol +++ b/src/auction/Auction.sol @@ -66,12 +66,12 @@ contract Auction is IAuction, VersionedContract, UUPS, Ownable, ReentrancyGuard, /// @notice Initializes a DAO's auction contract /// @param _token The ERC-721 token address - /// @param _founder The founder responsible for starting the first auction + /// @param _initalOwner The account responsible for starting the first auction /// @param _treasury The treasury address where ETH will be sent /// @param _data The encoded auction settings function initialize( address _token, - address _founder, + address _initalOwner, address _treasury, bytes calldata _data ) external initializer { @@ -82,7 +82,7 @@ contract Auction is IAuction, VersionedContract, UUPS, Ownable, ReentrancyGuard, __ReentrancyGuard_init(); // Grant initial ownership to a founder - __Ownable_init(_founder); + __Ownable_init(_initalOwner); // Pause the contract until the first auction __Pausable_init(true); @@ -99,8 +99,8 @@ contract Auction is IAuction, VersionedContract, UUPS, Ownable, ReentrancyGuard, settings.timeBuffer = INITIAL_TIME_BUFFER; settings.minBidIncrement = INITIAL_MIN_BID_INCREMENT_PERCENT; - // Store the founder rewards recipient - founderRewardsRecipent = _founder; + // Store the founder rewards settings + founderRewardRecipent = params.founderRewardRecipent; founderRewardBPS = params.founderRewardBPS; } @@ -239,7 +239,7 @@ contract Auction is IAuction, VersionedContract, UUPS, Ownable, ReentrancyGuard, if (split.totalRewards != 0) { // Deposit rewards rewards.depositRewards{ value: split.totalRewards }( - founderRewardsRecipent, + founderRewardRecipent, split.founderReward, currentBidReferral, split.refferalReward, @@ -411,6 +411,22 @@ contract Auction is IAuction, VersionedContract, UUPS, Ownable, ReentrancyGuard, emit MinBidIncrementPercentageUpdated(_percentage); } + /// @notice Updates the founder reward recipent address + /// @param _founder The new founder + function setFounderRewardsRecipent(address _founder) external onlyOwner whenPaused { + founderRewardRecipent = _founder; + + emit FounderRewardRecipentUpdated(_founder); + } + + /// @notice Updates the founder reward percentage in BPS + /// @param _founderRewardBPS The new percentage in BPS + function setFounderRewardBPS(uint256 _founderRewardBPS) external onlyOwner whenPaused { + founderRewardBPS = _founderRewardBPS; + + emit FounderRewardBPSUpdated(_founderRewardBPS); + } + /// /// /// TRANSFER UTIL /// /// /// diff --git a/src/auction/IAuction.sol b/src/auction/IAuction.sol index d0cf3a2..a8f270e 100644 --- a/src/auction/IAuction.sol +++ b/src/auction/IAuction.sol @@ -37,7 +37,7 @@ interface IAuction is IUUPS, IOwnable, IPausable { /// @param duration The new auction duration event DurationUpdated(uint256 duration); - /// @notice Emitted when the reserve price is updated + /// @notice Emitted when the reserve price is updatedq /// @param reservePrice The new reserve price event ReservePriceUpdated(uint256 reservePrice); @@ -49,6 +49,14 @@ interface IAuction is IUUPS, IOwnable, IPausable { /// @param timeBuffer The new time buffer event TimeBufferUpdated(uint256 timeBuffer); + /// @notice Emitted when the founder reward recipient is updated + /// @param founderRewardRecipient The new time buffer + event FounderRewardRecipentUpdated(address founderRewardRecipient); + + /// @notice Emitted when the founder reward BPS is updated + /// @param founderRewardBPS The new time buffer + event FounderRewardBPSUpdated(uint256 founderRewardBPS); + /// /// /// ERRORS /// /// /// @@ -99,6 +107,8 @@ interface IAuction is IUUPS, IOwnable, IPausable { uint256 duration; /// @notice The reserve price of each auction uint256 reservePrice; + /// @notice The address to recieve founders rewards + address founderRewardRecipent; /// @notice The percent of rewards a founder receives in BPS for each auction uint256 founderRewardBPS; } @@ -109,12 +119,12 @@ interface IAuction is IUUPS, IOwnable, IPausable { /// @notice Initializes a DAO's auction house /// @param token The ERC-721 token address - /// @param founder The founder responsible for starting the first auction + /// @param initialOwner The account responsible for starting the first auction /// @param treasury The treasury address where ETH will be sent /// @param data The encoded auction initialization data function initialize( address token, - address founder, + address initialOwner, address treasury, bytes calldata data ) external; diff --git a/src/auction/storage/AuctionStorageV2.sol b/src/auction/storage/AuctionStorageV2.sol index 2e5407d..9b97814 100644 --- a/src/auction/storage/AuctionStorageV2.sol +++ b/src/auction/storage/AuctionStorageV2.sol @@ -6,7 +6,7 @@ contract AuctionStorageV2 { address public currentBidReferral; /// @notice The DAO founder collecting protocol rewards - address public founderRewardsRecipent; + address public founderRewardRecipent; /// @notice The rewards to be paid to the DAO founder in BPS uint256 public founderRewardBPS; diff --git a/src/lib/token/ERC721.sol b/src/lib/token/ERC721.sol index 5e103eb..6d312a8 100644 --- a/src/lib/token/ERC721.sol +++ b/src/lib/token/ERC721.sol @@ -59,7 +59,7 @@ abstract contract ERC721 is IERC721, Initializable { /// @notice If the contract implements an interface /// @param _interfaceId The interface id - function supportsInterface(bytes4 _interfaceId) external pure returns (bool) { + function supportsInterface(bytes4 _interfaceId) public pure virtual returns (bool) { return _interfaceId == 0x01ffc9a7 || // ERC165 Interface ID _interfaceId == 0x80ac58cd || // ERC721 Interface ID diff --git a/src/manager/Manager.sol b/src/manager/Manager.sol index 51770bf..c4be038 100644 --- a/src/manager/Manager.sol +++ b/src/manager/Manager.sol @@ -8,7 +8,7 @@ import { ERC1967Proxy } from "../lib/proxy/ERC1967Proxy.sol"; import { ManagerStorageV1 } from "./storage/ManagerStorageV1.sol"; import { ManagerStorageV2 } from "./storage/ManagerStorageV2.sol"; import { IManager } from "./IManager.sol"; -import { IToken } from "../token/default/IToken.sol"; +import { IBaseToken } from "../token/interfaces/IBaseToken.sol"; import { IBaseMetadata } from "../metadata/interfaces/IBaseMetadata.sol"; import { IAuction } from "../auction/IAuction.sol"; import { ITreasury } from "../governance/treasury/ITreasury.sol"; @@ -109,7 +109,7 @@ contract Manager is IManager, VersionedContract, UUPS, Ownable, ManagerStorageV1 daoAddressesByToken[token] = DAOAddresses({ metadata: metadata, auction: auction, treasury: treasury, governor: governor }); // Initialize each instance with the provided settings - IToken(token).initialize({ + IBaseToken(token).initialize({ founders: _founderParams, metadataRenderer: metadata, auction: auction, @@ -117,7 +117,7 @@ contract Manager is IManager, VersionedContract, UUPS, Ownable, ManagerStorageV1 data: _implData[IMPLEMENTATION_TYPE_TOKEN] }); IBaseMetadata(metadata).initialize({ token: token, data: _implData[IMPLEMENTATION_TYPE_METADATA] }); - IAuction(auction).initialize({ token: token, founder: founder, treasury: treasury, data: _implData[IMPLEMENTATION_TYPE_AUCTION] }); + IAuction(auction).initialize({ token: token, initialOwner: founder, treasury: treasury, data: _implData[IMPLEMENTATION_TYPE_AUCTION] }); ITreasury(treasury).initialize({ governor: governor, data: _implData[IMPLEMENTATION_TYPE_TREASURY] }); IGovernor(governor).initialize({ treasury: treasury, token: token, data: _implData[IMPLEMENTATION_TYPE_GOVERNOR] }); @@ -143,7 +143,7 @@ contract Manager is IManager, VersionedContract, UUPS, Ownable, ManagerStorageV1 IBaseMetadata(metadata).initialize(_setupRenderer, _token); } - IToken(_token).setMetadataRenderer(IBaseMetadata(metadata)); + IBaseToken(_token).setMetadataRenderer(IBaseMetadata(metadata)); emit MetadataRendererUpdated({ sender: msg.sender, renderer: metadata }); } diff --git a/src/minters/MerkleReserveMinter.sol b/src/minters/MerkleReserveMinter.sol index 5b08c08..61ece5a 100644 --- a/src/minters/MerkleReserveMinter.sol +++ b/src/minters/MerkleReserveMinter.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.16; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import { IOwnable } from "../lib/interfaces/IOwnable.sol"; -import { IToken } from "../token/default/IToken.sol"; +import { IBaseToken } from "../token/interfaces/IBaseToken.sol"; import { IManager } from "../manager/IManager.sol"; import { IMintStrategy } from "./interfaces/IMintStrategy.sol"; @@ -151,7 +151,7 @@ contract MerkleReserveMinter is IMintStrategy { } // Only allowing reserved tokens to be minted for this strategy - IToken(tokenContract).mintFromReserveTo(claim.mintTo, claim.tokenId); + IBaseToken(tokenContract).mintFromReserveTo(claim.mintTo, claim.tokenId); } } diff --git a/src/token/default/IToken.sol b/src/token/default/IToken.sol index dc7ab17..cd2de7c 100644 --- a/src/token/default/IToken.sol +++ b/src/token/default/IToken.sol @@ -7,7 +7,6 @@ import { IManager } from "../../manager/IManager.sol"; import { IBaseToken } from "../interfaces/IBaseToken.sol"; import { TokenTypesV1 } from "./types/TokenTypesV1.sol"; import { TokenTypesV2 } from "./types/TokenTypesV2.sol"; -import { IBaseMetadata } from "../../metadata/interfaces/IBaseMetadata.sol"; /// @title IToken /// @author Rohan Kulkarni @@ -102,29 +101,6 @@ interface IToken is IUUPS, IERC721Votes, IBaseToken, TokenTypesV1, TokenTypesV2 address initialOwner ) external; - /// @notice Mints tokens to the caller and handles founder vesting - function mint() external returns (uint256 tokenId); - - /// @notice Mints tokens to the recipient and handles founder vesting - function mintTo(address recipient) external returns (uint256 tokenId); - - /// @notice Mints the specified amount of tokens to the recipient and handles founder vesting - function mintBatchTo(uint256 amount, address recipient) external returns (uint256[] memory tokenIds); - - /// @notice Mints the specified token from the reserve to the recipent - function mintFromReserveTo(address recipient, uint256 tokenId) external; - - /// @notice Burns a token owned by the caller - /// @param tokenId The ERC-721 token id - function burn(uint256 tokenId) external; - - /// @notice The URI for a token - /// @param tokenId The ERC-721 token id - function tokenURI(uint256 tokenId) external view returns (string memory); - - /// @notice The URI for the contract - function contractURI() external view returns (string memory); - /// @notice The number of founders function totalFounders() external view returns (uint256); @@ -142,23 +118,6 @@ interface IToken is IUUPS, IERC721Votes, IBaseToken, TokenTypesV1, TokenTypesV2 /// @param newFounders the full list of FounderParam structs function updateFounders(IManager.FounderParams[] calldata newFounders) external; - /// @notice The founder scheduled to receive the given token id - /// NOTE: If a founder is returned, there's no guarantee they'll receive the token as vesting expiration is not considered - /// @param tokenId The ERC-721 token id - function getScheduledRecipient(uint256 tokenId) external view returns (Founder memory); - - /// @notice The total supply of tokens - function totalSupply() external view returns (uint256); - - /// @notice The token's auction house - function auction() external view returns (address); - - /// @notice The token's metadata renderer - function metadataRenderer() external view returns (address); - - /// @notice The owner of the token and metadata renderer - function owner() external view returns (address); - /// @notice Update minters /// @param _minters Array of structs containing address status as a minter function updateMinters(MinterParams[] calldata _minters) external; @@ -166,11 +125,4 @@ interface IToken is IUUPS, IERC721Votes, IBaseToken, TokenTypesV1, TokenTypesV2 /// @notice Check if an address is a minter /// @param _minter Address to check function isMinter(address _minter) external view returns (bool); - - /// @notice Set a new metadata renderer - /// @param newRenderer new renderer address to use - function setMetadataRenderer(IBaseMetadata newRenderer) external; - - /// @notice Callback called by auction on first auction started to transfer ownership to treasury from founder - function onFirstAuctionStarted() external; } diff --git a/src/token/default/Token.sol b/src/token/default/Token.sol index 24a57ff..1d59f5e 100644 --- a/src/token/default/Token.sol +++ b/src/token/default/Token.sol @@ -325,12 +325,12 @@ contract Token is IToken, VersionedContract, UUPS, Ownable, ReentrancyGuard, ERC /// @notice The URI for a token /// @param _tokenId The ERC-721 token id - function tokenURI(uint256 _tokenId) public view override(IToken, ERC721) returns (string memory) { + function tokenURI(uint256 _tokenId) public view override(IBaseToken, ERC721) returns (string memory) { return settings.metadataRenderer.tokenURI(_tokenId); } /// @notice The URI for the contract - function contractURI() public view override(IToken, ERC721) returns (string memory) { + function contractURI() public view override(IBaseToken, ERC721) returns (string memory) { return settings.metadataRenderer.contractURI(); } @@ -466,7 +466,7 @@ contract Token is IToken, VersionedContract, UUPS, Ownable, ReentrancyGuard, ERC } /// @notice The contract owner - function owner() public view override(IToken, Ownable) returns (address) { + function owner() public view override(IBaseToken, Ownable) returns (address) { return super.owner(); } diff --git a/src/token/interfaces/IBaseToken.sol b/src/token/interfaces/IBaseToken.sol index dbd56ce..80c8750 100644 --- a/src/token/interfaces/IBaseToken.sol +++ b/src/token/interfaces/IBaseToken.sol @@ -4,6 +4,7 @@ pragma solidity 0.8.16; import { IERC721 } from "../../lib/interfaces/IERC721.sol"; import { IERC721Votes } from "../../lib/interfaces/IERC721Votes.sol"; import { IManager } from "../../manager/IManager.sol"; +import { IBaseMetadata } from "../../metadata/interfaces/IBaseMetadata.sol"; /// @title IBaseToken /// @author Neokry @@ -13,6 +14,19 @@ interface IBaseToken is IERC721, IERC721Votes { /// FUNCTIONS /// /// /// + /// @notice Initializes a DAO's ERC-721 token + /// @param founders The founding members to receive vesting allocations + /// @param data The encoded token and metadata initialization strings + /// @param metadataRenderer The token's metadata renderer + /// @param auction The token's auction house + function initialize( + IManager.FounderParams[] calldata founders, + bytes calldata data, + address metadataRenderer, + address auction, + address initialOwner + ) external; + /// @notice Mints tokens to the caller and handles founder vesting function mint() external returns (uint256 tokenId); @@ -48,9 +62,9 @@ interface IBaseToken is IERC721, IERC721Votes { /// @notice The owner of the token and metadata renderer function owner() external view returns (address); - /// @notice Check if an address is a minter - /// @param _minter Address to check - function isMinter(address _minter) external view returns (bool); + /// @notice Set a new metadata renderer + /// @param newRenderer new renderer address to use + function setMetadataRenderer(IBaseMetadata newRenderer) external; /// @notice Callback called by auction on first auction started to transfer ownership to treasury from founder function onFirstAuctionStarted() external; diff --git a/src/token/interfaces/IMirrorToken.sol b/src/token/interfaces/IMirrorToken.sol new file mode 100644 index 0000000..09f2a12 --- /dev/null +++ b/src/token/interfaces/IMirrorToken.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.16; + +/// @title IMirrorToken +/// @author Neokry +/// @notice A token that allows mirroring another token's ownership +interface IMirrorToken { + /// @notice Mirrors the ownership of a given tokenId from {tokenToMirror} + /// @param _tokenId The ERC-721 token to mirror + function mirror(uint256 _tokenId) external; +} diff --git a/src/token/partial-mirror/IPartialMirrorToken.sol b/src/token/partial-mirror/IPartialMirrorToken.sol index 4a689e1..df8572b 100644 --- a/src/token/partial-mirror/IPartialMirrorToken.sol +++ b/src/token/partial-mirror/IPartialMirrorToken.sol @@ -79,8 +79,8 @@ interface IPartialMirrorToken is IUUPS, IERC721Votes, IBaseToken, PartialMirrorT string symbol; /// @notice The tokenId that a DAO's auctions will start at uint256 reservedUntilTokenId; - /// @notice The token contract this token will mirror - address mirroredToken; + /// @notice The token contract to be mirrored + address tokenToMirror; /// @notice The minter a DAO enables by default address initalMinter; /// @notice The initilization data for the inital minter @@ -104,29 +104,6 @@ interface IPartialMirrorToken is IUUPS, IERC721Votes, IBaseToken, PartialMirrorT address initialOwner ) external; - /// @notice Mints tokens to the caller and handles founder vesting - function mint() external returns (uint256 tokenId); - - /// @notice Mints tokens to the recipient and handles founder vesting - function mintTo(address recipient) external returns (uint256 tokenId); - - /// @notice Mints the specified amount of tokens to the recipient and handles founder vesting - function mintBatchTo(uint256 amount, address recipient) external returns (uint256[] memory tokenIds); - - /// @notice Mints the specified token from the reserve to the recipent - function mintFromReserveTo(address recipient, uint256 tokenId) external; - - /// @notice Burns a token owned by the caller - /// @param tokenId The ERC-721 token id - function burn(uint256 tokenId) external; - - /// @notice The URI for a token - /// @param tokenId The ERC-721 token id - function tokenURI(uint256 tokenId) external view returns (string memory); - - /// @notice The URI for the contract - function contractURI() external view returns (string memory); - /// @notice The number of founders function totalFounders() external view returns (uint256); @@ -149,18 +126,6 @@ interface IPartialMirrorToken is IUUPS, IERC721Votes, IBaseToken, PartialMirrorT /// @param tokenId The ERC-721 token id function getScheduledRecipient(uint256 tokenId) external view returns (Founder memory); - /// @notice The total supply of tokens - function totalSupply() external view returns (uint256); - - /// @notice The token's auction house - function auction() external view returns (address); - - /// @notice The token's metadata renderer - function metadataRenderer() external view returns (address); - - /// @notice The owner of the token and metadata renderer - function owner() external view returns (address); - /// @notice Update minters /// @param _minters Array of structs containing address status as a minter function updateMinters(MinterParams[] calldata _minters) external; diff --git a/src/token/partial-mirror/PartialMirrorToken.sol b/src/token/partial-mirror/PartialMirrorToken.sol index f9e4e41..b623cdb 100644 --- a/src/token/partial-mirror/PartialMirrorToken.sol +++ b/src/token/partial-mirror/PartialMirrorToken.sol @@ -16,6 +16,7 @@ import { IBaseToken } from "../interfaces/IBaseToken.sol"; import { VersionedContract } from "../../VersionedContract.sol"; import { IMintStrategy } from "../../minters/interfaces/IMintStrategy.sol"; +import { IMirrorToken } from "../interfaces/IMirrorToken.sol"; /// @title Token /// @author Neokry @@ -101,7 +102,7 @@ contract PartialMirrorToken is IPartialMirrorToken, VersionedContract, UUPS, Own settings.metadataRenderer = IBaseMetadata(_metadataRenderer); settings.auction = _auction; reservedUntilTokenId = params.reservedUntilTokenId; - mirroredToken = params.mirroredToken; + tokenToMirror = params.tokenToMirror; // Check if an inital minter was specified if (params.initalMinter != address(0)) { @@ -386,7 +387,7 @@ contract PartialMirrorToken is IPartialMirrorToken, VersionedContract, UUPS, Own function _ownerOfMirrored(uint256 _tokenId) internal view returns (address) { // Check mirrored token owner or return address(0) if it doesn't exist - try IERC721(mirroredToken).ownerOf(_tokenId) returns (address mirrorOwner) { + try IERC721(tokenToMirror).ownerOf(_tokenId) returns (address mirrorOwner) { return mirrorOwner; } catch { return address(0); @@ -455,12 +456,12 @@ contract PartialMirrorToken is IPartialMirrorToken, VersionedContract, UUPS, Own /// @notice The URI for a token /// @param _tokenId The ERC-721 token id - function tokenURI(uint256 _tokenId) public view override(IPartialMirrorToken, ERC721) returns (string memory) { + function tokenURI(uint256 _tokenId) public view override(IBaseToken, ERC721) returns (string memory) { return settings.metadataRenderer.tokenURI(_tokenId); } /// @notice The URI for the contract - function contractURI() public view override(IPartialMirrorToken, ERC721) returns (string memory) { + function contractURI() public view override(IBaseToken, ERC721) returns (string memory) { return settings.metadataRenderer.contractURI(); } @@ -596,7 +597,7 @@ contract PartialMirrorToken is IPartialMirrorToken, VersionedContract, UUPS, Own } /// @notice The contract owner - function owner() public view override(IPartialMirrorToken, Ownable) returns (address) { + function owner() public view override(IBaseToken, Ownable) returns (address) { return super.owner(); } @@ -632,6 +633,14 @@ contract PartialMirrorToken is IPartialMirrorToken, VersionedContract, UUPS, Own settings.metadataRenderer = newRenderer; } + /// /// + /// ERC165 /// + /// /// + + function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) { + return interfaceId == type(IMirrorToken).interfaceId || super.supportsInterface(interfaceId); + } + /// /// /// TOKEN UPGRADE /// /// /// diff --git a/src/token/partial-mirror/storage/PartialMirrorTokenStorageV1.sol b/src/token/partial-mirror/storage/PartialMirrorTokenStorageV1.sol index cad18f7..dca21fd 100644 --- a/src/token/partial-mirror/storage/PartialMirrorTokenStorageV1.sol +++ b/src/token/partial-mirror/storage/PartialMirrorTokenStorageV1.sol @@ -2,7 +2,6 @@ pragma solidity 0.8.16; import { PartialMirrorTokenTypesV1 } from "../types/PartialMirrorTokenTypesV1.sol"; -import { BitMaps } from "@openzeppelin/contracts/utils/structs/BitMaps.sol"; /// @title PartialMirrorTokenStorageV1 /// @author Neokry @@ -26,5 +25,5 @@ contract PartialMirrorTokenStorageV1 is PartialMirrorTokenTypesV1 { uint256 public reservedUntilTokenId; /// @notice The token to mirror - address mirroredToken; + address public tokenToMirror; } diff --git a/test/Auction.t.sol b/test/Auction.t.sol index 9924087..7d837f9 100644 --- a/test/Auction.t.sol +++ b/test/Auction.t.sol @@ -25,12 +25,12 @@ contract AuctionTest is NounsBuilderTest { mockImpl = new MockImpl(); } - function deployAltMock(uint256 founderRewardPercent) internal virtual { + function deployAltMock(address founderRewardRecipent, uint256 founderRewardPercent) internal virtual { setMockFounderParams(); setMockTokenParams(); - setAuctionParams(0.01 ether, 10 minutes, founderRewardPercent); + setAuctionParams(0.01 ether, 10 minutes, founderRewardRecipent, founderRewardPercent); setMockGovParams(); @@ -605,7 +605,7 @@ contract AuctionTest is NounsBuilderTest { function test_FounderRewardSet() public { // deploy with 5% founder fee - deployAltMock(500); + deployAltMock(founder, 500); vm.prank(founder); auction.unpause(); @@ -625,4 +625,20 @@ contract AuctionTest is NounsBuilderTest { assertEq(address(treasury).balance, 0.95 ether); } + + function test_UpdateFounderReward() public { + // deploy with 5% founder fee + deployAltMock(founder, 500); + + assertEq(auction.founderRewardRecipent(), founder); + assertEq(auction.founderRewardBPS(), 500); + + vm.startPrank(founder); + auction.setFounderRewardsRecipent(founder2); + auction.setFounderRewardBPS(1000); + vm.stopPrank(); + + assertEq(auction.founderRewardRecipent(), founder2); + assertEq(auction.founderRewardBPS(), 1000); + } } diff --git a/test/Gov.t.sol b/test/Gov.t.sol index ad70017..9f96e3c 100644 --- a/test/Gov.t.sol +++ b/test/Gov.t.sol @@ -44,7 +44,7 @@ contract GovTest is NounsBuilderTest, GovernorTypesV1 { setMockTokenParams(); - setAuctionParams(0, 1 days, 0); + setAuctionParams(0, 1 days, address(0), 0); setGovParams(2 days, 1 days, 1 weeks, 25, 1000, founder); @@ -73,7 +73,7 @@ contract GovTest is NounsBuilderTest, GovernorTypesV1 { setMockTokenParams(); - setAuctionParams(0, 1 days, 0); + setAuctionParams(0, 1 days, address(0), 0); setGovParams(2 days, 1 days, 1 weeks, 100, 1000, founder); diff --git a/test/PartialMirrorToken.t.sol b/test/PartialMirrorToken.t.sol index f2dde4c..d5f9444 100644 --- a/test/PartialMirrorToken.t.sol +++ b/test/PartialMirrorToken.t.sol @@ -47,7 +47,7 @@ contract PartialMirrorTokenTest is NounsBuilderTest, TokenTypesV1 { name: "Mock Token", symbol: "MOCK", reservedUntilTokenId: _reservedUntilTokenId, - mirroredToken: address(tokenToMirror), + tokenToMirror: address(tokenToMirror), initalMinter: address(0), initalMinterData: new bytes(0) }); @@ -87,7 +87,7 @@ contract PartialMirrorTokenTest is NounsBuilderTest, TokenTypesV1 { name: "Mock Token", symbol: "MOCK", reservedUntilTokenId: _reservedUntilTokenId, - mirroredToken: address(tokenToMirror), + tokenToMirror: address(tokenToMirror), initalMinter: _minter, initalMinterData: _minterData }); diff --git a/test/utils/NounsBuilderTest.sol b/test/utils/NounsBuilderTest.sol index b7815dc..5b117bf 100644 --- a/test/utils/NounsBuilderTest.sol +++ b/test/utils/NounsBuilderTest.sol @@ -213,16 +213,22 @@ contract NounsBuilderTest is Test { } function setMockAuctionParams() internal virtual { - setAuctionParams(0.01 ether, 10 minutes, 0); + setAuctionParams(0.01 ether, 10 minutes, address(0), 0); } function setAuctionParams( uint256 _reservePrice, uint256 _duration, + address _founderRewardRecipent, uint256 _founderRewardBPS ) internal virtual { implData.push(); - auctionParams = IAuction.AuctionParams({ reservePrice: _reservePrice, duration: _duration, founderRewardBPS: _founderRewardBPS }); + auctionParams = IAuction.AuctionParams({ + reservePrice: _reservePrice, + duration: _duration, + founderRewardRecipent: _founderRewardRecipent, + founderRewardBPS: _founderRewardBPS + }); implData[manager.IMPLEMENTATION_TYPE_AUCTION()] = abi.encode(auctionParams); }