Skip to content

Commit

Permalink
fix: linter config
Browse files Browse the repository at this point in the history
  • Loading branch information
pikonha committed Oct 12, 2024
1 parent afb2c21 commit 3d77fce
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 21
cache: 'npm'
cache: "npm"

- name: "Install the Node.js dependencies"
run: "npm install"
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 21
cache: 'npm'
cache: "npm"

- name: "Install the Node.js dependencies"
run: "npm install"
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 21
cache: 'npm'
cache: "npm"

- name: "Install the Node.js dependencies"
run: "npm install"
Expand Down
10 changes: 8 additions & 2 deletions .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@
"code-complexity": ["error", 8],
"compiler-version": ["error", ">=0.8.25"],
"func-name-mixedcase": "off",
"func-visibility": ["error", { "ignoreConstructors": true }],
"func-visibility": [
"error",
{
"ignoreConstructors": true
}
],
"max-line-length": ["error", 120],
"named-parameters-mapping": "warn",
"no-console": "off",
"not-rely-on-time": "off",
"one-contract-per-file": "off"
"one-contract-per-file": "off",
"no-empty-blocks": "off"
}
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
},
"solidity.formatter": "forge",
"solidity.compileUsingRemoteVersion": "v0.8.25+commit.b61c2a91"
}
}
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ This project is designed to test your skills in smart contract development using

## Project Overview

You are tasked with implementing a token vendor machine that allows users to buy and sell tokens. The project consists of two main contracts:
You are tasked with implementing a token vendor machine that allows users to buy and sell tokens. The project consists
of two main contracts:

1. `BlockfulToken.sol`: An ERC20 token contract
2. `TokenVendor.sol`: A vendor contract for buying and selling tokens
Expand All @@ -19,17 +20,20 @@ To get started with this project, follow these steps:
## Your Tasks

1. Implement the `BlockfulToken` contract:

- It should be an ERC20 token with a name, symbol, and 18 decimals.
- Initial supply should be 1,000,000 tokens.

2. Implement the `TokenVendor` contract with the following functionality:

- Allow users to buy tokens with ETH (1 ETH = 100 tokens)
- Allow users to sell tokens back to the contract
- Allow the owner to withdraw ETH from the contract
- Implement proper access control (only owner can withdraw)
- Emit events for token purchases, sales, and ETH withdrawals

3. Complete the test file `test/TokenVendor.t.sol`:

- We've provided some basic "happy path" tests
- Implement additional tests for edge cases and potential failure scenarios
- Aim for at least 90% test coverage
Expand Down Expand Up @@ -91,6 +95,7 @@ Please submit your completed project as a Git repository. Make sure to include:

## Note

This project uses [Foundry](https://getfoundry.sh/). If you're new to Foundry, check out the [Foundry Book](https://book.getfoundry.sh/) for detailed instructions and tutorials.
This project uses [Foundry](https://getfoundry.sh/). If you're new to Foundry, check out the
[Foundry Book](https://book.getfoundry.sh/) for detailed instructions and tutorials.

Good luck with the challenge! We're excited to see your implementation.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
"test:coverage:report": "forge coverage --report lcov && genhtml lcov.info --branch-coverage --output-dir coverage",
"deploy": "forge script script/Deploy.s.sol:Deploy --rpc-url http://localhost:8545 --broadcast"
}
}
}

0 comments on commit 3d77fce

Please sign in to comment.