This repository contains a collection of devcontainer features related to smart-contract programming
This repository contains at the moment a collection of two Features - foundry
and slither
. TEach sub-section below shows a sample devcontainer.json
alongside example usage of the Feature.
Install foundry framework, with an optional specific version.
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/astrodevs-labs/devcontainers-features/foundry:1": {
/* Non mandatory option */
"commit": "43b4e23252b00a871923fb0acff3550519af0e68"
}
}
}
$ forge -v
forge X.X.X (xxxxxx ...)
Install slither static analyzer
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/astrodevs-labs/devcontainers-features/slither:1": {}
}
}
$ slither --version
X.X.X
Similar to the devcontainers/features
repo, this repository has a src
folder. Each Feature has its own sub-folder, containing at least a devcontainer-feature.json
and an entrypoint script install.sh
.
├── src
│ ├── foundry
│ │ ├── devcontainer-feature.json
│ │ └── install.sh
│ ├── slither
│ │ ├── devcontainer-feature.json
│ │ └── install.sh
| ├── ...
│ │ ├── devcontainer-feature.json
│ │ └── install.sh
...
An implementing tool will composite the documented dev container properties from the feature's devcontainer-feature.json
file, and execute in the install.sh
entrypoint script in the container during build time.