Skip to content

Commit

Permalink
Bump github.com/ethereum/go-ethereum from 1.13.14 to 1.14.0 (#45)
Browse files Browse the repository at this point in the history
* Bump github.com/ethereum/go-ethereum from 1.13.14 to 1.14.0

Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.13.14 to 1.14.0.
- [Release notes](https://github.com/ethereum/go-ethereum/releases)
- [Commits](ethereum/go-ethereum@v1.13.14...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/ethereum/go-ethereum
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: lmittmann <[email protected]>
  • Loading branch information
dependabot[bot] and lmittmann authored Apr 30, 2024
1 parent 4fb589a commit ccb564f
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 334 deletions.
22 changes: 7 additions & 15 deletions console.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,26 @@ import (

"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/core/tracing"
"github.com/lmittmann/go-solc/internal/console"
)

// NewConsole returns a [vm.EVMLogger] that logs calls of console.sol to the
// given testing.TB.
//
// To use console logging in your Solidity contract, import "console.sol".
func NewConsole(tb testing.TB) vm.EVMLogger {
return &consoleTracer{tb: tb}
func NewConsole(tb testing.TB) *tracing.Hooks {
tracer := &consoleTracer{tb: tb}
return &tracing.Hooks{
OnEnter: tracer.enterHook,
}
}

type consoleTracer struct {
tb testing.TB
}

func (ct *consoleTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) {
func (ct *consoleTracer) enterHook(depth int, typ byte, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) {
if to != console.Addr || len(input) < 4 {
return
}
Expand Down Expand Up @@ -58,14 +61,3 @@ func (ct *consoleTracer) log(args abi.Arguments, data []byte) {
}
ct.tb.Log(strings.Join(strVals, " "))
}

func (*consoleTracer) CaptureTxStart(uint64) {}
func (*consoleTracer) CaptureTxEnd(uint64) {}
func (*consoleTracer) CaptureStart(*vm.EVM, common.Address, common.Address, bool, []byte, uint64, *big.Int) {
}
func (*consoleTracer) CaptureEnd([]byte, uint64, error) {}
func (*consoleTracer) CaptureExit([]byte, uint64, error) {}
func (*consoleTracer) CaptureState(uint64, vm.OpCode, uint64, uint64, *vm.ScopeContext, []byte, int, error) {
}
func (*consoleTracer) CaptureFault(uint64, vm.OpCode, uint64, uint64, *vm.ScopeContext, int, error) {
}
2 changes: 1 addition & 1 deletion examples/console/console_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/lmittmann/w3/w3vm"
)

var c = solc.New("0.8.21")
var c = solc.New("0.8.25")

func TestNewConsole(t *testing.T) {
// compile contract
Expand Down
26 changes: 13 additions & 13 deletions examples/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.22

require (
github.com/lmittmann/go-solc v0.0.0
github.com/lmittmann/w3 v0.15.0
github.com/lmittmann/w3 v0.16.0
)

replace github.com/lmittmann/go-solc => ../
Expand All @@ -18,25 +18,25 @@ require (
github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/errors v1.9.1 // indirect
github.com/cockroachdb/errors v1.11.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect
github.com/cockroachdb/redact v1.1.3 // indirect
github.com/cockroachdb/pebble v1.1.0 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/ethereum/go-ethereum v1.13.14 // indirect
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
github.com/ethereum/go-ethereum v1.14.0 // indirect
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect
github.com/getsentry/sentry-go v0.18.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
Expand All @@ -60,14 +60,14 @@ require (
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.15.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
golang.org/x/tools v0.20.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)
Loading

0 comments on commit ccb564f

Please sign in to comment.