Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
270873d5
Unverified
Commit
270873d5
authored
Aug 16, 2023
by
Wyatt Barnes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename OptimismFeeEstimationPlugin to OptimismPlugin
parent
44aa740f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
plugin.spec.ts
packages/web3js-plugin/src/plugin.spec.ts
+6
-6
plugin.ts
packages/web3js-plugin/src/plugin.ts
+2
-2
No files found.
packages/web3js-plugin/src/plugin.spec.ts
View file @
270873d5
...
@@ -8,7 +8,7 @@ import {
...
@@ -8,7 +8,7 @@ import {
optimistAddress
,
optimistAddress
,
}
from
'
@eth-optimism/contracts-ts
'
}
from
'
@eth-optimism/contracts-ts
'
import
{
Optimism
FeeEstimation
Plugin
}
from
'
./plugin
'
import
{
OptimismPlugin
}
from
'
./plugin
'
const
defaultProvider
=
'
https://mainnet.optimism.io
'
const
defaultProvider
=
'
https://mainnet.optimism.io
'
const
provider
=
z
const
provider
=
z
...
@@ -21,17 +21,17 @@ if (provider === defaultProvider)
...
@@ -21,17 +21,17 @@ if (provider === defaultProvider)
'
Warning: Using default public provider, this could cause tests to fail due to rate limits. Set the VITE_L2_RPC_URL env to override default provider
'
'
Warning: Using default public provider, this could cause tests to fail due to rate limits. Set the VITE_L2_RPC_URL env to override default provider
'
)
)
describe
(
'
Optimism
FeeEstimation
Plugin
'
,
()
=>
{
describe
(
'
OptimismPlugin
'
,
()
=>
{
let
web3
:
Web3
let
web3
:
Web3
beforeAll
(()
=>
{
beforeAll
(()
=>
{
web3
=
new
Web3
(
provider
)
web3
=
new
Web3
(
provider
)
web3
.
registerPlugin
(
new
Optimism
FeeEstimation
Plugin
())
web3
.
registerPlugin
(
new
OptimismPlugin
())
})
})
test
(
'
should be registered under .op namespace
'
,
()
=>
test
(
'
should be registered under .op namespace
'
,
()
=>
expect
(
web3
.
op
).
toMatchInlineSnapshot
(
`
expect
(
web3
.
op
).
toMatchInlineSnapshot
(
`
Optimism
FeeEstimation
Plugin {
OptimismPlugin {
"_accountProvider": {
"_accountProvider": {
"create": [Function],
"create": [Function],
"decrypt": [Function],
"decrypt": [Function],
...
@@ -62,7 +62,7 @@ describe('OptimismFeeEstimationPlugin', () => {
...
@@ -62,7 +62,7 @@ describe('OptimismFeeEstimationPlugin', () => {
Symbol(kCapture): false,
Symbol(kCapture): false,
},
},
"_provider": HttpProvider {
"_provider": HttpProvider {
"clientUrl": "https://
mainnet.optimism.io
",
"clientUrl": "https://
opt-mainnet.g.alchemy.com/v2/OVlbpe9COlhG-ijOXGvL_phb5ns6p9-w
",
"httpProviderOptions": undefined,
"httpProviderOptions": undefined,
},
},
"useRpcCallSpecification": undefined,
"useRpcCallSpecification": undefined,
...
@@ -88,7 +88,7 @@ describe('OptimismFeeEstimationPlugin', () => {
...
@@ -88,7 +88,7 @@ describe('OptimismFeeEstimationPlugin', () => {
Symbol(kCapture): false,
Symbol(kCapture): false,
},
},
"_provider": HttpProvider {
"_provider": HttpProvider {
"clientUrl": "https://
mainnet.optimism.io
",
"clientUrl": "https://
opt-mainnet.g.alchemy.com/v2/OVlbpe9COlhG-ijOXGvL_phb5ns6p9-w
",
"httpProviderOptions": undefined,
"httpProviderOptions": undefined,
},
},
"useRpcCallSpecification": undefined,
"useRpcCallSpecification": undefined,
...
...
packages/web3js-plugin/src/plugin.ts
View file @
270873d5
...
@@ -17,7 +17,7 @@ import {
...
@@ -17,7 +17,7 @@ import {
}
from
'
@eth-optimism/contracts-ts
'
}
from
'
@eth-optimism/contracts-ts
'
import
{
RLP
}
from
'
@ethereumjs/rlp
'
import
{
RLP
}
from
'
@ethereumjs/rlp
'
export
class
Optimism
FeeEstimation
Plugin
extends
Web3PluginBase
{
export
class
OptimismPlugin
extends
Web3PluginBase
{
public
pluginNamespace
=
'
op
'
public
pluginNamespace
=
'
op
'
private
_gasPriceOracleContract
:
private
_gasPriceOracleContract
:
...
@@ -323,6 +323,6 @@ export class OptimismFeeEstimationPlugin extends Web3PluginBase {
...
@@ -323,6 +323,6 @@ export class OptimismFeeEstimationPlugin extends Web3PluginBase {
// Module Augmentation to add op namespace to root {web3} instance
// Module Augmentation to add op namespace to root {web3} instance
declare
module
'
web3
'
{
declare
module
'
web3
'
{
interface
Web3Context
{
interface
Web3Context
{
op
:
Optimism
FeeEstimation
Plugin
op
:
OptimismPlugin
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment