@zoralabs/coins 1.1.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +97 -93
- package/CHANGELOG.md +28 -0
- package/LICENSE +90 -21
- package/README.md +126 -0
- package/abis/BaseCoinV4.json +1840 -0
- package/abis/BaseZoraV4CoinHook.json +6 -2
- package/abis/CoinUniV4Test.json +20 -0
- package/abis/ContentCoinHook.json +6 -2
- package/abis/CreatorCoinHook.json +6 -2
- package/abis/FactoryTest.json +7 -0
- package/abis/FeeEstimatorHook.json +6 -2
- package/abis/IZoraV4CoinHook.json +2 -2
- package/abis/Ownable2StepUpgradeable.json +138 -0
- package/abis/ZoraFactoryImpl.json +39 -0
- package/addresses/8453.json +5 -5
- package/dist/index.cjs +36 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +35 -2
- package/dist/index.js.map +1 -1
- package/dist/wagmiGenerated.d.ts +32 -1
- package/dist/wagmiGenerated.d.ts.map +1 -1
- package/package/wagmiGenerated.ts +35 -2
- package/package.json +1 -1
- package/script/TestBackingCoinSwap.s.sol +1 -1
- package/script/TestV4Swap.s.sol +1 -1
- package/src/BaseCoin.sol +7 -2
- package/src/{CoinV4.sol → BaseCoinV4.sol} +15 -17
- package/src/Coin.sol +7 -1
- package/src/ContentCoin.sol +45 -0
- package/src/CreatorCoin.sol +14 -6
- package/src/ZoraFactoryImpl.sol +10 -4
- package/src/deployment/CoinsDeployerBase.sol +3 -3
- package/src/hooks/BaseZoraV4CoinHook.sol +10 -2
- package/src/hooks/ContentCoinHook.sol +7 -1
- package/src/hooks/CreatorCoinHook.sol +7 -1
- package/src/hooks/HookUpgradeGate.sol +7 -1
- package/src/interfaces/IZoraV4CoinHook.sol +1 -1
- package/src/libs/CoinCommon.sol +7 -1
- package/src/libs/CoinConfigurationVersions.sol +7 -1
- package/src/libs/CoinConstants.sol +7 -1
- package/src/libs/CoinDopplerMultiCurve.sol +7 -1
- package/src/libs/CoinRewards.sol +7 -1
- package/src/libs/CoinRewardsV4.sol +7 -1
- package/src/libs/CoinSetup.sol +7 -1
- package/src/libs/CreatorCoinConstants.sol +7 -1
- package/src/libs/CreatorCoinRewards.sol +7 -1
- package/src/libs/DopplerMath.sol +7 -1
- package/src/libs/HooksDeployment.sol +7 -1
- package/src/libs/PoolStateReader.sol +7 -1
- package/src/libs/UniV4SwapHelper.sol +7 -1
- package/src/libs/UniV4SwapToCurrency.sol +7 -1
- package/src/libs/V4Liquidity.sol +7 -1
- package/src/types/PoolConfiguration.sol +7 -1
- package/src/utils/AutoSwapper.sol +7 -1
- package/src/version/ContractVersionBase.sol +1 -1
- package/test/CoinUniV4.t.sol +61 -5
- package/test/Factory.t.sol +41 -0
- package/test/Upgrades.t.sol +8 -8
- package/test/utils/BaseTest.sol +23 -15
- package/wagmi.config.ts +1 -1
- /package/abis/{CoinV4.json → ContentCoin.json} +0 -0
package/dist/wagmiGenerated.d.ts
CHANGED
|
@@ -1764,7 +1764,7 @@ export declare const coinABI: readonly [{
|
|
|
1764
1764
|
readonly inputs: readonly [];
|
|
1765
1765
|
readonly name: "UseRevokeOwnershipToRemoveSelf";
|
|
1766
1766
|
}];
|
|
1767
|
-
export declare const
|
|
1767
|
+
export declare const contentCoinABI: readonly [{
|
|
1768
1768
|
readonly type: "constructor";
|
|
1769
1769
|
readonly inputs: readonly [{
|
|
1770
1770
|
readonly name: "protocolRewardRecipient_";
|
|
@@ -5762,6 +5762,12 @@ export declare const zoraFactoryImplABI: readonly [{
|
|
|
5762
5762
|
readonly type: "string";
|
|
5763
5763
|
}];
|
|
5764
5764
|
readonly stateMutability: "view";
|
|
5765
|
+
}, {
|
|
5766
|
+
readonly type: "function";
|
|
5767
|
+
readonly inputs: readonly [];
|
|
5768
|
+
readonly name: "acceptOwnership";
|
|
5769
|
+
readonly outputs: readonly [];
|
|
5770
|
+
readonly stateMutability: "nonpayable";
|
|
5765
5771
|
}, {
|
|
5766
5772
|
readonly type: "function";
|
|
5767
5773
|
readonly inputs: readonly [{
|
|
@@ -6152,6 +6158,16 @@ export declare const zoraFactoryImplABI: readonly [{
|
|
|
6152
6158
|
readonly type: "address";
|
|
6153
6159
|
}];
|
|
6154
6160
|
readonly stateMutability: "view";
|
|
6161
|
+
}, {
|
|
6162
|
+
readonly type: "function";
|
|
6163
|
+
readonly inputs: readonly [];
|
|
6164
|
+
readonly name: "pendingOwner";
|
|
6165
|
+
readonly outputs: readonly [{
|
|
6166
|
+
readonly name: "";
|
|
6167
|
+
readonly internalType: "address";
|
|
6168
|
+
readonly type: "address";
|
|
6169
|
+
}];
|
|
6170
|
+
readonly stateMutability: "view";
|
|
6155
6171
|
}, {
|
|
6156
6172
|
readonly type: "function";
|
|
6157
6173
|
readonly inputs: readonly [];
|
|
@@ -6419,6 +6435,21 @@ export declare const zoraFactoryImplABI: readonly [{
|
|
|
6419
6435
|
readonly indexed: false;
|
|
6420
6436
|
}];
|
|
6421
6437
|
readonly name: "Initialized";
|
|
6438
|
+
}, {
|
|
6439
|
+
readonly type: "event";
|
|
6440
|
+
readonly anonymous: false;
|
|
6441
|
+
readonly inputs: readonly [{
|
|
6442
|
+
readonly name: "previousOwner";
|
|
6443
|
+
readonly internalType: "address";
|
|
6444
|
+
readonly type: "address";
|
|
6445
|
+
readonly indexed: true;
|
|
6446
|
+
}, {
|
|
6447
|
+
readonly name: "newOwner";
|
|
6448
|
+
readonly internalType: "address";
|
|
6449
|
+
readonly type: "address";
|
|
6450
|
+
readonly indexed: true;
|
|
6451
|
+
}];
|
|
6452
|
+
readonly name: "OwnershipTransferStarted";
|
|
6422
6453
|
}, {
|
|
6423
6454
|
readonly type: "event";
|
|
6424
6455
|
readonly anonymous: false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wagmiGenerated.d.ts","sourceRoot":"","sources":["../package/wagmiGenerated.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0lBrB,CAAA"}
|
|
@@ -1256,10 +1256,10 @@ export const coinABI = [
|
|
|
1256
1256
|
] as const
|
|
1257
1257
|
|
|
1258
1258
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
1259
|
-
//
|
|
1259
|
+
// ContentCoin
|
|
1260
1260
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
1261
1261
|
|
|
1262
|
-
export const
|
|
1262
|
+
export const contentCoinABI = [
|
|
1263
1263
|
{
|
|
1264
1264
|
type: 'constructor',
|
|
1265
1265
|
inputs: [
|
|
@@ -4229,6 +4229,13 @@ export const zoraFactoryImplABI = [
|
|
|
4229
4229
|
outputs: [{ name: '', internalType: 'string', type: 'string' }],
|
|
4230
4230
|
stateMutability: 'view',
|
|
4231
4231
|
},
|
|
4232
|
+
{
|
|
4233
|
+
type: 'function',
|
|
4234
|
+
inputs: [],
|
|
4235
|
+
name: 'acceptOwnership',
|
|
4236
|
+
outputs: [],
|
|
4237
|
+
stateMutability: 'nonpayable',
|
|
4238
|
+
},
|
|
4232
4239
|
{
|
|
4233
4240
|
type: 'function',
|
|
4234
4241
|
inputs: [
|
|
@@ -4418,6 +4425,13 @@ export const zoraFactoryImplABI = [
|
|
|
4418
4425
|
outputs: [{ name: '', internalType: 'address', type: 'address' }],
|
|
4419
4426
|
stateMutability: 'view',
|
|
4420
4427
|
},
|
|
4428
|
+
{
|
|
4429
|
+
type: 'function',
|
|
4430
|
+
inputs: [],
|
|
4431
|
+
name: 'pendingOwner',
|
|
4432
|
+
outputs: [{ name: '', internalType: 'address', type: 'address' }],
|
|
4433
|
+
stateMutability: 'view',
|
|
4434
|
+
},
|
|
4421
4435
|
{
|
|
4422
4436
|
type: 'function',
|
|
4423
4437
|
inputs: [],
|
|
@@ -4659,6 +4673,25 @@ export const zoraFactoryImplABI = [
|
|
|
4659
4673
|
],
|
|
4660
4674
|
name: 'Initialized',
|
|
4661
4675
|
},
|
|
4676
|
+
{
|
|
4677
|
+
type: 'event',
|
|
4678
|
+
anonymous: false,
|
|
4679
|
+
inputs: [
|
|
4680
|
+
{
|
|
4681
|
+
name: 'previousOwner',
|
|
4682
|
+
internalType: 'address',
|
|
4683
|
+
type: 'address',
|
|
4684
|
+
indexed: true,
|
|
4685
|
+
},
|
|
4686
|
+
{
|
|
4687
|
+
name: 'newOwner',
|
|
4688
|
+
internalType: 'address',
|
|
4689
|
+
type: 'address',
|
|
4690
|
+
indexed: true,
|
|
4691
|
+
},
|
|
4692
|
+
],
|
|
4693
|
+
name: 'OwnershipTransferStarted',
|
|
4694
|
+
},
|
|
4662
4695
|
{
|
|
4663
4696
|
type: 'event',
|
|
4664
4697
|
anonymous: false,
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ import {IZoraFactory} from "../src/interfaces/IZoraFactory.sol";
|
|
|
8
8
|
import {CoinConfigurationVersions} from "../src/libs/CoinConfigurationVersions.sol";
|
|
9
9
|
import {MarketConstants} from "../src/libs/MarketConstants.sol";
|
|
10
10
|
import {UniV4SwapHelper} from "../src/libs/UniV4SwapHelper.sol";
|
|
11
|
-
import {
|
|
11
|
+
import {ContentCoin} from "../src/ContentCoin.sol";
|
|
12
12
|
import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol";
|
|
13
13
|
import {IUniversalRouter} from "@uniswap/universal-router/contracts/interfaces/IUniversalRouter.sol";
|
|
14
14
|
import {IPermit2} from "permit2/src/interfaces/IPermit2.sol";
|
package/script/TestV4Swap.s.sol
CHANGED
|
@@ -8,7 +8,7 @@ import {IZoraFactory} from "../src/interfaces/IZoraFactory.sol";
|
|
|
8
8
|
import {CoinConfigurationVersions} from "../src/libs/CoinConfigurationVersions.sol";
|
|
9
9
|
import {MarketConstants} from "../src/libs/MarketConstants.sol";
|
|
10
10
|
import {UniV4SwapHelper} from "../src/libs/UniV4SwapHelper.sol";
|
|
11
|
-
import {
|
|
11
|
+
import {ContentCoin} from "../src/ContentCoin.sol";
|
|
12
12
|
import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol";
|
|
13
13
|
import {IUniversalRouter} from "@uniswap/universal-router/contracts/interfaces/IUniversalRouter.sol";
|
|
14
14
|
import {IPermit2} from "permit2/src/interfaces/IPermit2.sol";
|
package/src/BaseCoin.sol
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
2
|
-
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/licensepragma solidity ^0.8.23;
|
|
3
8
|
|
|
4
9
|
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
5
10
|
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.23;
|
|
3
9
|
|
|
4
10
|
import {IPoolManager, PoolKey, Currency, IHooks} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol";
|
|
@@ -14,7 +20,12 @@ import {CoinConstants} from "./libs/CoinConstants.sol";
|
|
|
14
20
|
import {IUpgradeableV4Hook} from "./interfaces/IUpgradeableV4Hook.sol";
|
|
15
21
|
import {CoinCommon} from "./libs/CoinCommon.sol";
|
|
16
22
|
|
|
17
|
-
|
|
23
|
+
/**
|
|
24
|
+
* @title BaseCoinV4
|
|
25
|
+
* @notice Abstract base contract for Uniswap V4 integrated coins
|
|
26
|
+
* @dev Provides shared V4 functionality for both content coins and creator coins
|
|
27
|
+
*/
|
|
28
|
+
abstract contract BaseCoinV4 is BaseCoin, ICoinV4 {
|
|
18
29
|
/// @notice The Uniswap v4 pool manager singleton contract reference.
|
|
19
30
|
IPoolManager public immutable poolManager;
|
|
20
31
|
|
|
@@ -24,8 +35,8 @@ contract CoinV4 is BaseCoin, ICoinV4 {
|
|
|
24
35
|
/// @notice The configuration for the pool.
|
|
25
36
|
PoolConfiguration internal poolConfiguration;
|
|
26
37
|
|
|
27
|
-
/// @notice The constructor for the static
|
|
28
|
-
/// @dev All arguments are required and cannot be set to
|
|
38
|
+
/// @notice The constructor for the static BaseCoinV4 contract deployment shared across all Coins.
|
|
39
|
+
/// @dev All arguments are required and cannot be set to the 0 address.
|
|
29
40
|
/// @param protocolRewardRecipient_ The address of the protocol reward recipient
|
|
30
41
|
/// @param protocolRewards_ The address of the protocol rewards contract
|
|
31
42
|
/// @param poolManager_ The address of the pool manager
|
|
@@ -80,19 +91,6 @@ contract CoinV4 is BaseCoin, ICoinV4 {
|
|
|
80
91
|
poolManager.initialize(poolKey, sqrtPriceX96);
|
|
81
92
|
}
|
|
82
93
|
|
|
83
|
-
/// @dev The initial mint and distribution of the coin supply.
|
|
84
|
-
/// Overrides the BaseCoin._handleInitialDistribution to transfer the market supply to the hook.
|
|
85
|
-
function _handleInitialDistribution() internal virtual override {
|
|
86
|
-
// Mint the total supply to the coin contract
|
|
87
|
-
_mint(address(this), CoinConstants.MAX_TOTAL_SUPPLY);
|
|
88
|
-
|
|
89
|
-
// Distribute the creator launch reward to the payout recipient
|
|
90
|
-
_transfer(address(this), payoutRecipient, CoinConstants.CREATOR_LAUNCH_REWARD);
|
|
91
|
-
|
|
92
|
-
// Transfer the market supply to the hook for liquidity
|
|
93
|
-
_transfer(address(this), address(poolKey.hooks), balanceOf(address(this)));
|
|
94
|
-
}
|
|
95
|
-
|
|
96
94
|
/// @inheritdoc ICoinV4
|
|
97
95
|
function hooks() external view returns (IHooks) {
|
|
98
96
|
return poolKey.hooks;
|
package/src/Coin.sol
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.23;
|
|
3
9
|
|
|
4
10
|
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
8
|
+
pragma solidity ^0.8.23;
|
|
9
|
+
|
|
10
|
+
import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol";
|
|
11
|
+
import {BaseCoinV4} from "./BaseCoinV4.sol";
|
|
12
|
+
import {CoinConstants} from "./libs/CoinConstants.sol";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @title ContentCoin
|
|
16
|
+
* @notice Content coin implementation that uses creator coins as backing currency
|
|
17
|
+
* @dev Inherits from BaseCoinV4 and implements content-specific distribution logic
|
|
18
|
+
*/
|
|
19
|
+
contract ContentCoin is BaseCoinV4 {
|
|
20
|
+
/// @notice The constructor for the static ContentCoin contract deployment shared across all content coins.
|
|
21
|
+
/// @dev All arguments are required and cannot be set to the 0 address.
|
|
22
|
+
/// @param protocolRewardRecipient_ The address of the protocol reward recipient
|
|
23
|
+
/// @param protocolRewards_ The address of the protocol rewards contract
|
|
24
|
+
/// @param poolManager_ The address of the pool manager
|
|
25
|
+
/// @param airlock_ The address of the Airlock contract, ownership is used for a protocol fee split.
|
|
26
|
+
constructor(
|
|
27
|
+
address protocolRewardRecipient_,
|
|
28
|
+
address protocolRewards_,
|
|
29
|
+
IPoolManager poolManager_,
|
|
30
|
+
address airlock_
|
|
31
|
+
) BaseCoinV4(protocolRewardRecipient_, protocolRewards_, poolManager_, airlock_) {}
|
|
32
|
+
|
|
33
|
+
/// @dev The initial mint and distribution of the coin supply.
|
|
34
|
+
/// Implements content coin specific distribution: 990M to liquidity pool, 10M to creator.
|
|
35
|
+
function _handleInitialDistribution() internal virtual override {
|
|
36
|
+
// Mint the total supply to the coin contract
|
|
37
|
+
_mint(address(this), CoinConstants.MAX_TOTAL_SUPPLY);
|
|
38
|
+
|
|
39
|
+
// Distribute the creator launch reward to the payout recipient
|
|
40
|
+
_transfer(address(this), payoutRecipient, CoinConstants.CREATOR_LAUNCH_REWARD);
|
|
41
|
+
|
|
42
|
+
// Transfer the market supply to the hook for liquidity
|
|
43
|
+
_transfer(address(this), address(poolKey.hooks), balanceOf(address(this)));
|
|
44
|
+
}
|
|
45
|
+
}
|
package/src/CreatorCoin.sol
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.28;
|
|
3
9
|
|
|
4
10
|
import {ICreatorCoin} from "./interfaces/ICreatorCoin.sol";
|
|
5
11
|
import {CreatorCoinConstants} from "./libs/CreatorCoinConstants.sol";
|
|
6
|
-
import {IHooks, PoolConfiguration, PoolKey,
|
|
12
|
+
import {IHooks, PoolConfiguration, PoolKey, ICoinV4} from "./interfaces/ICoinV4.sol";
|
|
13
|
+
import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol";
|
|
14
|
+
import {BaseCoinV4} from "./BaseCoinV4.sol";
|
|
7
15
|
|
|
8
|
-
contract CreatorCoin is ICreatorCoin,
|
|
16
|
+
contract CreatorCoin is ICreatorCoin, BaseCoinV4 {
|
|
9
17
|
uint256 public vestingStartTime;
|
|
10
18
|
uint256 public vestingEndTime;
|
|
11
19
|
uint256 public totalClaimed;
|
|
@@ -15,7 +23,7 @@ contract CreatorCoin is ICreatorCoin, CoinV4 {
|
|
|
15
23
|
address _protocolRewards,
|
|
16
24
|
IPoolManager _poolManager,
|
|
17
25
|
address _airlock
|
|
18
|
-
)
|
|
26
|
+
) BaseCoinV4(_protocolRewardRecipient, _protocolRewards, _poolManager, _airlock) initializer {}
|
|
19
27
|
|
|
20
28
|
function initialize(
|
|
21
29
|
address payoutRecipient_,
|
|
@@ -28,7 +36,7 @@ contract CreatorCoin is ICreatorCoin, CoinV4 {
|
|
|
28
36
|
PoolKey memory poolKey_,
|
|
29
37
|
uint160 sqrtPriceX96,
|
|
30
38
|
PoolConfiguration memory poolConfiguration_
|
|
31
|
-
) public override(
|
|
39
|
+
) public override(BaseCoinV4, ICoinV4) {
|
|
32
40
|
require(currency_ == CreatorCoinConstants.CURRENCY, InvalidCurrency());
|
|
33
41
|
|
|
34
42
|
super.initialize(payoutRecipient_, owners_, tokenURI_, name_, symbol_, platformReferrer_, currency_, poolKey_, sqrtPriceX96, poolConfiguration_);
|
|
@@ -38,7 +46,7 @@ contract CreatorCoin is ICreatorCoin, CoinV4 {
|
|
|
38
46
|
}
|
|
39
47
|
|
|
40
48
|
/// @dev The initial mint and distribution of the coin supply.
|
|
41
|
-
///
|
|
49
|
+
/// Implements creator coin specific distribution: 500M to liquidity pool, 500M vested to creator.
|
|
42
50
|
function _handleInitialDistribution() internal override {
|
|
43
51
|
_mint(address(this), CreatorCoinConstants.TOTAL_SUPPLY);
|
|
44
52
|
|
package/src/ZoraFactoryImpl.sol
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.23;
|
|
3
9
|
|
|
4
10
|
import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol";
|
|
5
|
-
import {
|
|
11
|
+
import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol";
|
|
6
12
|
import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";
|
|
7
13
|
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
|
|
8
14
|
import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol";
|
|
@@ -15,7 +21,7 @@ import {IZoraFactory} from "./interfaces/IZoraFactory.sol";
|
|
|
15
21
|
import {IHasAfterCoinDeploy} from "./hooks/deployment/BaseCoinDeployHook.sol";
|
|
16
22
|
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
|
|
17
23
|
import {Coin} from "./Coin.sol";
|
|
18
|
-
import {
|
|
24
|
+
import {ContentCoin} from "./ContentCoin.sol";
|
|
19
25
|
import {ICoin, PoolKeyStruct} from "./interfaces/ICoin.sol";
|
|
20
26
|
import {ICoinV3} from "./interfaces/ICoinV3.sol";
|
|
21
27
|
import {ICoinV4} from "./interfaces/ICoinV4.sol";
|
|
@@ -39,7 +45,7 @@ contract ZoraFactoryImpl is
|
|
|
39
45
|
IZoraFactory,
|
|
40
46
|
UUPSUpgradeable,
|
|
41
47
|
ReentrancyGuardUpgradeable,
|
|
42
|
-
|
|
48
|
+
Ownable2StepUpgradeable,
|
|
43
49
|
IHasContractName,
|
|
44
50
|
ContractVersionBase,
|
|
45
51
|
DeployedCoinVersionLookup
|
|
@@ -10,7 +10,7 @@ import {Coin} from "../Coin.sol";
|
|
|
10
10
|
import {IVersionedContract} from "@zoralabs/shared-contracts/interfaces/IVersionedContract.sol";
|
|
11
11
|
import {BuySupplyWithSwapRouterHook} from "../hooks/deployment/BuySupplyWithSwapRouterHook.sol";
|
|
12
12
|
import {IZoraFactory} from "../interfaces/IZoraFactory.sol";
|
|
13
|
-
import {
|
|
13
|
+
import {ContentCoin} from "../ContentCoin.sol";
|
|
14
14
|
import {IHooks} from "@uniswap/v4-core/src/interfaces/IHooks.sol";
|
|
15
15
|
import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol";
|
|
16
16
|
import {ZoraFactory} from "../proxy/ZoraFactory.sol";
|
|
@@ -114,9 +114,9 @@ contract CoinsDeployerBase is ProxyDeployerScript {
|
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
function deployCoinV4Impl(address zoraV4CoinHook) internal returns (
|
|
117
|
+
function deployCoinV4Impl(address zoraV4CoinHook) internal returns (ContentCoin) {
|
|
118
118
|
return
|
|
119
|
-
new
|
|
119
|
+
new ContentCoin({
|
|
120
120
|
protocolRewardRecipient_: getZoraRecipient(),
|
|
121
121
|
protocolRewards_: PROTOCOL_REWARDS,
|
|
122
122
|
poolManager_: IPoolManager(getUniswapV4PoolManager()),
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.23;
|
|
3
9
|
|
|
4
10
|
import {BaseHook} from "@uniswap/v4-periphery/src/utils/BaseHook.sol";
|
|
@@ -113,7 +119,7 @@ abstract contract BaseZoraV4CoinHook is BaseHook, ContractVersionBase, IZoraV4Co
|
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
/// @inheritdoc IZoraV4CoinHook
|
|
116
|
-
function getPoolCoinByHash(
|
|
122
|
+
function getPoolCoinByHash(bytes32 poolKeyHash) external view returns (IZoraV4CoinHook.PoolCoin memory) {
|
|
117
123
|
return poolCoins[poolKeyHash];
|
|
118
124
|
}
|
|
119
125
|
|
|
@@ -366,4 +372,6 @@ abstract contract BaseZoraV4CoinHook is BaseHook, ContractVersionBase, IZoraV4Co
|
|
|
366
372
|
|
|
367
373
|
newPoolKey = V4Liquidity.lockAndMigrate(poolManager, poolKey, poolCoin.positions, poolCoin.coin, newHook, additionalData);
|
|
368
374
|
}
|
|
375
|
+
|
|
376
|
+
receive() external payable onlyPoolManager {}
|
|
369
377
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.28;
|
|
3
9
|
|
|
4
10
|
import {IPoolManager, IDeployedCoinVersionLookup, IHasRewardsRecipients, Currency, BaseZoraV4CoinHook} from "./BaseZoraV4CoinHook.sol";
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.28;
|
|
3
9
|
|
|
4
10
|
import {CreatorCoinConstants} from "../libs/CreatorCoinConstants.sol";
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.23;
|
|
3
9
|
|
|
4
10
|
import {IHooksUpgradeGate} from "../interfaces/IHooksUpgradeGate.sol";
|
|
@@ -117,7 +117,7 @@ interface IZoraV4CoinHook is IUpgradeableV4Hook {
|
|
|
117
117
|
/// @notice Returns the pool coin for a given pool key hash.
|
|
118
118
|
/// @param poolKeyHash The hash of the pool key for indexing.
|
|
119
119
|
/// @return poolCoin The pool coin confirmation data.
|
|
120
|
-
function getPoolCoinByHash(
|
|
120
|
+
function getPoolCoinByHash(bytes32 poolKeyHash) external view returns (IZoraV4CoinHook.PoolCoin memory);
|
|
121
121
|
|
|
122
122
|
/// @notice Returns the pool coin for a given pool key.
|
|
123
123
|
/// @param key The pool key.
|
package/src/libs/CoinCommon.sol
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.23;
|
|
3
9
|
|
|
4
10
|
import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol";
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.23;
|
|
3
9
|
|
|
4
10
|
import {CoinConstants} from "./CoinConstants.sol";
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.23;
|
|
3
9
|
|
|
4
10
|
library CoinConstants {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.23;
|
|
3
9
|
|
|
4
10
|
import {PoolConfiguration} from "../interfaces/ICoin.sol";
|
package/src/libs/CoinRewards.sol
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.23;
|
|
3
9
|
|
|
4
10
|
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.28;
|
|
3
9
|
|
|
4
10
|
import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol";
|
package/src/libs/CoinSetup.sol
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.23;
|
|
3
9
|
|
|
4
10
|
import {PoolConfigurationV4} from "../interfaces/ICoin.sol";
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.23;
|
|
3
9
|
|
|
4
10
|
library CreatorCoinConstants {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: ZORA-DELAYED-OSL-v1
|
|
2
|
+
// This software is licensed under the Zora Delayed Open Source License.
|
|
3
|
+
// Under this license, you may use, copy, modify, and distribute this software for
|
|
4
|
+
// non-commercial purposes only. Commercial use and competitive products are prohibited
|
|
5
|
+
// until the "Open Date" (3 years from first public distribution or earlier at Zora's discretion),
|
|
6
|
+
// at which point this software automatically becomes available under the MIT License.
|
|
7
|
+
// Full license terms available at: https://docs.zora.co/coins/license
|
|
2
8
|
pragma solidity ^0.8.28;
|
|
3
9
|
|
|
4
10
|
import {ICreatorCoinHook} from "../interfaces/ICreatorCoinHook.sol";
|