@xyo-network/ethers-ethereum-gas-plugin 2.47.8 → 2.47.10

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/package.json CHANGED
@@ -12,16 +12,16 @@
12
12
  "dependencies": {
13
13
  "@ethersproject/providers": "^5.7.2",
14
14
  "@xylabs/assert": "^2.7.1",
15
- "@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.47.8",
16
- "@xyo-network/module": "^2.47.8",
17
- "@xyo-network/payload-builder": "^2.47.8",
18
- "@xyo-network/payload-model": "^2.47.8",
19
- "@xyo-network/payloadset-plugin": "^2.47.8",
20
- "@xyo-network/witness": "^2.47.8"
15
+ "@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.47.10",
16
+ "@xyo-network/module": "^2.47.10",
17
+ "@xyo-network/payload-builder": "^2.47.10",
18
+ "@xyo-network/payload-model": "^2.47.10",
19
+ "@xyo-network/payloadset-plugin": "^2.47.10",
20
+ "@xyo-network/witness": "^2.47.10"
21
21
  },
22
22
  "devDependencies": {
23
- "@xylabs/ts-scripts-yarn3": "^2.14.16",
24
- "@xylabs/tsconfig": "^2.14.16",
23
+ "@xylabs/ts-scripts-yarn3": "^2.15.0",
24
+ "@xylabs/tsconfig": "^2.15.0",
25
25
  "typescript": "^4.9.5"
26
26
  },
27
27
  "description": "Primary SDK for using XYO Protocol 2.0",
@@ -57,5 +57,5 @@
57
57
  },
58
58
  "sideEffects": false,
59
59
  "types": "dist/types/index.d.ts",
60
- "version": "2.47.8"
60
+ "version": "2.47.10"
61
61
  }
@@ -1,28 +0,0 @@
1
- import { InfuraProvider } from '@ethersproject/providers'
2
- import { XyoEthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
3
- import { PayloadWrapper } from '@xyo-network/payload-wrapper'
4
-
5
- import { XyoEthereumGasEthersWitnessConfigSchema } from './Schema'
6
- import { XyoEthereumGasEthersWitness } from './Witness'
7
-
8
- const projectId = process.env.INFURA_PROJECT_ID || ''
9
- const projectSecret = process.env.INFURA_PROJECT_SECRET || ''
10
-
11
- const testIf = (condition: string | undefined) => (condition ? it : it.skip)
12
-
13
- describe('XyoEthereumGasEthersWitness', () => {
14
- testIf(projectId && projectSecret)('returns observation', async () => {
15
- const provider = new InfuraProvider('homestead', { projectId: process.env.INFURA_PROJECT_ID, projectSecret })
16
- const sut = await XyoEthereumGasEthersWitness.create({
17
- config: {
18
- schema: XyoEthereumGasEthersWitnessConfigSchema,
19
- },
20
- provider,
21
- })
22
- const [actual] = await sut.observe()
23
- expect(actual.timestamp).toBeNumber()
24
- expect(actual.schema).toBe(XyoEthereumGasEthersSchema)
25
- const answerWrapper = new PayloadWrapper(actual)
26
- expect(answerWrapper.valid).toBe(true)
27
- })
28
- })
@@ -1,20 +0,0 @@
1
- import { InfuraProvider } from '@ethersproject/providers'
2
-
3
- import { getGasFromEthers } from '../getGasFromEthers'
4
-
5
- const projectId = process.env.INFURA_PROJECT_ID || ''
6
- const projectSecret = process.env.INFURA_PROJECT_SECRET || ''
7
-
8
- const testIf = (condition: boolean | string | null | undefined) => (condition ? it : it.skip)
9
-
10
- describe('getGasFromEthers', () => {
11
- testIf(projectId && projectSecret)('returns prices', async () => {
12
- const provider = new InfuraProvider('homestead', { projectId: process.env.INFURA_PROJECT_ID, projectSecret })
13
- const result = await getGasFromEthers(provider)
14
- expect(result).toBeObject()
15
- expect(result.gasPrice).toBeNumber()
16
- expect(result.lastBaseFeePerGas).toBeNumber()
17
- expect(result.maxFeePerGas).toBeNumber()
18
- expect(result.maxPriorityFeePerGas).toBeNumber()
19
- })
20
- })
@@ -1,23 +0,0 @@
1
- import { InfuraProvider } from '@ethersproject/providers'
2
- import { XyoEthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
3
- import { PayloadSetPluginResolver } from '@xyo-network/payloadset-plugin'
4
-
5
- import { XyoEthereumGasEthersPlugin } from '../Plugin'
6
- import { XyoEthereumGasEthersWitness } from '../Witness'
7
-
8
- const projectId = process.env.INFURA_PROJECT_ID || ''
9
- const projectSecret = process.env.INFURA_PROJECT_SECRET || ''
10
-
11
- const testIf = (condition: string | undefined) => (condition ? it : it.skip)
12
-
13
- describe('XyoEthereumGasEthersPlugin', () => {
14
- testIf(projectId && projectSecret)('Add to Resolver', () => {
15
- const provider = new InfuraProvider('homestead', { projectId: process.env.INFURA_PROJECT_ID, projectSecret })
16
- const plugin = XyoEthereumGasEthersPlugin()
17
- const resolver = new PayloadSetPluginResolver().register(plugin, {
18
- witness: { config: { schema: XyoEthereumGasEthersWitness.configSchema }, provider },
19
- })
20
- expect(resolver.resolve(plugin.set)).toBeObject()
21
- expect(resolver.witness(XyoEthereumGasEthersSchema)).toBeObject()
22
- })
23
- })