bundle

package
v1.20.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package bundle packs a built forge project into the contracts bundle that op-deployer runs forge on.

Index

Constants

View Source
const CompileCacheFile = "cache/solidity-files-cache.json"

CompileCacheFile is forge's compile cache, relative to the project.

View Source
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

func ArtifactsDir(dir string) (string, error)

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

func Write(w io.Writer, absBase string, exclude []string, commit string) error

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 that are not sources of the build, and the other files of the libraries except for 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL