Documentation
¶
Overview ¶
Package bundle packs a built forge project into the contracts bundle that op-deployer runs forge on.
Index ¶
Constants ¶
const CompileCacheFile = "cache/solidity-files-cache.json"
CompileCacheFile is forge's compile cache, relative to the project.
const ScriptReadDir = "forge-artifacts"
ScriptReadDir is the directory of a bundle that op-deployer lets scripts read, whatever the compile cache names as the artifacts directory.
Variables ¶
This section is empty.
Functions ¶
func ArtifactsDir ¶
ArtifactsDir returns the artifacts directory of the forge project at dir, relative to it and with slashes, as its compile cache records it. It fails with fs.ErrNotExist when the project has no compile cache.
func Write ¶
Write writes the contracts bundle of the built forge project at absBase to w as a tar archive. The bundle leaves out the AST of each artifact: forge parses every artifact of a script's build at the start of a run, and the AST is most of the artifacts' size and of forge's memory. It also leaves out the Solidity files outside the libraries that are not sources of the build, and the files of the libraries other than Solidity files, license files and forge configs. It keeps the compile cache and the build infos as they are, so that forge does not compile. exclude holds more glob patterns of files to leave out. A commit that is not empty is written to the COMMIT file.
Write copies no link. It fails on a link that is, is in, or holds a part of the build, which the bundle would miss, and skips every other link.
Types ¶
This section is empty.