-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add some important local settings (#14)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added Solidity language settings for VSCode across multiple projects. - **Refactor** - Updated `runs-on` configuration to `namespace-profile-btp-scs` in GitHub workflows for multiple projects. - Removed `timeout` property from Hardhat configuration files across various projects. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
7 changed files
with
18 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,16 +47,6 @@ jobs: | |
apk update | ||
apk add --no-cache cairo-dev jpeg-dev pango-dev giflib-dev build-base g++ pkgconfig | ||
- name: Fetch semgrep rules | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: decurity/semgrep-smart-contracts | ||
path: rules | ||
|
||
- run: semgrep ci --sarif --output=semgrep.sarif || true | ||
env: | ||
SEMGREP_RULES: rules/solidity/security rules/solidity/performance | ||
|
||
- uses: crytic/[email protected] | ||
id: slither | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"[solidity]": { | ||
"editor.defaultFormatter": "NomicFoundation.hardhat-solidity" | ||
}, | ||
"solidity.formatter": "forge", | ||
"solidity.telemetry": false, | ||
"taskManager.exclude": "lib|install|tsc|hardhat" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,21 +10,12 @@ import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol"; | |
/// @title A generic ERC20 Token | ||
/// @dev Extends ERC20 with burnable, pausable, and permit functionalities. | ||
/// @custom:security-contact [email protected] | ||
contract GenericERC20 is | ||
ERC20, | ||
ERC20Burnable, | ||
ERC20Pausable, | ||
Ownable, | ||
ERC20Permit | ||
{ | ||
contract GenericERC20 is ERC20, ERC20Burnable, ERC20Pausable, Ownable, ERC20Permit { | ||
/// @dev Initializes the contract by setting a `name` and a `symbol` to the token and mints initial tokens to the | ||
/// deploying address. | ||
/// @param name The name of the token. | ||
/// @param symbol The symbol of the token. | ||
constructor( | ||
string memory name, | ||
string memory symbol | ||
) ERC20(name, symbol) Ownable(msg.sender) ERC20Permit(name) { | ||
constructor(string memory name, string memory symbol) ERC20(name, symbol) Ownable(msg.sender) ERC20Permit(name) { | ||
// Mint 100,000 tokens to the deploying address, adjusting for the token's decimals. | ||
_mint(msg.sender, 100_000 * 10 ** decimals()); | ||
} | ||
|
@@ -53,11 +44,7 @@ contract GenericERC20 is | |
/// @param from The address from which tokens are transferred. | ||
/// @param to The address to which tokens are transferred. | ||
/// @param value The amount of tokens to be transferred. | ||
function _update( | ||
address from, | ||
address to, | ||
uint256 value | ||
) internal override(ERC20, ERC20Pausable) { | ||
function _update(address from, address to, uint256 value) internal override(ERC20, ERC20Pausable) { | ||
super._update(from, to, value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters