The abigen exclusion pattern, previously on the form "path:type", now supports wildcards. Examples "*:type" to exclude a named type in all files, or "/path/to/foo.sol:*" all types in foo.sol.
This changes the CI build to store the git commit and date into package
internal/version instead of package main. Doing this essentially merges our
two ways of tracking the go-ethereum version into a single place, achieving
two objectives:
- Bad block reports, which use version.Info(), will now have the git commit
information even when geth is built in an environment such as
launchpad.net where git access is unavailable.
- For geth builds created by `go build ./cmd/geth` (i.e. not using `go run
build/ci.go install`), git information stored by the go tool is now used
in the p2p node name as well as in `geth version` and `geth
version-check`.
This change updates our urfave/cli dependency to the v2 branch of the library.
There are some Go API changes in cli v2:
- Flag values can now be accessed using the methods ctx.Bool,
ctx.Int, ctx.String, ... regardless of whether the flag is 'local' or
'global'.
- v2 has built-in support for flag categories. Our home-grown category
system is removed and the categories of flags are assigned as part of
the flag definition.
For users, there is only one observable difference with cli v2: flags must now
strictly appear before regular arguments. For example, the following command is
now invalid:
geth account import mykey.json --password file.txt
Instead, the command must be invoked as follows:
geth account import --password file.txt mykey.json
* accounts/abi/bind: fix duplicate field names in the generated go struct #24627
* accounts, cmd/abigen: resolve name conflicts
* ci lint, accounts/abi: remove unused function overloadedArgName
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* doc: clarify abigen alias flag usage
update the `abigen --alias` flag help info, give an example to make it more clear
related issue: https://github.com/ethereum/go-ethereum/issues/21846
* Update cmd/abigen/main.go
Co-authored-by: ligi <ligi@ligi.de>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: ligi <ligi@ligi.de>
* accounts, abigen: link dependent libs in deploy
* abigen: add java generation
* bind: Fix unit tests
* abigen: add unit test
* Fix CI
* Post-rebase fixes
* Fix rebase issue
* accounts/abi: Gary's review feedback
* accounts/abi: More Gary feedback
* accounts/abi: minor fixes
* accounts/abi, cmd/abigen: support tuple
accounts/abi/bind, cmd/abigen: add objc back
accounts/abi/bind: use byte[24] as function indicator
accounts/abi/bind: resolve struct slice or array
accounts/abi/bind: remove sort logic
accounts: fix issues in abi
* accounts/abi: address comment
* accounts/abi/bind: Accept function ptr parameter
They are translated as [24]byte
* Add Java template version
* accounts/abi/bind: fix merge issue
* Fix CI
Allow the --abi flag to be given - to indicate that it should read the
ABI information from standard input. It expects to read the solc output
with the --combined-json flag providing bin, abi, userdoc, devdoc, and
metadata, and works very similarly to the internal invocation of solc,
except it allows external invocation of solc.
This facilitates integration with more complex solc invocations, such
as invocations that require path remapping or --allow-paths tweaks.
Simple usage example:
solc --combined-json bin,abi,userdoc,devdoc,metadata *.sol | abigen --abi -
Support for legacy version 0.9.x is gone. The compiler version is no
longer cached. Compilation results (and the version) are read directly
from stdout using the --combined-json flag. As a workaround for
ethereum/solidity#651, source code is written to a temporary file before
compilation.
Integration of solc in package ethapi and cmd/abigen is now much simpler
because the compiler wrapper is no longer passed around as a pointer.
Fixes#2806, accidentally