mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-15 16:33:47 +00:00
accounts/abi/bind: remove unused fields from template structs
This commit is contained in:
parent
6afe90dddd
commit
5eb7271f0b
2 changed files with 27 additions and 30 deletions
|
|
@ -238,7 +238,6 @@ func Bind(types []string, abis []string, bytecodes []string, fsigs []map[string]
|
||||||
Receive: receive,
|
Receive: receive,
|
||||||
Events: events,
|
Events: events,
|
||||||
Libraries: make(map[string]string),
|
Libraries: make(map[string]string),
|
||||||
AllLibraries: make(map[string]string),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function 4-byte signatures are stored in the same sequence
|
// Function 4-byte signatures are stored in the same sequence
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ type tmplData struct {
|
||||||
Package string // Name of the package to place the generated file in
|
Package string // Name of the package to place the generated file in
|
||||||
Contracts map[string]*tmplContract // List of contracts to generate into this file
|
Contracts map[string]*tmplContract // List of contracts to generate into this file
|
||||||
Libraries map[string]string // Map the bytecode's link pattern to the library name
|
Libraries map[string]string // Map the bytecode's link pattern to the library name
|
||||||
InvertedLibs map[string]string // map of the contract's name to the link pattern
|
|
||||||
Structs map[string]*tmplStruct // Contract struct type definitions
|
Structs map[string]*tmplStruct // Contract struct type definitions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -44,7 +43,6 @@ type tmplContract struct {
|
||||||
Receive *tmplMethod // Additional special receive function
|
Receive *tmplMethod // Additional special receive function
|
||||||
Events map[string]*tmplEvent // Contract events accessors
|
Events map[string]*tmplEvent // Contract events accessors
|
||||||
Libraries map[string]string // Same as tmplData, but filtered to only keep direct deps that the contract needs
|
Libraries map[string]string // Same as tmplData, but filtered to only keep direct deps that the contract needs
|
||||||
AllLibraries map[string]string // same as Libraries, but all direct/indirect library dependencies
|
|
||||||
Library bool // Indicator whether the contract is a library
|
Library bool // Indicator whether the contract is a library
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -55,7 +53,7 @@ type tmplContractV2 struct {
|
||||||
Constructor abi.Method // Contract constructor for deploy parametrization
|
Constructor abi.Method // Contract constructor for deploy parametrization
|
||||||
Calls map[string]*tmplMethod // All contract methods (excluding fallback, receive)
|
Calls map[string]*tmplMethod // All contract methods (excluding fallback, receive)
|
||||||
Events map[string]*tmplEvent // Contract events accessors
|
Events map[string]*tmplEvent // Contract events accessors
|
||||||
Libraries map[string]string // all direct/indirect library dependencies
|
Libraries map[string]string // all direct library dependencies
|
||||||
Errors map[string]*tmplError // all errors defined
|
Errors map[string]*tmplError // all errors defined
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue