Skip to content

Commit

Permalink
yarn format
Browse files Browse the repository at this point in the history
  • Loading branch information
salman01zp committed May 6, 2024
1 parent c22840d commit ef3c2c7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
6 changes: 5 additions & 1 deletion packages/contracts/contracts/SignatureBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ contract SignatureBridge is Governable, ChainIdWithType, ProposalNonceTracker {
/// @param initialGovernor Addresses that should be initially granted the relayer role.
/// @param jobId JobId of the governor.
/// @param votingThreshold Number of votes required to force set the governor.
constructor(address initialGovernor, uint32 jobId, uint32 votingThreshold) Governable(initialGovernor, jobId, votingThreshold) {}
constructor(
address initialGovernor,
uint32 jobId,
uint32 votingThreshold
) Governable(initialGovernor, jobId, votingThreshold) {}

/// @notice Sets a new resource for handler contracts that use the IExecutor interface,
/// and maps the {handlerAddress} to {newResourceID} in {_resourceIdToHandlerAddress}.
Expand Down
18 changes: 3 additions & 15 deletions packages/contracts/contracts/utils/Governable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ contract Governable {
address indexed newOwner,
uint32 indexed jobId,
uint256 timestamp

);
event RecoveredAddress(address indexed recovered);

Expand All @@ -62,14 +61,10 @@ contract Governable {
_;
}


/// @notice Checks if the vote nonces are valid.
modifier areValidVotes(Vote[] memory votes) {
for (uint i = 0; i < votes.length; i++) {
require(
votes[i].jobId < jobId,
"Governable: JobId of vote must match jobId"
);
require(votes[i].jobId < jobId, "Governable: JobId of vote must match jobId");
require(
votes[i].proposedGovernor != address(0x0),
"Governable: Proposed governor cannot be the zero address"
Expand Down Expand Up @@ -131,12 +126,7 @@ contract Governable {
bytes32 pubKeyHash = keccak256(_publicKey);
address newOwner = address(uint160(uint256(pubKeyHash)));
require(
isSignatureFromGovernor(
abi.encodePacked(
_publicKey
),
_sig
),
isSignatureFromGovernor(abi.encodePacked(_publicKey), _sig),
"Governable: caller is not the governor"
);
_transferOwnership(newOwner, _jobId);
Expand Down Expand Up @@ -173,7 +163,7 @@ contract Governable {
}
}
}

/// @notice Process a vote
/// @param vote A vote struct
/// @param voter The address of the voter
Expand Down Expand Up @@ -247,6 +237,4 @@ contract Governable {
) public pure returns (Vote memory) {
return Vote(_jobId, _proposedGovernor);
}


}
4 changes: 2 additions & 2 deletions packages/vbridge/src/SignatureBridgeSide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class SignatureBridgeSide<A extends BaseContract> implements IBridgeSide
* @param admin - The deployer and governor upon creation.
*/
public static async createBridgeSide<A extends BaseContract>(
admin: ethers.Wallet,
admin: ethers.Wallet
): Promise<SignatureBridgeSide<A>> {
const bridgeFactory = new SignatureBridge__factory(admin);
const deployedBridge = await bridgeFactory.deploy(admin.address, 0, 1);
Expand All @@ -60,7 +60,7 @@ export class SignatureBridgeSide<A extends BaseContract> implements IBridgeSide
public static async create2BridgeSide<A extends BaseContract>(
deployer: Deployer,
saltHex: string,
admin: ethers.Wallet,
admin: ethers.Wallet
): Promise<SignatureBridgeSide<A>> {
const argTypes = ['address', 'uint32'];
const args = [admin.address, 0, 1];
Expand Down

0 comments on commit ef3c2c7

Please sign in to comment.