mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 09:51:36 +00:00
* Initial plan * Initial plan * cmd/pushtx, .github/workflows: add raw transaction broadcast tool with funnel fallback Add a standalone CLI tool (pushtx) for decoding and submitting raw signed Ethereum transactions to any JSON-RPC endpoint. Includes Gnosis Safe funnel fallback for insufficient-funds scenarios and calldata detection for the common RLP broadcast error. Files added: - cmd/pushtx/main.go: core tool with tx decode, summary, and broadcast - cmd/pushtx/funnel.go: Gnosis Safe execTransaction fallback - cmd/pushtx/main_test.go: tests for core functionality - cmd/pushtx/funnel_test.go: tests for funnel and calldata detection - .github/workflows/build.yml: CI workflow for build and test Files modified: - Makefile: add pushtx target - .gitignore: add cmd/pushtx/pushtx binary Co-authored-by: drqsatoshi <240532885+drqsatoshi@users.noreply.github.com> * cmd/pushtx: add Tenderly simulation URL to funnel comment Co-authored-by: drqsatoshi <240532885+drqsatoshi@users.noreply.github.com> * Initial plan * Initial plan Co-authored-by: drqsatoshi <240532885+drqsatoshi@users.noreply.github.com> * Makefile, build/ci.go: add pushtx to .PHONY and distribution archives Co-authored-by: drqsatoshi <240532885+drqsatoshi@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: drqsatoshi <240532885+drqsatoshi@users.noreply.github.com>
69 lines
1.9 KiB
Makefile
69 lines
1.9 KiB
Makefile
# This Makefile is meant to be used by people that do not usually work
|
|
# with Go source code. If you know what GOPATH is then you probably
|
|
# don't need to bother with make.
|
|
|
|
.PHONY: geth pushtx evm all test lint fmt clean devtools help
|
|
|
|
GOBIN = ./build/bin
|
|
GO ?= latest
|
|
GORUN = go run
|
|
|
|
#? geth: Build geth.
|
|
geth:
|
|
$(GORUN) build/ci.go install ./cmd/geth
|
|
@echo "Done building."
|
|
@echo "Run \"$(GOBIN)/geth\" to launch geth."
|
|
|
|
#? pushtx: Build pushtx.
|
|
pushtx:
|
|
$(GORUN) build/ci.go install ./cmd/pushtx
|
|
@echo "Done building."
|
|
@echo "Run \"$(GOBIN)/pushtx\" to launch pushtx."
|
|
|
|
#? evm: Build evm.
|
|
evm:
|
|
$(GORUN) build/ci.go install ./cmd/evm
|
|
@echo "Done building."
|
|
@echo "Run \"$(GOBIN)/evm\" to launch evm."
|
|
|
|
#? all: Build all packages and executables.
|
|
all:
|
|
$(GORUN) build/ci.go install
|
|
|
|
#? test: Run the tests.
|
|
test: all
|
|
$(GORUN) build/ci.go test
|
|
|
|
#? lint: Run certain pre-selected linters.
|
|
lint: ## Run linters.
|
|
$(GORUN) build/ci.go lint
|
|
|
|
#? fmt: Ensure consistent code formatting.
|
|
fmt:
|
|
gofmt -s -w $(shell find . -name "*.go")
|
|
|
|
#? clean: Clean go cache, built executables, and the auto generated folder.
|
|
clean:
|
|
go clean -cache
|
|
rm -fr build/_workspace/pkg/ $(GOBIN)/*
|
|
|
|
# The devtools target installs tools required for 'go generate'.
|
|
# You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'.
|
|
|
|
#? devtools: Install recommended developer tools.
|
|
devtools:
|
|
env GOBIN= go install golang.org/x/tools/cmd/stringer@latest
|
|
env GOBIN= go install github.com/fjl/gencodec@latest
|
|
env GOBIN= go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
|
env GOBIN= go install ./cmd/abigen
|
|
@type "solc" 2> /dev/null || echo 'Please install solc'
|
|
@type "protoc" 2> /dev/null || echo 'Please install protoc'
|
|
|
|
#? help: Get more info on make commands.
|
|
help: Makefile
|
|
@echo ''
|
|
@echo 'Usage:'
|
|
@echo ' make [target]'
|
|
@echo ''
|
|
@echo 'Targets:'
|
|
@sed -n 's/^#?//p' $< | column -t -s ':' | sort | sed -e 's/^/ /'
|