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
01dccf49
Unverified
Commit
01dccf49
authored
Nov 22, 2021
by
Conner Fromknecht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add CTC and SCC contract bindings
parent
5ed7f75a
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2425 additions
and
0 deletions
+2425
-0
Makefile
go/batch-submitter/Makefile
+40
-0
canonical_transaction_chain.go
...tch-submitter/bindings/ctc/canonical_transaction_chain.go
+1522
-0
state_commitment_chain.go
go/batch-submitter/bindings/scc/state_commitment_chain.go
+862
-0
go.sum
go/batch-submitter/go.sum
+1
-0
No files found.
go/batch-submitter/Makefile
View file @
01dccf49
...
...
@@ -7,6 +7,9 @@ LDFLAGSSTRING +=-X main.GitDate=$(GITDATE)
LDFLAGSSTRING
+=
-X
main.GitVersion
=
$(GITVERSION)
LDFLAGS
:=
-ldflags
"
$(LDFLAGSSTRING)
"
CTC_ABI_ARTIFACT
:=
../../packages/contracts/artifacts/contracts/L1/rollup/CanonicalTransactionChain.sol/CanonicalTransactionChain.json
SCC_ABI_ARTIFACT
:=
../../packages/contracts/artifacts/contracts/L1/rollup/StateCommitmentChain.sol/StateCommitmentChain.json
batch-submitter
:
env
GO111MODULE
=
on go build
-v
$(LDFLAGS)
./cmd/batch-submitter
...
...
@@ -19,8 +22,45 @@ test:
lint
:
golangci-lint run ./...
bindings
:
bindings-ctc bindings-scc
bindings-ctc
:
$
(
eval
temp :
=
$(
shell
mktemp
)
)
cat
$(CTC_ABI_ARTIFACT)
\
|
jq
-r
.bytecode
>
$(temp)
cat
$(CTC_ABI_ARTIFACT)
\
|
jq
.abi
\
|
abigen
--pkg
ctc
\
--abi
-
\
--out
bindings/ctc/canonical_transaction_chain.go
\
--type
CanonicalTransactionChain
\
--bin
$(temp)
rm
$(temp)
bindings-scc
:
$
(
eval
temp :
=
$(
shell
mktemp
)
)
cat
$(SCC_ABI_ARTIFACT)
\
|
jq
-r
.bytecode
>
$(temp)
cat
$(SCC_ABI_ARTIFACT)
\
|
jq
.abi
\
|
abigen
--pkg
scc
\
--abi
-
\
--out
bindings/scc/state_commitment_chain.go
\
--type
StateCommitmentChain
\
--bin
$(temp)
rm
$(temp)
.PHONY
:
\
batch-submitter
\
bindings
\
bindings-ctc
\
bindings-scc
\
clean
\
test
\
lint
go/batch-submitter/bindings/ctc/canonical_transaction_chain.go
0 → 100644
View file @
01dccf49
This diff is collapsed.
Click to expand it.
go/batch-submitter/bindings/scc/state_commitment_chain.go
0 → 100644
View file @
01dccf49
This diff is collapsed.
Click to expand it.
go/batch-submitter/go.sum
View file @
01dccf49
...
...
@@ -81,6 +81,7 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk=
github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
...
...
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