@contracts:solidity.compiler
Compile Solidity source (inline text or a http/ipfs URL) and return the long compiler version (0.8.26+commit.8a97fa7a), ready for verify --compiler. Pass the same options as the matching @solidity call so the cached compile is reused.
Returns: string
Syntax
Section titled “Syntax”@contracts:solidity.compiler(source ...options)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
source | string | Solidity source code, or a URL to fetch it from |
[...options] | string | Compiler options, e.g. version:0.8.26, runs:1000, via-ir |
Examples
Section titled “Examples”# Get the compiler version string for verificationset $compiler @contracts:solidity.compiler('https://sources.example.com/Counter.sol')print $compiler