@mainsail/contracts 0.0.1-evm.29 → 0.0.1-evm.30
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Exception } from "./base.js";
|
|
2
2
|
export class PoolError extends Exception {
|
|
3
|
+
type;
|
|
3
4
|
constructor(message, type) {
|
|
4
5
|
super(message);
|
|
5
6
|
this.type = type;
|
|
@@ -11,6 +12,7 @@ export class TransactionAlreadyInPoolError extends PoolError {
|
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
export class TransactionExceedsMaximumByteSizeError extends PoolError {
|
|
15
|
+
maxSize;
|
|
14
16
|
constructor(transaction, maxSize) {
|
|
15
17
|
super(`tx ${transaction.hash} exceeds size limit of ${maxSize} byte(s)`, "ERR_TOO_LARGE");
|
|
16
18
|
this.maxSize = maxSize;
|
|
@@ -27,24 +29,28 @@ export class TransactionFeeTooHighError extends PoolError {
|
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
export class SenderExceededMaximumTransactionCountError extends PoolError {
|
|
32
|
+
maxCount;
|
|
30
33
|
constructor(transaction, maxCount) {
|
|
31
34
|
super(`tx ${transaction.hash} exceeds sender's transaction count limit of ${maxCount}`, "ERR_EXCEEDS_MAX_COUNT");
|
|
32
35
|
this.maxCount = maxCount;
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
38
|
export class TransactionPoolFullError extends PoolError {
|
|
39
|
+
required;
|
|
36
40
|
constructor(transaction, required) {
|
|
37
41
|
super(`tx ${transaction.hash} fee ${transaction.data.gasPrice} is lower than ${required} already in pool`, "ERR_POOL_FULL");
|
|
38
42
|
this.required = required;
|
|
39
43
|
}
|
|
40
44
|
}
|
|
41
45
|
export class TransactionFailedToPreverifyError extends PoolError {
|
|
46
|
+
error;
|
|
42
47
|
constructor(transaction, error) {
|
|
43
48
|
super(`tx ${transaction.hash} cannot be preverified: ${error.message}`, "ERR_PREVERIFY");
|
|
44
49
|
this.error = error;
|
|
45
50
|
}
|
|
46
51
|
}
|
|
47
52
|
export class TransactionFailedToApplyError extends PoolError {
|
|
53
|
+
error;
|
|
48
54
|
constructor(transaction, error) {
|
|
49
55
|
super(`tx ${transaction.hash} cannot be applied: ${error.message}`, "ERR_APPLY");
|
|
50
56
|
this.error = error;
|
|
@@ -56,6 +62,7 @@ export class TransactionFailedToVerifyError extends PoolError {
|
|
|
56
62
|
}
|
|
57
63
|
}
|
|
58
64
|
export class TransactionFromWrongNetworkError extends PoolError {
|
|
65
|
+
currentNetwork;
|
|
59
66
|
constructor(transaction, currentNetwork) {
|
|
60
67
|
super(`tx ${transaction.hash} network ${transaction.data.network} doesn't match node's network ${currentNetwork}`, "ERR_WRONG_NETWORK");
|
|
61
68
|
this.currentNetwork = currentNetwork;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pool.js","sourceRoot":"","sources":["../../source/exceptions/pool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,OAAO,SAAU,SAAQ,SAAS;
|
|
1
|
+
{"version":3,"file":"pool.js","sourceRoot":"","sources":["../../source/exceptions/pool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,OAAO,SAAU,SAAQ,SAAS;IACvB,IAAI,CAAS;IAE7B,YAAmB,OAAe,EAAE,IAAY;QAC/C,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,CAAC;CACD;AAED,MAAM,OAAO,6BAA8B,SAAQ,SAAS;IAC3D,YAAmB,WAAwB;QAC1C,KAAK,CAAC,MAAM,WAAW,CAAC,IAAI,qBAAqB,EAAE,eAAe,CAAC,CAAC;IACrE,CAAC;CACD;AAED,MAAM,OAAO,sCAAuC,SAAQ,SAAS;IACpD,OAAO,CAAS;IAEhC,YAAmB,W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,CAAC;CACD;AAED,MAAM,OAAO,6BAA8B,SAAQ,SAAS;IAC3C,KAAK,CAAQ;IAE7B,YAAmB,WAAwB,EAAE,KAAY;QACxD,KAAK,CAAC,MAAM,WAAW,CAAC,IAAI,uBAAuB,KAAK,CAAC,OAAO,EAAE,EAAE,WAAW,CAAC,CAAC;QACjF,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACpB,CAAC;CACD;AAED,MAAM,OAAO,8BAA+B,SAAQ,SAAS;IAC5D,YAAmB,WAAwB;QAC1C,KAAK,CAAC,MAAM,WAAW,CAAC,IAAI,2BAA2B,EAAE,cAAc,CAAC,CAAC;IAC1E,CAAC;CACD;AAED,MAAM,OAAO,gCAAiC,SAAQ,SAAS;IACvD,cAAc,CAAS;IAE9B,YAAmB,WAAwB,EAAE,cAAsB;QAClE,KAAK,CACJ,MAAM,WAAW,CAAC,IAAI,YAAY,WAAW,CAAC,IAAI,CAAC,OAAO,iCAAiC,cAAc,EAAE,EAC3G,mBAAmB,CACnB,CAAC;QACF,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACtC,CAAC;CACD;AAED,MAAM,OAAO,2BAA4B,SAAQ,SAAS;IACzD,YAAmB,MAAc;QAChC,KAAK,CAAC,6BAA6B,MAAM,EAAE,EAAE,cAAc,CAAC,CAAC;IAC9D,CAAC;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../source/exceptions/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,OAAO,QAAS,SAAQ,SAAS;
|
|
1
|
+
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../source/exceptions/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,OAAO,QAAS,SAAQ,SAAS;IAG9B;IAFR,YACC,OAAe,EACR,OAAe,CAAC,MAAM;QAE7B,KAAK,CAAC,OAAO,CAAC,CAAC;QAFR,SAAI,GAAJ,IAAI,CAAkB;IAG9B,CAAC;CACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mainsail/contracts",
|
|
3
|
-
"version": "0.0.1-evm.
|
|
3
|
+
"version": "0.0.1-evm.30",
|
|
4
4
|
"description": "Contracts for the Mainsail blockchain",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"contributors": [],
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"/distribution"
|
|
12
12
|
],
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@hapi/hapi": "21.4.
|
|
14
|
+
"@hapi/hapi": "21.4.3",
|
|
15
15
|
"ajv": "8.17.1",
|
|
16
16
|
"dayjs": "1.11.13",
|
|
17
|
-
"inversify": "7.
|
|
17
|
+
"inversify": "7.8.1",
|
|
18
18
|
"reflect-metadata": "0.2.2",
|
|
19
|
-
"type-fest": "4.
|
|
20
|
-
"@mainsail/utils": "0.0.1-evm.
|
|
19
|
+
"type-fest": "4.41.0",
|
|
20
|
+
"@mainsail/utils": "0.0.1-evm.30"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"uvu": "0.5.6"
|