@zoralabs/coins 0.2.0 → 0.3.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.
@@ -1,15 +1,13 @@
1
1
 
2
- > @zoralabs/coins@0.2.0 build /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
2
+ > @zoralabs/coins@0.3.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.2.0 wagmi:generate /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
6
+ > @zoralabs/coins@0.3.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.28
10
- installing solc version "0.8.28"
11
- Successfully installed solc 0.8.28
12
- Solc 0.8.28 finished in 102.91s
9
+ Compiling 79 files with Solc 0.8.23
10
+ Solc 0.8.23 finished in 200.27s
13
11
  Compiler run successful with warnings:
14
12
  Warning (9302): Return value of low-level calls not used.
15
13
  --> test/Coin.t.sol:357:9:
@@ -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.2.0 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
31
+ > @zoralabs/coins@0.3.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.2.0 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
35
+ > @zoralabs/coins@0.3.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 1716ms (unchanged)
41
- src/interfaces/ICoin.sol 71ms (unchanged)
42
- src/interfaces/ICoinComments.sol 5ms (unchanged)
38
+ src/Coin.sol 763ms (unchanged)
39
+ src/interfaces/ICoin.sol 37ms (unchanged)
40
+ src/interfaces/ICoinComments.sol 4ms (unchanged)
43
41
  src/interfaces/IERC7572.sol 4ms (unchanged)
44
- src/interfaces/INonfungiblePositionManager.sol 28ms (unchanged)
45
- src/interfaces/IProtocolRewards.sol 13ms (unchanged)
46
- src/interfaces/ISwapRouter.sol 12ms (unchanged)
47
- src/interfaces/IUniswapV3Pool.sol 13ms (unchanged)
48
- src/interfaces/IUniswapV3SwapCallback.sol 5ms (unchanged)
49
- src/interfaces/IWETH.sol 13ms (unchanged)
50
- src/interfaces/IZoraFactory.sol 16ms (unchanged)
42
+ src/interfaces/INonfungiblePositionManager.sol 19ms (unchanged)
43
+ src/interfaces/IProtocolRewards.sol 15ms (unchanged)
44
+ src/interfaces/ISwapRouter.sol 5ms (unchanged)
45
+ src/interfaces/IUniswapV3Pool.sol 4ms (unchanged)
46
+ src/interfaces/IUniswapV3SwapCallback.sol 2ms (unchanged)
47
+ src/interfaces/IWETH.sol 4ms (unchanged)
48
+ src/interfaces/IZoraFactory.sol 12ms (unchanged)
51
49
  src/proxy/ZoraFactory.sol 17ms (unchanged)
52
- src/utils/CoinConstants.sol 16ms (unchanged)
53
- src/utils/MultiOwnable.sol 163ms (unchanged)
54
- src/utils/TickMath.sol 359ms (unchanged)
50
+ src/utils/CoinConstants.sol 6ms (unchanged)
51
+ src/utils/MultiOwnable.sol 101ms (unchanged)
52
+ src/utils/TickMath.sol 132ms (unchanged)
55
53
  src/version/ContractVersionBase.sol 4ms (unchanged)
56
- src/ZoraFactoryImpl.sol 128ms (unchanged)
57
- test/Coin.t.sol 1035ms (unchanged)
58
- test/Factory.t.sol 443ms (unchanged)
59
- test/MultiOwnable.t.sol 210ms (unchanged)
60
- test/utils/BaseTest.sol 290ms (unchanged)
61
- test/utils/ProtocolRewards.sol 1058ms (unchanged)
62
- script/Deploy.s.sol 14ms (unchanged)
54
+ src/ZoraFactoryImpl.sol 73ms (unchanged)
55
+ test/Coin.t.sol 398ms (unchanged)
56
+ test/Factory.t.sol 218ms (unchanged)
57
+ test/MultiOwnable.t.sol 100ms (unchanged)
58
+ test/utils/BaseTest.sol 105ms (unchanged)
59
+ test/utils/ProtocolRewards.sol 398ms (unchanged)
60
+ script/Deploy.s.sol 3ms (unchanged)
63
61
  CLI Building entry: package/index.ts
64
62
  CLI Using tsconfig: tsconfig.json
65
63
  CLI tsup v7.3.0
@@ -70,7 +68,7 @@ CJS Build start
70
68
  ESM Build start
71
69
  ESM dist/index.js 30.79 KB
72
70
  ESM dist/index.js.map 56.06 KB
73
- ESM ⚡️ Build success in 45ms
71
+ ESM ⚡️ Build success in 22ms
74
72
  CJS dist/index.cjs 31.84 KB
75
73
  CJS dist/index.cjs.map 56.17 KB
76
- CJS ⚡️ Build success in 48ms
74
+ CJS ⚡️ Build success in 22ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @zoralabs/coins
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e1a3d68f: Refactored coin interface imports
8
+
3
9
  ## 0.2.0
4
10
 
5
11
  ### Minor Changes
package/abis/ICoin.json CHANGED
@@ -51,6 +51,53 @@
51
51
  ],
52
52
  "stateMutability": "payable"
53
53
  },
54
+ {
55
+ "type": "function",
56
+ "name": "contractURI",
57
+ "inputs": [],
58
+ "outputs": [
59
+ {
60
+ "name": "",
61
+ "type": "string",
62
+ "internalType": "string"
63
+ }
64
+ ],
65
+ "stateMutability": "view"
66
+ },
67
+ {
68
+ "type": "function",
69
+ "name": "onERC721Received",
70
+ "inputs": [
71
+ {
72
+ "name": "operator",
73
+ "type": "address",
74
+ "internalType": "address"
75
+ },
76
+ {
77
+ "name": "from",
78
+ "type": "address",
79
+ "internalType": "address"
80
+ },
81
+ {
82
+ "name": "tokenId",
83
+ "type": "uint256",
84
+ "internalType": "uint256"
85
+ },
86
+ {
87
+ "name": "data",
88
+ "type": "bytes",
89
+ "internalType": "bytes"
90
+ }
91
+ ],
92
+ "outputs": [
93
+ {
94
+ "name": "",
95
+ "type": "bytes4",
96
+ "internalType": "bytes4"
97
+ }
98
+ ],
99
+ "stateMutability": "nonpayable"
100
+ },
54
101
  {
55
102
  "type": "function",
56
103
  "name": "platformReferrer",
@@ -103,6 +150,25 @@
103
150
  ],
104
151
  "stateMutability": "nonpayable"
105
152
  },
153
+ {
154
+ "type": "function",
155
+ "name": "supportsInterface",
156
+ "inputs": [
157
+ {
158
+ "name": "interfaceId",
159
+ "type": "bytes4",
160
+ "internalType": "bytes4"
161
+ }
162
+ ],
163
+ "outputs": [
164
+ {
165
+ "name": "",
166
+ "type": "bool",
167
+ "internalType": "bool"
168
+ }
169
+ ],
170
+ "stateMutability": "view"
171
+ },
106
172
  {
107
173
  "type": "function",
108
174
  "name": "tokenURI",
@@ -441,6 +507,12 @@
441
507
  ],
442
508
  "anonymous": false
443
509
  },
510
+ {
511
+ "type": "event",
512
+ "name": "ContractURIUpdated",
513
+ "inputs": [],
514
+ "anonymous": false
515
+ },
444
516
  {
445
517
  "type": "error",
446
518
  "name": "AddressZero",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zoralabs/coins",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -30,8 +30,8 @@
30
30
  "typescript": "^5.2.2",
31
31
  "viem": "^2.21.18",
32
32
  "@zoralabs/shared-contracts": "^0.0.1",
33
- "@zoralabs/tsconfig": "^0.0.1",
34
- "@zoralabs/shared-scripts": "^0.0.0"
33
+ "@zoralabs/shared-scripts": "^0.0.0",
34
+ "@zoralabs/tsconfig": "^0.0.1"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "pnpm run wagmi:generate && pnpm run copy-abis && pnpm run prettier:write && tsup",
package/src/Coin.sol CHANGED
@@ -2,18 +2,7 @@
2
2
  pragma solidity ^0.8.23;
3
3
 
4
4
  import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
5
- import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
6
- import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
7
5
  import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
8
- import {Address} from "@openzeppelin/contracts/utils/Address.sol";
9
- import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";
10
- import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";
11
- import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
12
-
13
- import {ContractVersionBase} from "./version/ContractVersionBase.sol";
14
- import {CoinConstants} from "./utils/CoinConstants.sol";
15
- import {MultiOwnable} from "./utils/MultiOwnable.sol";
16
- import {TickMath} from "./utils/TickMath.sol";
17
6
  import {ICoin} from "./interfaces/ICoin.sol";
18
7
  import {ICoinComments} from "./interfaces/ICoinComments.sol";
19
8
  import {IERC7572} from "./interfaces/IERC7572.sol";
@@ -23,6 +12,15 @@ import {ISwapRouter} from "./interfaces/ISwapRouter.sol";
23
12
  import {IProtocolRewards} from "./interfaces/IProtocolRewards.sol";
24
13
  import {IWETH} from "./interfaces/IWETH.sol";
25
14
 
15
+ import {Address} from "@openzeppelin/contracts/utils/Address.sol";
16
+ import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";
17
+ import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";
18
+ import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
19
+ import {ContractVersionBase} from "./version/ContractVersionBase.sol";
20
+ import {CoinConstants} from "./utils/CoinConstants.sol";
21
+ import {MultiOwnable} from "./utils/MultiOwnable.sol";
22
+ import {TickMath} from "./utils/TickMath.sol";
23
+
26
24
  /*
27
25
  $$$$$$\ $$$$$$\ $$$$$$\ $$\ $$\
28
26
  $$ __$$\ $$ __$$\ \_$$ _|$$$\ $$ |
@@ -33,17 +31,7 @@ import {IWETH} from "./interfaces/IWETH.sol";
33
31
  \$$$$$$ | $$$$$$ |$$$$$$\ $$ | \$$ |
34
32
  \______/ \______/ \______|\__| \__|
35
33
  */
36
- contract Coin is
37
- ICoin,
38
- IERC165,
39
- IERC721Receiver,
40
- IERC7572,
41
- CoinConstants,
42
- ContractVersionBase,
43
- ERC20PermitUpgradeable,
44
- MultiOwnable,
45
- ReentrancyGuardUpgradeable
46
- {
34
+ contract Coin is ICoin, CoinConstants, ContractVersionBase, ERC20PermitUpgradeable, MultiOwnable, ReentrancyGuardUpgradeable {
47
35
  using SafeERC20 for IERC20;
48
36
 
49
37
  address public immutable WETH;
@@ -1,7 +1,11 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  pragma solidity ^0.8.23;
3
3
 
4
- interface ICoin {
4
+ import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
5
+ import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
6
+ import {IERC7572} from "./IERC7572.sol";
7
+
8
+ interface ICoin is IERC165, IERC721Receiver, IERC7572 {
5
9
  /// @notice Thrown when an operation is attempted with a zero address
6
10
  error AddressZero();
7
11
 
@@ -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.2.0";
12
+ return "0.3.0";
13
13
  }
14
14
  }
package/test/Coin.t.sol CHANGED
@@ -441,6 +441,6 @@ contract CoinTest is BaseTest {
441
441
  }
442
442
 
443
443
  function test_contract_version() public view {
444
- assertEq(coin.contractVersion(), "0.2.0");
444
+ assertEq(coin.contractVersion(), "0.3.0");
445
445
  }
446
446
  }