Skip to content

Commit

Permalink
Merge pull request #10 from SpecularL2/macwis/build-n-integration
Browse files Browse the repository at this point in the history
Build fix and integration
  • Loading branch information
macwis authored Jan 29, 2024
2 parents 78dd616 + f730b38 commit 9f0405c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,12 @@ jobs:
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
artifacts: "./dist/linux/spc-linux-amd64,./dist/macos/spc-macos-arm64"

- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push the Docker image
run: make docker-push
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,21 @@ build-linux:
.PHONY: build-macos # Build macOS binary
build-macos:
mkdir -p $(DIST_MACOS)
CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 $(GO_BUILD) -o ./$(DIST_MACOS)/$(BINARY_NAME)-macos-arm64 -v $(CMD_PATH)
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 $(GO_BUILD) -o ./$(DIST_MACOS)/$(BINARY_NAME)-macos-arm64 -v $(CMD_PATH)

.PHONY: build-docker # Build Docker image
build-docker:
docker build . -t ghcr.io/specularl2/specular-cli:latest -t spc

.PHONY: docker-push # Push Docker image to registry
docker-push:
docker push ghcr.io/specularl2/specular-cli:latest

.PHONY: build # Build Linux binary (alias)
build:
make build-linux
make build-macos
make build-docker

.PHONY: wire-generate # Generate Wire bindings
wire-generate:
Expand Down
13 changes: 7 additions & 6 deletions internal/spc/handlers/up/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"time"

"github.com/ethereum/go-ethereum/common"

"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethclient"

Expand All @@ -26,9 +27,10 @@ type UpHandler struct {
workspace *workspace.WorkspaceHandler
}

// nolint:unused
type CallArgs struct {
from *common.Address
to *common.Address
from *common.Address
to *common.Address
value *big.Int
}

Expand Down Expand Up @@ -138,7 +140,7 @@ func (u *UpHandler) StartL1Geth() error {
return nil
}

func (u *UpHandler) fundL1Accounts() error {
func (u *UpHandler) fundL1Accounts() error { // nolint:unused
usr, err := user.Current()
if err != nil {
return err
Expand Down Expand Up @@ -186,15 +188,14 @@ func (u *UpHandler) fundL1Accounts() error {
big.NewInt(10000),
)
if err != nil {
u.log.Warn(err)
u.log.Warn(err)
return err
}

u.log.Info("funded account")
time.Sleep(time.Second * 3)
balance, err := client.BalanceAt(context.Background(), toAddress, nil)
balance, _ := client.BalanceAt(context.Background(), toAddress, nil)
u.log.Info(balance)

}

return nil
Expand Down

0 comments on commit 9f0405c

Please sign in to comment.