Skip to content

Commit

Permalink
attempt to fix TestGolangBindings (erigontech#7041)
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov authored and ty-sentio-xyz committed Mar 16, 2023
1 parent 7db77c7 commit 2a9a41e
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ devtools:
# Notice! If you adding new binary - add it also to cmd/hack/binary-deps/main.go file
$(GOBUILD) -o $(GOBIN)/go-bindata github.com/kevinburke/go-bindata/go-bindata
$(GOBUILD) -o $(GOBIN)/gencodec github.com/fjl/gencodec
$(GOBUILD) -o $(GOBIN)/codecgen github.com/ugorji/go/codec/codecgen
$(GOBUILD) -o $(GOBIN)/abigen ./cmd/abigen
$(GOBUILD) -o $(GOBIN)/codecgen github.com/ugorji/go/codec/codecgen
PATH=$(GOBIN):$(PATH) go generate ./common
PATH=$(GOBIN):$(PATH) go generate ./core/types
# PATH=$(GOBIN):$(PATH) go generate ./core/types
PATH=$(GOBIN):$(PATH) go generate ./consensus/aura/...
#PATH=$(GOBIN):$(PATH) go generate ./eth/ethconfig/...
@type "npm" 2> /dev/null || echo 'Please install node.js and npm'
Expand Down
24 changes: 12 additions & 12 deletions accounts/abi/bind/bind_test.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion accounts/abi/bind/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ var (
{{decapitalise $name}}Addr, _, _, _ := Deploy{{capitalise $name}}(auth, backend)
{{$contract.Type}}Bin = strings.Replace({{$contract.Type}}Bin, "__${{$pattern}}$__", {{decapitalise $name}}Addr.String()[2:], -1)
{{end}}
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex({{.Type}}Bin), backend {{range .Constructor.Inputs}}, {{.Name}}{{end}})
address, tx, contract, err := bind.DeployContract(auth, parsed, libcommon.FromHex({{.Type}}Bin), backend {{range .Constructor.Inputs}}, {{.Name}}{{end}})
if err != nil {
return libcommon.Address{}, nil, nil, err
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/abigen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ func init() {
}

func abigen(c *cli.Context) error {
//fmt.Printf("a? %s\n", c.FlagNames())

utils.CheckExclusive(c, &abiFlag, &jsonFlag, &solFlag, &vyFlag) // Only one source can be selected.
if c.String(pkgFlag.Name) == "" {
utils.Fatalf("No destination package specified (--pkg)")
Expand Down
5 changes: 3 additions & 2 deletions cmd/evm/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
"github.com/ledgerwatch/erigon-lib/chain"
libcommon "github.com/ledgerwatch/erigon-lib/common"
common2 "github.com/ledgerwatch/erigon-lib/common/dbg"
"github.com/ledgerwatch/erigon-lib/common/hexutility"
"github.com/ledgerwatch/erigon-lib/kv/kvcfg"
"github.com/ledgerwatch/erigon-lib/kv/memdb"
"github.com/ledgerwatch/log/v3"
Expand Down Expand Up @@ -202,7 +203,7 @@ func runCmd(ctx *cli.Context) error {
fmt.Printf("Invalid input length for hex data (%d)\n", len(hexcode))
os.Exit(1)
}
code = common.FromHex(string(hexcode))
code = hexutility.MustDecodeHex(string(hexcode))
} else if fn := ctx.Args().First(); len(fn) > 0 {
// EASM-file to compile
src, err := os.ReadFile(fn)
Expand Down Expand Up @@ -266,7 +267,7 @@ func runCmd(ctx *cli.Context) error {
} else {
hexInput = []byte(ctx.String(InputFlag.Name))
}
input := common.FromHex(string(bytes.TrimSpace(hexInput)))
input := hexutility.MustDecodeHex(string(bytes.TrimSpace(hexInput)))

var execFunc func() ([]byte, uint64, error)
if ctx.Bool(CreateFlag.Name) {
Expand Down
3 changes: 1 addition & 2 deletions consensus/aura/auraabi/gen_block_reward.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions consensus/aura/auraabi/gen_validator_set.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 9 additions & 10 deletions core/types/gen_withdrawal_json.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/contracts/build/testcontract.bin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
608060405234801561001057600080fd5b5033600090815260208190526040902060649055610208806100336000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063c2ce0ef711610066578063c2ce0ef71461010a578063c53e5ae314610127578063cb946a0714610127578063d592ed1f14610144578063f64c050d1461010a5761009e565b806327e235e3146100a3578063660cc200146100db578063780900dc146100e557806382ab890a146100e5578063a7f4377914610102575b600080fd5b6100c9600480360360208110156100b957600080fd5b50356001600160a01b031661014c565b60408051918252519081900360200190f35b6100e361015e565b005b6100e3600480360360208110156100fb57600080fd5b5035610170565b6100e3610182565b6100e36004803603602081101561012057600080fd5b5035610194565b6100e36004803603602081101561013d57600080fd5b50356101a8565b6100e36101bd565b60006020819052908152604090205481565b33600090815260208190526040812055fe5b33600090815260208190526040902055565b33600090815260208190526040812055565b336000908152602081905260409020819055fe5b33600090815260208190526040812082905580fd5b33600090815260208190526040812081905580fdfea2646970667358221220c40698b47133056d15d4a84d769c07a1f24008b50347105be970e1f0191ca44f64736f6c63430007020033
608060405234801561001057600080fd5b503360009081526020819052604090206064905561023a806100336000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063c2ce0ef711610066578063c2ce0ef714610114578063c53e5ae314610127578063cb946a0714610127578063d592ed1f1461013a578063f64c050d1461011457600080fd5b806327e235e3146100a3578063660cc200146100d5578063780900dc146100df57806382ab890a146100df578063a7f43779146100ff575b600080fd5b6100c36100b13660046101a5565b60006020819052908152604090205481565b60405190815260200160405180910390f35b6100dd610142565b005b6100dd6100ed3660046101d5565b33600090815260208190526040902055565b6100dd33600090815260208190526040812055565b6100dd6101223660046101d5565b61015c565b6100dd6101353660046101d5565b610179565b6100dd610190565b3360009081526020819052604081205561015a6101ee565b565b3360009081526020819052604090208190556101766101ee565b50565b336000908152602081905260408120829055819080fd5b33600090815260208190526040812081905580fd5b6000602082840312156101b757600080fd5b81356001600160a01b03811681146101ce57600080fd5b9392505050565b6000602082840312156101e757600080fd5b5035919050565b634e487b7160e01b600052600160045260246000fdfea2646970667358221220cbc0ec1bd2504a9e5d6a3f3a8b92de36a1af219062eec962f407d937d0acadc664736f6c63430008130033

0 comments on commit 2a9a41e

Please sign in to comment.