@evergonlabs/tmi-protocol-indexer 0.1.0 → 0.1.2
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.
|
@@ -16,6 +16,11 @@ export declare enum FractionSaleEventEnum {
|
|
|
16
16
|
WITHDRAW_NON_WRAPPED = "withdraw_non_wrapped",
|
|
17
17
|
REFUND = "refund"
|
|
18
18
|
}
|
|
19
|
+
export type IWrappedAssetAmount = {
|
|
20
|
+
tokenAddress: Address;
|
|
21
|
+
amount: bigint;
|
|
22
|
+
tokenId: bigint;
|
|
23
|
+
};
|
|
19
24
|
export type IFractionEventData<TEvent extends FractionSaleEventEnum = FractionSaleEventEnum> = {
|
|
20
25
|
[FractionSaleEventEnum.CREATED]: {
|
|
21
26
|
type: FractionSaleEventEnum.CREATED;
|
|
@@ -29,12 +34,15 @@ export type IFractionEventData<TEvent extends FractionSaleEventEnum = FractionSa
|
|
|
29
34
|
purchaser: Address;
|
|
30
35
|
priceId: bigint;
|
|
31
36
|
amountOfFractions: bigint;
|
|
37
|
+
amountPaid: bigint;
|
|
38
|
+
amountBurnt: bigint;
|
|
32
39
|
};
|
|
33
40
|
[FractionSaleEventEnum.CLAIM]: {
|
|
34
41
|
type: FractionSaleEventEnum.CLAIM;
|
|
35
42
|
receiver: Address;
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
claimId: bigint;
|
|
44
|
+
fractionsBurnt: bigint;
|
|
45
|
+
received: IWrappedAssetAmount[];
|
|
38
46
|
};
|
|
39
47
|
[FractionSaleEventEnum.WITHDRAW]: {
|
|
40
48
|
type: FractionSaleEventEnum.WITHDRAW;
|
|
@@ -42,7 +50,8 @@ export type IFractionEventData<TEvent extends FractionSaleEventEnum = FractionSa
|
|
|
42
50
|
};
|
|
43
51
|
[FractionSaleEventEnum.WITHDRAW_NON_WRAPPED]: {
|
|
44
52
|
type: FractionSaleEventEnum.WITHDRAW_NON_WRAPPED;
|
|
45
|
-
|
|
53
|
+
receiver: Address;
|
|
54
|
+
received: IWrappedAssetAmount[];
|
|
46
55
|
};
|
|
47
56
|
[FractionSaleEventEnum.REFUND]: {
|
|
48
57
|
type: FractionSaleEventEnum.REFUND;
|
|
@@ -385,7 +394,7 @@ export declare const fractionsSaleActivity: import("ponder").OnchainTable<{
|
|
|
385
394
|
}, {}, {}>;
|
|
386
395
|
};
|
|
387
396
|
extra: {
|
|
388
|
-
pk: import("ponder").PrimaryKeyBuilder<"chainId" | "transactionHash">;
|
|
397
|
+
pk: import("ponder").PrimaryKeyBuilder<"chainId" | "saleId" | "transactionHash">;
|
|
389
398
|
fromIdx: import("drizzle-orm/pg-core").IndexBuilder;
|
|
390
399
|
chainIdIdx: import("drizzle-orm/pg-core").IndexBuilder;
|
|
391
400
|
};
|
|
@@ -716,6 +725,23 @@ export declare const fractionsSale: import("ponder").OnchainTable<{
|
|
|
716
725
|
identity: undefined;
|
|
717
726
|
generated: undefined;
|
|
718
727
|
}, {}, {}>;
|
|
728
|
+
otcPrice: import("drizzle-orm/pg-core").PgColumn<{
|
|
729
|
+
name: "otc_price";
|
|
730
|
+
tableName: "fractions_sale";
|
|
731
|
+
dataType: "bigint";
|
|
732
|
+
columnType: "PgEvmBigint";
|
|
733
|
+
data: bigint;
|
|
734
|
+
driverParam: string;
|
|
735
|
+
notNull: true;
|
|
736
|
+
hasDefault: true;
|
|
737
|
+
isPrimaryKey: false;
|
|
738
|
+
isAutoincrement: false;
|
|
739
|
+
hasRuntimeDefault: false;
|
|
740
|
+
enumValues: undefined;
|
|
741
|
+
baseColumn: never;
|
|
742
|
+
identity: undefined;
|
|
743
|
+
generated: undefined;
|
|
744
|
+
}, {}, {}>;
|
|
719
745
|
softCap: import("drizzle-orm/pg-core").PgColumn<{
|
|
720
746
|
name: "soft_cap";
|
|
721
747
|
tableName: "fractions_sale";
|
|
@@ -1259,6 +1285,40 @@ export declare const fractionsPurchase: import("ponder").OnchainTable<{
|
|
|
1259
1285
|
identity: undefined;
|
|
1260
1286
|
generated: undefined;
|
|
1261
1287
|
}, {}, {}>;
|
|
1288
|
+
amountPaid: import("drizzle-orm/pg-core").PgColumn<{
|
|
1289
|
+
name: "amount_paid";
|
|
1290
|
+
tableName: "fractions_purchase";
|
|
1291
|
+
dataType: "bigint";
|
|
1292
|
+
columnType: "PgEvmBigint";
|
|
1293
|
+
data: bigint;
|
|
1294
|
+
driverParam: string;
|
|
1295
|
+
notNull: true;
|
|
1296
|
+
hasDefault: false;
|
|
1297
|
+
isPrimaryKey: false;
|
|
1298
|
+
isAutoincrement: false;
|
|
1299
|
+
hasRuntimeDefault: false;
|
|
1300
|
+
enumValues: undefined;
|
|
1301
|
+
baseColumn: never;
|
|
1302
|
+
identity: undefined;
|
|
1303
|
+
generated: undefined;
|
|
1304
|
+
}, {}, {}>;
|
|
1305
|
+
amountBurnt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1306
|
+
name: "amount_burnt";
|
|
1307
|
+
tableName: "fractions_purchase";
|
|
1308
|
+
dataType: "bigint";
|
|
1309
|
+
columnType: "PgEvmBigint";
|
|
1310
|
+
data: bigint;
|
|
1311
|
+
driverParam: string;
|
|
1312
|
+
notNull: true;
|
|
1313
|
+
hasDefault: false;
|
|
1314
|
+
isPrimaryKey: false;
|
|
1315
|
+
isAutoincrement: false;
|
|
1316
|
+
hasRuntimeDefault: false;
|
|
1317
|
+
enumValues: undefined;
|
|
1318
|
+
baseColumn: never;
|
|
1319
|
+
identity: undefined;
|
|
1320
|
+
generated: undefined;
|
|
1321
|
+
}, {}, {}>;
|
|
1262
1322
|
priceId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1263
1323
|
name: "price_id";
|
|
1264
1324
|
tableName: "fractions_purchase";
|
|
@@ -1444,6 +1504,25 @@ export declare const fractionsClaim: import("ponder").OnchainTable<{
|
|
|
1444
1504
|
identity: undefined;
|
|
1445
1505
|
generated: undefined;
|
|
1446
1506
|
}, {}, {}>;
|
|
1507
|
+
received: import("drizzle-orm/pg-core").PgColumn<{
|
|
1508
|
+
name: "received";
|
|
1509
|
+
tableName: "fractions_claim";
|
|
1510
|
+
dataType: "json";
|
|
1511
|
+
columnType: "PgJson";
|
|
1512
|
+
data: [];
|
|
1513
|
+
driverParam: unknown;
|
|
1514
|
+
notNull: true;
|
|
1515
|
+
hasDefault: false;
|
|
1516
|
+
isPrimaryKey: false;
|
|
1517
|
+
isAutoincrement: false;
|
|
1518
|
+
hasRuntimeDefault: false;
|
|
1519
|
+
enumValues: undefined;
|
|
1520
|
+
baseColumn: never;
|
|
1521
|
+
identity: undefined;
|
|
1522
|
+
generated: undefined;
|
|
1523
|
+
}, {}, {
|
|
1524
|
+
$type: [];
|
|
1525
|
+
}>;
|
|
1447
1526
|
transactionHash: import("drizzle-orm/pg-core").PgColumn<{
|
|
1448
1527
|
name: "tx_hash";
|
|
1449
1528
|
tableName: "fractions_claim";
|
|
@@ -62,7 +62,7 @@ export const fractionsSaleActivity = onchainTable("fractions_sale_activity", (t)
|
|
|
62
62
|
updatedAt: t.timestamp("updated_at").notNull(),
|
|
63
63
|
}), (table) => ({
|
|
64
64
|
pk: primaryKey({
|
|
65
|
-
columns: [table.chainId, table.transactionHash],
|
|
65
|
+
columns: [table.chainId, table.transactionHash, table.saleId],
|
|
66
66
|
}),
|
|
67
67
|
fromIdx: index().on(table.from),
|
|
68
68
|
chainIdIdx: index().on(table.chainId),
|
|
@@ -118,6 +118,7 @@ export const fractionsSale = onchainTable("fractions_sale", (t) => ({
|
|
|
118
118
|
creator: t.hex("address").notNull(),
|
|
119
119
|
status: t.varchar("status").notNull().default("created"),
|
|
120
120
|
fractionPrice: t.bigint("fraction_price").notNull().default(0n),
|
|
121
|
+
otcPrice: t.bigint("otc_price").notNull().default(0n),
|
|
121
122
|
softCap: t.bigint("soft_cap"),
|
|
122
123
|
hardCap: t.bigint("hard_cap"),
|
|
123
124
|
softCapPerAccount: t.bigint("soft_cap_per_account"),
|
|
@@ -197,6 +198,8 @@ export const fractionsPurchase = onchainTable("fractions_purchase", (t) => ({
|
|
|
197
198
|
diamondAddress: t.hex("diamond_address").notNull(),
|
|
198
199
|
buyerAddress: t.hex("buyer_address").notNull(),
|
|
199
200
|
amountOfFractions: t.bigint("amount_of_fractions").notNull(),
|
|
201
|
+
amountPaid: t.bigint("amount_paid").notNull(),
|
|
202
|
+
amountBurnt: t.bigint("amount_burnt").notNull(),
|
|
200
203
|
priceId: t.bigint("price_id").notNull(),
|
|
201
204
|
transactionHash: t.hex("tx_hash").notNull(),
|
|
202
205
|
createdAt: t.timestamp("created_at").notNull(),
|
|
@@ -221,6 +224,7 @@ export const fractionsClaim = onchainTable("fractions_claim", (t) => ({
|
|
|
221
224
|
saleId: t.bigint("sale_id").notNull(),
|
|
222
225
|
semiFungibleBurntId: t.bigint("semi_fungible_burnt_id").notNull(),
|
|
223
226
|
amountOfFractionsBurnt: t.bigint("amount_of_fractions_burnt").notNull(),
|
|
227
|
+
received: t.json("received").$type().notNull(),
|
|
224
228
|
transactionHash: t.hex("tx_hash").notNull(),
|
|
225
229
|
createdAt: t.timestamp("created_at").notNull(),
|
|
226
230
|
updatedAt: t.timestamp("updated_at").notNull(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evergonlabs/tmi-protocol-indexer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -14,25 +14,26 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@evergonlabs/tmi-contracts-fractions-sdk": "1.1.0",
|
|
17
|
+
"@evergonlabs/tmi-contracts-fractions-sdk": "npm:@evergonlabs/tmi-contracts-fractions-sdk@1.1.0",
|
|
18
|
+
"@evergonlabs/fraction-protocol-sdk-next": "npm:@evergonlabs/fraction-protocol-sdk@2.0.0-beta",
|
|
18
19
|
"@evergonlabs/tmi-contracts-staking-sdk": "^0.1.0",
|
|
19
|
-
"@evergonlabs/tmi-evm-contracts": "0.
|
|
20
|
+
"@evergonlabs/tmi-evm-contracts": "0.6.0",
|
|
20
21
|
"drizzle-orm": "0.41.0",
|
|
21
|
-
"hono": "^4.
|
|
22
|
+
"hono": "^4.9.7",
|
|
22
23
|
"kysely": "^0.26.3",
|
|
23
24
|
"ponder": "^0.11.4",
|
|
24
25
|
"type-fest": "^4.33.0",
|
|
25
|
-
"zod": "^3.
|
|
26
|
-
"@evergonlabs/tmi-protocol-fractions-sdk": "0.2.
|
|
27
|
-
"@evergonlabs/tmi-protocol-
|
|
28
|
-
"@evergonlabs/tmi-protocol-
|
|
29
|
-
"@evergonlabs/tmi-protocol-
|
|
26
|
+
"zod": "^3.25.0",
|
|
27
|
+
"@evergonlabs/tmi-protocol-fractions-sdk": "0.2.1",
|
|
28
|
+
"@evergonlabs/tmi-protocol-staking-sdk": "0.2.1",
|
|
29
|
+
"@evergonlabs/tmi-protocol-types": "0.2.1",
|
|
30
|
+
"@evergonlabs/tmi-protocol-utils": "0.2.1"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
33
|
"@evergonlabs/tmi-eslint-config": "^0.1.3",
|
|
33
34
|
"@evergonlabs/tmi-typescript-config": "^0.2.0",
|
|
34
|
-
"@topcli/prompts": "^2.1.0",
|
|
35
35
|
"abitype": "^1.0.8",
|
|
36
|
+
"dotenv": "^17.2.2",
|
|
36
37
|
"eslint": "^9.21.0",
|
|
37
38
|
"jiti": "^2.4.2",
|
|
38
39
|
"kleur": "^4.1.5",
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
"db": "ponder db",
|
|
61
62
|
"lint": "eslint .",
|
|
62
63
|
"serve": "ponder serve",
|
|
63
|
-
"start": "ponder start --schema=${DATABASE_SCHEMA} --views-schema=
|
|
64
|
-
"start:
|
|
64
|
+
"start": "ponder start --schema=${DATABASE_SCHEMA} --views-schema=v3 -- --network=${ENVIRONMENT}",
|
|
65
|
+
"start:local": "ponder dev -v -- --network=local --schema=v01"
|
|
65
66
|
}
|
|
66
67
|
}
|