From ec49806b93674aedc27e1c7d50dedb198285f242 Mon Sep 17 00:00:00 2001 From: Meek Msaki <98189596+mmsaki@users.noreply.github.com> Date: Sat, 2 Mar 2024 11:21:58 +0000 Subject: [PATCH 1/2] add devcontainer for codespaces users --- .devcontainer/devcontainer.json | 24 ++++++++++++++++++++++++ .github/dependabot.yml | 12 ++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .github/dependabot.yml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..333604d --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,24 @@ +{ + "name": "Gas Optimizations", + "image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye", + // FIXME: Uncomment feature if foundry adds this https://github.com/foundry-rs/foundry/issues/7290 + // "features": { + // "ghcr.io/foundry-rs/foundry": {} + // } + // "postCreateCommand": "forge test --gas-report", + + // TODO: Remove commands if this feature is added https://github.com/foundry-rs/foundry/issues/7290 + "postCreateCommand": "curl -L https://foundry.paradigm.xyz | bash", + "postStartCommand": "/home/vscode/.foundry/bin/foundryup", + "postAttachCommand": "/home/vscode/.foundry/bin/forge test --gas-report", + + "customizations": { + "vscode": { + "extensions": [ + "JuanBlanco.solidity", + "hosho.solidity-debugger", + "wayou.vscode-todo-highlight" + ] + } + } +} diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f33a02c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for more information: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +# https://containers.dev/guide/dependabot + +version: 2 +updates: + - package-ecosystem: "devcontainers" + directory: "/" + schedule: + interval: weekly From a9ba76e645dc49af8ea15236ecc1eb3b10b1c2c2 Mon Sep 17 00:00:00 2001 From: Meek Msaki <98189596+mmsaki@users.noreply.github.com> Date: Sat, 2 Mar 2024 11:22:06 +0000 Subject: [PATCH 2/2] Add devcontainer.json * adds `devcontainer.json` for codespace users * We install foundry packages using use `"postCreateCommand"` commands * See TODO and FIXME comments for later updates to `devcontainer.json` --- test/Gas.UnitTests.t.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Gas.UnitTests.t.sol b/test/Gas.UnitTests.t.sol index 1a3548d..0ddc3cf 100644 --- a/test/Gas.UnitTests.t.sol +++ b/test/Gas.UnitTests.t.sol @@ -196,5 +196,5 @@ contract GasTest is Test { vm.stopPrank(); } - function testGetPaymentStatus(address sender) public { + function testGetPaymentStatus(address sender) public {} }