Skip to content

Commit

Permalink
tweaks to connect AH to Pool
Browse files Browse the repository at this point in the history
the AH cannot transfer() tokens unless it is first connected to the pool. initSuper() function now connects, must be called after first auction started
  • Loading branch information
markcarey committed Nov 19, 2024
1 parent bc45f02 commit 6d150a4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions contracts/AuctionHouse.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ import { INounsAuctionHouse } from './interfaces/INounsAuctionHouse.sol';
import { INounsToken } from './interfaces/INounsToken.sol';
import { IWETH } from './interfaces/IWETH.sol';

interface GDAv1Forwarder {
function connectPool(address pool, bytes memory userData) external returns (bool);
}

contract NounsAuctionHouse is INounsAuctionHouse, PausableUpgradeable, ReentrancyGuardUpgradeable, OwnableUpgradeable {
// The Nouns ERC721 token contract
INounsToken public nouns;
Expand Down Expand Up @@ -189,11 +193,12 @@ contract NounsAuctionHouse is INounsAuctionHouse, PausableUpgradeable, Reentranc
}

/**
* @notice Set super token address
* @notice Set super token address & connects to pool
* @dev Only callable by the owner.
*/
function setSuperToken(address _superToken) external onlyOwner {
function initSuper(address _superToken, GDAv1Forwarder _gda, address pool) external onlyOwner {
superToken = _superToken;
_gda.connectPool(pool, "");
}

/**
Expand Down

0 comments on commit 6d150a4

Please sign in to comment.