@socket.tech/dl-common 1.0.1
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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +20 -0
- package/dist/models/attestSignature.d.ts +34 -0
- package/dist/models/attestSignature.js +32 -0
- package/dist/models/attestations.d.ts +69 -0
- package/dist/models/attestations.js +59 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +19 -0
- package/dist/models/message.d.ts +165 -0
- package/dist/models/message.js +135 -0
- package/dist/models/packet.d.ts +220 -0
- package/dist/models/packet.js +195 -0
- package/dist/models/proposal.d.ts +126 -0
- package/dist/models/proposal.js +114 -0
- package/dist/services/cacheService.d.ts +14 -0
- package/dist/services/cacheService.js +89 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.js +19 -0
- package/dist/services/queueService.d.ts +10 -0
- package/dist/services/queueService.js +57 -0
- package/dist/types/codes.d.ts +22 -0
- package/dist/types/codes.js +28 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +18 -0
- package/dist/types/types.d.ts +86 -0
- package/dist/types/types.js +41 -0
- package/dist/utils/address.d.ts +2 -0
- package/dist/utils/address.js +8 -0
- package/dist/utils/axios.d.ts +2 -0
- package/dist/utils/axios.js +47 -0
- package/dist/utils/dataStructHelper.d.ts +2 -0
- package/dist/utils/dataStructHelper.js +10 -0
- package/dist/utils/discord.d.ts +1 -0
- package/dist/utils/discord.js +17 -0
- package/dist/utils/extraUtils.d.ts +22 -0
- package/dist/utils/extraUtils.js +85 -0
- package/dist/utils/idUtils.d.ts +13 -0
- package/dist/utils/idUtils.js +41 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.js +23 -0
- package/dist/utils/relaySigner.d.ts +21 -0
- package/dist/utils/relaySigner.js +69 -0
- package/package.json +80 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Socket
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# dl-batcher-service
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./models"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
__exportStar(require("./services"), exports);
|
|
20
|
+
__exportStar(require("./utils"), exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { DataTypes, Model } from "sequelize";
|
|
2
|
+
export declare class AttestSignature extends Model {
|
|
3
|
+
id: number;
|
|
4
|
+
packetId: string;
|
|
5
|
+
proposalCount: number;
|
|
6
|
+
root: string;
|
|
7
|
+
signature: string;
|
|
8
|
+
watcherId: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const AttestSignatureModel: {
|
|
11
|
+
id: {
|
|
12
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
13
|
+
autoIncrement: boolean;
|
|
14
|
+
primaryKey: boolean;
|
|
15
|
+
};
|
|
16
|
+
packetId: {
|
|
17
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
18
|
+
unique: string;
|
|
19
|
+
};
|
|
20
|
+
proposalCount: {
|
|
21
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
22
|
+
unique: string;
|
|
23
|
+
};
|
|
24
|
+
watcherId: {
|
|
25
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
26
|
+
unique: string;
|
|
27
|
+
};
|
|
28
|
+
root: {
|
|
29
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
30
|
+
};
|
|
31
|
+
signature: {
|
|
32
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AttestSignatureModel = exports.AttestSignature = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class AttestSignature extends sequelize_1.Model {
|
|
6
|
+
}
|
|
7
|
+
exports.AttestSignature = AttestSignature;
|
|
8
|
+
exports.AttestSignatureModel = {
|
|
9
|
+
id: {
|
|
10
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
11
|
+
autoIncrement: true,
|
|
12
|
+
primaryKey: true,
|
|
13
|
+
},
|
|
14
|
+
packetId: {
|
|
15
|
+
type: sequelize_1.DataTypes.STRING,
|
|
16
|
+
unique: "uniqueAttestSignPointer",
|
|
17
|
+
},
|
|
18
|
+
proposalCount: {
|
|
19
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
20
|
+
unique: "uniqueAttestSignPointer",
|
|
21
|
+
},
|
|
22
|
+
watcherId: {
|
|
23
|
+
type: sequelize_1.DataTypes.STRING,
|
|
24
|
+
unique: "uniqueAttestSignPointer",
|
|
25
|
+
},
|
|
26
|
+
root: {
|
|
27
|
+
type: sequelize_1.DataTypes.STRING,
|
|
28
|
+
},
|
|
29
|
+
signature: {
|
|
30
|
+
type: sequelize_1.DataTypes.STRING,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { IntegrationTypes } from "@socket.tech/dl-core";
|
|
2
|
+
import { DataTypes, Model } from "sequelize";
|
|
3
|
+
export declare class Attestation extends Model {
|
|
4
|
+
id: number;
|
|
5
|
+
packetId: string;
|
|
6
|
+
proposalCount: number;
|
|
7
|
+
root: string;
|
|
8
|
+
switchboard: string;
|
|
9
|
+
integrationType: IntegrationTypes;
|
|
10
|
+
srcChainSlug: number;
|
|
11
|
+
dstChainSlug: number;
|
|
12
|
+
attester: string;
|
|
13
|
+
attestTxId: string;
|
|
14
|
+
attestTxHash: string;
|
|
15
|
+
attestTime: number;
|
|
16
|
+
numberOfAttestations: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const AttestationModel: {
|
|
19
|
+
id: {
|
|
20
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
21
|
+
autoIncrement: boolean;
|
|
22
|
+
primaryKey: boolean;
|
|
23
|
+
};
|
|
24
|
+
packetId: {
|
|
25
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
26
|
+
unique: string;
|
|
27
|
+
};
|
|
28
|
+
proposalCount: {
|
|
29
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
30
|
+
unique: string;
|
|
31
|
+
};
|
|
32
|
+
switchboard: {
|
|
33
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
34
|
+
};
|
|
35
|
+
srcChainSlug: {
|
|
36
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
37
|
+
};
|
|
38
|
+
dstChainSlug: {
|
|
39
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
40
|
+
};
|
|
41
|
+
integrationType: {
|
|
42
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
43
|
+
};
|
|
44
|
+
root: {
|
|
45
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
46
|
+
unique: string;
|
|
47
|
+
};
|
|
48
|
+
attester: {
|
|
49
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
50
|
+
defaultValue: string;
|
|
51
|
+
unique: string;
|
|
52
|
+
};
|
|
53
|
+
attestTxId: {
|
|
54
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
55
|
+
defaultValue: string;
|
|
56
|
+
};
|
|
57
|
+
attestTxHash: {
|
|
58
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
59
|
+
defaultValue: string;
|
|
60
|
+
};
|
|
61
|
+
attestTime: {
|
|
62
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
63
|
+
defaultValue: number;
|
|
64
|
+
};
|
|
65
|
+
numberOfAttestations: {
|
|
66
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
67
|
+
defaultValue: number;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AttestationModel = exports.Attestation = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class Attestation extends sequelize_1.Model {
|
|
6
|
+
}
|
|
7
|
+
exports.Attestation = Attestation;
|
|
8
|
+
exports.AttestationModel = {
|
|
9
|
+
id: {
|
|
10
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
11
|
+
autoIncrement: true,
|
|
12
|
+
primaryKey: true,
|
|
13
|
+
},
|
|
14
|
+
packetId: {
|
|
15
|
+
type: sequelize_1.DataTypes.STRING,
|
|
16
|
+
unique: "uniqueAttestationPointer",
|
|
17
|
+
},
|
|
18
|
+
proposalCount: {
|
|
19
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
20
|
+
unique: "uniqueAttestationPointer",
|
|
21
|
+
},
|
|
22
|
+
switchboard: {
|
|
23
|
+
type: sequelize_1.DataTypes.STRING,
|
|
24
|
+
},
|
|
25
|
+
srcChainSlug: {
|
|
26
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
27
|
+
},
|
|
28
|
+
dstChainSlug: {
|
|
29
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
30
|
+
},
|
|
31
|
+
integrationType: {
|
|
32
|
+
type: sequelize_1.DataTypes.STRING,
|
|
33
|
+
},
|
|
34
|
+
root: {
|
|
35
|
+
type: sequelize_1.DataTypes.STRING,
|
|
36
|
+
unique: "uniqueAttestationPointer",
|
|
37
|
+
},
|
|
38
|
+
attester: {
|
|
39
|
+
type: sequelize_1.DataTypes.STRING,
|
|
40
|
+
defaultValue: "",
|
|
41
|
+
unique: "uniqueAttestationPointer",
|
|
42
|
+
},
|
|
43
|
+
attestTxId: {
|
|
44
|
+
type: sequelize_1.DataTypes.STRING,
|
|
45
|
+
defaultValue: "",
|
|
46
|
+
},
|
|
47
|
+
attestTxHash: {
|
|
48
|
+
type: sequelize_1.DataTypes.STRING,
|
|
49
|
+
defaultValue: "",
|
|
50
|
+
},
|
|
51
|
+
attestTime: {
|
|
52
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
53
|
+
defaultValue: 0,
|
|
54
|
+
},
|
|
55
|
+
numberOfAttestations: {
|
|
56
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
57
|
+
defaultValue: 0,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./packet"), exports);
|
|
18
|
+
__exportStar(require("./message"), exports);
|
|
19
|
+
__exportStar(require("./attestSignature"), exports);
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { DataTypes, Model } from "sequelize";
|
|
2
|
+
export declare enum ExecutionRelayStatus {
|
|
3
|
+
EXECUTED = "EXECUTED",
|
|
4
|
+
EXECUTING = "EXECUTING",
|
|
5
|
+
NO = "NO",
|
|
6
|
+
EXECUTE_FAILED = "EXECUTE_FAILED",
|
|
7
|
+
IGNORED = "IGNORED"
|
|
8
|
+
}
|
|
9
|
+
export declare class Message extends Model {
|
|
10
|
+
id: number;
|
|
11
|
+
packetId: string;
|
|
12
|
+
srcChainSlug: number;
|
|
13
|
+
dstChainSlug: number;
|
|
14
|
+
srcPlug: string;
|
|
15
|
+
destPlug: string;
|
|
16
|
+
messageId: string;
|
|
17
|
+
fees: string;
|
|
18
|
+
minMsgGasLimit: string;
|
|
19
|
+
executionParams: string;
|
|
20
|
+
transmissionParams: string;
|
|
21
|
+
executionFee: string;
|
|
22
|
+
transmissionFees: string;
|
|
23
|
+
switchboardFees: string;
|
|
24
|
+
decapacitorProof: string;
|
|
25
|
+
payload: string;
|
|
26
|
+
packedMessage: string;
|
|
27
|
+
retry: boolean;
|
|
28
|
+
firstSimulationTimestamp: number;
|
|
29
|
+
inboundSuccess: boolean;
|
|
30
|
+
inboundRevertString: string;
|
|
31
|
+
capacitorMsgCount: number;
|
|
32
|
+
capacitorPacketCount: number;
|
|
33
|
+
rootHash: string;
|
|
34
|
+
isExecuted: boolean;
|
|
35
|
+
isVerified: boolean;
|
|
36
|
+
executor: string;
|
|
37
|
+
executeTxId: string;
|
|
38
|
+
executeTxHash: string;
|
|
39
|
+
executeTime: number;
|
|
40
|
+
outboundTxHash: string;
|
|
41
|
+
outboundTime: number;
|
|
42
|
+
executeSignature: string;
|
|
43
|
+
executeMsgGasLimit: string;
|
|
44
|
+
executeRelayStatus: ExecutionRelayStatus;
|
|
45
|
+
}
|
|
46
|
+
export declare const MessageModel: {
|
|
47
|
+
id: {
|
|
48
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
49
|
+
autoIncrement: boolean;
|
|
50
|
+
};
|
|
51
|
+
srcChainSlug: {
|
|
52
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
53
|
+
};
|
|
54
|
+
dstChainSlug: {
|
|
55
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
56
|
+
};
|
|
57
|
+
srcPlug: {
|
|
58
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
59
|
+
};
|
|
60
|
+
destPlug: {
|
|
61
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
62
|
+
};
|
|
63
|
+
messageId: {
|
|
64
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
65
|
+
primaryKey: boolean;
|
|
66
|
+
};
|
|
67
|
+
minMsgGasLimit: {
|
|
68
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
69
|
+
};
|
|
70
|
+
executionParams: {
|
|
71
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
72
|
+
};
|
|
73
|
+
transmissionParams: {
|
|
74
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
75
|
+
};
|
|
76
|
+
fees: {
|
|
77
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
78
|
+
};
|
|
79
|
+
executionFee: {
|
|
80
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
81
|
+
};
|
|
82
|
+
transmissionFees: {
|
|
83
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
84
|
+
};
|
|
85
|
+
switchboardFees: {
|
|
86
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
87
|
+
};
|
|
88
|
+
decapacitorProof: {
|
|
89
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
90
|
+
defaultValue: string;
|
|
91
|
+
};
|
|
92
|
+
payload: {
|
|
93
|
+
type: DataTypes.TextDataTypeConstructor;
|
|
94
|
+
};
|
|
95
|
+
packedMessage: {
|
|
96
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
97
|
+
};
|
|
98
|
+
capacitorMsgCount: {
|
|
99
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
100
|
+
};
|
|
101
|
+
capacitorPacketCount: {
|
|
102
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
103
|
+
};
|
|
104
|
+
rootHash: {
|
|
105
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
106
|
+
};
|
|
107
|
+
isVerified: {
|
|
108
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
109
|
+
defaultValue: boolean;
|
|
110
|
+
};
|
|
111
|
+
isExecuted: {
|
|
112
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
113
|
+
defaultValue: boolean;
|
|
114
|
+
};
|
|
115
|
+
executeRelayStatus: {
|
|
116
|
+
type: DataTypes.EnumDataTypeConstructor;
|
|
117
|
+
values: ExecutionRelayStatus[];
|
|
118
|
+
defaultValue: ExecutionRelayStatus;
|
|
119
|
+
};
|
|
120
|
+
executor: {
|
|
121
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
122
|
+
defaultValue: string;
|
|
123
|
+
};
|
|
124
|
+
executeTxHash: {
|
|
125
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
126
|
+
defaultValue: string;
|
|
127
|
+
};
|
|
128
|
+
executeTxId: {
|
|
129
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
130
|
+
defaultValue: string;
|
|
131
|
+
};
|
|
132
|
+
executeTime: {
|
|
133
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
134
|
+
};
|
|
135
|
+
executeSignature: {
|
|
136
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
137
|
+
defaultValue: string;
|
|
138
|
+
};
|
|
139
|
+
executeMsgGasLimit: {
|
|
140
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
141
|
+
};
|
|
142
|
+
outboundTxHash: {
|
|
143
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
144
|
+
defaultValue: string;
|
|
145
|
+
};
|
|
146
|
+
outboundTime: {
|
|
147
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
148
|
+
};
|
|
149
|
+
firstSimulationTimestamp: {
|
|
150
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
151
|
+
defaultValue: number;
|
|
152
|
+
};
|
|
153
|
+
retry: {
|
|
154
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
155
|
+
defaultValue: boolean;
|
|
156
|
+
};
|
|
157
|
+
inboundSuccess: {
|
|
158
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
159
|
+
defaultValue: boolean;
|
|
160
|
+
};
|
|
161
|
+
inboundRevertString: {
|
|
162
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
163
|
+
defaultValue: string;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessageModel = exports.Message = exports.ExecutionRelayStatus = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
var ExecutionRelayStatus;
|
|
6
|
+
(function (ExecutionRelayStatus) {
|
|
7
|
+
ExecutionRelayStatus["EXECUTED"] = "EXECUTED";
|
|
8
|
+
ExecutionRelayStatus["EXECUTING"] = "EXECUTING";
|
|
9
|
+
ExecutionRelayStatus["NO"] = "NO";
|
|
10
|
+
ExecutionRelayStatus["EXECUTE_FAILED"] = "EXECUTE_FAILED";
|
|
11
|
+
ExecutionRelayStatus["IGNORED"] = "IGNORED";
|
|
12
|
+
})(ExecutionRelayStatus || (exports.ExecutionRelayStatus = ExecutionRelayStatus = {}));
|
|
13
|
+
class Message extends sequelize_1.Model {
|
|
14
|
+
}
|
|
15
|
+
exports.Message = Message;
|
|
16
|
+
exports.MessageModel = {
|
|
17
|
+
id: {
|
|
18
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
19
|
+
autoIncrement: true,
|
|
20
|
+
},
|
|
21
|
+
srcChainSlug: {
|
|
22
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
23
|
+
},
|
|
24
|
+
dstChainSlug: {
|
|
25
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
26
|
+
},
|
|
27
|
+
srcPlug: {
|
|
28
|
+
type: sequelize_1.DataTypes.STRING,
|
|
29
|
+
},
|
|
30
|
+
destPlug: {
|
|
31
|
+
type: sequelize_1.DataTypes.STRING,
|
|
32
|
+
},
|
|
33
|
+
messageId: {
|
|
34
|
+
type: sequelize_1.DataTypes.STRING,
|
|
35
|
+
primaryKey: true,
|
|
36
|
+
},
|
|
37
|
+
minMsgGasLimit: {
|
|
38
|
+
type: sequelize_1.DataTypes.STRING,
|
|
39
|
+
},
|
|
40
|
+
executionParams: {
|
|
41
|
+
type: sequelize_1.DataTypes.STRING,
|
|
42
|
+
},
|
|
43
|
+
transmissionParams: {
|
|
44
|
+
type: sequelize_1.DataTypes.STRING,
|
|
45
|
+
},
|
|
46
|
+
fees: {
|
|
47
|
+
type: sequelize_1.DataTypes.STRING,
|
|
48
|
+
},
|
|
49
|
+
executionFee: {
|
|
50
|
+
type: sequelize_1.DataTypes.STRING,
|
|
51
|
+
},
|
|
52
|
+
transmissionFees: {
|
|
53
|
+
type: sequelize_1.DataTypes.STRING,
|
|
54
|
+
},
|
|
55
|
+
switchboardFees: {
|
|
56
|
+
type: sequelize_1.DataTypes.STRING,
|
|
57
|
+
},
|
|
58
|
+
decapacitorProof: {
|
|
59
|
+
type: sequelize_1.DataTypes.STRING,
|
|
60
|
+
defaultValue: "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
61
|
+
},
|
|
62
|
+
payload: {
|
|
63
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
64
|
+
},
|
|
65
|
+
packedMessage: {
|
|
66
|
+
type: sequelize_1.DataTypes.STRING,
|
|
67
|
+
},
|
|
68
|
+
capacitorMsgCount: {
|
|
69
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
70
|
+
},
|
|
71
|
+
capacitorPacketCount: {
|
|
72
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
73
|
+
},
|
|
74
|
+
rootHash: {
|
|
75
|
+
type: sequelize_1.DataTypes.STRING,
|
|
76
|
+
},
|
|
77
|
+
isVerified: {
|
|
78
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
79
|
+
defaultValue: false,
|
|
80
|
+
},
|
|
81
|
+
isExecuted: {
|
|
82
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
83
|
+
defaultValue: false,
|
|
84
|
+
},
|
|
85
|
+
executeRelayStatus: {
|
|
86
|
+
type: sequelize_1.DataTypes.ENUM,
|
|
87
|
+
values: [...Object.values(ExecutionRelayStatus)],
|
|
88
|
+
defaultValue: ExecutionRelayStatus.NO,
|
|
89
|
+
},
|
|
90
|
+
executor: {
|
|
91
|
+
type: sequelize_1.DataTypes.STRING,
|
|
92
|
+
defaultValue: "",
|
|
93
|
+
},
|
|
94
|
+
executeTxHash: {
|
|
95
|
+
type: sequelize_1.DataTypes.STRING,
|
|
96
|
+
defaultValue: "",
|
|
97
|
+
},
|
|
98
|
+
executeTxId: {
|
|
99
|
+
type: sequelize_1.DataTypes.STRING,
|
|
100
|
+
defaultValue: "",
|
|
101
|
+
},
|
|
102
|
+
executeTime: {
|
|
103
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
104
|
+
},
|
|
105
|
+
executeSignature: {
|
|
106
|
+
type: sequelize_1.DataTypes.STRING,
|
|
107
|
+
defaultValue: "",
|
|
108
|
+
},
|
|
109
|
+
executeMsgGasLimit: {
|
|
110
|
+
type: sequelize_1.DataTypes.STRING,
|
|
111
|
+
},
|
|
112
|
+
outboundTxHash: {
|
|
113
|
+
type: sequelize_1.DataTypes.STRING,
|
|
114
|
+
defaultValue: "",
|
|
115
|
+
},
|
|
116
|
+
outboundTime: {
|
|
117
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
118
|
+
},
|
|
119
|
+
firstSimulationTimestamp: {
|
|
120
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
121
|
+
defaultValue: 0,
|
|
122
|
+
},
|
|
123
|
+
retry: {
|
|
124
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
125
|
+
defaultValue: false,
|
|
126
|
+
},
|
|
127
|
+
inboundSuccess: {
|
|
128
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
129
|
+
defaultValue: false,
|
|
130
|
+
},
|
|
131
|
+
inboundRevertString: {
|
|
132
|
+
type: sequelize_1.DataTypes.STRING,
|
|
133
|
+
defaultValue: "",
|
|
134
|
+
},
|
|
135
|
+
};
|