Skip to content

Commit

Permalink
chore: rename target -> commitmentsigner
Browse files Browse the repository at this point in the history
  • Loading branch information
merklefruit committed Sep 23, 2024
1 parent d541668 commit 26b418d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions bolt-contracts/src/contracts/BoltChallenger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ contract BoltChallenger is IBoltChallenger {
openedAt: Time.timestamp(),
status: ChallengeStatus.Open,
challenger: msg.sender,
target: commitmentSigner,
commitmentSigner: commitmentSigner,
commitment: commitment
});

Expand Down Expand Up @@ -251,7 +251,7 @@ contract BoltChallenger is IBoltChallenger {
// proposer is not at fault. The bond will be shared between the resolver and commitment signer.
challenge.status = ChallengeStatus.Defended;
_transferHalfBond(msg.sender);
_transferHalfBond(challenge.target);
_transferHalfBond(challenge.commitmentSigner);
emit ChallengeDefended(challengeID);
return;
} else if (account.nonce < decodedTx.nonce) {
Expand All @@ -265,7 +265,7 @@ contract BoltChallenger is IBoltChallenger {
// resolver and commitment signer.
challenge.status = ChallengeStatus.Defended;
_transferHalfBond(msg.sender);
_transferHalfBond(challenge.target);
_transferHalfBond(challenge.commitmentSigner);
emit ChallengeDefended(challengeID);
return;
}
Expand All @@ -292,7 +292,7 @@ contract BoltChallenger is IBoltChallenger {
// The bond will be shared between the resolver and commitment signer.
challenge.status = ChallengeStatus.Defended;
_transferHalfBond(msg.sender);
_transferHalfBond(challenge.target);
_transferHalfBond(challenge.commitmentSigner);
emit ChallengeDefended(challengeID);
}

Expand Down
4 changes: 2 additions & 2 deletions bolt-contracts/src/interfaces/IBoltChallenger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface IBoltChallenger {
uint48 openedAt;
ChallengeStatus status;
address challenger;
address target;
address commitmentSigner;
SignedCommitment commitment;
}

Expand Down Expand Up @@ -59,7 +59,7 @@ interface IBoltChallenger {
error BondTransferFailed();
error ChallengeNotExpired();

event ChallengeOpened(bytes32 indexed challengeId, address indexed challenger, address indexed target);
event ChallengeOpened(bytes32 indexed challengeId, address indexed challenger, address indexed commitmentSigner);
event ChallengeDefended(bytes32 indexed challengeId);
event ChallengeLost(bytes32 indexed challengeId);

Expand Down

0 comments on commit 26b418d

Please sign in to comment.