@xyo-network/gas-price-plugin 2.61.1 → 2.61.2
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/cjs/Diviner.js +5 -5
- package/dist/cjs/Diviner.js.map +1 -1
- package/dist/cjs/Plugin.js +4 -4
- package/dist/cjs/Plugin.js.map +1 -1
- package/dist/cjs/Schema.js +3 -3
- package/dist/cjs/Schema.js.map +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/divineGas.js +6 -6
- package/dist/cjs/lib/divineGas.js.map +1 -1
- package/dist/cjs/lib/identities/index.js +5 -5
- package/dist/cjs/lib/identities/index.js.map +1 -1
- package/dist/cjs/lib/identities/isEthereumGasBlocknativePayload.js +9 -0
- package/dist/cjs/lib/identities/isEthereumGasBlocknativePayload.js.map +1 -0
- package/dist/cjs/lib/identities/{isXyoEthereumGasEtherchainV2Payload.js → isEthereumGasEtherchainV2Payload.js} +5 -5
- package/dist/cjs/lib/identities/isEthereumGasEtherchainV2Payload.js.map +1 -0
- package/dist/cjs/lib/identities/isEthereumGasEthersPayload.js +9 -0
- package/dist/cjs/lib/identities/isEthereumGasEthersPayload.js.map +1 -0
- package/dist/cjs/lib/identities/isEthereumGasEtherscanPayload.js +9 -0
- package/dist/cjs/lib/identities/isEthereumGasEtherscanPayload.js.map +1 -0
- package/dist/cjs/lib/identities/isEthereumGasEthgasstationPayload.js +9 -0
- package/dist/cjs/lib/identities/isEthereumGasEthgasstationPayload.js.map +1 -0
- package/dist/cjs/lib/transforms/transformGasFromBlocknative.js.map +1 -1
- package/dist/cjs/lib/transforms/transformGasFromEtherchainV2.js.map +1 -1
- package/dist/cjs/lib/transforms/transformGasFromEthers.js.map +1 -1
- package/dist/cjs/lib/transforms/transformGasFromEtherscan.js.map +1 -1
- package/dist/cjs/lib/transforms/transformGasFromEthgasstation.js.map +1 -1
- package/dist/cjs/test/sampleBlocknativeGas.js +1 -1
- package/dist/cjs/test/sampleBlocknativeGas.js.map +1 -1
- package/dist/cjs/test/sampleEtherchainGasV2.js +1 -1
- package/dist/cjs/test/sampleEtherchainGasV2.js.map +1 -1
- package/dist/cjs/test/sampleEthersGas.js +1 -1
- package/dist/cjs/test/sampleEthersGas.js.map +1 -1
- package/dist/cjs/test/sampleEtherscanGas.js +1 -1
- package/dist/cjs/test/sampleEtherscanGas.js.map +1 -1
- package/dist/cjs/test/sampleEthgasstationGas.js +1 -1
- package/dist/cjs/test/sampleEthgasstationGas.js.map +1 -1
- package/dist/docs.json +106 -106
- package/dist/esm/Diviner.js +5 -5
- package/dist/esm/Diviner.js.map +1 -1
- package/dist/esm/Plugin.js +4 -4
- package/dist/esm/Plugin.js.map +1 -1
- package/dist/esm/Schema.js +2 -2
- package/dist/esm/Schema.js.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/divineGas.js +8 -8
- package/dist/esm/lib/divineGas.js.map +1 -1
- package/dist/esm/lib/identities/index.js +5 -5
- package/dist/esm/lib/identities/index.js.map +1 -1
- package/dist/esm/lib/identities/isEthereumGasBlocknativePayload.js +5 -0
- package/dist/esm/lib/identities/isEthereumGasBlocknativePayload.js.map +1 -0
- package/dist/esm/lib/identities/isEthereumGasEtherchainV2Payload.js +5 -0
- package/dist/esm/lib/identities/isEthereumGasEtherchainV2Payload.js.map +1 -0
- package/dist/esm/lib/identities/isEthereumGasEthersPayload.js +5 -0
- package/dist/esm/lib/identities/isEthereumGasEthersPayload.js.map +1 -0
- package/dist/esm/lib/identities/isEthereumGasEtherscanPayload.js +5 -0
- package/dist/esm/lib/identities/isEthereumGasEtherscanPayload.js.map +1 -0
- package/dist/esm/lib/identities/isEthereumGasEthgasstationPayload.js +5 -0
- package/dist/esm/lib/identities/isEthereumGasEthgasstationPayload.js.map +1 -0
- package/dist/esm/lib/transforms/transformGasFromBlocknative.js.map +1 -1
- package/dist/esm/lib/transforms/transformGasFromEtherchainV2.js.map +1 -1
- package/dist/esm/lib/transforms/transformGasFromEthers.js.map +1 -1
- package/dist/esm/lib/transforms/transformGasFromEtherscan.js.map +1 -1
- package/dist/esm/lib/transforms/transformGasFromEthgasstation.js.map +1 -1
- package/dist/esm/test/sampleBlocknativeGas.js +2 -2
- package/dist/esm/test/sampleBlocknativeGas.js.map +1 -1
- package/dist/esm/test/sampleEtherchainGasV2.js +2 -2
- package/dist/esm/test/sampleEtherchainGasV2.js.map +1 -1
- package/dist/esm/test/sampleEthersGas.js +2 -2
- package/dist/esm/test/sampleEthersGas.js.map +1 -1
- package/dist/esm/test/sampleEtherscanGas.js +2 -2
- package/dist/esm/test/sampleEtherscanGas.js.map +1 -1
- package/dist/esm/test/sampleEthgasstationGas.js +2 -2
- package/dist/esm/test/sampleEthgasstationGas.js.map +1 -1
- package/dist/types/Diviner.d.ts +5 -5
- package/dist/types/Diviner.d.ts.map +1 -1
- package/dist/types/Plugin.d.ts +2 -2
- package/dist/types/Plugin.d.ts.map +1 -1
- package/dist/types/Schema.d.ts +4 -4
- package/dist/types/Schema.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/divineGas.d.ts +2 -2
- package/dist/types/lib/divineGas.d.ts.map +1 -1
- package/dist/types/lib/identities/index.d.ts +5 -5
- package/dist/types/lib/identities/index.d.ts.map +1 -1
- package/dist/types/lib/identities/isEthereumGasBlocknativePayload.d.ts +6 -0
- package/dist/types/lib/identities/isEthereumGasBlocknativePayload.d.ts.map +1 -0
- package/dist/types/lib/identities/isEthereumGasEtherchainV2Payload.d.ts +6 -0
- package/dist/types/lib/identities/isEthereumGasEtherchainV2Payload.d.ts.map +1 -0
- package/dist/types/lib/identities/isEthereumGasEthersPayload.d.ts +6 -0
- package/dist/types/lib/identities/isEthereumGasEthersPayload.d.ts.map +1 -0
- package/dist/types/lib/identities/isEthereumGasEtherscanPayload.d.ts +6 -0
- package/dist/types/lib/identities/isEthereumGasEtherscanPayload.d.ts.map +1 -0
- package/dist/types/lib/identities/isEthereumGasEthgasstationPayload.d.ts +6 -0
- package/dist/types/lib/identities/isEthereumGasEthgasstationPayload.d.ts.map +1 -0
- package/dist/types/lib/transforms/transformGasFromBlocknative.d.ts +2 -2
- package/dist/types/lib/transforms/transformGasFromBlocknative.d.ts.map +1 -1
- package/dist/types/lib/transforms/transformGasFromEtherchainV2.d.ts +2 -2
- package/dist/types/lib/transforms/transformGasFromEtherchainV2.d.ts.map +1 -1
- package/dist/types/lib/transforms/transformGasFromEthers.d.ts +2 -2
- package/dist/types/lib/transforms/transformGasFromEthers.d.ts.map +1 -1
- package/dist/types/lib/transforms/transformGasFromEtherscan.d.ts +2 -2
- package/dist/types/lib/transforms/transformGasFromEtherscan.d.ts.map +1 -1
- package/dist/types/lib/transforms/transformGasFromEthgasstation.d.ts +2 -2
- package/dist/types/lib/transforms/transformGasFromEthgasstation.d.ts.map +1 -1
- package/dist/types/test/sampleBlocknativeGas.d.ts +2 -2
- package/dist/types/test/sampleBlocknativeGas.d.ts.map +1 -1
- package/dist/types/test/sampleEtherchainGasV2.d.ts +2 -2
- package/dist/types/test/sampleEtherchainGasV2.d.ts.map +1 -1
- package/dist/types/test/sampleEthersGas.d.ts +2 -2
- package/dist/types/test/sampleEthersGas.d.ts.map +1 -1
- package/dist/types/test/sampleEtherscanGas.d.ts +2 -2
- package/dist/types/test/sampleEtherscanGas.d.ts.map +1 -1
- package/dist/types/test/sampleEthgasstationGas.d.ts +2 -2
- package/dist/types/test/sampleEthgasstationGas.d.ts.map +1 -1
- package/package.json +15 -15
- package/src/Diviner.ts +7 -7
- package/src/Plugin.ts +6 -6
- package/src/Schema.ts +4 -4
- package/src/index.ts +3 -3
- package/src/lib/divineGas.ts +13 -13
- package/src/lib/identities/index.ts +5 -5
- package/src/lib/identities/isEthereumGasBlocknativePayload.ts +6 -0
- package/src/lib/identities/isEthereumGasEtherchainV2Payload.ts +6 -0
- package/src/lib/identities/isEthereumGasEthersPayload.ts +6 -0
- package/src/lib/identities/isEthereumGasEtherscanPayload.ts +6 -0
- package/src/lib/identities/isEthereumGasEthgasstationPayload.ts +6 -0
- package/src/lib/transforms/transformGasFromBlocknative.ts +5 -5
- package/src/lib/transforms/transformGasFromEtherchainV2.ts +3 -3
- package/src/lib/transforms/transformGasFromEthers.ts +5 -5
- package/src/lib/transforms/transformGasFromEtherscan.ts +4 -4
- package/src/lib/transforms/transformGasFromEthgasstation.ts +5 -5
- package/src/test/sampleBlocknativeGas.ts +3 -7
- package/src/test/sampleEtherchainGasV2.ts +3 -3
- package/src/test/sampleEthersGas.ts +3 -3
- package/src/test/sampleEtherscanGas.ts +3 -3
- package/src/test/sampleEthgasstationGas.ts +3 -3
- package/dist/cjs/lib/identities/isXyoEthereumGasBlocknativePayload.js +0 -9
- package/dist/cjs/lib/identities/isXyoEthereumGasBlocknativePayload.js.map +0 -1
- package/dist/cjs/lib/identities/isXyoEthereumGasEtherchainV2Payload.js.map +0 -1
- package/dist/cjs/lib/identities/isXyoEthereumGasEthersPayload.js +0 -9
- package/dist/cjs/lib/identities/isXyoEthereumGasEthersPayload.js.map +0 -1
- package/dist/cjs/lib/identities/isXyoEthereumGasEtherscanPayload.js +0 -9
- package/dist/cjs/lib/identities/isXyoEthereumGasEtherscanPayload.js.map +0 -1
- package/dist/cjs/lib/identities/isXyoEthereumGasEthgasstationPayload.js +0 -9
- package/dist/cjs/lib/identities/isXyoEthereumGasEthgasstationPayload.js.map +0 -1
- package/dist/esm/lib/identities/isXyoEthereumGasBlocknativePayload.js +0 -5
- package/dist/esm/lib/identities/isXyoEthereumGasBlocknativePayload.js.map +0 -1
- package/dist/esm/lib/identities/isXyoEthereumGasEtherchainV2Payload.js +0 -5
- package/dist/esm/lib/identities/isXyoEthereumGasEtherchainV2Payload.js.map +0 -1
- package/dist/esm/lib/identities/isXyoEthereumGasEthersPayload.js +0 -5
- package/dist/esm/lib/identities/isXyoEthereumGasEthersPayload.js.map +0 -1
- package/dist/esm/lib/identities/isXyoEthereumGasEtherscanPayload.js +0 -5
- package/dist/esm/lib/identities/isXyoEthereumGasEtherscanPayload.js.map +0 -1
- package/dist/esm/lib/identities/isXyoEthereumGasEthgasstationPayload.js +0 -5
- package/dist/esm/lib/identities/isXyoEthereumGasEthgasstationPayload.js.map +0 -1
- package/dist/types/lib/identities/isXyoEthereumGasBlocknativePayload.d.ts +0 -6
- package/dist/types/lib/identities/isXyoEthereumGasBlocknativePayload.d.ts.map +0 -1
- package/dist/types/lib/identities/isXyoEthereumGasEtherchainV2Payload.d.ts +0 -6
- package/dist/types/lib/identities/isXyoEthereumGasEtherchainV2Payload.d.ts.map +0 -1
- package/dist/types/lib/identities/isXyoEthereumGasEthersPayload.d.ts +0 -6
- package/dist/types/lib/identities/isXyoEthereumGasEthersPayload.d.ts.map +0 -1
- package/dist/types/lib/identities/isXyoEthereumGasEtherscanPayload.d.ts +0 -6
- package/dist/types/lib/identities/isXyoEthereumGasEtherscanPayload.d.ts.map +0 -1
- package/dist/types/lib/identities/isXyoEthereumGasEthgasstationPayload.d.ts +0 -6
- package/dist/types/lib/identities/isXyoEthereumGasEthgasstationPayload.d.ts.map +0 -1
- package/src/lib/identities/isXyoEthereumGasBlocknativePayload.ts +0 -6
- package/src/lib/identities/isXyoEthereumGasEtherchainV2Payload.ts +0 -6
- package/src/lib/identities/isXyoEthereumGasEthersPayload.ts +0 -6
- package/src/lib/identities/isXyoEthereumGasEtherscanPayload.ts +0 -6
- package/src/lib/identities/isXyoEthereumGasEthgasstationPayload.ts +0 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin';
|
|
2
2
|
import { FeeData } from '@xyo-network/gas-price-payload-plugin';
|
|
3
|
-
export declare const transformGasFromEtherscan: (payload:
|
|
3
|
+
export declare const transformGasFromEtherscan: (payload: EthereumGasEtherscanPayload) => FeeData;
|
|
4
4
|
//# sourceMappingURL=transformGasFromEtherscan.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformGasFromEtherscan.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromEtherscan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"transformGasFromEtherscan.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromEtherscan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAA;AAChG,OAAO,EAAE,OAAO,EAAa,MAAM,uCAAuC,CAAA;AAqB1E,eAAO,MAAM,yBAAyB,YAAa,2BAA2B,KAAG,OAKhF,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin';
|
|
2
2
|
import { FeeData } from '@xyo-network/gas-price-payload-plugin';
|
|
3
|
-
export declare const transformGasFromEthgasstation: (payload:
|
|
3
|
+
export declare const transformGasFromEthgasstation: (payload: EthereumGasEthgasstationPayload) => FeeData;
|
|
4
4
|
//# sourceMappingURL=transformGasFromEthgasstation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformGasFromEthgasstation.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromEthgasstation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"transformGasFromEthgasstation.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromEthgasstation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,wDAAwD,CAAA;AACxG,OAAO,EAAE,OAAO,EAAgC,MAAM,uCAAuC,CAAA;AA8B7F,eAAO,MAAM,6BAA6B,YAAa,+BAA+B,KAAG,OAKxF,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const sampleBlocknativeGas:
|
|
1
|
+
import { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin';
|
|
2
|
+
export declare const sampleBlocknativeGas: EthereumGasBlocknativePayload;
|
|
3
3
|
//# sourceMappingURL=sampleBlocknativeGas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleBlocknativeGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleBlocknativeGas.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"sampleBlocknativeGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleBlocknativeGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,6BAA6B,EAAgC,MAAM,sDAAsD,CAAA;AAEpJ,eAAO,MAAM,oBAAoB,EAAE,6BA0FlC,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const sampleEtherchainGasV2:
|
|
1
|
+
import { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins';
|
|
2
|
+
export declare const sampleEtherchainGasV2: EthereumGasEtherchainV2Payload;
|
|
3
3
|
//# sourceMappingURL=sampleEtherchainGasV2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleEtherchainGasV2.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEtherchainGasV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"sampleEtherchainGasV2.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEtherchainGasV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAiC,MAAM,iEAAiE,CAAA;AAE/I,eAAO,MAAM,qBAAqB,EAAE,8BAYnC,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const sampleEthersGas:
|
|
1
|
+
import { EthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin';
|
|
2
|
+
export declare const sampleEthersGas: EthereumGasEthersPayload;
|
|
3
3
|
//# sourceMappingURL=sampleEthersGas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleEthersGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEthersGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"sampleEthersGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEthersGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAA2B,MAAM,iDAAiD,CAAA;AAEnH,eAAO,MAAM,eAAe,EAAE,wBAO7B,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const sampleEtherscanGas:
|
|
1
|
+
import { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin';
|
|
2
|
+
export declare const sampleEtherscanGas: EthereumGasEtherscanPayload;
|
|
3
3
|
//# sourceMappingURL=sampleEtherscanGas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleEtherscanGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEtherscanGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"sampleEtherscanGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEtherscanGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAA8B,MAAM,oDAAoD,CAAA;AAE5H,eAAO,MAAM,kBAAkB,EAAE,2BAahC,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const sampleEthgasstationGas:
|
|
1
|
+
import { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin';
|
|
2
|
+
export declare const sampleEthgasstationGas: EthereumGasEthgasstationPayload;
|
|
3
3
|
//# sourceMappingURL=sampleEthgasstationGas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleEthgasstationGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEthgasstationGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"sampleEthgasstationGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEthgasstationGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAkC,MAAM,wDAAwD,CAAA;AAExI,eAAO,MAAM,sBAAsB,EAAE,+BAiBpC,CAAA"}
|
package/package.json
CHANGED
|
@@ -11,19 +11,19 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@xylabs/exists": "^2.9.1",
|
|
14
|
-
"@xyo-network/abstract-diviner": "^2.61.
|
|
15
|
-
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "^2.61.
|
|
16
|
-
"@xyo-network/diviner": "^2.61.
|
|
17
|
-
"@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins": "^2.61.
|
|
18
|
-
"@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.61.
|
|
19
|
-
"@xyo-network/etherscan-ethereum-gas-payload-plugin": "^2.61.
|
|
20
|
-
"@xyo-network/ethgasstation-ethereum-gas-payload-plugin": "^2.61.
|
|
21
|
-
"@xyo-network/gas-price-payload-plugin": "^2.61.
|
|
22
|
-
"@xyo-network/module": "^2.61.
|
|
23
|
-
"@xyo-network/payload-builder": "^2.61.
|
|
24
|
-
"@xyo-network/payload-model": "^2.61.
|
|
25
|
-
"@xyo-network/payloadset-plugin": "^2.61.
|
|
26
|
-
"@xyo-network/promise": "^2.61.
|
|
14
|
+
"@xyo-network/abstract-diviner": "^2.61.2",
|
|
15
|
+
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "^2.61.2",
|
|
16
|
+
"@xyo-network/diviner": "^2.61.2",
|
|
17
|
+
"@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins": "^2.61.2",
|
|
18
|
+
"@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.61.2",
|
|
19
|
+
"@xyo-network/etherscan-ethereum-gas-payload-plugin": "^2.61.2",
|
|
20
|
+
"@xyo-network/ethgasstation-ethereum-gas-payload-plugin": "^2.61.2",
|
|
21
|
+
"@xyo-network/gas-price-payload-plugin": "^2.61.2",
|
|
22
|
+
"@xyo-network/module": "^2.61.2",
|
|
23
|
+
"@xyo-network/payload-builder": "^2.61.2",
|
|
24
|
+
"@xyo-network/payload-model": "^2.61.2",
|
|
25
|
+
"@xyo-network/payloadset-plugin": "^2.61.2",
|
|
26
|
+
"@xyo-network/promise": "^2.61.2",
|
|
27
27
|
"regression": "^2.0.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@ethersproject/solidity": "^5.7.0",
|
|
35
35
|
"@types/regression": "^2.0.2",
|
|
36
36
|
"@uniswap/sdk": "^3.0.3",
|
|
37
|
-
"@uniswap/sdk-core": "^3.2.
|
|
37
|
+
"@uniswap/sdk-core": "^3.2.6",
|
|
38
38
|
"@uniswap/v3-sdk": "^3.9.0",
|
|
39
39
|
"@xylabs/ts-scripts-yarn3": "^2.17.13",
|
|
40
40
|
"@xylabs/tsconfig": "^2.17.13",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
},
|
|
84
84
|
"sideEffects": false,
|
|
85
85
|
"types": "dist/types/index.d.ts",
|
|
86
|
-
"version": "2.61.
|
|
86
|
+
"version": "2.61.2"
|
|
87
87
|
}
|
package/src/Diviner.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { AbstractDiviner } from '@xyo-network/abstract-diviner'
|
|
2
2
|
import { DivinerConfig, DivinerModule, DivinerParams } from '@xyo-network/diviner'
|
|
3
|
-
import {
|
|
3
|
+
import { EthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'
|
|
4
4
|
import { AnyConfigSchema } from '@xyo-network/module'
|
|
5
5
|
import { Payload } from '@xyo-network/payload-model'
|
|
6
6
|
import { Promisable } from '@xyo-network/promise'
|
|
7
7
|
|
|
8
8
|
import { divineGas } from './lib'
|
|
9
|
-
import {
|
|
9
|
+
import { EthereumGasDivinerConfigSchema } from './Schema'
|
|
10
10
|
|
|
11
|
-
export type
|
|
12
|
-
export type
|
|
11
|
+
export type EthereumGasDivinerConfig = DivinerConfig<{ schema: EthereumGasDivinerConfigSchema }>
|
|
12
|
+
export type EthereumGasDivinerParams = DivinerParams<AnyConfigSchema<EthereumGasDivinerConfig>>
|
|
13
13
|
|
|
14
|
-
export class
|
|
14
|
+
export class EthereumGasDiviner<TParams extends EthereumGasDivinerParams = EthereumGasDivinerParams>
|
|
15
15
|
extends AbstractDiviner<TParams>
|
|
16
16
|
implements DivinerModule
|
|
17
17
|
{
|
|
18
|
-
static override configSchema: string =
|
|
19
|
-
static override targetSchema: string =
|
|
18
|
+
static override configSchema: string = EthereumGasDivinerConfigSchema
|
|
19
|
+
static override targetSchema: string = EthereumGasSchema
|
|
20
20
|
|
|
21
21
|
override divine(payloads?: Payload[]): Promisable<Payload[]> {
|
|
22
22
|
const cost = divineGas(payloads ?? [])
|
package/src/Plugin.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'
|
|
2
2
|
import { PayloadSetSchema } from '@xyo-network/payload-model'
|
|
3
3
|
import { createPayloadSetDivinerPlugin } from '@xyo-network/payloadset-plugin'
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { EthereumGasDiviner } from './Diviner'
|
|
6
6
|
|
|
7
|
-
export const
|
|
8
|
-
createPayloadSetDivinerPlugin<
|
|
9
|
-
{ required: { [
|
|
7
|
+
export const EthereumGasPlugin = () =>
|
|
8
|
+
createPayloadSetDivinerPlugin<EthereumGasDiviner>(
|
|
9
|
+
{ required: { [EthereumGasSchema]: 1 }, schema: PayloadSetSchema },
|
|
10
10
|
{
|
|
11
11
|
diviner: async (params) => {
|
|
12
|
-
return (await
|
|
12
|
+
return (await EthereumGasDiviner.create(params)) as EthereumGasDiviner
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
15
|
)
|
package/src/Schema.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export const
|
|
1
|
+
export type EthereumGasDivinerQuerySchema = 'network.xyo.blockchain.ethereum.gas.diviner.query'
|
|
2
|
+
export const EthereumGasDivinerQuerySchema: EthereumGasDivinerQuerySchema = 'network.xyo.blockchain.ethereum.gas.diviner.query'
|
|
3
3
|
|
|
4
|
-
export type
|
|
5
|
-
export const
|
|
4
|
+
export type EthereumGasDivinerConfigSchema = 'network.xyo.blockchain.ethereum.gas.diviner.config'
|
|
5
|
+
export const EthereumGasDivinerConfigSchema: EthereumGasDivinerConfigSchema = 'network.xyo.blockchain.ethereum.gas.diviner.config'
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumGasPlugin } from './Plugin'
|
|
2
2
|
|
|
3
3
|
export * from './Diviner'
|
|
4
4
|
export * from './Schema'
|
|
5
5
|
|
|
6
|
-
export {
|
|
6
|
+
export { EthereumGasPlugin }
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line import/no-default-export
|
|
9
|
-
export default
|
|
9
|
+
export default EthereumGasPlugin
|
package/src/lib/divineGas.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumGasPayload, EthereumGasSchema, FeeData } from '@xyo-network/gas-price-payload-plugin'
|
|
2
2
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
3
3
|
import { Payload } from '@xyo-network/payload-model'
|
|
4
4
|
|
|
5
5
|
import { average } from './average'
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
isEthereumGasBlocknativePayload,
|
|
8
|
+
isEthereumGasEtherchainV2Payload,
|
|
9
|
+
isEthereumGasEtherscanPayload,
|
|
10
|
+
isEthereumGasEthersPayload,
|
|
11
|
+
isEthereumGasEthgasstationPayload,
|
|
12
12
|
} from './identities'
|
|
13
13
|
import {
|
|
14
14
|
transformGasFromBlocknative,
|
|
@@ -18,15 +18,15 @@ import {
|
|
|
18
18
|
transformGasFromEthgasstation,
|
|
19
19
|
} from './transforms'
|
|
20
20
|
|
|
21
|
-
export const divineGas = (payloads: Payload[]):
|
|
22
|
-
const blocknative = payloads.filter(
|
|
23
|
-
const etherchainV2 = payloads.filter(
|
|
24
|
-
const ethers = payloads.filter(
|
|
25
|
-
const etherscan = payloads.filter(
|
|
26
|
-
const ethgasstation = payloads.filter(
|
|
21
|
+
export const divineGas = (payloads: Payload[]): EthereumGasPayload => {
|
|
22
|
+
const blocknative = payloads.filter(isEthereumGasBlocknativePayload).map(transformGasFromBlocknative)
|
|
23
|
+
const etherchainV2 = payloads.filter(isEthereumGasEtherchainV2Payload).map(transformGasFromEtherchainV2)
|
|
24
|
+
const ethers = payloads.filter(isEthereumGasEthersPayload).map(transformGasFromEthers)
|
|
25
|
+
const etherscan = payloads.filter(isEthereumGasEtherscanPayload).map(transformGasFromEtherscan)
|
|
26
|
+
const ethgasstation = payloads.filter(isEthereumGasEthgasstationPayload).map(transformGasFromEthgasstation)
|
|
27
27
|
const transactionCosts: FeeData[] = [...blocknative, ...etherchainV2, ...ethers, ...etherscan, ...ethgasstation]
|
|
28
28
|
const avg = average(transactionCosts)
|
|
29
29
|
const timestamp = Date.now()
|
|
30
|
-
const payload = new PayloadBuilder<
|
|
30
|
+
const payload = new PayloadBuilder<EthereumGasPayload>({ schema: EthereumGasSchema }).fields({ ...avg, timestamp }).build()
|
|
31
31
|
return payload
|
|
32
32
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
1
|
+
export * from './isEthereumGasBlocknativePayload'
|
|
2
|
+
export * from './isEthereumGasEtherchainV2Payload'
|
|
3
|
+
export * from './isEthereumGasEtherscanPayload'
|
|
4
|
+
export * from './isEthereumGasEthersPayload'
|
|
5
|
+
export * from './isEthereumGasEthgasstationPayload'
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
2
|
+
import { Payload } from '@xyo-network/payload-model'
|
|
3
|
+
|
|
4
|
+
export const isEthereumGasBlocknativePayload = (payload?: Payload | null): payload is EthereumGasBlocknativePayload => {
|
|
5
|
+
return payload?.schema === EthereumGasBlocknativeSchema
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'
|
|
2
|
+
import { Payload } from '@xyo-network/payload-model'
|
|
3
|
+
|
|
4
|
+
export const isEthereumGasEtherchainV2Payload = (payload?: Payload | null): payload is EthereumGasEtherchainV2Payload => {
|
|
5
|
+
return payload?.schema === EthereumGasEtherchainV2Schema
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
|
|
2
|
+
import { Payload } from '@xyo-network/payload-model'
|
|
3
|
+
|
|
4
|
+
export const isEthereumGasEthersPayload = (payload?: Payload | null): payload is EthereumGasEthersPayload => {
|
|
5
|
+
return payload?.schema === EthereumGasEthersSchema
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EthereumGasEtherscanPayload, EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
|
|
2
|
+
import { Payload } from '@xyo-network/payload-model'
|
|
3
|
+
|
|
4
|
+
export const isEthereumGasEtherscanPayload = (payload?: Payload | null): payload is EthereumGasEtherscanPayload => {
|
|
5
|
+
return payload?.schema === EthereumGasEtherscanSchema
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EthereumGasEthgasstationPayload, EthereumGasEthgasstationSchema } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'
|
|
2
|
+
import { Payload } from '@xyo-network/payload-model'
|
|
3
|
+
|
|
4
|
+
export const isEthereumGasEthgasstationPayload = (payload?: Payload | null): payload is EthereumGasEthgasstationPayload => {
|
|
5
|
+
return payload?.schema === EthereumGasEthgasstationSchema
|
|
6
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
|
2
|
-
import {
|
|
2
|
+
import { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
3
3
|
import { FeeData, FeePerGas, PriorityFeePerGas } from '@xyo-network/gas-price-payload-plugin'
|
|
4
4
|
import { linear } from 'regression'
|
|
5
5
|
|
|
6
|
-
const getBaseFee = (payload:
|
|
6
|
+
const getBaseFee = (payload: EthereumGasBlocknativePayload): number | undefined => {
|
|
7
7
|
return payload?.blockPrices?.[0]?.baseFeePerGas
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
const getFeePerGas = (payload:
|
|
10
|
+
const getFeePerGas = (payload: EthereumGasBlocknativePayload): Partial<FeePerGas> => {
|
|
11
11
|
const sorted = payload.blockPrices?.[0].estimatedPrices?.sort((a, b) => a.confidence - b.confidence)
|
|
12
12
|
const trend = linear([
|
|
13
13
|
[0, sorted?.[0].price],
|
|
@@ -25,7 +25,7 @@ const getFeePerGas = (payload: XyoEthereumGasBlocknativePayload): Partial<FeePer
|
|
|
25
25
|
return feePerGas
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
const getPriorityFeePerGas = (payload:
|
|
28
|
+
const getPriorityFeePerGas = (payload: EthereumGasBlocknativePayload): Partial<PriorityFeePerGas> => {
|
|
29
29
|
const sorted = payload.blockPrices?.[0].estimatedPrices?.sort((a, b) => a.confidence - b.confidence)
|
|
30
30
|
const trend = linear([
|
|
31
31
|
[0, sorted?.[0].maxPriorityFeePerGas],
|
|
@@ -43,7 +43,7 @@ const getPriorityFeePerGas = (payload: XyoEthereumGasBlocknativePayload): Partia
|
|
|
43
43
|
return priorityFeePerGas
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
export const transformGasFromBlocknative = (payload:
|
|
46
|
+
export const transformGasFromBlocknative = (payload: EthereumGasBlocknativePayload): FeeData => {
|
|
47
47
|
const baseFee = getBaseFee(payload)
|
|
48
48
|
const feePerGas = getFeePerGas(payload)
|
|
49
49
|
const priorityFeePerGas = getPriorityFeePerGas(payload)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'
|
|
2
2
|
import { FeeData, FeePerGas } from '@xyo-network/gas-price-payload-plugin'
|
|
3
3
|
|
|
4
|
-
const getFeePerGas = (payload:
|
|
4
|
+
const getFeePerGas = (payload: EthereumGasEtherchainV2Payload): Partial<FeePerGas> => {
|
|
5
5
|
const { slow, standard, fast, rapid } = payload.data
|
|
6
6
|
const low = slow / 1_000_000_000
|
|
7
7
|
const medium = standard / 1_000_000_000
|
|
@@ -10,7 +10,7 @@ const getFeePerGas = (payload: XyoEthereumGasEtherchainV2Payload): Partial<FeePe
|
|
|
10
10
|
return { high, low, medium, veryHigh }
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export const transformGasFromEtherchainV2 = (payload:
|
|
13
|
+
export const transformGasFromEtherchainV2 = (payload: EthereumGasEtherchainV2Payload): FeeData => {
|
|
14
14
|
const baseFee = undefined
|
|
15
15
|
const feePerGas = getFeePerGas(payload)
|
|
16
16
|
const priorityFeePerGas = {}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
|
|
2
2
|
import { FeeData, FeePerGas, PriorityFeePerGas } from '@xyo-network/gas-price-payload-plugin'
|
|
3
3
|
|
|
4
|
-
const getBaseFee = (payload:
|
|
4
|
+
const getBaseFee = (payload: EthereumGasEthersPayload): number | undefined => {
|
|
5
5
|
const { lastBaseFeePerGas } = payload
|
|
6
6
|
return lastBaseFeePerGas ? lastBaseFeePerGas / 1_000_000_000 : undefined
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const getFeePerGas = (payload:
|
|
9
|
+
const getFeePerGas = (payload: EthereumGasEthersPayload): Partial<FeePerGas> => {
|
|
10
10
|
const { maxFeePerGas } = payload
|
|
11
11
|
const high = maxFeePerGas ? maxFeePerGas / 1_000_000_000 : undefined
|
|
12
12
|
return { high }
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const getPriorityFeePerGas = (payload:
|
|
15
|
+
const getPriorityFeePerGas = (payload: EthereumGasEthersPayload): Partial<PriorityFeePerGas> => {
|
|
16
16
|
const { maxPriorityFeePerGas } = payload
|
|
17
17
|
const high = maxPriorityFeePerGas ? maxPriorityFeePerGas / 1_000_000_000 : undefined
|
|
18
18
|
return { high }
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export const transformGasFromEthers = (payload:
|
|
21
|
+
export const transformGasFromEthers = (payload: EthereumGasEthersPayload): FeeData => {
|
|
22
22
|
const baseFee = getBaseFee(payload)
|
|
23
23
|
const feePerGas = getFeePerGas(payload)
|
|
24
24
|
const priorityFeePerGas = getPriorityFeePerGas(payload)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
|
|
2
2
|
import { FeeData, FeePerGas } from '@xyo-network/gas-price-payload-plugin'
|
|
3
3
|
import { linear } from 'regression'
|
|
4
4
|
|
|
5
|
-
const getBaseFee = (payload:
|
|
5
|
+
const getBaseFee = (payload: EthereumGasEtherscanPayload): number | undefined => {
|
|
6
6
|
const { suggestBaseFee } = payload.result
|
|
7
7
|
return parseFloat(suggestBaseFee)
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
const getFeePerGas = (payload:
|
|
10
|
+
const getFeePerGas = (payload: EthereumGasEtherscanPayload): Partial<FeePerGas> => {
|
|
11
11
|
const { FastGasPrice, ProposeGasPrice, SafeGasPrice } = payload.result
|
|
12
12
|
const low = parseFloat(SafeGasPrice)
|
|
13
13
|
const medium = parseFloat(ProposeGasPrice)
|
|
@@ -20,7 +20,7 @@ const getFeePerGas = (payload: XyoEthereumGasEtherscanPayload): Partial<FeePerGa
|
|
|
20
20
|
return { high, low, medium, veryHigh }
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export const transformGasFromEtherscan = (payload:
|
|
23
|
+
export const transformGasFromEtherscan = (payload: EthereumGasEtherscanPayload): FeeData => {
|
|
24
24
|
const baseFee = getBaseFee(payload)
|
|
25
25
|
const feePerGas = getFeePerGas(payload)
|
|
26
26
|
const priorityFeePerGas = {}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
|
2
|
-
import {
|
|
2
|
+
import { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'
|
|
3
3
|
import { FeeData, FeePerGas, PriorityFeePerGas } from '@xyo-network/gas-price-payload-plugin'
|
|
4
4
|
import { linear } from 'regression'
|
|
5
5
|
|
|
6
|
-
const getBaseFee = (payload:
|
|
6
|
+
const getBaseFee = (payload: EthereumGasEthgasstationPayload): number | undefined => {
|
|
7
7
|
const { baseFee } = payload
|
|
8
8
|
return baseFee
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
const getFeePerGas = (payload:
|
|
11
|
+
const getFeePerGas = (payload: EthereumGasEthgasstationPayload): Partial<FeePerGas> => {
|
|
12
12
|
const { standard: medium, fast: high, instant: veryHigh } = payload.gasPrice
|
|
13
13
|
const trend = linear([
|
|
14
14
|
[1, medium],
|
|
@@ -19,7 +19,7 @@ const getFeePerGas = (payload: XyoEthereumGasEthgasstationPayload): Partial<FeeP
|
|
|
19
19
|
return { low, medium, high, veryHigh }
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
const getPriorityFeePerGas = (payload:
|
|
22
|
+
const getPriorityFeePerGas = (payload: EthereumGasEthgasstationPayload): Partial<PriorityFeePerGas> => {
|
|
23
23
|
const { standard: medium, fast: high, instant: veryHigh } = payload.priorityFee
|
|
24
24
|
const trend = linear([
|
|
25
25
|
[1, medium],
|
|
@@ -30,7 +30,7 @@ const getPriorityFeePerGas = (payload: XyoEthereumGasEthgasstationPayload): Part
|
|
|
30
30
|
return { low, medium, high, veryHigh }
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export const transformGasFromEthgasstation = (payload:
|
|
33
|
+
export const transformGasFromEthgasstation = (payload: EthereumGasEthgasstationPayload): FeeData => {
|
|
34
34
|
const baseFee = getBaseFee(payload)
|
|
35
35
|
const feePerGas = getFeePerGas(payload)
|
|
36
36
|
const priorityFeePerGas = getPriorityFeePerGas(payload)
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
EstimatedBaseFee,
|
|
3
|
-
XyoEthereumGasBlocknativePayload,
|
|
4
|
-
XyoEthereumGasBlocknativeSchema,
|
|
5
|
-
} from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
1
|
+
import { EstimatedBaseFee, EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
6
2
|
|
|
7
|
-
export const sampleBlocknativeGas:
|
|
3
|
+
export const sampleBlocknativeGas: EthereumGasBlocknativePayload = {
|
|
8
4
|
blockPrices: [
|
|
9
5
|
{
|
|
10
6
|
baseFeePerGas: 13.691764456,
|
|
@@ -90,7 +86,7 @@ export const sampleBlocknativeGas: XyoEthereumGasBlocknativePayload = {
|
|
|
90
86
|
maxPrice: 36,
|
|
91
87
|
msSinceLastBlock: 3643,
|
|
92
88
|
network: 'main',
|
|
93
|
-
schema:
|
|
89
|
+
schema: EthereumGasBlocknativeSchema,
|
|
94
90
|
system: 'ethereum',
|
|
95
91
|
timestamp: 1668697958837,
|
|
96
92
|
unit: 'gwei',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'
|
|
2
2
|
|
|
3
|
-
export const sampleEtherchainGasV2:
|
|
3
|
+
export const sampleEtherchainGasV2: EthereumGasEtherchainV2Payload = {
|
|
4
4
|
code: 200,
|
|
5
5
|
data: {
|
|
6
6
|
fast: 19803047330,
|
|
@@ -10,6 +10,6 @@ export const sampleEtherchainGasV2: XyoEthereumGasEtherchainV2Payload = {
|
|
|
10
10
|
standard: 12000000000,
|
|
11
11
|
timestamp: 1668621234096,
|
|
12
12
|
},
|
|
13
|
-
schema:
|
|
13
|
+
schema: EthereumGasEtherchainV2Schema,
|
|
14
14
|
timestamp: 1668621240790,
|
|
15
15
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
|
|
2
2
|
|
|
3
|
-
export const sampleEthersGas:
|
|
3
|
+
export const sampleEthersGas: EthereumGasEthersPayload = {
|
|
4
4
|
gasPrice: 13547863640,
|
|
5
5
|
lastBaseFeePerGas: 13447862081,
|
|
6
6
|
maxFeePerGas: 28395724162,
|
|
7
7
|
maxPriorityFeePerGas: 1500000000,
|
|
8
|
-
schema:
|
|
8
|
+
schema: EthereumGasEthersSchema,
|
|
9
9
|
timestamp: 1668697958837,
|
|
10
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumGasEtherscanPayload, EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
|
|
2
2
|
|
|
3
|
-
export const sampleEtherscanGas:
|
|
3
|
+
export const sampleEtherscanGas: EthereumGasEtherscanPayload = {
|
|
4
4
|
message: 'OK',
|
|
5
5
|
result: {
|
|
6
6
|
FastGasPrice: '30',
|
|
@@ -10,7 +10,7 @@ export const sampleEtherscanGas: XyoEthereumGasEtherscanPayload = {
|
|
|
10
10
|
gasUsedRatio: '0.416266666666667,0.5672862,0.540979033333333,0.342410966666667,0.389071233333333',
|
|
11
11
|
suggestBaseFee: '27.616709247',
|
|
12
12
|
},
|
|
13
|
-
schema:
|
|
13
|
+
schema: EthereumGasEtherscanSchema,
|
|
14
14
|
status: '1',
|
|
15
15
|
timestamp: 1668697958837,
|
|
16
16
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumGasEthgasstationPayload, EthereumGasEthgasstationSchema } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'
|
|
2
2
|
|
|
3
|
-
export const sampleEthgasstationGas:
|
|
3
|
+
export const sampleEthgasstationGas: EthereumGasEthgasstationPayload = {
|
|
4
4
|
baseFee: 10,
|
|
5
5
|
blockNumber: 16028883,
|
|
6
6
|
blockTime: 11.88,
|
|
@@ -15,6 +15,6 @@ export const sampleEthgasstationGas: XyoEthereumGasEthgasstationPayload = {
|
|
|
15
15
|
instant: 2,
|
|
16
16
|
standard: 2,
|
|
17
17
|
},
|
|
18
|
-
schema:
|
|
18
|
+
schema: EthereumGasEthgasstationSchema,
|
|
19
19
|
timestamp: 1668697958837,
|
|
20
20
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isXyoEthereumGasBlocknativePayload = void 0;
|
|
4
|
-
const blocknative_ethereum_gas_payload_plugin_1 = require("@xyo-network/blocknative-ethereum-gas-payload-plugin");
|
|
5
|
-
const isXyoEthereumGasBlocknativePayload = (payload) => {
|
|
6
|
-
return (payload === null || payload === void 0 ? void 0 : payload.schema) === blocknative_ethereum_gas_payload_plugin_1.XyoEthereumGasBlocknativeSchema;
|
|
7
|
-
};
|
|
8
|
-
exports.isXyoEthereumGasBlocknativePayload = isXyoEthereumGasBlocknativePayload;
|
|
9
|
-
//# sourceMappingURL=isXyoEthereumGasBlocknativePayload.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isXyoEthereumGasBlocknativePayload.js","sourceRoot":"","sources":["../../../../src/lib/identities/isXyoEthereumGasBlocknativePayload.ts"],"names":[],"mappings":";;;AAAA,kHAAwI;AAGjI,MAAM,kCAAkC,GAAG,CAAC,OAAwB,EAA+C,EAAE;IAC1H,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,MAAK,yEAA+B,CAAA;AAC5D,CAAC,CAAA;AAFY,QAAA,kCAAkC,sCAE9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isXyoEthereumGasEtherchainV2Payload.js","sourceRoot":"","sources":["../../../../src/lib/identities/isXyoEthereumGasEtherchainV2Payload.ts"],"names":[],"mappings":";;;AAAA,wIAAqJ;AAG9I,MAAM,mCAAmC,GAAG,CAAC,OAAwB,EAAgD,EAAE;IAC5H,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,MAAK,qFAAgC,CAAA;AAC7D,CAAC,CAAA;AAFY,QAAA,mCAAmC,uCAE/C"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isXyoEthereumGasEthersPayload = void 0;
|
|
4
|
-
const ethers_ethereum_gas_payload_plugin_1 = require("@xyo-network/ethers-ethereum-gas-payload-plugin");
|
|
5
|
-
const isXyoEthereumGasEthersPayload = (payload) => {
|
|
6
|
-
return (payload === null || payload === void 0 ? void 0 : payload.schema) === ethers_ethereum_gas_payload_plugin_1.XyoEthereumGasEthersSchema;
|
|
7
|
-
};
|
|
8
|
-
exports.isXyoEthereumGasEthersPayload = isXyoEthereumGasEthersPayload;
|
|
9
|
-
//# sourceMappingURL=isXyoEthereumGasEthersPayload.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isXyoEthereumGasEthersPayload.js","sourceRoot":"","sources":["../../../../src/lib/identities/isXyoEthereumGasEthersPayload.ts"],"names":[],"mappings":";;;AAAA,wGAAyH;AAGlH,MAAM,6BAA6B,GAAG,CAAC,OAAwB,EAA0C,EAAE;IAChH,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,MAAK,+DAA0B,CAAA;AACvD,CAAC,CAAA;AAFY,QAAA,6BAA6B,iCAEzC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isXyoEthereumGasEtherscanPayload = void 0;
|
|
4
|
-
const etherscan_ethereum_gas_payload_plugin_1 = require("@xyo-network/etherscan-ethereum-gas-payload-plugin");
|
|
5
|
-
const isXyoEthereumGasEtherscanPayload = (payload) => {
|
|
6
|
-
return (payload === null || payload === void 0 ? void 0 : payload.schema) === etherscan_ethereum_gas_payload_plugin_1.XyoEthereumGasEtherscanSchema;
|
|
7
|
-
};
|
|
8
|
-
exports.isXyoEthereumGasEtherscanPayload = isXyoEthereumGasEtherscanPayload;
|
|
9
|
-
//# sourceMappingURL=isXyoEthereumGasEtherscanPayload.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isXyoEthereumGasEtherscanPayload.js","sourceRoot":"","sources":["../../../../src/lib/identities/isXyoEthereumGasEtherscanPayload.ts"],"names":[],"mappings":";;;AAAA,8GAAkI;AAG3H,MAAM,gCAAgC,GAAG,CAAC,OAAwB,EAA6C,EAAE;IACtH,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,MAAK,qEAA6B,CAAA;AAC1D,CAAC,CAAA;AAFY,QAAA,gCAAgC,oCAE5C"}
|