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
8af6726b
Unverified
Commit
8af6726b
authored
Aug 15, 2023
by
Ethen Pociask
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[indexer.docs] Updated api.go
parent
ea0bf501
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
api.go
indexer/api/api.go
+3
-12
No files found.
indexer/api/api.go
View file @
8af6726b
...
@@ -2,7 +2,6 @@ package api
...
@@ -2,7 +2,6 @@ package api
import
(
import
(
"encoding/json"
"encoding/json"
"fmt"
"net/http"
"net/http"
"github.com/ethereum-optimism/optimism/indexer/database"
"github.com/ethereum-optimism/optimism/indexer/database"
...
@@ -10,14 +9,6 @@ import (
...
@@ -10,14 +9,6 @@ import (
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5"
)
)
const
(
depositPath
=
"/api/v0/deposits/"
withdrawalPath
=
"/api/v0/withdrawals/"
healthzPath
=
"/healthz"
addressParam
=
"{address:.+}"
)
type
PaginationResponse
struct
{
type
PaginationResponse
struct
{
// TODO type this better
// TODO type this better
Data
interface
{}
`json:"data"`
Data
interface
{}
`json:"data"`
...
@@ -100,9 +91,9 @@ func NewApi(bv database.BridgeTransfersView) *Api {
...
@@ -100,9 +91,9 @@ func NewApi(bv database.BridgeTransfersView) *Api {
// these regex are .+ because I wasn't sure what they should be
// these regex are .+ because I wasn't sure what they should be
// don't want a regex for addresses because would prefer to validate the address
// don't want a regex for addresses because would prefer to validate the address
// with go-ethereum and throw a friendly error message
// with go-ethereum and throw a friendly error message
r
.
Get
(
fmt
.
Sprintf
(
"%s%s"
,
depositPath
,
addressParam
)
,
api
.
L1DepositsHandler
)
r
.
Get
(
"/api/v0/deposits/{address:.+}"
,
api
.
L1DepositsHandler
)
r
.
Get
(
fmt
.
Sprintf
(
"%s%s"
,
withdrawalPath
,
addressParam
)
,
api
.
L2WithdrawalsHandler
)
r
.
Get
(
"/api/v0/withdrawals/{address:.+}"
,
api
.
L2WithdrawalsHandler
)
r
.
Get
(
healthzPath
,
api
.
HealthzHandler
)
r
.
Get
(
"/healthz"
,
api
.
HealthzHandler
)
return
api
return
api
...
...
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