Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
boyuanx committed Jan 1, 2025
1 parent bb6675e commit 425b935
Show file tree
Hide file tree
Showing 19 changed files with 514 additions and 59 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PRIVATE_KEY=
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,9 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# Custom
artifacts
cache
cache_hardhat
typechain-types
23 changes: 23 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# directories
broadcast
cache
coverage
node_modules
out
.github
cache
cache_hardhat
typechain-types
artifacts
lib

# files
*.env
*.log
.DS_Store
.pnp.*
bun.lockb
lcov.info
package-lock.json
pnpm-lock.yaml
yarn.lock
7 changes: 7 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bracketSpacing: true
printWidth: 120
proseWrap: "always"
singleQuote: false
tabWidth: 2
trailingComma: "all"
useTabs: false
15 changes: 15 additions & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "solhint:recommended",
"rules": {
"code-complexity": ["error", 8],
"compiler-version": "off",
"const-name-snakecase": "off",
"func-name-mixedcase": "off",
"func-visibility": ["error", { "ignoreConstructors": true }],
"max-line-length": ["error", 120],
"named-parameters-mapping": "warn",
"no-inline-assembly": "off",
"not-rely-on-time": "off",
"one-contract-per-file": "off"
}
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

Foundry consists of:

- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
- **Chisel**: Fast, utilitarian, and verbose solidity REPL.
- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
- **Chisel**: Fast, utilitarian, and verbose solidity REPL.

## Documentation

Expand Down
Binary file modified bun.lockb
Binary file not shown.
18 changes: 18 additions & 0 deletions deploy/01-deploy-counter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// TypeScript
import { DeployFunction } from "hardhat-deploy/dist/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";

const deployCounter: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { deploy } = hre.deployments;
const { deployer } = await hre.getNamedAccounts();

await deploy("Counter", {
from: deployer,
log: true,
args: [],
waitConfirmations: 1,
});
};

export default deployCounter;
deployCounter.tags = ["Counter"];
17 changes: 15 additions & 2 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
[profile.default]
src = "src"
out = "out"
libs = ["node_modules"]
solc = "0.8.28"
bytecode_hash = "none"
optimizer = true
optimizer_runs = 200
build_info = true
auto_detect_remappings = true

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
[fmt]
bracket_spacing = true
int_types = "long"
line_length = 120
multiline_func_header = "all"
number_underscore = "thousands"
quote_style = "double"
tab_width = 4
wrap_comments = true
Loading

0 comments on commit 425b935

Please sign in to comment.