package store
import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
)
//go:generate gencodec -type Log -field-override logMarshaling -out output.go
type Log struct {
Address common.Address `json:"address" gencodec:"required"`
// list of topics provided by the contract.
Topics []common.Hash `json:"topics" gencodec:"required"`
// supplied by the contract, usually ABI-encoded
Data []byte `json:"data" gencodec:"required"`
}
type logMarshaling struct {
Data hexutil.Bytes
}
Before
// Code generated by github.com/fjl/gencodec. DO NOT EDIT.
package store
import (
"encoding/json"
"errors"
"github.com/smartcontractkit/chainlink/vendor/github.com/ethereum/go-ethereum/common"
"github.com/smartcontractkit/chainlink/vendor/github.com/ethereum/go-ethereum/common/hexutil"
)
...
Now
// Code generated by github.com/fjl/gencodec. DO NOT EDIT.
package store
import (
"encoding/json"
"errors"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
)
...
It has been difficult to reproduce the error in the test suite because this project does not use golang/dep to vendor dependencies.
Sorry, I've been really slow catching up with GH notifications. I don't think this is a good solution. We should try to remove the use of goimports instead.
Fixes https://github.com/fjl/gencodec/issues/8
As seen here where we are using golang/dep to vendor our dependencies: https://github.com/smartcontractkit/chainlink/pull/680#issuecomment-432803279
Source
Before
Now
It has been difficult to reproduce the error in the test suite because this project does not use golang/dep to vendor dependencies.