Skip to content

Commit 325c74d

Browse files
authored
Fix Solidity warnings (#77)
* Add SPDX identifiers (Apache 2.0) where missing * Comment out unused variable names in mock contracts * Fix natspec for non-public variables in IndexToken contract
1 parent 12b6eac commit 325c74d

38 files changed

+91
-36
lines changed

contracts/adapters/FeeSplitExtension.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15+
16+
SPDX-License-Identifier: Apache License, Version 2.0
1517
*/
1618

1719
pragma solidity 0.6.10;

contracts/adapters/FlexibleLeverageStrategyExtension.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15+
16+
SPDX-License-Identifier: Apache License, Version 2.0
1517
*/
1618

1719
pragma solidity 0.6.10;

contracts/adapters/GIMExtension.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15+
16+
SPDX-License-Identifier: Apache License, Version 2.0
1517
*/
1618

1719
pragma solidity 0.6.10;

contracts/adapters/GovernanceExtension.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15+
16+
SPDX-License-Identifier: Apache License, Version 2.0
1517
*/
1618

1719
pragma solidity 0.6.10;

contracts/adapters/StreamingFeeSplitExtension.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15+
16+
SPDX-License-Identifier: Apache License, Version 2.0
1517
*/
1618

1719
pragma solidity 0.6.10;

contracts/hooks/SupplyCapAllowedCallerIssuanceHook.sol

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15+
16+
SPDX-License-Identifier: Apache License, Version 2.0
1517
*/
1618

1719
pragma solidity 0.6.10;
@@ -42,7 +44,7 @@ contract SupplyCapAllowedCallerIssuanceHook is Ownable, IManagerIssuanceHook {
4244
event SupplyCapUpdated(uint256 _newCap);
4345
event CallerStatusUpdated(address indexed _caller, bool _status);
4446
event AnyoneCallableUpdated(bool indexed _status);
45-
47+
4648
/* ============ State Variables ============ */
4749

4850
// Cap on totalSupply of Sets
@@ -89,7 +91,7 @@ contract SupplyCapAllowedCallerIssuanceHook is Ownable, IManagerIssuanceHook {
8991
override
9092
{
9193
_validateAllowedContractCaller(_sender);
92-
94+
9395
uint256 totalSupply = _setToken.totalSupply();
9496
require(totalSupply.add(_issueQuantity) <= supplyCap, "Supply cap exceeded");
9597
}
@@ -133,7 +135,7 @@ contract SupplyCapAllowedCallerIssuanceHook is Ownable, IManagerIssuanceHook {
133135
}
134136

135137
/**
136-
* ONLY OWNER: Toggle whether anyone can call function, bypassing the callAllowlist
138+
* ONLY OWNER: Toggle whether anyone can call function, bypassing the callAllowlist
137139
*
138140
* @param _status Boolean indicating whether to allow anyone call
139141
*/
@@ -145,7 +147,7 @@ contract SupplyCapAllowedCallerIssuanceHook is Ownable, IManagerIssuanceHook {
145147
/* ============ Internal Functions ============ */
146148

147149
/**
148-
* Validate if passed address is allowed to call function. If anyoneCallable is set to true, anyone can call otherwise needs to be an EOA or
150+
* Validate if passed address is allowed to call function. If anyoneCallable is set to true, anyone can call otherwise needs to be an EOA or
149151
* approved contract address.
150152
*/
151153
function _validateAllowedContractCaller(address _caller) internal view {

contracts/hooks/SupplyCapIssuanceHook.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15+
16+
SPDX-License-Identifier: Apache License, Version 2.0
1517
*/
1618

1719
pragma solidity 0.6.10;
@@ -36,7 +38,7 @@ contract SupplyCapIssuanceHook is Ownable, IManagerIssuanceHook {
3638
/* ============ Events ============ */
3739

3840
event SupplyCapUpdated(uint256 _newCap);
39-
41+
4042
/* ============ State Variables ============ */
4143

4244
// Cap on totalSupply of Sets

contracts/interfaces/IAdapter.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15+
16+
SPDX-License-Identifier: Apache License, Version 2.0
1517
*/
1618

1719
pragma solidity 0.6.10;

contracts/interfaces/IBaseManager.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15+
16+
SPDX-License-Identifier: Apache License, Version 2.0
1517
*/
1618

1719
pragma solidity 0.6.10;

contracts/interfaces/ICErc20.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// SPDX-License-Identifier: Apache License, Version 2.0
12
pragma solidity 0.6.10;
23

34
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

0 commit comments

Comments
 (0)