@zoralabs/coins 0.3.1 → 0.4.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 +35 -37
- package/CHANGELOG.md +6 -0
- package/addresses/8453.json +2 -2
- package/addresses/84532.json +2 -2
- package/package.json +1 -1
- package/src/Coin.sol +1 -3
- package/src/utils/CoinConstants.sol +3 -11
- package/src/version/ContractVersionBase.sol +1 -1
- package/test/Coin.t.sol +3 -7
- package/test/Factory.t.sol +1 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
> @zoralabs/coins@0.
|
|
2
|
+
> @zoralabs/coins@0.4.0 build /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
|
|
3
3
|
> pnpm run wagmi:generate && pnpm run copy-abis && pnpm run prettier:write && tsup
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @zoralabs/coins@0.
|
|
6
|
+
> @zoralabs/coins@0.4.0 wagmi:generate /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
|
|
7
7
|
> FOUNDRY_PROFILE=dev forge build && wagmi generate && pnpm exec rename-generated-abi-casing ./package/wagmiGenerated.ts
|
|
8
8
|
|
|
9
|
-
Compiling 79 files with Solc 0.8.
|
|
10
|
-
|
|
11
|
-
Successfully installed solc 0.8.28
|
|
12
|
-
Solc 0.8.28 finished in 103.41s
|
|
9
|
+
Compiling 79 files with Solc 0.8.23
|
|
10
|
+
Solc 0.8.23 finished in 198.33s
|
|
13
11
|
Compiler run successful with warnings:
|
|
14
12
|
Warning (9302): Return value of low-level calls not used.
|
|
15
|
-
--> test/Coin.t.sol:
|
|
13
|
+
--> test/Coin.t.sol:377:9:
|
|
16
14
|
|
|
|
17
|
-
|
|
15
|
+
377 | address(coin).call{value: 1 ether}("");
|
|
18
16
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
19
17
|
|
|
20
18
|
[33m-[39m Validating plugins
|
|
@@ -30,36 +28,36 @@ Warning (9302): Return value of low-level calls not used.
|
|
|
30
28
|
✅ Updated ./package/wagmiGenerated.ts (2 replacements)
|
|
31
29
|
✨ All files processed successfully!
|
|
32
30
|
|
|
33
|
-
> @zoralabs/coins@0.
|
|
31
|
+
> @zoralabs/coins@0.4.0 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
|
|
34
32
|
> pnpm exec bundle-abis
|
|
35
33
|
|
|
36
34
|
|
|
37
|
-
> @zoralabs/coins@0.
|
|
35
|
+
> @zoralabs/coins@0.4.0 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
|
|
38
36
|
> prettier --write 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'
|
|
39
37
|
|
|
40
|
-
src/Coin.sol
|
|
41
|
-
src/interfaces/ICoin.sol
|
|
42
|
-
src/interfaces/ICoinComments.sol
|
|
43
|
-
src/interfaces/IERC7572.sol
|
|
44
|
-
src/interfaces/INonfungiblePositionManager.sol
|
|
45
|
-
src/interfaces/IProtocolRewards.sol
|
|
46
|
-
src/interfaces/ISwapRouter.sol
|
|
47
|
-
src/interfaces/IUniswapV3Pool.sol
|
|
48
|
-
src/interfaces/IUniswapV3SwapCallback.sol
|
|
49
|
-
src/interfaces/IWETH.sol
|
|
50
|
-
src/interfaces/IZoraFactory.sol
|
|
51
|
-
src/proxy/ZoraFactory.sol
|
|
52
|
-
src/utils/CoinConstants.sol
|
|
53
|
-
src/utils/MultiOwnable.sol
|
|
54
|
-
src/utils/TickMath.sol
|
|
55
|
-
src/version/ContractVersionBase.sol
|
|
56
|
-
src/ZoraFactoryImpl.sol
|
|
57
|
-
test/Coin.t.sol
|
|
58
|
-
test/Factory.t.sol
|
|
59
|
-
test/MultiOwnable.t.sol
|
|
60
|
-
test/utils/BaseTest.sol
|
|
61
|
-
test/utils/ProtocolRewards.sol
|
|
62
|
-
script/Deploy.s.sol
|
|
38
|
+
src/Coin.sol 728ms (unchanged)
|
|
39
|
+
src/interfaces/ICoin.sol 36ms (unchanged)
|
|
40
|
+
src/interfaces/ICoinComments.sol 3ms (unchanged)
|
|
41
|
+
src/interfaces/IERC7572.sol 1ms (unchanged)
|
|
42
|
+
src/interfaces/INonfungiblePositionManager.sol 21ms (unchanged)
|
|
43
|
+
src/interfaces/IProtocolRewards.sol 6ms (unchanged)
|
|
44
|
+
src/interfaces/ISwapRouter.sol 9ms (unchanged)
|
|
45
|
+
src/interfaces/IUniswapV3Pool.sol 4ms (unchanged)
|
|
46
|
+
src/interfaces/IUniswapV3SwapCallback.sol 3ms (unchanged)
|
|
47
|
+
src/interfaces/IWETH.sol 8ms (unchanged)
|
|
48
|
+
src/interfaces/IZoraFactory.sol 12ms (unchanged)
|
|
49
|
+
src/proxy/ZoraFactory.sol 13ms (unchanged)
|
|
50
|
+
src/utils/CoinConstants.sol 6ms (unchanged)
|
|
51
|
+
src/utils/MultiOwnable.sol 88ms (unchanged)
|
|
52
|
+
src/utils/TickMath.sol 138ms (unchanged)
|
|
53
|
+
src/version/ContractVersionBase.sol 2ms (unchanged)
|
|
54
|
+
src/ZoraFactoryImpl.sol 86ms (unchanged)
|
|
55
|
+
test/Coin.t.sol 378ms (unchanged)
|
|
56
|
+
test/Factory.t.sol 155ms (unchanged)
|
|
57
|
+
test/MultiOwnable.t.sol 109ms (unchanged)
|
|
58
|
+
test/utils/BaseTest.sol 108ms (unchanged)
|
|
59
|
+
test/utils/ProtocolRewards.sol 407ms (unchanged)
|
|
60
|
+
script/Deploy.s.sol 4ms (unchanged)
|
|
63
61
|
CLI Building entry: package/index.ts
|
|
64
62
|
CLI Using tsconfig: tsconfig.json
|
|
65
63
|
CLI tsup v7.3.0
|
|
@@ -68,9 +66,9 @@ CLI Target: es2021
|
|
|
68
66
|
CLI Cleaning output folder
|
|
69
67
|
CJS Build start
|
|
70
68
|
ESM Build start
|
|
71
|
-
CJS dist/index.cjs 31.91 KB
|
|
72
|
-
CJS dist/index.cjs.map 56.30 KB
|
|
73
|
-
CJS ⚡️ Build success in 45ms
|
|
74
69
|
ESM dist/index.js 30.86 KB
|
|
75
70
|
ESM dist/index.js.map 56.19 KB
|
|
76
|
-
ESM ⚡️ Build success in
|
|
71
|
+
ESM ⚡️ Build success in 20ms
|
|
72
|
+
CJS dist/index.cjs 31.91 KB
|
|
73
|
+
CJS dist/index.cjs.map 56.30 KB
|
|
74
|
+
CJS ⚡️ Build success in 21ms
|
package/CHANGELOG.md
CHANGED
package/addresses/8453.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"ZORA_FACTORY": "0xC1d310288E76bE71E7A26d269Fd6cbd3A1D9febC",
|
|
3
|
-
"ZORA_FACTORY_IMPL": "
|
|
4
|
-
"COIN": "
|
|
3
|
+
"ZORA_FACTORY_IMPL": "0x2734Fc968DD5739A78c28d0078785460b4887596",
|
|
4
|
+
"COIN": "0x8147FB008c78aAC363f87BaAEF4dBf25CBff27a2",
|
|
5
5
|
"NONFUNGIBLE_POSITION_MANAGER": "0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1",
|
|
6
6
|
"SWAP_ROUTER_02": "0x2626664c2603336E57B271c5C0b26F421741e481",
|
|
7
7
|
"UNISWAP_QUOTER": "0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",
|
package/addresses/84532.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"ZORA_FACTORY": "0x1E670515d3A4C75C0860846c0605c84AF0e0db0d",
|
|
3
|
-
"ZORA_FACTORY_IMPL": "
|
|
4
|
-
"COIN": "
|
|
3
|
+
"ZORA_FACTORY_IMPL": "0xA86Ce280A49f5f902D4Bcc8B9099DdeC8C1A4AfB",
|
|
4
|
+
"COIN": "0x41888F4BB5C2260Bf3d7c6f4c69a9D52222D1D84",
|
|
5
5
|
"NONFUNGIBLE_POSITION_MANAGER": "0x27F971cb582BF9E50F397e4d29a5C7A34f11faA2",
|
|
6
6
|
"SWAP_ROUTER_02": "0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4",
|
|
7
7
|
"UNISWAP_QUOTER": "0xC5290058841028F1614F3A6F0F5816cAd0df5E27",
|
package/package.json
CHANGED
package/src/Coin.sol
CHANGED
|
@@ -117,10 +117,8 @@ contract Coin is ICoin, CoinConstants, ContractVersionBase, ERC20PermitUpgradeab
|
|
|
117
117
|
// Mint the total supply
|
|
118
118
|
_mint(address(this), MAX_TOTAL_SUPPLY);
|
|
119
119
|
|
|
120
|
-
// Distribute launch
|
|
120
|
+
// Distribute the creator launch reward
|
|
121
121
|
_transfer(address(this), payoutRecipient, CREATOR_LAUNCH_REWARD);
|
|
122
|
-
_transfer(address(this), platformReferrer, PLATFORM_REFERRER_LAUNCH_REWARD);
|
|
123
|
-
_transfer(address(this), protocolRewardRecipient, PROTOCOL_LAUNCH_REWARD);
|
|
124
122
|
|
|
125
123
|
// Approve the transfer of the remaining supply to the pool
|
|
126
124
|
IERC20(address(this)).safeIncreaseAllowance(address(nonfungiblePositionManager), POOL_LAUNCH_SUPPLY);
|
|
@@ -7,21 +7,13 @@ abstract contract CoinConstants {
|
|
|
7
7
|
uint256 public constant MAX_TOTAL_SUPPLY = 1_000_000_000e18;
|
|
8
8
|
|
|
9
9
|
/// @notice The number of coins allocated to the liquidity pool
|
|
10
|
-
/// @dev
|
|
11
|
-
uint256 internal constant POOL_LAUNCH_SUPPLY =
|
|
10
|
+
/// @dev 990 million coins
|
|
11
|
+
uint256 internal constant POOL_LAUNCH_SUPPLY = 990_000_000e18;
|
|
12
12
|
|
|
13
13
|
/// @notice The number of coins rewarded to the creator
|
|
14
|
-
/// @dev
|
|
14
|
+
/// @dev 10 million coins
|
|
15
15
|
uint256 internal constant CREATOR_LAUNCH_REWARD = 10_000_000e18;
|
|
16
16
|
|
|
17
|
-
/// @notice The number of coins rewarded to the platform referrer
|
|
18
|
-
/// @dev Set to 5 million coins
|
|
19
|
-
uint256 internal constant PLATFORM_REFERRER_LAUNCH_REWARD = 5_000_000e18;
|
|
20
|
-
|
|
21
|
-
/// @notice The number of coins rewarded to the protocol
|
|
22
|
-
/// @dev Set to 5 million coins
|
|
23
|
-
uint256 internal constant PROTOCOL_LAUNCH_REWARD = 5_000_000e18;
|
|
24
|
-
|
|
25
17
|
/// @notice The minimum order size allowed for trades
|
|
26
18
|
/// @dev Set to 0.0000001 ETH to prevent dust transactions
|
|
27
19
|
uint256 public constant MIN_ORDER_SIZE = 0.0000001 ether;
|
|
@@ -9,6 +9,6 @@ import {IVersionedContract} from "@zoralabs/shared-contracts/interfaces/IVersion
|
|
|
9
9
|
contract ContractVersionBase is IVersionedContract {
|
|
10
10
|
/// @notice The version of the contract
|
|
11
11
|
function contractVersion() external pure override returns (string memory) {
|
|
12
|
-
return "0.
|
|
12
|
+
return "0.4.0";
|
|
13
13
|
}
|
|
14
14
|
}
|
package/test/Coin.t.sol
CHANGED
|
@@ -11,18 +11,14 @@ contract CoinTest is BaseTest {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
function test_supply_constants() public view {
|
|
14
|
-
assertEq(MAX_TOTAL_SUPPLY, POOL_LAUNCH_SUPPLY + CREATOR_LAUNCH_REWARD
|
|
14
|
+
assertEq(MAX_TOTAL_SUPPLY, POOL_LAUNCH_SUPPLY + CREATOR_LAUNCH_REWARD);
|
|
15
15
|
|
|
16
16
|
assertEq(MAX_TOTAL_SUPPLY, 1_000_000_000e18);
|
|
17
|
-
assertEq(POOL_LAUNCH_SUPPLY,
|
|
17
|
+
assertEq(POOL_LAUNCH_SUPPLY, 990_000_000e18);
|
|
18
18
|
assertEq(CREATOR_LAUNCH_REWARD, 10_000_000e18);
|
|
19
|
-
assertEq(PLATFORM_REFERRER_LAUNCH_REWARD, 5_000_000e18);
|
|
20
|
-
assertEq(PROTOCOL_LAUNCH_REWARD, 5_000_000e18);
|
|
21
19
|
|
|
22
20
|
assertEq(coin.totalSupply(), MAX_TOTAL_SUPPLY);
|
|
23
21
|
assertEq(coin.balanceOf(coin.payoutRecipient()), CREATOR_LAUNCH_REWARD);
|
|
24
|
-
assertEq(coin.balanceOf(coin.platformReferrer()), PLATFORM_REFERRER_LAUNCH_REWARD);
|
|
25
|
-
assertEq(coin.balanceOf(coin.protocolRewardRecipient()), PROTOCOL_LAUNCH_REWARD);
|
|
26
22
|
assertApproxEqAbs(coin.balanceOf(address(pool)), POOL_LAUNCH_SUPPLY, 1e18);
|
|
27
23
|
}
|
|
28
24
|
|
|
@@ -465,6 +461,6 @@ contract CoinTest is BaseTest {
|
|
|
465
461
|
}
|
|
466
462
|
|
|
467
463
|
function test_contract_version() public view {
|
|
468
|
-
assertEq(coin.contractVersion(), "0.
|
|
464
|
+
assertEq(coin.contractVersion(), "0.4.0");
|
|
469
465
|
}
|
|
470
466
|
}
|
package/test/Factory.t.sol
CHANGED
|
@@ -54,9 +54,7 @@ contract FactoryTest is BaseTest {
|
|
|
54
54
|
assertEq(coin.currency(), address(weth), "currency");
|
|
55
55
|
assertEq(coin.totalSupply(), 1_000_000_000e18, "totalSupply");
|
|
56
56
|
assertEq(coin.balanceOf(users.creator), 10_000_000e18, "balanceOf creator");
|
|
57
|
-
|
|
58
|
-
assertGe(coin.balanceOf(users.feeRecipient), 5_000_000e18, "balanceOf protocolRewardRecipient");
|
|
59
|
-
assertGt(coin.balanceOf(coin.poolAddress()), 979_999_983e18, "balanceOf pool");
|
|
57
|
+
assertGt(coin.balanceOf(coin.poolAddress()), 989_999_999e18, "balanceOf pool");
|
|
60
58
|
}
|
|
61
59
|
|
|
62
60
|
function test_deploy_with_eth(uint256 initialOrderSize) public {
|