Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: foundry #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#
root = true

# All files
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

# Solidity
# https://github.com/sambacha/prettier-config-solidity
[*.sol]
indent_size = 4
indent_style = space

# q
# kdb+
[*.q]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# Markdown
[*.{md,adoc,asciidoc}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = false

# Match nix files, set indent to spaces with width of two
[*.nix]
indent_style = space
indent_size = 2

# JavaScript, JSON, JSX, JavaScript Modules, TypeScript
# https://github.com/feross/standard
# https://prettier.io
[*.{cjs,js,json,jsx,mjs,ts,tsx,mts,cts}]
indent_size = 2
indent_style = space

# TOML
# https://github.com/toml-lang/toml/tree/master/examples
[*.toml]
indent_size = 2
indent_style = space

# YAML
# http://yaml.org/spec/1.2/2009-07-21/spec.html#id2576668
[*.{yaml,yml}]
indent_size = 2
indent_style = space

# Shell
# https://google.github.io/styleguide/shell.xml#Indentation
[*.{bash,sh,zsh}]
indent_size = 2
indent_style = space

# confg + cfg
[*.{conf,cfg}]
charset = UTF-8
end_of_line = LF
indent_size = 4
indent_style = tab
insert_final_newline = true
tab_width = 4
trim_trailing_whitespace = true

# Match diffs, avoid to trim trailing whitespace
[*.{diff,patch}]
trim_trailing_whitespace = false

# Ignore fixtures and vendored files
[{dist,artifacts,vendor,test/fixtures,tests_config,__snapshot__,}/**]
charset = unset
end_of_line = unset
indent_size = unset
indent_style = unset
insert_final_newline = unset
trim_trailing_spaces = unset
48 changes: 42 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,44 @@
# -*- mode: gitignore; -*-
/out
cache/
artifacts/
logs
*.log
!/broadcast
/broadcast/*
/broadcast/*/31337/

## CVE-2021-21300 style exploits
.\#*

## General ##
*~
\#*\#
/**/build
.DS_Store
node_modules
.env
tmp/
_dev/
coverage/
/dist
/build
bin
deployments/

## Binary ##
*.zip
*.tar
*.tar.gz
*.tgz

## IDE ##
.secret
.idea/*

#Hardhat files
cache
artifacts
deployments
bin
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
79 changes: 79 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[profile.default]
src = 'contracts'
test = 'test'
script = 'script'
out = 'out'
libs = ['lib']
remappings = []
auto_detect_remappings = true
libraries = []
cache = true
cache_path = 'cache'
broadcast = 'broadcast'
allow_paths = []
include_paths = []
force = false
evm_version = 'london'
gas_reports = ['*']
gas_reports_ignore = []
auto_detect_solc = true
offline = false
optimizer = true
optimizer_runs = 200
verbosity = 0
ignored_error_codes = [
'license',
'code-size',
]
fs_permissions = []
build_info = false
ffi = false
sender = '0x00a329c0648769a73afac7f9381e08fb43dbea72'
tx_origin = '0x00a329c0648769a73afac7f9381e08fb43dbea72'
initial_balance = '0xffffffffffffffffffffffff'
block_number = 1
gas_limit = 9223372036854775807
block_base_fee_per_gas = 0
block_coinbase = '0x0000000000000000000000000000000000000000'
block_timestamp = 1
block_difficulty = 0
memory_limit = 33554432
extra_output = []
extra_output_files = []
names = false
sizes = false
via_ir = false
no_storage_caching = false
bytecode_hash = 'ipfs'
sparse_mode = false

[profile.default.rpc_storage_caching]
chains = 'all'
endpoints = 'all'

[fmt]
line_length = 120
tab_width = 4
bracket_spacing = false
int_types = 'long'
func_attrs_with_params_multiline = true
quote_style = 'double'
number_underscore = 'preserve'

[fuzz]
runs = 256
max_test_rejects = 65536
max_global_rejects = 65536
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

Loading