Skip to content

Commit

Permalink
Run the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
sug0 committed Jul 15, 2023
1 parent 52eb7d2 commit 48695b1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
18 changes: 10 additions & 8 deletions contracts/contract/Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,11 @@ contract Bridge is IBridge, ReentrancyGuard {
return keccak256(abi.encode(version, "bridge", validators, powers, nonce));
}

function _isEnoughVotingPower(
uint256[] memory _powers,
uint256 _thresholdVotingPower
) internal pure returns (bool) {
function _isEnoughVotingPower(uint256[] memory _powers, uint256 _thresholdVotingPower)
internal
pure
returns (bool)
{
uint256 powerAccumulator = 0;

for (uint256 i = 0; i < _powers.length; i++) {
Expand All @@ -222,10 +223,11 @@ contract Bridge is IBridge, ReentrancyGuard {
newValidatorSetArgs.validators.length == newValidatorSetArgs.powers.length;
}

function _isValidSignatureSet(
ValidatorSetArgs calldata validatorSetArgs,
Signature[] calldata signature
) internal pure returns (bool) {
function _isValidSignatureSet(ValidatorSetArgs calldata validatorSetArgs, Signature[] calldata signature)
internal
pure
returns (bool)
{
return _isValidValidatorSetArg(validatorSetArgs) && validatorSetArgs.validators.length == signature.length;
}

Expand Down
9 changes: 5 additions & 4 deletions contracts/contract/Governance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,11 @@ contract Governance is IGovernance, ReentrancyGuard {
return keccak256(abi.encode(version, "governance", validators, powers, nonce));
}

function _isEnoughVotingPower(
uint256[] memory _powers,
uint256 _thresholdVotingPower
) internal pure returns (bool) {
function _isEnoughVotingPower(uint256[] memory _powers, uint256 _thresholdVotingPower)
internal
pure
returns (bool)
{
uint256 powerAccumulator = 0;

for (uint256 i = 0; i < _powers.length; i++) {
Expand Down
8 changes: 5 additions & 3 deletions contracts/contract/Vault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ contract Vault is IVault {
proxy = IProxy(_proxy);
}

function batchTransferToErc20(
Erc20Transfer[] calldata _transfers
) external onlyLatestBridgeContract returns (bool[] memory) {
function batchTransferToErc20(Erc20Transfer[] calldata _transfers)
external
onlyLatestBridgeContract
returns (bool[] memory)
{
bool[] memory transfersStatus = new bool[](_transfers.length);

for (uint256 i = 0; i < _transfers.length; ++i) {
Expand Down
4 changes: 1 addition & 3 deletions contracts/interface/IVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@ import "./ICommon.sol";
interface IVault is ICommon {
event InvalidTransfer(Erc20Transfer transfer);

function batchTransferToErc20(
Erc20Transfer[] calldata tranfers
) external returns (bool[] memory);
function batchTransferToErc20(Erc20Transfer[] calldata tranfers) external returns (bool[] memory);
}

0 comments on commit 48695b1

Please sign in to comment.