You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** The request key of the event (e.g., "vyL1rMR_qbkoi8yUW3ktEeBU9XzdWSEaoe1GdPLL3j4"). */
54
55
declarerequestkey: string;
55
56
declaretransaction: Transaction;
57
+
58
+
declareorderIndex: number;
56
59
}
57
60
58
61
Event.init(
59
62
{
60
-
id: {type: DataTypes.INTEGER,autoIncrement: true,primaryKey: true,comment: "The unique identifier for the event record (e.g., 5985644)."},
61
-
transactionId: {type: DataTypes.INTEGER,allowNull: true,comment: "The ID of the associated transaction (e.g., 4134355)."},
62
-
payloadHash: {type: DataTypes.STRING,allowNull: false,comment: "The payload hash of the event (e.g., '3NzEURi0GMMMEwbAbNMrjAwoPR7hDwLROe5aLityoBo')."},
63
-
chainId: {type: DataTypes.INTEGER,allowNull: false,comment: "The ID of the blockchain network (e.g., 0)."},
64
-
module: {type: DataTypes.STRING,allowNull: false,comment: "The module associated with the event (e.g., 'coin')."},
65
-
modulehash: {type: DataTypes.STRING,allowNull: false,comment: "The hash of the module (e.g., 'klFkrLfpyLW-M3xjVPSdqXEMgxPPJibRt_D6qiBws6s')."},
66
-
name: {type: DataTypes.STRING,allowNull: false,comment: "The name of the event (e.g., 'TRANSFER')."},
67
-
params: {type: DataTypes.JSONB,allowNull: false,comment: "The parameters of the event (e.g., ['k:ec48fcadd0649a4230800668ca5bb17d1a91f14daf87a56cb954964055994031', 'k:e7f7130f359fb1f8c87873bf858a0e9cbc3c1059f62ae715ec72e760b055e9f3', 0.000969])."},
68
-
paramtext: {type: DataTypes.JSONB,allowNull: false,comment: "The text representation of the parameters (e.g., ['k:ec48fcadd0649a4230800668ca5bb17d1a91f14daf87a56cb954964055994031', 'k:e7f7130f359fb1f8c87873bf858a0e9cbc3c1059f62ae715ec72e760b055e9f3', 0.000969])."},
69
-
qualname: {type: DataTypes.STRING,allowNull: false,comment: "The qualified name of the event (e.g., 'coin')."},
70
-
requestkey: {type: DataTypes.STRING,allowNull: false,comment: "The request key of the event (e.g., 'vyL1rMR_qbkoi8yUW3ktEeBU9XzdWSEaoe1GdPLL3j4')."},
63
+
id: {
64
+
type: DataTypes.INTEGER,
65
+
autoIncrement: true,
66
+
primaryKey: true,
67
+
comment: "The unique identifier for the event record (e.g., 5985644).",
68
+
},
69
+
transactionId: {
70
+
type: DataTypes.INTEGER,
71
+
allowNull: true,
72
+
comment: "The ID of the associated transaction (e.g., 4134355).",
73
+
},
74
+
payloadHash: {
75
+
type: DataTypes.STRING,
76
+
allowNull: false,
77
+
comment:
78
+
"The payload hash of the event (e.g., '3NzEURi0GMMMEwbAbNMrjAwoPR7hDwLROe5aLityoBo').",
79
+
},
80
+
chainId: {
81
+
type: DataTypes.INTEGER,
82
+
allowNull: false,
83
+
comment: "The ID of the blockchain network (e.g., 0).",
84
+
},
85
+
module: {
86
+
type: DataTypes.STRING,
87
+
allowNull: false,
88
+
comment: "The module associated with the event (e.g., 'coin').",
89
+
},
90
+
modulehash: {
91
+
type: DataTypes.STRING,
92
+
allowNull: false,
93
+
comment:
94
+
"The hash of the module (e.g., 'klFkrLfpyLW-M3xjVPSdqXEMgxPPJibRt_D6qiBws6s').",
95
+
},
96
+
name: {
97
+
type: DataTypes.STRING,
98
+
allowNull: false,
99
+
comment: "The name of the event (e.g., 'TRANSFER').",
100
+
},
101
+
params: {
102
+
type: DataTypes.JSONB,
103
+
allowNull: false,
104
+
comment:
105
+
"The parameters of the event (e.g., ['k:ec48fcadd0649a4230800668ca5bb17d1a91f14daf87a56cb954964055994031', 'k:e7f7130f359fb1f8c87873bf858a0e9cbc3c1059f62ae715ec72e760b055e9f3', 0.000969]).",
106
+
},
107
+
paramtext: {
108
+
type: DataTypes.JSONB,
109
+
allowNull: false,
110
+
comment:
111
+
"The text representation of the parameters (e.g., ['k:ec48fcadd0649a4230800668ca5bb17d1a91f14daf87a56cb954964055994031', 'k:e7f7130f359fb1f8c87873bf858a0e9cbc3c1059f62ae715ec72e760b055e9f3', 0.000969]).",
112
+
},
113
+
qualname: {
114
+
type: DataTypes.STRING,
115
+
allowNull: false,
116
+
comment: "The qualified name of the event (e.g., 'coin').",
117
+
},
118
+
requestkey: {
119
+
type: DataTypes.STRING,
120
+
allowNull: false,
121
+
comment:
122
+
"The request key of the event (e.g., 'vyL1rMR_qbkoi8yUW3ktEeBU9XzdWSEaoe1GdPLL3j4').",
@@ -60,9 +60,6 @@ class Transfer extends Model<TransferAttributes> implements TransferAttributes {
60
60
/** The account to which the transfer was made (e.g., "k:251efb06f3b798dbe7bb3f58f535b67b0a9ed2da9aa4e2367be4abc07cc927fa"). */
61
61
declareto_acct: string;
62
62
63
-
/** The network name (e.g., "mainnet01"). */
64
-
declarenetwork: string;
65
-
66
63
/** Whether the transfer has a token ID (e.g., false). */
67
64
declarehasTokenId: boolean;
68
65
@@ -74,26 +71,100 @@ class Transfer extends Model<TransferAttributes> implements TransferAttributes {
74
71
75
72
/* Whether the transfer is canonical */
76
73
declarecanonical?: boolean;
74
+
75
+
/* The transfer order */
76
+
declareorderIndex?: number;
77
77
}
78
78
79
79
Transfer.init(
80
80
{
81
-
id: {type: DataTypes.INTEGER,autoIncrement: true,primaryKey: true,comment: "The unique identifier for the transfer record (e.g., 1799984)."},
82
-
transactionId: {type: DataTypes.INTEGER,allowNull: true,comment: "The ID of the associated transaction (e.g., 2022215)."},
83
-
type: {type: DataTypes.STRING,allowNull: false,comment: "The type of the transfer (e.g., 'fungible')."},
84
-
amount: {type: DataTypes.DECIMAL,allowNull: false,comment: "The amount transferred (e.g., 0.0003112)."},
85
-
payloadHash: {type: DataTypes.STRING,allowNull: false,comment: "The payload hash of the transfer (e.g., 'UVboyJrggtoJBUSgCvTfCMrfGjxiZ7tvRQ_k_f5Mr6I')."},
86
-
chainId: {type: DataTypes.INTEGER,allowNull: false,comment: "The ID of the blockchain network (e.g., 0)."},
87
-
from_acct: {type: DataTypes.STRING,allowNull: false,comment: "The account from which the transfer was made (e.g., 'k:6fdc4bdbd5bd319466d7b83d85465d8a5a5546bf3b9aababb77aac7bb44241aa')."},
88
-
modulehash: {type: DataTypes.STRING,allowNull: false,comment: "The hash of the module (e.g., 'klFkrLfpyLW-M3xjVPSdqXEMgxPPJibRt_D6qiBws6s')."},
89
-
modulename: {type: DataTypes.STRING,allowNull: false,comment: "The name of the module (e.g., 'coin')."},
90
-
requestkey: {type: DataTypes.STRING,allowNull: false,comment: "The request key of the transfer (e.g., 'y2XuhnGPkvptF-scYTnMfdcD2zokQf-HyOu-qngAm9s')."},
91
-
to_acct: {type: DataTypes.STRING,allowNull: false,comment: "The account to which the transfer was made (e.g., 'k:251efb06f3b798dbe7bb3f58f535b67b0a9ed2da9aa4e2367be4abc07cc927fa')."},
92
-
network: {type: DataTypes.STRING,allowNull: false,comment: "The network name (e.g., 'mainnet01')."},
93
-
hasTokenId: {type: DataTypes.BOOLEAN,allowNull: true,comment: "Whether the transfer has a token ID (e.g., true)."},
94
-
tokenId: {type: DataTypes.STRING,allowNull: true,comment: "The token ID associated with the transfer (optional, e.g., 't:DowR5LB9h6n96kxFRXDLSuSs1yh100Pk6STuUQNpseM')."},
95
-
contractId: {type: DataTypes.INTEGER,allowNull: true,comment: "The ID of the associated contract (optional, e.g., 1)."},
96
-
canonical: {type: DataTypes.BOOLEAN,allowNull: true,comment: "Whether the transfer is canonical"},
81
+
id: {
82
+
type: DataTypes.INTEGER,
83
+
autoIncrement: true,
84
+
primaryKey: true,
85
+
comment: "The unique identifier for the transfer record (e.g., 1799984).",
86
+
},
87
+
transactionId: {
88
+
type: DataTypes.INTEGER,
89
+
allowNull: true,
90
+
comment: "The ID of the associated transaction (e.g., 2022215).",
91
+
},
92
+
type: {
93
+
type: DataTypes.STRING,
94
+
allowNull: false,
95
+
comment: "The type of the transfer (e.g., 'fungible').",
96
+
},
97
+
amount: {
98
+
type: DataTypes.DECIMAL,
99
+
allowNull: false,
100
+
comment: "The amount transferred (e.g., 0.0003112).",
101
+
},
102
+
payloadHash: {
103
+
type: DataTypes.STRING,
104
+
allowNull: false,
105
+
comment:
106
+
"The payload hash of the transfer (e.g., 'UVboyJrggtoJBUSgCvTfCMrfGjxiZ7tvRQ_k_f5Mr6I').",
107
+
},
108
+
chainId: {
109
+
type: DataTypes.INTEGER,
110
+
allowNull: false,
111
+
comment: "The ID of the blockchain network (e.g., 0).",
112
+
},
113
+
from_acct: {
114
+
type: DataTypes.STRING,
115
+
allowNull: false,
116
+
comment:
117
+
"The account from which the transfer was made (e.g., 'k:6fdc4bdbd5bd319466d7b83d85465d8a5a5546bf3b9aababb77aac7bb44241aa').",
118
+
},
119
+
modulehash: {
120
+
type: DataTypes.STRING,
121
+
allowNull: false,
122
+
comment:
123
+
"The hash of the module (e.g., 'klFkrLfpyLW-M3xjVPSdqXEMgxPPJibRt_D6qiBws6s').",
124
+
},
125
+
modulename: {
126
+
type: DataTypes.STRING,
127
+
allowNull: false,
128
+
comment: "The name of the module (e.g., 'coin').",
129
+
},
130
+
requestkey: {
131
+
type: DataTypes.STRING,
132
+
allowNull: false,
133
+
comment:
134
+
"The request key of the transfer (e.g., 'y2XuhnGPkvptF-scYTnMfdcD2zokQf-HyOu-qngAm9s').",
135
+
},
136
+
to_acct: {
137
+
type: DataTypes.STRING,
138
+
allowNull: false,
139
+
comment:
140
+
"The account to which the transfer was made (e.g., 'k:251efb06f3b798dbe7bb3f58f535b67b0a9ed2da9aa4e2367be4abc07cc927fa').",
141
+
},
142
+
hasTokenId: {
143
+
type: DataTypes.BOOLEAN,
144
+
allowNull: true,
145
+
comment: "Whether the transfer has a token ID (e.g., true).",
146
+
},
147
+
tokenId: {
148
+
type: DataTypes.STRING,
149
+
allowNull: true,
150
+
comment:
151
+
"The token ID associated with the transfer (optional, e.g., 't:DowR5LB9h6n96kxFRXDLSuSs1yh100Pk6STuUQNpseM').",
152
+
},
153
+
contractId: {
154
+
type: DataTypes.INTEGER,
155
+
allowNull: true,
156
+
comment: "The ID of the associated contract (optional, e.g., 1).",
0 commit comments