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
99021e29
Unverified
Commit
99021e29
authored
Mar 16, 2022
by
smartcontracts
Committed by
GitHub
Mar 16, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2316 from ethereum-optimism/sc/remove-dtl-client
maint(dtl): remove unused L1DataTransportClient
parents
c4120a2f
075f4b66
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
98 deletions
+6
-98
cuddly-hotels-tell.md
.changeset/cuddly-hotels-tell.md
+5
-0
package.json
packages/data-transport-layer/package.json
+1
-5
client.ts
packages/data-transport-layer/src/client/client.ts
+0
-74
index.ts
packages/data-transport-layer/src/index.ts
+0
-1
yarn.lock
yarn.lock
+0
-18
No files found.
.changeset/cuddly-hotels-tell.md
0 → 100644
View file @
99021e29
---
'
@eth-optimism/data-transport-layer'
:
patch
---
Removes the unused L1DataTransportClient and its dependencies
packages/data-transport-layer/package.json
View file @
99021e29
...
@@ -47,24 +47,20 @@
...
@@ -47,24 +47,20 @@
"axios"
:
"^0.21.1"
,
"axios"
:
"^0.21.1"
,
"bcfg"
:
"^0.1.6"
,
"bcfg"
:
"^0.1.6"
,
"bfj"
:
"^7.0.2"
,
"bfj"
:
"^7.0.2"
,
"browser-or-node"
:
"^1.3.0"
,
"cors"
:
"^2.8.5"
,
"cors"
:
"^2.8.5"
,
"dotenv"
:
"^10.0.0"
,
"dotenv"
:
"^10.0.0"
,
"ethers"
:
"^5.5.4"
,
"ethers"
:
"^5.5.4"
,
"express"
:
"^4.17.1"
,
"express"
:
"^4.17.1"
,
"express-prom-bundle"
:
"^6.3.6"
,
"express-prom-bundle"
:
"^6.3.6"
,
"level"
:
"^6.0.1"
,
"level"
:
"^6.0.1"
,
"levelup"
:
"^4.4.0"
,
"levelup"
:
"^4.4.0"
"node-fetch"
:
"^2.6.1"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"@types/browser-or-node"
:
"^1.3.0"
,
"@types/chai"
:
"^4.2.18"
,
"@types/chai"
:
"^4.2.18"
,
"@types/chai-as-promised"
:
"^7.1.4"
,
"@types/chai-as-promised"
:
"^7.1.4"
,
"@types/cors"
:
"^2.8.9"
,
"@types/cors"
:
"^2.8.9"
,
"@types/levelup"
:
"^4.3.0"
,
"@types/levelup"
:
"^4.3.0"
,
"@types/mocha"
:
"^8.2.2"
,
"@types/mocha"
:
"^8.2.2"
,
"@types/node-fetch"
:
"^2.5.10"
,
"@typescript-eslint/eslint-plugin"
:
"^4.26.0"
,
"@typescript-eslint/eslint-plugin"
:
"^4.26.0"
,
"@typescript-eslint/parser"
:
"^4.26.0"
,
"@typescript-eslint/parser"
:
"^4.26.0"
,
"babel-eslint"
:
"^10.1.0"
,
"babel-eslint"
:
"^10.1.0"
,
...
...
packages/data-transport-layer/src/client/client.ts
deleted
100644 → 0
View file @
c4120a2f
// Only load if not in browser.
import
{
isNode
}
from
'
browser-or-node
'
// eslint-disable-next-line no-var
declare
var
window
:
any
const
fetch
=
isNode
?
require
(
'
node-fetch
'
)
:
window
.
fetch
import
{
EnqueueResponse
,
StateRootBatchResponse
,
StateRootResponse
,
SyncingResponse
,
TransactionBatchResponse
,
TransactionResponse
,
}
from
'
../types
'
export
class
L1DataTransportClient
{
constructor
(
private
url
:
string
)
{}
public
async
syncing
():
Promise
<
SyncingResponse
>
{
return
this
.
_get
(
`/eth/syncing`
)
}
public
async
getEnqueueByIndex
(
index
:
number
):
Promise
<
EnqueueResponse
>
{
return
this
.
_get
(
`/enqueue/index/
${
index
}
`
)
}
public
async
getLatestEnqueue
():
Promise
<
EnqueueResponse
>
{
return
this
.
_get
(
`/enqueue/latest`
)
}
public
async
getTransactionByIndex
(
index
:
number
):
Promise
<
TransactionResponse
>
{
return
this
.
_get
(
`/transaction/index/
${
index
}
`
)
}
public
async
getLatestTransacton
():
Promise
<
TransactionResponse
>
{
return
this
.
_get
(
`/transaction/latest`
)
}
public
async
getTransactionBatchByIndex
(
index
:
number
):
Promise
<
TransactionBatchResponse
>
{
return
this
.
_get
(
`/batch/transaction/index/
${
index
}
`
)
}
public
async
getLatestTransactionBatch
():
Promise
<
TransactionBatchResponse
>
{
return
this
.
_get
(
`/batch/transaction/latest`
)
}
public
async
getStateRootByIndex
(
index
:
number
):
Promise
<
StateRootResponse
>
{
return
this
.
_get
(
`/stateroot/index/
${
index
}
`
)
}
public
async
getLatestStateRoot
():
Promise
<
StateRootResponse
>
{
return
this
.
_get
(
`/stateroot/latest`
)
}
public
async
getStateRootBatchByIndex
(
index
:
number
):
Promise
<
StateRootBatchResponse
>
{
return
this
.
_get
(
`/batch/stateroot/index/
${
index
}
`
)
}
public
async
getLatestStateRootBatch
():
Promise
<
StateRootBatchResponse
>
{
return
this
.
_get
(
`/batch/stateroot/latest`
)
}
private
async
_get
<
TResponse
>
(
endpoint
:
string
):
Promise
<
TResponse
>
{
return
(
await
fetch
(
`
${
this
.
url
}${
endpoint
}
`
)).
json
()
}
}
packages/data-transport-layer/src/index.ts
View file @
99021e29
export
*
from
'
./client/client
'
export
*
from
'
./types
'
export
*
from
'
./types
'
yarn.lock
View file @
99021e29
...
@@ -3035,11 +3035,6 @@
...
@@ -3035,11 +3035,6 @@
"@types/connect" "*"
"@types/connect" "*"
"@types/node" "*"
"@types/node" "*"
"@types/browser-or-node@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@types/browser-or-node/-/browser-or-node-1.3.0.tgz#896ec59bcb8109fc858d8e68d3c056c176a19622"
integrity sha512-MVetr65IR7RdJbUxVHsaPFaXAO8fi89zv1g8L/mHygh1Q7xnnK02XZLwfMh57FOpTO6gtnagoPMQ/UOFfctXRQ==
"@types/chai-as-promised@^7.1.4":
"@types/chai-as-promised@^7.1.4":
version "7.1.4"
version "7.1.4"
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.4.tgz#caf64e76fb056b8c8ced4b761ed499272b737601"
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.4.tgz#caf64e76fb056b8c8ced4b761ed499272b737601"
...
@@ -3168,14 +3163,6 @@
...
@@ -3168,14 +3163,6 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.3.tgz#bbeb55fbc73f28ea6de601fbfa4613f58d785323"
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.3.tgz#bbeb55fbc73f28ea6de601fbfa4613f58d785323"
integrity sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==
integrity sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==
"@types/node-fetch@^2.5.10":
version "2.5.12"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.12.tgz#8a6f779b1d4e60b7a57fb6fd48d84fb545b9cc66"
integrity sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==
dependencies:
"@types/node" "*"
form-data "^3.0.0"
"@types/node-fetch@^2.5.5":
"@types/node-fetch@^2.5.5":
version "2.5.10"
version "2.5.10"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.10.tgz#9b4d4a0425562f9fcea70b12cb3fcdd946ca8132"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.10.tgz#9b4d4a0425562f9fcea70b12cb3fcdd946ca8132"
...
@@ -4825,11 +4812,6 @@ brorand@^1.0.1, brorand@^1.1.0:
...
@@ -4825,11 +4812,6 @@ brorand@^1.0.1, brorand@^1.1.0:
resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=
integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=
browser-or-node@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/browser-or-node/-/browser-or-node-1.3.0.tgz#f2a4e8568f60263050a6714b2cc236bb976647a7"
integrity sha512-0F2z/VSnLbmEeBcUrSuDH5l0HxTXdQQzLjkmBR4cYfvg1zJrKSlmIZFqyFR8oX0NrwPhy3c3HQ6i3OxMbew4Tg==
browser-stdout@1.3.1:
browser-stdout@1.3.1:
version "1.3.1"
version "1.3.1"
resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60"
resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60"
...
...
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