Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #586 from keep-network/rename-deposit-factory-getter
Browse files Browse the repository at this point in the history
Touchups

Small set of renames, removing superfluous require's.
  • Loading branch information
Shadowfiend authored Apr 21, 2020
2 parents deaa64a + 3d07ece commit a5804d5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions solidity/contracts/deposit/DepositFunding.sol
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ library DepositFunding {
uint256 _bondRequirementSatoshi = _lotSizeSatoshis.mul(_d.tbtcSystem.getInitialCollateralizedPercent()).div(100);
uint256 _bondRequirementWei = _d.fetchBitcoinPrice().mul(_bondRequirementSatoshi);

_d.keepSetupFee = _d.tbtcSystem.createNewDepositFeeEstimate();
_d.keepSetupFee = _d.tbtcSystem.getNewDepositFeeEstimate();
/* solium-disable-next-line value-in-payable */
_d.keepAddress = _d.tbtcSystem.requestNewKeep.value(msg.value)(
_m,
Expand Down Expand Up @@ -165,8 +165,7 @@ library DepositFunding {
"Signer fraud during funding flow only available while awaiting funding"
);

bool _isFraud = _d.submitSignatureFraud(_v, _r, _s, _signedDigest, _preimage);
require(_isFraud, "Signature is not fraudulent");
_d.submitSignatureFraud(_v, _r, _s, _signedDigest, _preimage);
_d.logFraudDuringSetup();

// Allow deposit owner to withdraw seized bonds after contract termination.
Expand Down
2 changes: 1 addition & 1 deletion solidity/contracts/deposit/DepositLiquidation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ library DepositLiquidation {
"Signer liquidation already in progress"
);
require(!_d.inEndState(), "Contract has halted");
require(submitSignatureFraud(_d, _v, _r, _s, _signedDigest, _preimage), "Signature is not fraud");
submitSignatureFraud(_d, _v, _r, _s, _signedDigest, _preimage);
startSignerFraudLiquidation(_d);
}

Expand Down
2 changes: 1 addition & 1 deletion solidity/contracts/interfaces/ITBTCSystem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface ITBTCSystem {
// passthrough requests for the oracle
function fetchRelayCurrentDifficulty() external view returns (uint256);
function fetchRelayPreviousDifficulty() external view returns (uint256);
function createNewDepositFeeEstimate() external view returns (uint256);
function getNewDepositFeeEstimate() external view returns (uint256);
function getAllowNewDeposits() external view returns (bool);
function isAllowedLotSize(uint64 _lotSizeSatoshis) external view returns (bool);
function requestNewKeep(uint256 _m, uint256 _n, uint256 _bond, uint256 _maxSecuredLifetime) external payable returns (address);
Expand Down
2 changes: 1 addition & 1 deletion solidity/contracts/system/TBTCSystem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ contract TBTCSystem is Ownable, ITBTCSystem, DepositLog {

/// @notice Gets a fee estimate for creating a new Deposit.
/// @return Uint256 estimate.
function createNewDepositFeeEstimate()
function getNewDepositFeeEstimate()
external
view
returns (uint256)
Expand Down

0 comments on commit a5804d5

Please sign in to comment.