Skip to content

Commit

Permalink
Merge branch 'main' into feat/natspec-smells
Browse files Browse the repository at this point in the history
  • Loading branch information
gas1cent authored Jan 29, 2024
2 parents 7bba7a0 + 03c6e1a commit 8e8db38
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MAINNET_RPC=
MAINNET_DEPLOYER_PK=

GOERLI_RPC=
GOERLI_DEPLOYER_PK=
SEPOLIA_RPC=
SEPOLIA_DEPLOYER_PK=

ETHERSCAN_API_KEY=
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
run: |
touch .env
echo MAINNET_RPC="${{ secrets.MAINNET_RPC }}" >> .env
echo GOERLI_RPC="${{ secrets.GOERLI_RPC }}" >> .env
echo SEPOLIA_RPC="${{ secrets.SEPOLIA_RPC }}" >> .env
cat .env
- name: Run tests
Expand Down
8 changes: 8 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The MIT License (MIT)
Copyright © 2023 Wonderland

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<dt>Deployment scripts</dt>
<dd>Sample scripts to deploy contracts on both mainnet and testnet.</dd>

<dt>Sample Integraion & Unit tests</dt>
<dt>Sample Integration & Unit tests</dt>
<dd>Example tests showcasing mocking, assertions and configuration for mainnet forking. As well it includes everything needed in order to check code coverage.</dd>

<dt>Linter</dt>
Expand Down Expand Up @@ -91,10 +91,10 @@ yarn coverage

Configure the `.env` variables.

### Goerli
### Sepolia

```bash
yarn deploy:goerli
yarn deploy:sepolia
```

### Mainnet
Expand Down Expand Up @@ -140,3 +140,6 @@ Also, remember to update the `package_name` param to your package name:
```

You can take a look at our [solidity-exporter-action](https://github.com/defi-wonderland/solidity-exporter-action) repository for more information and usage examples.

## Licensing
The primary license for the boilerplate is MIT, see [`LICENSE`](https://github.com/defi-wonderland/solidity-foundry-boilerplate/blob/main/LICENSE)
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ multiline_func_header = 'params_first'
sort_imports = true

[profile.default]
solc_version = '0.8.19'
solc_version = '0.8.23'
src = 'solidity'
test = 'solidity/test'
out = 'out'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build": "forge build",
"build:optimized": "FOUNDRY_PROFILE=optimized forge build",
"coverage": "forge coverage --match-contract Unit",
"deploy:goerli": "bash -c 'source .env && forge script DeployGoerli --rpc-url $GOERLI_RPC --broadcast --private-key $GOERLI_DEPLOYER_PK --verify --etherscan-api-key $ETHERSCAN_API_KEY'",
"deploy:sepolia": "bash -c 'source .env && forge script DeploySepolia --rpc-url $SEPOLIA_RPC --broadcast --private-key $SEPOLIA_DEPLOYER_PK --verify --etherscan-api-key $ETHERSCAN_API_KEY'",
"deploy:mainnet": "bash -c 'source .env && forge script DeployMainnet --rpc-url $MAINNET_RPC --broadcast --private-key $MAINNET_DEPLOYER_PK --verify --etherscan-api-key $ETHERSCAN_API_KEY'",
"lint:check": "yarn lint:sol-tests && yarn lint:sol-logic && forge fmt --check",
"lint:fix": "sort-package-json && forge fmt && yarn lint:sol-tests --fix && yarn lint:sol-logic --fix",
Expand Down
2 changes: 1 addition & 1 deletion solidity/contracts/Greeter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity =0.8.19;
pragma solidity =0.8.23;

import {IGreeter} from 'interfaces/IGreeter.sol';
import {IERC20} from 'isolmate/interfaces/tokens/IERC20.sol';
Expand Down
2 changes: 1 addition & 1 deletion solidity/interfaces/IGreeter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity =0.8.19;
pragma solidity =0.8.23;

import {IERC20} from 'isolmate/interfaces/tokens/IERC20.sol';

Expand Down
4 changes: 2 additions & 2 deletions solidity/scripts/Deploy.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity =0.8.19;
pragma solidity =0.8.23;

import {Greeter} from 'contracts/Greeter.sol';
import {Script} from 'forge-std/Script.sol';
Expand All @@ -21,7 +21,7 @@ contract DeployMainnet is Deploy {
}
}

contract DeployGoerli is Deploy {
contract DeploySepolia is Deploy {
function run() external {
IERC20 weth = IERC20(0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6);

Expand Down
2 changes: 1 addition & 1 deletion solidity/test/integration/Greeter.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity =0.8.19;
pragma solidity =0.8.23;

import {IntegrationBase} from 'test/integration/IntegrationBase.sol';

Expand Down
2 changes: 1 addition & 1 deletion solidity/test/integration/IntegrationBase.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity =0.8.19;
pragma solidity =0.8.23;

import {Greeter, IGreeter} from 'contracts/Greeter.sol';
import {Test} from 'forge-std/Test.sol';
Expand Down
2 changes: 1 addition & 1 deletion solidity/test/unit/Greeter.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity =0.8.19;
pragma solidity =0.8.23;

Check warning on line 2 in solidity/test/unit/Greeter.t.sol

View workflow job for this annotation

GitHub Actions / Lint Commit Messages

Found more than One contract per file. 4 contracts found!

import {Greeter, IGreeter} from 'contracts/Greeter.sol';
import {Test} from 'forge-std/Test.sol';
Expand Down

0 comments on commit 8e8db38

Please sign in to comment.