Documentation ¶
Overview ¶
Package solc provides bindings for the Solidity compiler.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileInDirWithCertainFiles ¶
func CompileInDirWithCertainFiles()
func NewConsole ¶
NewConsole returns a vm.EVMLogger that logs calls of console.sol to the given testing.TB.
Types ¶
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
func (*Compiler) BuildSettings ¶
func (*Compiler) Compile ¶
Compile all contracts in the given directory and return the contract code of the contract with the given name.
func (*Compiler) CompileSingleFile ¶
func (*Compiler) MustCompile ¶
MustCompile is like Compiler.Compile but panics on error.
type Contract ¶
type Contract struct { Code []byte // The bytecode of the contract after deployment. DeployCode []byte // The bytecode to deploy the contract. Metadata string }
Contract represents a compiled contract.
type EVMVersion ¶
type EVMVersion string
EVMVersion represents the EVM version to compile for.
const ( EVMVersionCancun EVMVersion = "cancun" EVMVersionShanghai EVMVersion = "shanghai" EVMVersionParis EVMVersion = "paris" EVMVersionLondon EVMVersion = "london" EVMVersionBerlin EVMVersion = "berlin" EVMVersionIstanbul EVMVersion = "istanbul" EVMVersionPetersburg EVMVersion = "petersburg" EVMVersionByzantium EVMVersion = "byzantium" )
type Option ¶
type Option func(*Settings)
An Option configures the compilation Settings.
func WithEVMVersion ¶
func WithEVMVersion(evmVersion EVMVersion) Option
WithEVMVersion configures the compilation Settings to set the given EVM version.
func WithOptimizer ¶
WithOptimizer configures the compilation Settings to set the given Optimizer.
type Settings ¶
type Settings struct { Remappings []string `json:"remappings,omitempty"` Optimizer *Optimizer `json:"optimizer"` ViaIR bool `json:"viaIR,omitempty"` EVMVersion EVMVersion `json:"evmVersion"` OutputSelection map[string]map[string][]string `json:"outputSelection"` // contains filtered or unexported fields }
Settings for the compilation.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.