From f35f345ca10dda310a7bf72cbc4d4ccc77b41f2a Mon Sep 17 00:00:00 2001 From: Pascal Marco Caversaccio Date: Sun, 31 Jul 2022 11:00:31 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20add=20foundry=20directories?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pascal Marco Caversaccio --- .gitignore | 25 +++++++++++++++++++++++++ .gitmodules | 3 +++ README.md | 1 + foundry.toml | 12 ++++++++++++ lib/forge-std | 1 + src/SimpleStore.vy | 15 +++++++++++++++ test/.gitkeep | 0 7 files changed, 57 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 foundry.toml create mode 160000 lib/forge-std create mode 100644 src/SimpleStore.vy create mode 100644 test/.gitkeep diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..fed918ad --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +# Ignore all Visual Studio Code settings +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local history for Visual Studio Code +.history + +# Built Visual Studio Code extensions +*.vsix + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# Foundry files +bin +cache +out diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..f67502a8 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/forge-std"] + path = lib/forge-std + url = https://github.com/foundry-rs/forge-std.git diff --git a/README.md b/README.md index 02cb9560..1af4acc5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # 🐍 snekmate + State-of-the-art, highly opinionated, hyper-optimised, and secure Vyper smart contract building blocks. diff --git a/foundry.toml b/foundry.toml new file mode 100644 index 00000000..2c5d162a --- /dev/null +++ b/foundry.toml @@ -0,0 +1,12 @@ +## defaults for all profiles +[default] +src = 'src' # the source directory +test = 'test' # the test directory +out = 'out' # the output directory (for artifacts) +libs = ['lib'] # a list of library directories +remappings = ['ds-test/=lib/ds-test/src/'] # a list of remappings +cache = true # whether to cache builds or not +cache_path = 'cache' # where the cache is stored if enabled +force = true # whether to ignore the cache (clean build) +ffi = true # whether to enable foreign function interface (ffi) cheatcodes or not +verbosity = 3 # the verbosity of tests diff --git a/lib/forge-std b/lib/forge-std new file mode 160000 index 00000000..27e14b7f --- /dev/null +++ b/lib/forge-std @@ -0,0 +1 @@ +Subproject commit 27e14b7f2448e5f5ac32719f51fe652aa0b0733e diff --git a/src/SimpleStore.vy b/src/SimpleStore.vy new file mode 100644 index 00000000..34370c5f --- /dev/null +++ b/src/SimpleStore.vy @@ -0,0 +1,15 @@ + +val: uint256 + +@external +def __init__(_val: uint256): + self.val = _val + + +@external +def store(_val: uint256): + self.val = _val + +@external +def get() -> uint256: + return self.val diff --git a/test/.gitkeep b/test/.gitkeep new file mode 100644 index 00000000..e69de29b