-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NFT immutables but can't compile
- Loading branch information
Showing
8 changed files
with
145 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity ^0.8.17; | ||
|
||
import {ERC20} from 'solmate/src/tokens/ERC20.sol'; | ||
|
||
struct NFTParameters { | ||
address seaportV1_5; | ||
address seaportV1_4; | ||
address nftxZap; | ||
address x2y2; | ||
address foundation; | ||
address sudoswap; | ||
address elementMarket; | ||
address nft20Zap; | ||
address cryptopunks; | ||
address looksRareV2; | ||
address routerRewardsDistributor; | ||
address looksRareRewardsDistributor; | ||
address looksRareToken; | ||
} | ||
|
||
contract NFTImmutables { | ||
/// @dev Seaport 1.5 address | ||
address internal immutable SEAPORT_V1_5; | ||
|
||
/// @dev Seaport 1.4 address | ||
address internal immutable SEAPORT_V1_4; | ||
|
||
/// @dev The address of NFTX zap contract for interfacing with vaults | ||
address internal immutable NFTX_ZAP; | ||
|
||
/// @dev The address of X2Y2 | ||
address internal immutable X2Y2; | ||
|
||
// @dev The address of Foundation | ||
address internal immutable FOUNDATION; | ||
|
||
// @dev The address of Element Market | ||
address internal immutable ELEMENT_MARKET; | ||
|
||
// @dev the address of NFT20's zap contract | ||
address internal immutable NFT20_ZAP; | ||
|
||
// @dev the address of Larva Lab's cryptopunks marketplace | ||
address internal immutable CRYPTOPUNKS; | ||
|
||
/// @dev The address of LooksRareV2 | ||
address internal immutable LOOKS_RARE_V2; | ||
|
||
/// @dev The address of LooksRare token | ||
ERC20 internal immutable LOOKS_RARE_TOKEN; | ||
|
||
/// @dev The address of LooksRare rewards distributor | ||
address internal immutable LOOKS_RARE_REWARDS_DISTRIBUTOR; | ||
|
||
/// @dev The address of router rewards distributor | ||
address internal immutable ROUTER_REWARDS_DISTRIBUTOR; | ||
|
||
constructor(NFTParameters memory params) { | ||
SEAPORT_V1_5 = params.seaportV1_5; | ||
SEAPORT_V1_4 = params.seaportV1_4; | ||
NFTX_ZAP = params.nftxZap; | ||
X2Y2 = params.x2y2; | ||
FOUNDATION = params.foundation; | ||
ELEMENT_MARKET = params.elementMarket; | ||
NFT20_ZAP = params.nft20Zap; | ||
CRYPTOPUNKS = params.cryptopunks; | ||
LOOKS_RARE_V2 = params.looksRareV2; | ||
LOOKS_RARE_TOKEN = ERC20(params.looksRareToken); | ||
LOOKS_RARE_REWARDS_DISTRIBUTOR = params.looksRareRewardsDistributor; | ||
ROUTER_REWARDS_DISTRIBUTOR = params.routerRewardsDistributor; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,38 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity ^0.8.17; | ||
|
||
import {IWETH9} from '../interfaces/external/IWETH9.sol'; | ||
import {IAllowanceTransfer} from 'permit2/src/interfaces/IAllowanceTransfer.sol'; | ||
|
||
struct PaymentsParameters { | ||
address permit2; | ||
address weth9; | ||
address openseaConduit; | ||
address sudoswap; | ||
} | ||
|
||
contract PaymentsImmutables { | ||
/// @dev WETH9 address | ||
IWETH9 internal immutable WETH9; | ||
|
||
/// @dev Permit2 address | ||
IAllowanceTransfer internal immutable PERMIT2; | ||
|
||
/// @dev The address of OpenSea's conduit used in both Seaport 1.4 and Seaport 1.5 | ||
address internal immutable OPENSEA_CONDUIT; | ||
|
||
// @dev The address of Sudoswap's router | ||
address internal immutable SUDOSWAP; | ||
|
||
enum Spenders { | ||
OSConduit, | ||
Sudoswap | ||
} | ||
|
||
constructor(PaymentsParameters memory params) { | ||
WETH9 = IWETH9(params.weth9); | ||
PERMIT2 = IAllowanceTransfer(params.permit2); | ||
OPENSEA_CONDUIT = params.openseaConduit; | ||
SUDOSWAP = params.sudoswap; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters