create-ponder 0.1.0-next.7 → 0.1.0-next.8
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.
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/feature-factory/ponder.schema.ts +3 -3
- package/templates/feature-filter/ponder.schema.ts +3 -3
- package/templates/feature-multichain/ponder.schema.ts +3 -3
- package/templates/feature-proxy/ponder.schema.ts +3 -3
- package/templates/feature-read-contract/ponder.schema.ts +3 -3
- package/templates/project-friendtech/ponder.schema.ts +19 -7
- package/templates/project-uniswap-v3-flash/ponder.schema.ts +3 -3
- package/templates/reference-erc20/ponder.schema.ts +22 -10
- package/templates/reference-erc721/ponder.schema.ts +15 -8
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSchema } from "@ponder/core";
|
|
2
2
|
|
|
3
|
-
export default
|
|
3
|
+
export default createSchema((p) => ({
|
|
4
4
|
SwapEvent: p.createTable({
|
|
5
5
|
id: p.string(),
|
|
6
6
|
recipient: p.string(),
|
|
7
7
|
payer: p.string(),
|
|
8
8
|
}),
|
|
9
|
-
});
|
|
9
|
+
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSchema } from "@ponder/core";
|
|
2
2
|
|
|
3
|
-
export default
|
|
3
|
+
export default createSchema((p) => ({
|
|
4
4
|
LiquidationEvent: p.createTable({
|
|
5
5
|
id: p.string(),
|
|
6
6
|
liquidator: p.string(),
|
|
@@ -9,4 +9,4 @@ export default p.createSchema({
|
|
|
9
9
|
id: p.string(),
|
|
10
10
|
newOwner: p.string(),
|
|
11
11
|
}),
|
|
12
|
-
});
|
|
12
|
+
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSchema } from "@ponder/core";
|
|
2
2
|
|
|
3
|
-
export default
|
|
3
|
+
export default createSchema((p) => ({
|
|
4
4
|
File: p.createTable({
|
|
5
5
|
id: p.string(),
|
|
6
6
|
name: p.string(),
|
|
@@ -11,4 +11,4 @@ export default p.createSchema({
|
|
|
11
11
|
encoding: p.string().optional(),
|
|
12
12
|
compression: p.string().optional(),
|
|
13
13
|
}),
|
|
14
|
-
});
|
|
14
|
+
}));
|
|
@@ -1,17 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSchema } from "@ponder/core";
|
|
2
2
|
|
|
3
|
-
export default
|
|
3
|
+
export default createSchema((p) => ({
|
|
4
4
|
TradeType: p.createEnum(["BUY", "SELL"]),
|
|
5
5
|
Share: p.createTable({
|
|
6
6
|
id: p.bytes(),
|
|
7
|
+
|
|
7
8
|
subjectId: p.bytes().references("Subject.id"),
|
|
8
9
|
traderId: p.bytes().references("Trader.id"),
|
|
10
|
+
|
|
11
|
+
subject: p.one("subjectId"),
|
|
12
|
+
trader: p.one("traderId"),
|
|
13
|
+
|
|
9
14
|
shareAmount: p.bigint(),
|
|
10
15
|
}),
|
|
11
16
|
TradeEvent: p.createTable({
|
|
12
17
|
id: p.bytes(),
|
|
18
|
+
|
|
13
19
|
subjectId: p.bytes().references("Subject.id"),
|
|
14
20
|
traderId: p.bytes().references("Trader.id"),
|
|
21
|
+
|
|
22
|
+
subject: p.one("subjectId"),
|
|
23
|
+
trader: p.one("traderId"),
|
|
24
|
+
|
|
15
25
|
shareAmount: p.bigint(),
|
|
16
26
|
tradeType: p.enum("TradeType"),
|
|
17
27
|
ethAmount: p.bigint(),
|
|
@@ -29,8 +39,9 @@ export default p.createSchema({
|
|
|
29
39
|
earnings: p.bigint(),
|
|
30
40
|
traderVolume: p.bigint(),
|
|
31
41
|
protocolFeesGenerated: p.bigint(),
|
|
32
|
-
|
|
33
|
-
|
|
42
|
+
|
|
43
|
+
shares: p.many("Share.subjectId"),
|
|
44
|
+
trades: p.many("TradeEvent.subjectId"),
|
|
34
45
|
}),
|
|
35
46
|
Trader: p.createTable({
|
|
36
47
|
id: p.bytes(),
|
|
@@ -40,11 +51,12 @@ export default p.createSchema({
|
|
|
40
51
|
profit: p.bigint(),
|
|
41
52
|
subjectFeesPaid: p.bigint(),
|
|
42
53
|
protocolFeesPaid: p.bigint(),
|
|
43
|
-
|
|
44
|
-
|
|
54
|
+
|
|
55
|
+
shares: p.many("Share.traderId"),
|
|
56
|
+
trades: p.many("TradeEvent.traderId"),
|
|
45
57
|
}),
|
|
46
58
|
Protocol: p.createTable({
|
|
47
59
|
id: p.int(),
|
|
48
60
|
earnings: p.bigint(),
|
|
49
61
|
}),
|
|
50
|
-
});
|
|
62
|
+
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSchema } from "@ponder/core";
|
|
2
2
|
|
|
3
|
-
export default
|
|
3
|
+
export default createSchema((p) => ({
|
|
4
4
|
PoolTokens: p.createTable({
|
|
5
5
|
id: p.string(),
|
|
6
6
|
token0: p.string(),
|
|
@@ -14,4 +14,4 @@ export default p.createSchema({
|
|
|
14
14
|
id: p.string(),
|
|
15
15
|
amount: p.bigint(),
|
|
16
16
|
}),
|
|
17
|
-
});
|
|
17
|
+
}));
|
|
@@ -1,35 +1,47 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSchema } from "@ponder/core";
|
|
2
2
|
|
|
3
|
-
export default
|
|
3
|
+
export default createSchema((p) => ({
|
|
4
4
|
Account: p.createTable({
|
|
5
5
|
id: p.string(),
|
|
6
6
|
balance: p.bigint(),
|
|
7
|
-
approvals: p.virtual("Approval.ownerId"),
|
|
8
7
|
isOwner: p.boolean(),
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
approvals: p.many("Approval.ownerId"),
|
|
10
|
+
approvalOwnerEvents: p.many("ApprovalEvent.ownerId"),
|
|
11
|
+
approvalSpenderEvents: p.many("ApprovalEvent.spenderId"),
|
|
12
|
+
transferFromEvents: p.many("TransferEvent.fromId"),
|
|
13
|
+
transferToEvents: p.many("TransferEvent.toId"),
|
|
14
14
|
}),
|
|
15
15
|
Approval: p.createTable({
|
|
16
16
|
id: p.bytes(),
|
|
17
17
|
amount: p.bigint(),
|
|
18
|
+
|
|
18
19
|
ownerId: p.string().references("Account.id"),
|
|
19
20
|
spenderId: p.string().references("Account.id"),
|
|
21
|
+
|
|
22
|
+
owner: p.one("ownerId"),
|
|
23
|
+
spender: p.one("spenderId"),
|
|
20
24
|
}),
|
|
21
25
|
TransferEvent: p.createTable({
|
|
22
26
|
id: p.string(),
|
|
23
27
|
amount: p.bigint(),
|
|
28
|
+
timestamp: p.int(),
|
|
29
|
+
|
|
24
30
|
fromId: p.string().references("Account.id"),
|
|
25
31
|
toId: p.string().references("Account.id"),
|
|
26
|
-
|
|
32
|
+
|
|
33
|
+
from: p.one("fromId"),
|
|
34
|
+
to: p.one("toId"),
|
|
27
35
|
}),
|
|
28
36
|
ApprovalEvent: p.createTable({
|
|
29
37
|
id: p.string(),
|
|
30
38
|
amount: p.bigint(),
|
|
39
|
+
timestamp: p.int(),
|
|
40
|
+
|
|
31
41
|
ownerId: p.string().references("Account.id"),
|
|
32
42
|
spenderId: p.string().references("Account.id"),
|
|
33
|
-
|
|
43
|
+
|
|
44
|
+
owner: p.one("ownerId"),
|
|
45
|
+
spender: p.one("spenderId"),
|
|
34
46
|
}),
|
|
35
|
-
});
|
|
47
|
+
}));
|
|
@@ -1,22 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSchema } from "@ponder/core";
|
|
2
2
|
|
|
3
|
-
export default
|
|
3
|
+
export default createSchema((p) => ({
|
|
4
4
|
Account: p.createTable({
|
|
5
5
|
id: p.string(),
|
|
6
|
-
tokens: p.
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
tokens: p.many("Token.ownerId"),
|
|
7
|
+
|
|
8
|
+
transferFromEvents: p.many("TransferEvent.fromId"),
|
|
9
|
+
transferToEvents: p.many("TransferEvent.toId"),
|
|
9
10
|
}),
|
|
10
11
|
Token: p.createTable({
|
|
11
12
|
id: p.bigint(),
|
|
12
13
|
ownerId: p.string().references("Account.id"),
|
|
13
|
-
|
|
14
|
+
|
|
15
|
+
owner: p.one("ownerId"),
|
|
16
|
+
transferEvents: p.many("TransferEvent.tokenId"),
|
|
14
17
|
}),
|
|
15
18
|
TransferEvent: p.createTable({
|
|
16
19
|
id: p.string(),
|
|
20
|
+
timestamp: p.int(),
|
|
17
21
|
fromId: p.string().references("Account.id"),
|
|
18
22
|
toId: p.string().references("Account.id"),
|
|
19
23
|
tokenId: p.bigint().references("Token.id"),
|
|
20
|
-
|
|
24
|
+
|
|
25
|
+
from: p.one("fromId"),
|
|
26
|
+
to: p.one("toId"),
|
|
27
|
+
token: p.one("tokenId"),
|
|
21
28
|
}),
|
|
22
|
-
});
|
|
29
|
+
}));
|