Skip to content

Conversation

@dimroc
Copy link

@dimroc dimroc commented Oct 25, 2018

Fixes #8


As seen here where we are using golang/dep to vendor our dependencies: smartcontractkit/chainlink#680 (comment)

Source

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.

Co-Authored-By: dimroc <dimroc@gmail.com>
@fjl
Copy link
Owner

fjl commented Feb 25, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants