@rareprotocol/rare-cli 1.0.2 → 1.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.
@@ -1,4 +1,4 @@
1
- export { d as CanonicalV4Pool, e as CanonicalV4Pools, f as ContractAddresses, a as CurrencyInfo, C as CurrencyInput, b as CurrencyName, g as CurrencyResolveResult, c as CustomCurrencyInfo, E as ETH_ADDRESS, P as PUBLIC_LISTING_TARGET, R as ResolvedCurrency, S as SupportedChain, h as canonicalV4Pools, i as chainIds, j as contractAddresses, k as currencyNames, l as defaultRpcUrls, m as getBatchListingAddress, n as getCanonicalRareEthPool, o as getCanonicalUsdcEthPool, p as getCanonicalV4Pools, q as getContractAddresses, r as getErc721ApprovalManagerAddress, s as getLiquidFactoryAddress, t as getRareMinterAddress, u as getSwapRouterAddress, v as getV4QuoterAddress, w as isSupportedChain, x as listCurrencies, y as requireContractAddress, z as resolveCurrency, A as resolveCurrencyInfo, B as supportedChains, D as viemChains } from './addresses-BE3luaB3.js';
1
+ export { d as CanonicalV4Pool, e as CanonicalV4Pools, f as ContractAddresses, a as CurrencyInfo, C as CurrencyInput, b as CurrencyName, g as CurrencyResolveResult, c as CustomCurrencyInfo, E as ETH_ADDRESS, P as PUBLIC_LISTING_TARGET, R as ResolvedCurrency, S as SupportedChain, h as canonicalV4Pools, i as ccipChainSelectors, j as chainIds, k as contractAddresses, l as currencyNames, m as defaultRpcUrls, n as getBatchListingAddress, o as getCanonicalRareEthPool, p as getCanonicalUsdcEthPool, q as getCanonicalV4Pools, r as getCcipChainSelector, s as getContractAddresses, t as getErc721ApprovalManagerAddress, u as getLiquidFactoryAddress, v as getRareBridgeAddress, w as getRareMinterAddress, x as getSwapRouterAddress, y as getV4QuoterAddress, z as isSupportedChain, A as listCurrencies, B as requireContractAddress, D as resolveCurrency, F as resolveCurrencyInfo, G as supportedChains, H as viemChains } from './addresses-CcGI_7v1.js';
2
2
  import 'viem';
3
3
 
4
4
  declare const auctionAbi: readonly [{
@@ -3730,6 +3730,94 @@ declare const rareMinterAbi: readonly [{
3730
3730
  readonly type: "function";
3731
3731
  }];
3732
3732
 
3733
+ declare const rareBridgeAbi: readonly [{
3734
+ readonly type: "function";
3735
+ readonly name: "getFee";
3736
+ readonly inputs: readonly [{
3737
+ readonly name: "_destinationChainSelector";
3738
+ readonly type: "uint64";
3739
+ readonly internalType: "uint64";
3740
+ }, {
3741
+ readonly name: "_destinationChainRecipient";
3742
+ readonly type: "address";
3743
+ readonly internalType: "address";
3744
+ }, {
3745
+ readonly name: "_distributionData";
3746
+ readonly type: "bytes";
3747
+ readonly internalType: "bytes";
3748
+ }, {
3749
+ readonly name: "_extraArgs";
3750
+ readonly type: "bytes";
3751
+ readonly internalType: "bytes";
3752
+ }, {
3753
+ readonly name: "_payFeesInLink";
3754
+ readonly type: "bool";
3755
+ readonly internalType: "bool";
3756
+ }];
3757
+ readonly outputs: readonly [{
3758
+ readonly name: "fee";
3759
+ readonly type: "uint256";
3760
+ readonly internalType: "uint256";
3761
+ }];
3762
+ readonly stateMutability: "view";
3763
+ }, {
3764
+ readonly type: "function";
3765
+ readonly name: "send";
3766
+ readonly inputs: readonly [{
3767
+ readonly name: "_destinationChainSelector";
3768
+ readonly type: "uint64";
3769
+ readonly internalType: "uint64";
3770
+ }, {
3771
+ readonly name: "_destinationChainRecipient";
3772
+ readonly type: "address";
3773
+ readonly internalType: "address";
3774
+ }, {
3775
+ readonly name: "_distributionData";
3776
+ readonly type: "bytes";
3777
+ readonly internalType: "bytes";
3778
+ }, {
3779
+ readonly name: "_extraArgs";
3780
+ readonly type: "bytes";
3781
+ readonly internalType: "bytes";
3782
+ }, {
3783
+ readonly name: "_payFeesInLink";
3784
+ readonly type: "bool";
3785
+ readonly internalType: "bool";
3786
+ }];
3787
+ readonly outputs: readonly [];
3788
+ readonly stateMutability: "payable";
3789
+ }, {
3790
+ readonly type: "event";
3791
+ readonly name: "MessageSent";
3792
+ readonly inputs: readonly [{
3793
+ readonly name: "messageId";
3794
+ readonly type: "bytes32";
3795
+ readonly indexed: true;
3796
+ readonly internalType: "bytes32";
3797
+ }, {
3798
+ readonly name: "destinationChainSelector";
3799
+ readonly type: "uint64";
3800
+ readonly indexed: true;
3801
+ readonly internalType: "uint64";
3802
+ }, {
3803
+ readonly name: "destinationChainRecipient";
3804
+ readonly type: "address";
3805
+ readonly indexed: true;
3806
+ readonly internalType: "address";
3807
+ }, {
3808
+ readonly name: "fee";
3809
+ readonly type: "uint256";
3810
+ readonly indexed: false;
3811
+ readonly internalType: "uint256";
3812
+ }, {
3813
+ readonly name: "payFeesInLink";
3814
+ readonly type: "bool";
3815
+ readonly indexed: false;
3816
+ readonly internalType: "bool";
3817
+ }];
3818
+ readonly anonymous: false;
3819
+ }];
3820
+
3733
3821
  declare const sovereignFactoryAbi: readonly [{
3734
3822
  readonly type: "function";
3735
3823
  readonly name: "SOVEREIGN_NFT";
@@ -4473,4 +4561,4 @@ declare const uniswapV4QuoterAbi: readonly [{
4473
4561
  readonly stateMutability: "nonpayable";
4474
4562
  }];
4475
4563
 
4476
- export { auctionAbi, batchAuctionHouseAbi, batchListingAbi, batchOfferAbi, collectionMintAbi, collectionOwnerAbi, factoryAbi, lazyBatchMintFactoryAbi, lazySovereignFactoryAbi, liquidEditionAbi, liquidFactoryAbi, liquidRouterAbi, rareMinterAbi, sovereignFactoryAbi, tokenAbi, uniswapV4QuoterAbi };
4564
+ export { auctionAbi, batchAuctionHouseAbi, batchListingAbi, batchOfferAbi, collectionMintAbi, collectionOwnerAbi, factoryAbi, lazyBatchMintFactoryAbi, lazySovereignFactoryAbi, liquidEditionAbi, liquidFactoryAbi, liquidRouterAbi, rareBridgeAbi, rareMinterAbi, sovereignFactoryAbi, tokenAbi, uniswapV4QuoterAbi };
package/dist/contracts.js CHANGED
@@ -29,6 +29,7 @@ var contractAddresses = {
29
29
  sepolia: {
30
30
  factory: getAddress("0x3c7526a0975156299ceef369b8ff3c01cc670523"),
31
31
  auction: getAddress("0xC8Edc7049b233641ad3723D6C60019D1c8771612"),
32
+ rareBridge: getAddress("0xdC168291658f6C5F1D0b33E573c4d289DCA9dD08"),
32
33
  sovereignFactory: getAddress("0x46B2850ba7787734F648A6848b5eDE0815C1F8Bf"),
33
34
  lazySovereignFactory: getAddress("0xc5B8Ad9003673a23d005A6448C74d8955a1a38fA"),
34
35
  rareMinter: getAddress("0xd28Dc0B89104d7BBd902F338a0193fF063617ccE"),
@@ -46,6 +47,7 @@ var contractAddresses = {
46
47
  mainnet: {
47
48
  factory: getAddress("0xAe8E375a268Ed6442bEaC66C6254d6De5AeD4aB1"),
48
49
  auction: getAddress("0x6D7c44773C52D396F43c2D511B81aa168E9a7a42"),
50
+ rareBridge: getAddress("0x88135dd0e7a8a2e42272dda89849a997ce2e83f7"),
49
51
  sovereignFactory: getAddress("0xe980ec62378529d95ba446433f4deb6324129c59"),
50
52
  lazySovereignFactory: getAddress("0xba798BD606d86D207ca2751510173532899117a1"),
51
53
  rareMinter: getAddress("0x5fa112EFeD8297bec0010b312208d223E0cE891E"),
@@ -56,19 +58,27 @@ var contractAddresses = {
56
58
  marketplaceSettings: getAddress("0x61DBF87164d33FD3695256DC8Ba74D3B1d304170"),
57
59
  erc20ApprovalManager: getAddress("0xa837a7eAff154Ab837617Cf7250648D3Ec0A4436"),
58
60
  erc721ApprovalManager: getAddress("0x4bb0Deea6d1A30C601338aAB776d394C2AE5c0F8"),
59
- liquidFactory: getAddress("0xbb4341CFd588a098e9aCE1D224178836426c4a8E"),
61
+ liquidFactory: getAddress("0x25f993C222fE5e891128a782A5168f1C78629540"),
60
62
  swapRouter: getAddress("0xEBd58EdA8408d9EA409f2c2bE8898BD9738f3583"),
61
63
  v4Quoter: getAddress("0x52F0E24D1c21C8A0cB1e5a5dD6198556BD9E1203")
62
64
  },
63
65
  base: {
64
66
  factory: getAddress("0xf776204233bfb52ba0ddff24810cbdbf3dbf94dd"),
65
- auction: getAddress("0x51c36ffb05e17ed80ee5c02fa83d7677c5613de2")
67
+ auction: getAddress("0x51c36ffb05e17ed80ee5c02fa83d7677c5613de2"),
68
+ rareBridge: getAddress("0x3b41e21094611d152a08d3691a70837f1a077dae")
66
69
  },
67
70
  "base-sepolia": {
68
71
  factory: getAddress("0x2b181ae0f1aea6fed75591b04991b1a3f9868d51"),
69
- auction: getAddress("0x1f0c946f0ee87acb268d50ede6c9b4d010af65d2")
72
+ auction: getAddress("0x1f0c946f0ee87acb268d50ede6c9b4d010af65d2"),
73
+ rareBridge: getAddress("0xca491bb62A7730E97F500510132C47633DDD0229")
70
74
  }
71
75
  };
76
+ var ccipChainSelectors = {
77
+ mainnet: 5009297550715157269n,
78
+ sepolia: 16015286601757825753n,
79
+ base: 15971525489660198786n,
80
+ "base-sepolia": 10344971235874465080n
81
+ };
72
82
  var canonicalV4Pools = {
73
83
  sepolia: {
74
84
  rareEthPool: {
@@ -247,6 +257,16 @@ function getRareMinterAddress(chain) {
247
257
  }
248
258
  return rareMinter;
249
259
  }
260
+ function getRareBridgeAddress(chain) {
261
+ const address = getContractAddresses(chain).rareBridge;
262
+ if (!address) {
263
+ throw new Error(`RareBridge is not configured on "${chain}". Supported RareBridge chains: mainnet, sepolia, base, base-sepolia.`);
264
+ }
265
+ return address;
266
+ }
267
+ function getCcipChainSelector(chain) {
268
+ return ccipChainSelectors[chain];
269
+ }
250
270
  function isSupportedChain(value) {
251
271
  return supportedChains.some((chain) => chain === value);
252
272
  }
@@ -3445,6 +3465,119 @@ var rareMinterAbi = [
3445
3465
  }
3446
3466
  ];
3447
3467
 
3468
+ // src/contracts/abis/rare-bridge.ts
3469
+ var rareBridgeAbi = [
3470
+ {
3471
+ type: "function",
3472
+ name: "getFee",
3473
+ inputs: [
3474
+ {
3475
+ name: "_destinationChainSelector",
3476
+ type: "uint64",
3477
+ internalType: "uint64"
3478
+ },
3479
+ {
3480
+ name: "_destinationChainRecipient",
3481
+ type: "address",
3482
+ internalType: "address"
3483
+ },
3484
+ {
3485
+ name: "_distributionData",
3486
+ type: "bytes",
3487
+ internalType: "bytes"
3488
+ },
3489
+ {
3490
+ name: "_extraArgs",
3491
+ type: "bytes",
3492
+ internalType: "bytes"
3493
+ },
3494
+ {
3495
+ name: "_payFeesInLink",
3496
+ type: "bool",
3497
+ internalType: "bool"
3498
+ }
3499
+ ],
3500
+ outputs: [
3501
+ {
3502
+ name: "fee",
3503
+ type: "uint256",
3504
+ internalType: "uint256"
3505
+ }
3506
+ ],
3507
+ stateMutability: "view"
3508
+ },
3509
+ {
3510
+ type: "function",
3511
+ name: "send",
3512
+ inputs: [
3513
+ {
3514
+ name: "_destinationChainSelector",
3515
+ type: "uint64",
3516
+ internalType: "uint64"
3517
+ },
3518
+ {
3519
+ name: "_destinationChainRecipient",
3520
+ type: "address",
3521
+ internalType: "address"
3522
+ },
3523
+ {
3524
+ name: "_distributionData",
3525
+ type: "bytes",
3526
+ internalType: "bytes"
3527
+ },
3528
+ {
3529
+ name: "_extraArgs",
3530
+ type: "bytes",
3531
+ internalType: "bytes"
3532
+ },
3533
+ {
3534
+ name: "_payFeesInLink",
3535
+ type: "bool",
3536
+ internalType: "bool"
3537
+ }
3538
+ ],
3539
+ outputs: [],
3540
+ stateMutability: "payable"
3541
+ },
3542
+ {
3543
+ type: "event",
3544
+ name: "MessageSent",
3545
+ inputs: [
3546
+ {
3547
+ name: "messageId",
3548
+ type: "bytes32",
3549
+ indexed: true,
3550
+ internalType: "bytes32"
3551
+ },
3552
+ {
3553
+ name: "destinationChainSelector",
3554
+ type: "uint64",
3555
+ indexed: true,
3556
+ internalType: "uint64"
3557
+ },
3558
+ {
3559
+ name: "destinationChainRecipient",
3560
+ type: "address",
3561
+ indexed: true,
3562
+ internalType: "address"
3563
+ },
3564
+ {
3565
+ name: "fee",
3566
+ type: "uint256",
3567
+ indexed: false,
3568
+ internalType: "uint256"
3569
+ },
3570
+ {
3571
+ name: "payFeesInLink",
3572
+ type: "bool",
3573
+ indexed: false,
3574
+ internalType: "bool"
3575
+ }
3576
+ ],
3577
+ anonymous: false
3578
+ }
3579
+ ];
3580
+
3448
3581
  // src/contracts/abis/sovereign-factory.ts
3449
3582
  var sovereignFactoryAbi = [
3450
3583
  {
@@ -4312,6 +4445,7 @@ export {
4312
4445
  batchListingAbi,
4313
4446
  batchOfferAbi,
4314
4447
  canonicalV4Pools,
4448
+ ccipChainSelectors,
4315
4449
  chainIds,
4316
4450
  collectionMintAbi,
4317
4451
  collectionOwnerAbi,
@@ -4323,9 +4457,11 @@ export {
4323
4457
  getCanonicalRareEthPool,
4324
4458
  getCanonicalUsdcEthPool,
4325
4459
  getCanonicalV4Pools,
4460
+ getCcipChainSelector,
4326
4461
  getContractAddresses,
4327
4462
  getErc721ApprovalManagerAddress,
4328
4463
  getLiquidFactoryAddress,
4464
+ getRareBridgeAddress,
4329
4465
  getRareMinterAddress,
4330
4466
  getSwapRouterAddress,
4331
4467
  getV4QuoterAddress,
@@ -4336,6 +4472,7 @@ export {
4336
4472
  liquidFactoryAbi,
4337
4473
  liquidRouterAbi,
4338
4474
  listCurrencies,
4475
+ rareBridgeAbi,
4339
4476
  rareMinterAbi,
4340
4477
  requireContractAddress,
4341
4478
  resolveCurrency,