diff --git a/contracts/src/BoldToken.sol b/contracts/src/BoldToken.sol index 3227cf6fd..3f1b229c8 100644 --- a/contracts/src/BoldToken.sol +++ b/contracts/src/BoldToken.sol @@ -65,9 +65,7 @@ contract BoldToken is CheckContract, IBoldToken { address _troveManagerAddress, address _stabilityPoolAddress, address _borrowerOperationsAddress - ) - public - { + ) { checkContract(_troveManagerAddress); checkContract(_stabilityPoolAddress); checkContract(_borrowerOperationsAddress); @@ -199,8 +197,8 @@ contract BoldToken is CheckContract, IBoldToken { } } - function _buildDomainSeparator(bytes32 typeHash, bytes32 name, bytes32 version) private view returns (bytes32) { - return keccak256(abi.encode(typeHash, name, version, _chainID(), address(this))); + function _buildDomainSeparator(bytes32 _typeHash, bytes32 _name, bytes32 _version) private view returns (bytes32) { + return keccak256(abi.encode(_typeHash, _name, _version, _chainID(), address(this))); } // --- Internal operations --- @@ -280,23 +278,23 @@ contract BoldToken is CheckContract, IBoldToken { // --- Optional functions --- - function name() external view override returns (string memory) { + function name() external pure override returns (string memory) { return _NAME; } - function symbol() external view override returns (string memory) { + function symbol() external pure override returns (string memory) { return _SYMBOL; } - function decimals() external view override returns (uint8) { + function decimals() external pure override returns (uint8) { return _DECIMALS; } - function version() external view override returns (string memory) { + function version() external pure override returns (string memory) { return _VERSION; } - function permitTypeHash() external view override returns (bytes32) { + function permitTypeHash() external pure override returns (bytes32) { return _PERMIT_TYPEHASH; } } diff --git a/contracts/src/MultiTroveGetter.sol b/contracts/src/MultiTroveGetter.sol index 580893b21..6c08d3f61 100644 --- a/contracts/src/MultiTroveGetter.sol +++ b/contracts/src/MultiTroveGetter.sol @@ -22,7 +22,7 @@ contract MultiTroveGetter { TroveManager public troveManager; // XXX Troves missing from ITroveManager? ISortedTroves public sortedTroves; - constructor(TroveManager _troveManager, ISortedTroves _sortedTroves) public { + constructor(TroveManager _troveManager, ISortedTroves _sortedTroves) { troveManager = _troveManager; sortedTroves = _sortedTroves; } diff --git a/contracts/src/OldTestContracts/BoldTokenTester.sol b/contracts/src/OldTestContracts/BoldTokenTester.sol index 446299e6d..e6acce8b9 100644 --- a/contracts/src/OldTestContracts/BoldTokenTester.sol +++ b/contracts/src/OldTestContracts/BoldTokenTester.sol @@ -12,10 +12,12 @@ contract BoldTokenTester is BoldToken { address _troveManagerAddress, address _stabilityPoolAddress, address _borrowerOperationsAddress - ) public BoldToken(_troveManagerAddress, - _stabilityPoolAddress, - _borrowerOperationsAddress) {} - + ) BoldToken( + _troveManagerAddress, + _stabilityPoolAddress, + _borrowerOperationsAddress + ) {} + function unprotectedMint(address _account, uint256 _amount) external { // No check on caller here @@ -42,6 +44,7 @@ contract BoldTokenTester is BoldToken { function callInternalApprove(address owner, address spender, uint256 amount) external returns (bool) { _approve(owner, spender, amount); + return true; } function getChainId() external view returns (uint256 chainID) { diff --git a/contracts/src/TestContracts/BoldTokenTester.sol b/contracts/src/TestContracts/BoldTokenTester.sol index 446299e6d..e6acce8b9 100644 --- a/contracts/src/TestContracts/BoldTokenTester.sol +++ b/contracts/src/TestContracts/BoldTokenTester.sol @@ -12,10 +12,12 @@ contract BoldTokenTester is BoldToken { address _troveManagerAddress, address _stabilityPoolAddress, address _borrowerOperationsAddress - ) public BoldToken(_troveManagerAddress, - _stabilityPoolAddress, - _borrowerOperationsAddress) {} - + ) BoldToken( + _troveManagerAddress, + _stabilityPoolAddress, + _borrowerOperationsAddress + ) {} + function unprotectedMint(address _account, uint256 _amount) external { // No check on caller here @@ -42,6 +44,7 @@ contract BoldTokenTester is BoldToken { function callInternalApprove(address owner, address spender, uint256 amount) external returns (bool) { _approve(owner, spender, amount); + return true; } function getChainId() external view returns (uint256 chainID) { diff --git a/contracts/src/test/TestContracts/BaseTest.sol b/contracts/src/test/TestContracts/BaseTest.sol index 8973d834d..3bcd6413e 100644 --- a/contracts/src/test/TestContracts/BaseTest.sol +++ b/contracts/src/test/TestContracts/BaseTest.sol @@ -54,7 +54,7 @@ contract BaseTest is Test { accountsList = tempAccounts; } - function logContractAddresses() public { + function logContractAddresses() view public { console.log("ActivePool addr: ", address(activePool)); console.log("BorrowerOps addr: ", address(borrowerOperations)); console.log("CollSurplusPool addr: ", address(collSurplusPool)); @@ -66,4 +66,4 @@ contract BaseTest is Test { console.log("TroveManager addr: ", address(troveManager)); console.log("BoldToken addr: ", address(boldToken)); } -} \ No newline at end of file +}