-
Notifications
You must be signed in to change notification settings - Fork 32
/
TestConfigV2.sol
32 lines (24 loc) · 1.16 KB
/
TestConfigV2.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
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
import "./TestPlus.sol";
import { SoundCreatorV1 } from "@core/SoundCreatorV1.sol";
import { ISoundEditionV2, SoundEditionV2 } from "@core/SoundEditionV2.sol";
contract TestConfigV2 is TestPlus {
uint256 internal _salt;
SoundCreatorV1 soundCreator;
function setUp() public virtual {
soundCreator = new SoundCreatorV1(address(new SoundEditionV2()));
}
function createSoundEdition(ISoundEditionV2.EditionInitialization memory init) public returns (SoundEditionV2) {
bytes memory initData = abi.encodeWithSelector(SoundEditionV2.initialize.selector, init);
address[] memory contracts;
bytes[] memory data;
soundCreator.createSoundAndMints(bytes32(++_salt), initData, contracts, data);
(address addr, ) = soundCreator.soundEditionAddress(address(this), bytes32(_salt));
return SoundEditionV2(addr);
}
function genericEditionInitialization() public view returns (ISoundEditionV2.EditionInitialization memory init) {
init.fundingRecipient = address(this);
init.tierCreations = new ISoundEditionV2.TierCreation[](1);
}
}