From a6722d74139d4916a150c2de740ad7756bebda38 Mon Sep 17 00:00:00 2001
From: lady Dao <159568696+ladydao@users.noreply.github.com>
Date: Mon, 19 Feb 2024 18:52:29 +0100
Subject: [PATCH] Initial commit
---
.gas-snapshot | 1 +
.github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++
.gitignore | 2 ++
.gitmodules | 3 +++
LICENSE | 24 ++++++++++++++++++++++++
README.md | 39 +++++++++++++++++++++++++++++++++++++++
foundry.toml | 2 ++
lib/forge-std | 1 +
src/Contract.sol | 4 ++++
test/Contract.t.sol | 23 +++++++++++++++++++++++
10 files changed, 128 insertions(+)
create mode 100644 .gas-snapshot
create mode 100644 .github/workflows/ci.yml
create mode 100644 .gitignore
create mode 100644 .gitmodules
create mode 100644 LICENSE
create mode 100644 README.md
create mode 100644 foundry.toml
create mode 160000 lib/forge-std
create mode 100644 src/Contract.sol
create mode 100644 test/Contract.t.sol
diff --git a/.gas-snapshot b/.gas-snapshot
new file mode 100644
index 0000000..7b7b9ec
--- /dev/null
+++ b/.gas-snapshot
@@ -0,0 +1 @@
+TestContract:testBar() (gas: 401)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..fbe7307
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,29 @@
+name: CI
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+
+env:
+ FOUNDRY_PROFILE: ci
+
+jobs:
+ run-ci:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Install Foundry
+ uses: foundry-rs/foundry-toolchain@v1
+ with:
+ version: nightly
+
+ - name: Install deps
+ run: forge install
+
+ - name: Check gas snapshots
+ run: forge snapshot --check
+
+ - name: Run tests
+ run: forge test
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d8a1d07
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+cache/
+out/
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..888d42d
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "lib/forge-std"]
+ path = lib/forge-std
+ url = https://github.com/foundry-rs/forge-std
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..68a49da
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to