Skip to content

Commit

Permalink
Merge pull request #1 from 1Hive/allo-v2
Browse files Browse the repository at this point in the history
✨ allo-v2 foundry
  • Loading branch information
kamikazebr authored Dec 4, 2023
2 parents df35629 + 6af20d1 commit df919b3
Show file tree
Hide file tree
Showing 9 changed files with 2,531 additions and 2,215 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/allo-v2"]
path = lib/allo-v2
url = https://github.com/allo-protocol/allo-v2
133 changes: 132 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,138 @@
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#default-profile
[profile.default]
src = 'pkg/contracts/src'
test = 'pkg/contracts/test'
out = 'pkg/contracts/out'
libs = ['lib']

# See more config options https://github.com/foundry-rs/foundry/tree/master/config
# auto_detect_remappings = true # recursive auto-detection of remappings
# remappings = []
# # list of libraries to link in the form of `<path to lib>:<lib name>:<address>`: `"src/MyLib.sol:MyLib:0x8De6DDbCd5053d32292AAA0D2105A32d108484a6"`
# # the <path to lib> supports remappings
# libraries = []
# cache = true
# cache_path = 'cache'
# broadcast = 'broadcast'
# # additional solc allow paths
# allow_paths = []
# # additional solc include paths
# include_paths = []
# force = false
# evm_version = 'shanghai'
# gas_reports = ['*']
# gas_reports_ignore = []
# ## Sets the concrete solc version to use, this overrides the `auto_detect_solc` value
# # solc = '0.8.10'
# auto_detect_solc = true
# offline = false
# optimizer = true
# optimizer_runs = 200
# model_checker = { contracts = { 'a.sol' = [
# 'A1',
# 'A2',
# ], 'b.sol' = [
# 'B1',
# 'B2',
# ] }, engine = 'chc', targets = [
# 'assert',
# 'outOfBounds',
# ], timeout = 10000 }
# verbosity = 0
# eth_rpc_url = "https://example.com/"
# # Setting this option enables decoding of error traces from mainnet deployed / verfied contracts via etherscan
# etherscan_api_key = "YOURETHERSCANAPIKEY"
# # ignore solc warnings for missing license and exceeded contract size
# # known error codes are: ["unreachable", "unused-return", "unused-param", "unused-var", "code-size", "shadowing", "func-mutability", "license", "pragma-solidity", "virtual-interfaces", "same-varname"]
# # additional warnings can be added using their numeric error code: ["license", 1337]
# ignored_error_codes = ["license", "code-size"]
# deny_warnings = false
# match_test = "Foo"
# no_match_test = "Bar"
# match_contract = "Foo"
# no_match_contract = "Bar"
# match_path = "*/Foo*"
# no_match_path = "*/Bar*"
# ffi = false
# # These are the default callers, generated using `address(uint160(uint256(keccak256("foundry default caller"))))`
# sender = '0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38'
# tx_origin = '0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38'
# initial_balance = '0xffffffffffffffffffffffff'
# block_number = 0
# fork_block_number = 0
# chain_id = 1
# # NOTE due to a toml-rs limitation, this value needs to be a string if the desired gas limit exceeds `i64::MAX` (9223372036854775807)
# # `gas_limit = "Max"` is equivalent to `gas_limit = "18446744073709551615"`
# gas_limit = 9223372036854775807
# gas_price = 0
# block_base_fee_per_gas = 0
# block_coinbase = '0x0000000000000000000000000000000000000000'
# block_timestamp = 0
# block_difficulty = 0
# block_prevrandao = '0x0000000000000000000000000000000000000000'
# block_gas_limit = 30000000
# memory_limit = 134217728
# extra_output = ["metadata"]
# extra_output_files = []
# names = false
# sizes = false
# via_ir = false
# # caches storage retrieved locally for certain chains and endpoints
# # can also be restricted to `chains = ["optimism", "mainnet"]`
# # by default all endpoints will be cached, alternative options are "remote" for only caching non localhost endpoints and "<regex>"
# # to disable storage caching entirely set `no_storage_caching = true`
# rpc_storage_caching = { chains = "all", endpoints = "all" }
# # this overrides `rpc_storage_caching` entirely
# no_storage_caching = false
# # Whether to store the referenced sources in the metadata as literal data.
# use_literal_content = false
# # use ipfs method to generate the metadata hash, solc's default.
# # To not include the metadata hash, to allow for deterministic code: https://docs.soliditylang.org/en/latest/metadata.html, use "none"
# bytecode_hash = "ipfs"
# # Whether to append the metadata hash to the bytecode
# cbor_metadata = true
# # How to treat revert (and require) reason strings.
# # Possible values are: "default", "strip", "debug" and "verboseDebug".
# # "default" does not inject compiler-generated revert strings and keeps user-supplied ones.
# # "strip" removes all revert strings (if possible, i.e. if literals are used) keeping side-effects
# # "debug" injects strings for compiler-generated internal reverts, implemented for ABI encoders V1 and V2 for now.
# # "verboseDebug" even appends further information to user-supplied revert strings (not yet implemented)
# revert_strings = "default"
# # If this option is enabled, Solc is instructed to generate output (bytecode) only for the required contracts
# # this can reduce compile time for `forge test` a bit but is considered experimental at this point.
# sparse_mode = false
# build_info = true
# build_info_path = "build-info"
# root = "root"
# # Configures permissions for cheatcodes that touch the filesystem like `vm.writeFile`
# # `access` restricts how the `path` can be accessed via cheatcodes
# # `read-write` | `true` => `read` + `write` access allowed (`vm.readFile` + `vm.writeFile`)
# # `none`| `false` => no access
# # `read` => only read access (`vm.readFile`)
# # `write` => only write access (`vm.writeFile`)
# # The `allowed_paths` further lists the paths that are considered, e.g. `./` represents the project root directory
# # By default, only read access is granted to the project's out dir, so generated artifacts can be read by default
# # following example enables read-write access for the project dir :
# # `fs_permissions = [{ access = "read-write", path = "./"}]`
# fs_permissions = [{ access = "read", path = "./out"}]
# [fuzz]
# runs = 256
# max_test_rejects = 65536
# seed = '0x3e8'

# dictionary_weight = 40
# include_storage = true
# include_push_bytes = true

# [invariant]
# runs = 256
# depth = 15
# fail_on_revert = false
# call_override = false
# dictionary_weight = 80
# include_storage = true
# include_push_bytes = true
# shrink_sequence = true

# [fmt]
# line_length = 100
# tab_width = 2
43 changes: 43 additions & 0 deletions gardens-v2.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"folders": [
{
"name": "Frontend",
"path": "./apps/web"
},
{
"name": "Foundry",
"path": "./pkg/contracts"
},
{
"name": "Subgraph",
"path": "./pkg/subgraph"
},
{
"name": "Root",
"path": "."
},
// {
// "path": "packages/nextjs/public/assets"
// }
],
"settings": {
"editor.tabSize": 2,
"prettier.tabWidth": 4,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[solidity]": {
"editor.defaultFormatter": "NomicFoundation.hardhat-solidity"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
}
},
"extensions": {
"recommendations": [
"esbenp.prettier-vscode",
"dsznajder.es7-react-js-snippets",
"dbaeumer.vscode-eslint",
"xabikos.javascriptsnippets",
"styled-components.vscode-styled-components"
]
}
}
1 change: 1 addition & 0 deletions lib/allo-v2
Submodule allo-v2 added at de7b8c
2 changes: 2 additions & 0 deletions pkg/contracts/src/Counter.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import "allo-v2/core/Allo.sol";

contract Counter {
uint256 public number;

Expand Down
4 changes: 2 additions & 2 deletions pkg/subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 blossom/counter"
},
"dependencies": {
"@graphprotocol/graph-cli": "^0.37.2",
"@graphprotocol/graph-ts": "^0.29.1"
"@graphprotocol/graph-cli": "^0.62.0",
"@graphprotocol/graph-ts": "^0.31.0"
},
"devDependencies": {
"mustache": "^4.2.0"
Expand Down
Loading

0 comments on commit df919b3

Please sign in to comment.