@merkl/api 0.19.30 → 0.19.31

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.
@@ -77,9 +77,9 @@ export declare class GenericProcessor<Input extends callKeys, DataRaw extends da
77
77
  processingRound3(_typeInfo: DataRaw): void;
78
78
  processingRound4(_typeInfo: DataRaw): void;
79
79
  handleWhiteListBlacklistRound5(typeInfo: DataRaw, campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.ERC20LOGPROCESSOR> | CampaignParameters<Campaign.ERC20REBASELOGPROCESSOR> | CampaignParameters<Campaign.EULER>): {
80
- whitelistedSupplyTargetToken: number;
80
+ whitelistedSupplyTargetToken: any;
81
81
  totalSupply: any;
82
- blacklistedSupply: number;
82
+ blacklistedSupply: any;
83
83
  };
84
84
  processingRound5(_index: number, type: tokenType, typeInfo: DataRaw, _calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.ERC20LOGPROCESSOR> | CampaignParameters<Campaign.ERC20REBASELOGPROCESSOR> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<Output>;
85
85
  computeRound1(type: tokenType, typeInfo: DataRaw): tokenTypeStruct;
@@ -89,7 +89,7 @@ export declare class GenericProcessor<Input extends callKeys, DataRaw extends da
89
89
  computeRound5(index: number, type: tokenType, typeInfo: DataRaw, calls: string[], campaign: CampaignParameters<ERC20SupportedCampaignType>, pricer: Pricer): Promise<tokenTypeStruct>;
90
90
  generateWhitelistCall(type: tokenType, typeInfo: DataRaw, campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.ERC20LOGPROCESSOR> | CampaignParameters<Campaign.ERC20REBASELOGPROCESSOR> | CampaignParameters<Campaign.EULER>): CallDto[];
91
91
  generateBlackListCall(type: tokenType, typeInfo: DataRaw, campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.ERC20LOGPROCESSOR> | CampaignParameters<Campaign.ERC20REBASELOGPROCESSOR> | CampaignParameters<Campaign.EULER>): CallDto[];
92
- decodeListedSupply(index: number, decimals: number, list: string[], calls: string[]): string;
92
+ decodeListedSupply(index: number, list: string[], calls: string[]): string;
93
93
  decodeRound(round: callType[], index: number, calls: string[], type: tokenType, data: DataRaw): void;
94
94
  decodePreviousRound(round: Round, calls: string[], data: DataRaw, type: tokenType, index: number): void;
95
95
  decodePreviousStakingRound(round: Round, calls: string[], data: DataRaw, type: tokenType, index: number): void;
@@ -42,10 +42,14 @@ export class GenericProcessor {
42
42
  processingRound3(_typeInfo) { }
43
43
  processingRound4(_typeInfo) { }
44
44
  handleWhiteListBlacklistRound5(typeInfo, campaign) {
45
+ const blacklistedSupplyBN = BigInt(typeInfo.blacklistedSupply);
46
+ const totalSupplyBN = BigInt(typeInfo.totalSupply);
45
47
  const totalSupply = BN2Number(typeInfo.totalSupply, campaign.campaignParameters.decimalsTargetToken);
46
- const whitelistedSupply = Number(typeInfo.whitelistedSupply);
47
- const blacklistedSupply = Number(typeInfo.blacklistedSupply);
48
- let whitelistedSupplyTargetToken = whitelistedSupply ? whitelistedSupply : totalSupply - blacklistedSupply;
48
+ const whitelistedSupply = BN2Number(typeInfo.whitelistedSupply, campaign.campaignParameters.decimalsTargetToken);
49
+ const blacklistedSupply = BN2Number(typeInfo.blacklistedSupply, campaign.campaignParameters.decimalsTargetToken);
50
+ let whitelistedSupplyTargetToken = whitelistedSupply
51
+ ? whitelistedSupply
52
+ : BN2Number(totalSupplyBN - blacklistedSupplyBN, campaign.campaignParameters.decimalsTargetToken);
49
53
  whitelistedSupplyTargetToken = whitelistedSupplyTargetToken ? whitelistedSupplyTargetToken : 0.00001;
50
54
  return {
51
55
  whitelistedSupplyTargetToken,
@@ -162,9 +166,9 @@ export class GenericProcessor {
162
166
  };
163
167
  }
164
168
  async computeRound5(index, type, typeInfo, calls, campaign, pricer) {
165
- typeInfo.whitelistedSupply = this.decodeListedSupply(index, campaign.campaignParameters.decimalsTargetToken, campaign.campaignParameters.whitelist, calls);
169
+ typeInfo.whitelistedSupply = this.decodeListedSupply(index, campaign.campaignParameters.whitelist, calls);
166
170
  index = index + campaign.campaignParameters.whitelist.length;
167
- typeInfo.blacklistedSupply = this.decodeListedSupply(index, campaign.campaignParameters.decimalsTargetToken, campaign.campaignParameters.blacklist, calls);
171
+ typeInfo.blacklistedSupply = this.decodeListedSupply(index, campaign.campaignParameters.blacklist, calls);
168
172
  index = index + campaign.campaignParameters.blacklist.length;
169
173
  this.decodePreviousRound(Round.four, calls, typeInfo, type, index);
170
174
  if (typeInfo.isStaking === "true") {
@@ -210,13 +214,13 @@ export class GenericProcessor {
210
214
  }
211
215
  return blacklistedLiquidityCalls;
212
216
  }
213
- decodeListedSupply(index, decimals, list, calls) {
217
+ decodeListedSupply(index, list, calls) {
214
218
  if (list.length === 0) {
215
219
  return "0";
216
220
  }
217
- let listedSupply = 0;
221
+ let listedSupply = 0n;
218
222
  for (const _ of list) {
219
- listedSupply += BN2Number(decodeCall(calls, index++, "balanceOf"), decimals);
223
+ listedSupply += BigInt(decodeCall(calls, index++, "balanceOf"));
220
224
  }
221
225
  return listedSupply.toString();
222
226
  }
@@ -805,6 +805,7 @@ declare const EtherlinkInterfaceCampaigns: {
805
805
  maximumBoostInvited: number;
806
806
  cumulativeBoost: boolean;
807
807
  }[];
808
+ url: string;
808
809
  };
809
810
  "Hanji WETH/USDC Etherlink 0x65ea4dd7f789c71c0f57ed84b3bdc3062898d3cb": {
810
811
  campaignType: any;
@@ -842,6 +843,7 @@ declare const EtherlinkInterfaceCampaigns: {
842
843
  maximumBoostInvited: number;
843
844
  cumulativeBoost: boolean;
844
845
  }[];
846
+ url: string;
845
847
  };
846
848
  "Hanji WBTC/USDC Etherlink 0xbb6b01d94e3f6ebae8647cb56d544f57928ab758": {
847
849
  campaignType: any;
@@ -879,6 +881,7 @@ declare const EtherlinkInterfaceCampaigns: {
879
881
  maximumBoostInvited: number;
880
882
  cumulativeBoost: boolean;
881
883
  }[];
884
+ url: string;
882
885
  };
883
886
  };
884
887
  declare const SwapxInterfaceCampaigns: {
@@ -42,7 +42,7 @@ export var etherlinkCampaigns;
42
42
  })(etherlinkCampaigns || (etherlinkCampaigns = {}));
43
43
  const etherlinkReferralProgram = {
44
44
  hookType: HOOK.REFERRALPROGRAM,
45
- key: "merkl-test",
45
+ key: "apple-farm",
46
46
  chainId: ChainId.ETHERLINK,
47
47
  contractAddress: "0xF39CC381B91f36238c77f42B9fF4D45376F80E5b",
48
48
  contractState: contractStateBoost.SYNCHRONIZED,
@@ -57,8 +57,14 @@ const etherlinkReferralProgram = {
57
57
  };
58
58
  const blacklistEtherlink = [
59
59
  "0x8872642881C7C3f4124f3215a0D12CDf807EEB01",
60
- "0xA237E96Abc3180AF377EcF22aE590C02991f9b1F",
61
60
  "0x50D760f3a8630e620BC0D29E8031E8a37dEB4751",
61
+ "0xA237E96Abc3180AF377EcF22aE590C02991f9b1F",
62
+ "0x851CAD3E0b90C2535725eCeFcCDfeeb7996B9414",
63
+ "0x931ef6d9ea6FfFfd73D5F7CE35664BAD76cBc784",
64
+ "0xf663c334Ae22e9A086193A52918f873154Bdf2d4",
65
+ "0x6c1b204185A55E9DaA0bF026720Fe94458ddd89F",
66
+ "0x56A8b583276278513Eb78c3d132a80c1e81B9405",
67
+ "0x6a2f09Bc9E6b82b38FCa096792B94f36FAd657Ac",
62
68
  ];
63
69
  export var swapxCampaigns;
64
70
  (function (swapxCampaigns) {
@@ -555,7 +561,7 @@ const EtherlinkInterfaceCampaigns = {
555
561
  targetToken: "0x79052Ab3C166D4899a1e0DD033aC3b379AF0B1fD",
556
562
  whitelist: [],
557
563
  blacklist: blacklistEtherlink,
558
- url: "nan",
564
+ url: "https://www.uranium.io/",
559
565
  forwarders: [],
560
566
  },
561
567
  [etherlinkCampaigns.Hanji_HJLP]: {
@@ -593,8 +599,8 @@ const EtherlinkInterfaceCampaigns = {
593
599
  forwarders: [],
594
600
  isOutOfRangeIncentivized: false,
595
601
  weightFees: 6000,
596
- weightToken0: 0,
597
- weightToken1: 4000,
602
+ weightToken0: 2000,
603
+ weightToken1: 2000,
598
604
  },
599
605
  [etherlinkCampaigns.Iguana_XTZ_USDC]: {
600
606
  campaignType: Campaign.CLAMM,
@@ -634,13 +640,13 @@ const EtherlinkInterfaceCampaigns = {
634
640
  chainId: ChainId.ETHERLINK,
635
641
  contractAddress: "0xF39CC381B91f36238c77f42B9fF4D45376F80E5b",
636
642
  contractState: contractStateBoost.SYNCHRONIZED,
637
- boostForReferrer: boostingReferralFunction.ZERO,
638
- valueForBoostForReferrer: 1000000000,
639
- boostForInvited: boostingReferralFunction.ZERO,
640
- valueForBoostForInvited: 1000000000,
643
+ boostForReferrer: boostingReferralFunction.PROPORTIONAL,
644
+ valueForBoostForReferrer: 50000000,
645
+ boostForInvited: boostingReferralFunction.PROPORTIONAL,
646
+ valueForBoostForInvited: 50000000,
641
647
  defaultBoost: defaultReferralBoost.SCORE,
642
648
  maximumBoostReferrer: 0,
643
- maximumBoostInvited: 0,
649
+ maximumBoostInvited: 50000000,
644
650
  cumulativeBoost: false,
645
651
  },
646
652
  ],
@@ -678,6 +684,7 @@ const EtherlinkInterfaceCampaigns = {
678
684
  blacklist: blacklistEtherlink,
679
685
  forwarders: [],
680
686
  hooks: [etherlinkReferralProgram],
687
+ url: "https://app.hanji.io/trade/0xd0bc067cf877f7b76ceb331891331d9e6acda1a7",
681
688
  },
682
689
  [etherlinkCampaigns.Hanji_WETH_USDC]: {
683
690
  campaignType: Campaign.EVENT_BASED,
@@ -707,6 +714,7 @@ const EtherlinkInterfaceCampaigns = {
707
714
  blacklist: blacklistEtherlink,
708
715
  forwarders: [],
709
716
  hooks: [etherlinkReferralProgram],
717
+ url: "https://app.hanji.io/trade/0x65ea4dd7f789c71c0f57ed84b3bdc3062898d3cb",
710
718
  },
711
719
  [etherlinkCampaigns.Hanji_WBTC_USDC]: {
712
720
  campaignType: Campaign.EVENT_BASED,
@@ -736,6 +744,7 @@ const EtherlinkInterfaceCampaigns = {
736
744
  blacklist: blacklistEtherlink,
737
745
  forwarders: [],
738
746
  hooks: [etherlinkReferralProgram],
747
+ url: "https://app.hanji.io/trade/0xbb6b01d94e3f6ebae8647cb56d544f57928ab758",
739
748
  },
740
749
  };
741
750
  const SwapxInterfaceCampaigns = {