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
d8780d84
Unverified
Commit
d8780d84
authored
Feb 18, 2022
by
Conner Fromknecht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add teleportr binary and Makefile skeleton
parent
014976df
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
0 deletions
+76
-0
.gitignore
go/teleportr/.gitignore
+1
-0
Makefile
go/teleportr/Makefile
+26
-0
main.go
go/teleportr/cmd/teleportr/main.go
+43
-0
package.json
go/teleportr/package.json
+6
-0
No files found.
go/teleportr/.gitignore
0 → 100644
View file @
d8780d84
/teleportr
go/teleportr/Makefile
0 → 100644
View file @
d8780d84
GITCOMMIT
:=
$(
shell
git rev-parse HEAD
)
GITDATE
:=
$(
shell
git show
-s
--format
=
'%ct'
)
GITVERSION
:=
$(
shell
cat
package.json | jq .version
)
LDFLAGSSTRING
+=
-X
main.GitCommit
=
$(GITCOMMIT)
LDFLAGSSTRING
+=
-X
main.GitDate
=
$(GITDATE)
LDFLAGSSTRING
+=
-X
main.GitVersion
=
$(GITVERSION)
LDFLAGS
:=
-ldflags
"
$(LDFLAGSSTRING)
"
teleportr
:
env
GO111MODULE
=
on go build
-v
$(LDFLAGS)
./cmd/teleportr
clean
:
rm
teleportr
test
:
go
test
-v
./...
lint
:
golangci-lint run ./...
.PHONY
:
\
teleportr
\
clean
\
test
\
lint
go/teleportr/cmd/teleportr/main.go
0 → 100644
View file @
d8780d84
package
main
import
(
"fmt"
"os"
"github.com/ethereum/go-ethereum/log"
"github.com/urfave/cli"
"github.com/ethereum-optimism/optimism/go/teleportr/flags"
)
var
(
GitVersion
=
""
GitCommit
=
""
GitDate
=
""
)
func
main
()
{
// Set up logger with a default INFO level in case we fail to parse flags.
// Otherwise the final critical log won't show what the parsing error was.
log
.
Root
()
.
SetHandler
(
log
.
LvlFilterHandler
(
log
.
LvlInfo
,
log
.
StreamHandler
(
os
.
Stdout
,
log
.
TerminalFormat
(
true
)),
),
)
app
:=
cli
.
NewApp
()
app
.
Flags
=
flags
.
Flags
app
.
Version
=
fmt
.
Sprintf
(
"%s-%s-%s"
,
GitVersion
,
GitCommit
,
GitDate
)
app
.
Name
=
"teleportr"
app
.
Usage
=
"Teleportr"
app
.
Description
=
"Teleportr bridge from L1 to L2"
app
.
Action
=
func
(
_
*
cli
.
Context
)
error
{
return
nil
}
err
:=
app
.
Run
(
os
.
Args
)
if
err
!=
nil
{
log
.
Crit
(
"Application failed"
,
"message"
,
err
)
}
}
go/teleportr/package.json
0 → 100644
View file @
d8780d84
{
"name"
:
"@eth-optimism/teleportr"
,
"version"
:
"0.0.0"
,
"private"
:
true
,
"devDependencies"
:
{}
}
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