@zoralabs/coins 0.1.1 → 0.2.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.
@@ -3,27 +3,27 @@ pragma solidity ^0.8.23;
3
3
 
4
4
  interface IZoraFactory {
5
5
  /// @notice Emitted when a coin is created
6
- /// @param deployer The msg.sender address of coin creation
7
- /// @param creator The address of the creator of the coin
6
+ /// @param caller The msg.sender address
8
7
  /// @param payoutRecipient The address of the creator payout recipient
9
8
  /// @param platformReferrer The address of the platform referrer
10
9
  /// @param currency The address of the currency
11
- /// @param tokenURI The URI of the coin
10
+ /// @param uri The URI of the coin
12
11
  /// @param name The name of the coin
13
12
  /// @param symbol The symbol of the coin
14
13
  /// @param coin The address of the coin
15
14
  /// @param pool The address of the pool
15
+ /// @param version The coin contract version
16
16
  event CoinCreated(
17
- address indexed deployer,
18
- address indexed creator, // TODO remove after backend approval
17
+ address indexed caller,
19
18
  address indexed payoutRecipient,
20
- address platformReferrer,
19
+ address indexed platformReferrer,
21
20
  address currency,
22
- string tokenURI,
21
+ string uri,
23
22
  string name,
24
23
  string symbol,
25
24
  address coin,
26
- address pool
25
+ address pool,
26
+ string version
27
27
  );
28
28
 
29
29
  /// @notice Thrown when the amount of ERC20 tokens transferred does not match the expected amount
@@ -60,7 +60,7 @@ abstract contract CoinConstants {
60
60
 
61
61
  /// @notice The LP's lower tick
62
62
  /// @dev This is only used if the currency is WETH
63
- int24 internal constant LP_TICK_LOWER_WETH = -219200;
63
+ int24 internal constant LP_TICK_LOWER_WETH = -199200;
64
64
 
65
65
  /// @notice The LP's upper tick
66
66
  int24 internal constant LP_TICK_UPPER = 887200;
@@ -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.1.1";
12
+ return "0.2.0";
13
13
  }
14
14
  }
package/test/Coin.t.sol CHANGED
@@ -377,19 +377,22 @@ contract CoinTest is BaseTest {
377
377
  MarketRewards memory marketRewards = _calculateMarketRewards(expectedLpFee);
378
378
 
379
379
  assertEq(marketRewards.creator + marketRewards.platformReferrer + marketRewards.protocol, expectedLpFee, "Secondary rewards incorrect");
380
- assertEq(
380
+ assertApproxEqAbs(
381
381
  protocolRewards.balanceOf(users.creator),
382
382
  initialTokenCreatorBalance + orderFees.creator + marketRewards.creator,
383
+ 0.0000000000000001 ether,
383
384
  "Token creator rewards incorrect"
384
385
  );
385
- assertEq(
386
+ assertApproxEqAbs(
386
387
  protocolRewards.balanceOf(users.platformReferrer),
387
388
  initialPlatformReferrerBalance + orderFees.platformReferrer + marketRewards.platformReferrer,
389
+ 0.0000000000000001 ether,
388
390
  "Platform referrer rewards incorrect"
389
391
  );
390
- assertEq(
392
+ assertApproxEqAbs(
391
393
  protocolRewards.balanceOf(users.feeRecipient),
392
394
  initialFeeRecipientBalance + orderFees.protocol + marketRewards.protocol,
395
+ 0.0000000000000001 ether,
393
396
  "Protocol rewards incorrect"
394
397
  );
395
398
  assertEq(protocolRewards.balanceOf(users.tradeReferrer), initialOrderReferrerBalance + orderFees.tradeReferrer, "Order referrer rewards incorrect");
@@ -438,6 +441,6 @@ contract CoinTest is BaseTest {
438
441
  }
439
442
 
440
443
  function test_contract_version() public view {
441
- assertEq(coin.contractVersion(), "0.1.1");
444
+ assertEq(coin.contractVersion(), "0.2.0");
442
445
  }
443
446
  }