@merkl/api 0.20.131 → 0.20.132
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.
@@ -7,9 +7,11 @@ export class EventBasedMetadata {
|
|
7
7
|
let mainProtocolId = "reserve";
|
8
8
|
let name = `${params.eventID.split("(")[0]} on ${capitalize(mainProtocolId)}`;
|
9
9
|
let tokens = [];
|
10
|
+
let hardcodeUrl;
|
10
11
|
if (params.contract === "0xAED9261caa6A795178a4ab4D3Be62f2D01b2c214") {
|
11
12
|
mainProtocolId = "reserve";
|
12
13
|
name = "Trade BTC ETH DCA Index";
|
14
|
+
hardcodeUrl = "https://app.reserve.org/ethereum/index-dtf/0x4e3b170dcbe704b248df5f56d488114ace01b1c5/overview";
|
13
15
|
tokens = [
|
14
16
|
{ chainId: computeChainId, address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" },
|
15
17
|
{ chainId: computeChainId, address: "0x4E3B170DcBe704b248df5f56D488114acE01B1C5" },
|
@@ -18,6 +20,7 @@ export class EventBasedMetadata {
|
|
18
20
|
if (params.contract === "0xB76726B4befE761a1859C1c02E7d157142E077c0") {
|
19
21
|
mainProtocolId = "reserve";
|
20
22
|
name = "Trade Imagine The SMEL";
|
23
|
+
hardcodeUrl = "https://app.reserve.org/ethereum/index-dtf/0xf91384484f4717314798e8975bcd904a35fc2bf1/overview";
|
21
24
|
tokens = [
|
22
25
|
{ chainId: computeChainId, address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" },
|
23
26
|
{ chainId: computeChainId, address: "0xF91384484F4717314798E8975BCd904A35fc2BF1" },
|
@@ -26,6 +29,7 @@ export class EventBasedMetadata {
|
|
26
29
|
if (params.contract === "0xB986a32F468EdaD2F2F890094Ea39aE484FBCaF4") {
|
27
30
|
mainProtocolId = "reserve";
|
28
31
|
name = "Trade RWA Index";
|
32
|
+
hardcodeUrl = "https://app.reserve.org/ethereum/index-dtf/0xA5cdea03B11042fc10B52aF9eCa48bb17A2107d2/overview";
|
29
33
|
tokens = [
|
30
34
|
{ chainId: computeChainId, address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" },
|
31
35
|
{ chainId: computeChainId, address: "0xA5cdea03B11042fc10B52aF9eCa48bb17A2107d2" },
|
@@ -33,23 +37,26 @@ export class EventBasedMetadata {
|
|
33
37
|
}
|
34
38
|
if (params.contract === "0x1914256C2F70aAc87e097Cd8B07958e9F17F2BCd") {
|
35
39
|
mainProtocolId = "reserve";
|
36
|
-
name = "Trade ";
|
40
|
+
name = "Trade CoinDesk DeFi Select Index";
|
41
|
+
hardcodeUrl = "https://app.reserve.org/ethereum/index-dtf/0x188D12Eb13a5Eadd0867074ce8354B1AD6f4790b/overview";
|
37
42
|
tokens = [
|
38
|
-
{ chainId: computeChainId, address: "" },
|
39
|
-
{ chainId: computeChainId, address: "" },
|
43
|
+
{ chainId: computeChainId, address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" },
|
44
|
+
{ chainId: computeChainId, address: "0x188D12Eb13a5Eadd0867074ce8354B1AD6f4790b" },
|
40
45
|
];
|
41
46
|
}
|
42
47
|
if (params.contract === "0x4BaF786bd59022c942DceE4282b17D1bc681C99f") {
|
43
48
|
mainProtocolId = "reserve";
|
44
|
-
name = "Trade
|
49
|
+
name = "Trade DeFi Growth Index";
|
50
|
+
hardcodeUrl = "https://app.reserve.org/ethereum/index-dtf/0x9a1741E151233a82Cf69209A2F1bC7442B1fB29C/overview";
|
45
51
|
tokens = [
|
46
52
|
{ chainId: computeChainId, address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" },
|
47
|
-
{ chainId: computeChainId, address: "
|
53
|
+
{ chainId: computeChainId, address: "0x9a1741E151233a82Cf69209A2F1bC7442B1fB29C" },
|
48
54
|
];
|
49
55
|
}
|
50
56
|
if (params.contract === "0x479e82b60f5885A3569d618d027Ef1Ac2020Ee82") {
|
51
57
|
mainProtocolId = "reserve";
|
52
58
|
name = "Trade Large Cap DeFi Index";
|
59
|
+
hardcodeUrl = "https://app.reserve.org/ethereum/index-dtf/0x20d81101D254729a6E689418526bE31e2c544290/overview";
|
53
60
|
tokens = [
|
54
61
|
{ chainId: computeChainId, address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" },
|
55
62
|
{ chainId: computeChainId, address: "0x20d81101D254729a6E689418526bE31e2c544290" },
|
@@ -58,6 +65,7 @@ export class EventBasedMetadata {
|
|
58
65
|
if (params.contract === "0x477172B5176CC93e8766860fd58b0C640898080d") {
|
59
66
|
mainProtocolId = "reserve";
|
60
67
|
name = "Trade Base MemeIndexer DTF";
|
68
|
+
hardcodeUrl = "https://app.reserve.org/base/index-dtf/0xb8753941196692E322846cfEE9C14C97AC81928A/overview";
|
61
69
|
tokens = [
|
62
70
|
{ chainId: computeChainId, address: "0x4200000000000000000000000000000000000006" },
|
63
71
|
{ chainId: computeChainId, address: "0xb8753941196692E322846cfEE9C14C97AC81928A" },
|
@@ -66,6 +74,7 @@ export class EventBasedMetadata {
|
|
66
74
|
if (params.contract === "0xd19c0dbbC5Ba2eC4faa0e3FFf892F0E95F23D9e0") {
|
67
75
|
mainProtocolId = "reserve";
|
68
76
|
name = "Trade MarketVector Token Terminal Fundamental Index ";
|
77
|
+
hardcodeUrl = "https://app.reserve.org/base/index-dtf/0xe8b46b116D3BdFA787CE9CF3f5aCC78dc7cA380E/overview";
|
69
78
|
tokens = [
|
70
79
|
{ chainId: computeChainId, address: "0x4200000000000000000000000000000000000006" },
|
71
80
|
{ chainId: computeChainId, address: "0xe8b46b116D3BdFA787CE9CF3f5aCC78dc7cA380E" },
|
@@ -74,6 +83,7 @@ export class EventBasedMetadata {
|
|
74
83
|
if (params.contract === "0xD38d1AB8A150e6eE0AE70C86A8E9Fb0c83255b76") {
|
75
84
|
mainProtocolId = "reserve";
|
76
85
|
name = "Trade Bloomberg Galaxy Crypto Index";
|
86
|
+
hardcodeUrl = "https://app.reserve.org/base/index-dtf/0x23418De10d422AD71C9D5713a2B8991a9c586443/overview";
|
77
87
|
tokens = [
|
78
88
|
{ chainId: computeChainId, address: "0x4200000000000000000000000000000000000006" },
|
79
89
|
{ chainId: computeChainId, address: "0x23418De10d422AD71C9D5713a2B8991a9c586443" },
|
@@ -82,6 +92,7 @@ export class EventBasedMetadata {
|
|
82
92
|
if (params.contract === "0xF37631E6481e61011FbDccbCE714ab06A031FBa8") {
|
83
93
|
mainProtocolId = "reserve";
|
84
94
|
name = "Trade MarketVector Digital Assets 25 Index";
|
95
|
+
hardcodeUrl = "https://app.reserve.org/base/index-dtf/0xD600e748C17Ca237Fcb5967Fa13d688AFf17Be78/overview";
|
85
96
|
tokens = [
|
86
97
|
{ chainId: computeChainId, address: "0x4200000000000000000000000000000000000006" },
|
87
98
|
{ chainId: computeChainId, address: "0xD600e748C17Ca237Fcb5967Fa13d688AFf17Be78" },
|
@@ -90,6 +101,7 @@ export class EventBasedMetadata {
|
|
90
101
|
if (params.contract === "0x130C5bc30567987861620971C6B60C08D3784eF8") {
|
91
102
|
mainProtocolId = "reserve";
|
92
103
|
name = "Trade Virtuals Index";
|
104
|
+
hardcodeUrl = "https://app.reserve.org/base/index-dtf/0x47686106181b3CEfe4eAf94C4c10b48Ac750370b/overview";
|
93
105
|
tokens = [
|
94
106
|
{ chainId: computeChainId, address: "0x4200000000000000000000000000000000000006" },
|
95
107
|
{ chainId: computeChainId, address: "0x47686106181b3CEfe4eAf94C4c10b48Ac750370b" },
|
@@ -98,6 +110,7 @@ export class EventBasedMetadata {
|
|
98
110
|
if (params.contract === "0xeD5210Bd97d855E8BEc2389439B8487eEcC3FC60") {
|
99
111
|
mainProtocolId = "reserve";
|
100
112
|
name = "Trade AIndex";
|
113
|
+
hardcodeUrl = "https://app.reserve.org/base/index-dtf/0xfe45EDa533e97198d9f3dEEDA9aE6c147141f6F9/overview";
|
101
114
|
tokens = [
|
102
115
|
{ chainId: computeChainId, address: "0x4200000000000000000000000000000000000006" },
|
103
116
|
{ chainId: computeChainId, address: "0xfe45EDa533e97198d9f3dEEDA9aE6c147141f6F9" },
|
@@ -106,6 +119,7 @@ export class EventBasedMetadata {
|
|
106
119
|
if (params.contract === "0xFdCCD04DDCa9eCf052E8e9eF6BD09a9b323fBF49") {
|
107
120
|
mainProtocolId = "reserve";
|
108
121
|
name = "Trade Clanker Index ";
|
122
|
+
hardcodeUrl = "https://app.reserve.org/base/index-dtf/0x44551CA46Fa5592bb572E20043f7C3D54c85cAD7/overview";
|
109
123
|
tokens = [
|
110
124
|
{ chainId: computeChainId, address: "0x4200000000000000000000000000000000000006" },
|
111
125
|
{ chainId: computeChainId, address: "0x44551CA46Fa5592bb572E20043f7C3D54c85cAD7" },
|
@@ -114,6 +128,7 @@ export class EventBasedMetadata {
|
|
114
128
|
if (params.contract === "0xE207FAb5839CA5bCc0d930761755cC7d82C1f19c") {
|
115
129
|
mainProtocolId = "reserve";
|
116
130
|
name = "Trade Alpha Base Index";
|
131
|
+
hardcodeUrl = "https://app.reserve.org/base/index-dtf/0xeBcda5b80f62DD4DD2A96357b42BB6Facbf30267/overview";
|
117
132
|
tokens = [
|
118
133
|
{ chainId: computeChainId, address: "0x4200000000000000000000000000000000000006" },
|
119
134
|
{ chainId: computeChainId, address: "0xeBcda5b80f62DD4DD2A96357b42BB6Facbf30267" },
|
@@ -148,7 +163,7 @@ export class EventBasedMetadata {
|
|
148
163
|
name,
|
149
164
|
tokens,
|
150
165
|
mainProtocol: mainProtocolId,
|
151
|
-
depositUrl: EventBasedMetadata.generateUrl(computeChainId, params),
|
166
|
+
depositUrl: hardcodeUrl ?? EventBasedMetadata.generateUrl(computeChainId, params),
|
152
167
|
};
|
153
168
|
}
|
154
169
|
catch {
|
@@ -10,7 +10,6 @@ const MTW_INTERFACE = new Interface([
|
|
10
10
|
"function token() external view returns (address)",
|
11
11
|
]);
|
12
12
|
export async function merklChainData(chainId) {
|
13
|
-
const tokens = await TokenService.findManyObjectPerAddress({ chainId, verified: true });
|
14
13
|
const distributorAddress = registry(chainId)?.Merkl?.Distributor;
|
15
14
|
const distributionCreatorAddress = registry(chainId)?.Merkl?.DistributionCreator;
|
16
15
|
if (!distributorAddress || !distributionCreatorAddress) {
|
@@ -65,6 +64,10 @@ export async function merklChainData(chainId) {
|
|
65
64
|
message = DistributorCreatorInterface.decodeFunctionResult("message", result[i++].returnData)[0]?.toString();
|
66
65
|
}
|
67
66
|
catch { }
|
67
|
+
const tokens = await TokenService.findManyObjectPerAddress({
|
68
|
+
chainId,
|
69
|
+
id: DistributorCreatorInterface.decodeFunctionResult("getValidRewardTokens()", result[i].returnData)[0].map((t) => TokenService.hashId({ chainId, address: t.token })),
|
70
|
+
});
|
68
71
|
const validRewardTokens = DistributorCreatorInterface.decodeFunctionResult("getValidRewardTokens()", result[i++].returnData)[0].map((t) => {
|
69
72
|
const decimals = tokens[t.token]?.decimals ? tokens[t.token]?.decimals : undefined;
|
70
73
|
const symbol = tokens[t.token]?.symbol ? tokens[t.token]?.symbol : undefined;
|