@pythnetwork/price-pusher 8.0.0-alpha → 8.0.0
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/lib/evm/evm.d.ts.map +1 -1
- package/lib/evm/evm.js +11 -4
- package/package.json +2 -2
package/lib/evm/evm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../src/evm/evm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAGL,iBAAiB,EAElB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EACL,sBAAsB,EACtB,SAAS,EACT,aAAa,EACd,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../src/evm/evm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAGL,iBAAiB,EAElB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EACL,sBAAsB,EACtB,SAAS,EACT,aAAa,EACd,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAaxD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,qBAAa,gBAAiB,SAAQ,kBAAkB;IAEpD,OAAO,CAAC,YAAY;IAEpB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,MAAM;gBAHN,YAAY,EAAE,YAAY,EAClC,UAAU,EAAE,SAAS,EAAE,EACf,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,MAAM,EACtB,MAAM,EAAE;QACN,gBAAgB,EAAE,iBAAiB,CAAC;KACrC;IAUG,KAAK;YAeG,aAAa;IAO3B,OAAO,CAAC,iBAAiB;IAuBnB,mBAAmB,CACvB,OAAO,EAAE,SAAS,GACjB,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;CAuBlC;AAED,qBAAa,cAAe,YAAW,YAAY;IAK/C,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,0BAA0B;IAClC,OAAO,CAAC,6BAA6B;IACrC,OAAO,CAAC,mBAAmB;IAC3B,OAAO,CAAC,QAAQ,CAAC;IACjB,OAAO,CAAC,gBAAgB,CAAC;IAZ3B,OAAO,CAAC,aAAa,CAA4B;IACjD,OAAO,CAAC,eAAe,CAA0B;gBAGvC,UAAU,EAAE,sBAAsB,EAClC,MAAM,EAAE,iBAAiB,EACzB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,0BAA0B,EAAE,MAAM,EAClC,6BAA6B,EAAE,MAAM,EACrC,mBAAmB,EAAE,MAAM,EAC3B,QAAQ,CAAC,oBAAQ,EACjB,gBAAgB,CAAC,8BAAkB;IASvC,eAAe,CACnB,QAAQ,EAAE,MAAM,EAAE,EAClB,cAAc,EAAE,aAAa,EAAE,GAC9B,OAAO,CAAC,IAAI,CAAC;YA2OF,yBAAyB;YAuBzB,uBAAuB;CAQtC"}
|
package/lib/evm/evm.js
CHANGED
|
@@ -114,11 +114,12 @@ class EvmPricePusher {
|
|
|
114
114
|
this.logger.error(e, "An unidentified error has occured when getting the update fee.");
|
|
115
115
|
throw e;
|
|
116
116
|
}
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
// Gas price in networks with transaction type eip1559 represents the
|
|
118
|
+
// addition of baseFee and priorityFee required to land the transaction. We
|
|
119
|
+
// are using this to remain compatible with the networks that doesn't
|
|
120
|
+
// support this transaction type.
|
|
119
121
|
let gasPrice = Number(await this.customGasStation?.getCustomGasPrice()) ||
|
|
120
|
-
Number(
|
|
121
|
-
Number(fees.maxFeePerGas);
|
|
122
|
+
Number(await this.client.getGasPrice());
|
|
122
123
|
// Try to re-use the same nonce and increase the gas if the last tx is not landed yet.
|
|
123
124
|
if (this.pusherAddress === undefined) {
|
|
124
125
|
this.pusherAddress = this.client.account.address;
|
|
@@ -185,6 +186,12 @@ class EvmPricePusher {
|
|
|
185
186
|
this.logger.info("The nonce is incorrect. This is an expected behaviour in high frequency or multi-instance setup. Skipping this push.");
|
|
186
187
|
return;
|
|
187
188
|
}
|
|
189
|
+
// Sometimes the contract function execution fails in simulation and this error is thrown.
|
|
190
|
+
if (err.walk((e) => e instanceof viem_1.ContractFunctionExecutionError)) {
|
|
191
|
+
this.logger.warn({ err }, "The contract function execution failed in simulation. This is an expected behaviour in high frequency or multi-instance setup. " +
|
|
192
|
+
"Please review this error and file an issue if it is a bug. Skipping this push.");
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
188
195
|
// We normally crash on unknown failures but we believe that this type of error is safe to skip. The other reason is that
|
|
189
196
|
// wometimes we see a TransactionExecutionError because of the nonce without any details and it is not catchable.
|
|
190
197
|
if (err.walk((e) => e instanceof viem_1.TransactionExecutionError)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pythnetwork/price-pusher",
|
|
3
|
-
"version": "8.0.0
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Pyth Price Pusher",
|
|
5
5
|
"homepage": "https://pyth.network",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"yaml": "^2.1.1",
|
|
75
75
|
"yargs": "^17.5.1"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "525ad190de4dfcc1e95502ec056ad446fa6041f5"
|
|
78
78
|
}
|