Conversation
| event ProviderUpdate(address indexed providerAddress, string name, string url); | ||
|
|
||
| Bridge public bridge; | ||
| IBridge public bridge; |
Check warning
Code scanning / Slither
State variables that could be declared constant Warning
|
|
||
| // solhint-disable comprehensive-interface | ||
| contract PegOutPayer { | ||
| LiquidityBridgeContractV2 public immutable LBC; |
Check warning
Code scanning / Slither
Conformance to Solidity naming conventions Warning test
| // solhint-disable comprehensive-interface | ||
| contract PegOutPayer { | ||
| LiquidityBridgeContractV2 public immutable LBC; | ||
| address public immutable OWNER; |
Check warning
Code scanning / Slither
Conformance to Solidity naming conventions Warning test
| function withdraw(uint256 amount) external { | ||
| if (msg.sender != OWNER) { | ||
| revert NotOwner(msg.sender); | ||
| } | ||
| if (address(this).balance < amount){ | ||
| revert InsufficientBalance(address(this).balance, amount); | ||
| } | ||
| emit Withdraw(OWNER, amount); | ||
| (bool sent, bytes memory cause) = payable(OWNER).call{value: amount}(""); | ||
| if (!sent) { | ||
| revert SendError(cause); | ||
| } | ||
| } |
Check warning
Code scanning / Slither
Low-level calls Warning test
Dependency ReviewThe following issues were found:
|
|
NIT: We could also rename the file names of the interfaces to follow the IName.sol convention. Otherwise, LGTM! |
What
solhintversion and configurationWhy
After doing some PoCs with the gas consumption of the discovery part of the protocol, we need to prepare the repo to start receiving the actual implementation of the split. This includes organizing the current contract files into a clear repository structure and update the linter so the new contributions can be consistent between them.
Important
The new directory structure is the following:
.
└── contracts/
├── interfaces/
├── legacy/
├── libraries/
├── test-contracts/
├── split/
├── Contract1
├── Contract2
├── ...
└── ContractN
where the directories will be used in the following way:
Not included in this PR
Task
https://rsklabs.atlassian.net/browse/GBI-2842