Skip to content

Commit a3703ae

Browse files
Amxxarr00
andauthored
Use dependencies from lib/@openzeppelin-contracts (#39)
* Remove vendored entrypoint + replace dependencies * lint javascript * lint solidity * fix tests * fix tests * update submodule * clean * fix entrypoint testing * simplification * try fix slither by reverting to master * try fix by removing symlinks * try fix * up * Update TOOLING.md --------- Co-authored-by: Arr00 <[email protected]>
1 parent 35e820e commit a3703ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

39 files changed

+2010
-4079
lines changed

.github/workflows/checks.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v4
22+
with:
23+
submodules: recursive
2224
- name: Set up environment
2325
uses: ./.github/actions/setup
2426
- run: npm run lint
@@ -82,4 +84,4 @@ jobs:
8284
uses: codespell-project/[email protected]
8385
with:
8486
check_filenames: true
85-
skip: package-lock.json,vendor
87+
skip: package-lock.json

.prettierrc

Lines changed: 0 additions & 15 deletions
This file was deleted.

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib/@openzeppelin-contracts/.prettierrc

.solcover.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

.solcover.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib/@openzeppelin-contracts/.solcover.js

TOOLING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Difference with @openzeppelin/contracts
2+
3+
## Slither
4+
5+
Community repo uses a different slither config than @openzeppelin/contracts.
6+
We had to remove the following line that causes issues:
7+
8+
```json
9+
"compile_force_framework": "hardhat"
10+
```
11+

contracts/crosschain/axelar/mocks/AxelarGatewayMock.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ contract AxelarGatewayMock {
1212
using Strings for string;
1313
using BitMaps for BitMaps.BitMap;
1414

15-
BitMaps.BitMap private pendingCommandIds;
15+
BitMaps.BitMap private _pendingCommandIds;
1616

1717
event CommandIdPending(
1818
bytes32 indexed commandId,
@@ -45,8 +45,8 @@ contract AxelarGatewayMock {
4545
)
4646
);
4747

48-
require(!pendingCommandIds.get(uint256(commandId)));
49-
pendingCommandIds.set(uint256(commandId));
48+
require(!_pendingCommandIds.get(uint256(commandId)));
49+
_pendingCommandIds.set(uint256(commandId));
5050

5151
emit CommandIdPending(commandId, destinationChain, destinationContractAddress, payload);
5252

@@ -61,8 +61,8 @@ contract AxelarGatewayMock {
6161
string calldata sourceAddress,
6262
bytes32 payloadHash
6363
) external returns (bool) {
64-
if (pendingCommandIds.get(uint256(commandId))) {
65-
pendingCommandIds.unset(uint256(commandId));
64+
if (_pendingCommandIds.get(uint256(commandId))) {
65+
_pendingCommandIds.unset(uint256(commandId));
6666

6767
emit IAxelarGateway.ContractCallExecuted(commandId);
6868

contracts/token/ERC20/extensions/ERC20Allowlist.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ abstract contract ERC20Allowlist is ERC20 {
2020
/**
2121
* @dev Allowed status of addresses. True if allowed, False otherwise.
2222
*/
23-
mapping(address account => bool) internal _allowed;
23+
mapping(address account => bool) private _allowed;
2424

2525
/**
2626
* @dev Emitted when a `user` is allowed to transfer and approve.

contracts/token/ERC20/extensions/ERC20Blocklist.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ abstract contract ERC20Blocklist is ERC20 {
2020
/**
2121
* @dev Blocked status of addresses. True if blocked, False otherwise.
2222
*/
23-
mapping(address user => bool) internal _blocked;
23+
mapping(address user => bool) private _blocked;
2424

2525
/**
2626
* @dev Emitted when a user is blocked.

contracts/token/ERC20/extensions/ERC20Collateral.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ abstract contract ERC20Collateral is ERC20, IERC6372 {
5353
/**
5454
* @inheritdoc IERC6372
5555
*/
56+
// solhint-disable-next-line func-name-mixedcase
5657
function CLOCK_MODE() public view virtual returns (string memory) {
5758
return "mode=timestamp";
5859
}

0 commit comments

Comments
 (0)