-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathParty.sol
48 lines (41 loc) · 1.44 KB
/
Party.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// SPDX-License-Identifier: Beta Software
pragma solidity ^0.8;
import "../tokens/IERC721.sol";
import "./PartyGovernanceNFT.sol";
import "./PartyGovernance.sol";
/// @notice The governance contract that also custodies the precious NFTs. This
/// is also the Governance NFT 721 contract.
contract Party is PartyGovernanceNFT {
// Arguments used to initialize the party.
struct PartyOptions {
PartyGovernance.GovernanceOpts governance;
string name;
string symbol;
}
// Arguments used to initialize the `PartyGovernanceNFT`.
struct PartyInitData {
PartyOptions options;
IERC721[] preciousTokens;
uint256[] preciousTokenIds;
address mintAuthority;
}
// Set the `Globals` contract.
constructor(IGlobals globals) PartyGovernanceNFT(globals) {}
/// @notice Initializer to be delegatecalled by `Proxy` constructor. Will
/// revert if called outside the constructor.
/// @param initData Options used to initialize the party governance.
function initialize(PartyInitData memory initData)
external
onlyConstructor
{
PartyGovernanceNFT._initialize(
initData.options.name,
initData.options.symbol,
initData.options.governance,
initData.preciousTokens,
initData.preciousTokenIds,
initData.mintAuthority
);
}
receive() external payable {}
}