-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
557 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule sp1-contracts
added at
610395
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/ | ||
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ | ||
@rari-capital/solmate/=lib/solmate/ | ||
@lib-keccak/=lib/lib-keccak/contracts/lib/ | ||
@solady/=lib/solady/src/ | ||
forge-std/=lib/forge-std/src/ | ||
ds-test/=lib/forge-std/lib/ds-test/src/ | ||
safe-contracts/=lib/safe-contracts/contracts/ | ||
kontrol-cheatcodes/=lib/kontrol-cheatcodes/src/ | ||
gelato/=lib/automate/contracts/ | ||
@solady-test/=lib/lib-keccak/lib/solady/test/ | ||
automate/=lib/automate/contracts/ | ||
erc4626-tests/=lib/automate/lib/openzeppelin-contracts/lib/erc4626-tests/ | ||
hardhat/=lib/automate/node_modules/hardhat/ | ||
lib-keccak/=lib/lib-keccak/contracts/ | ||
openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/ | ||
openzeppelin-contracts/=lib/openzeppelin-contracts/ | ||
prb-test/=lib/automate/lib/prb-test/src/ | ||
prb/-est/=lib/automate/lib/prb-test/src/ | ||
solady/=lib/solady/ | ||
solmate/=lib/solmate/src/ | ||
@sp1-contracts/=lib/sp1-contracts/contracts/src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
483 changes: 483 additions & 0 deletions
483
packages/contracts-bedrock/src/dispute/OptimisticZKGame.sol
Large diffs are not rendered by default.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
packages/contracts-bedrock/src/dispute/interfaces/IOptimisticZKGame.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.15; | ||
|
||
import { IDisputeGame } from "./IDisputeGame.sol"; | ||
import "src/dispute/lib/Types.sol"; | ||
|
||
interface IOptimisticZKGame is IDisputeGame { | ||
enum IntermediateClaimStatus { | ||
NONE, | ||
ACCEPTED, | ||
CHALLENGED | ||
} | ||
|
||
struct IntermediateRootClaim { | ||
OutputRoot outputRoot; | ||
IntermediateClaimStatus status; | ||
} | ||
|
||
struct Challenge { | ||
address challenger; | ||
Clock proposerClock; | ||
IntermediateRootClaim left; | ||
IntermediateRootClaim right; | ||
OutputRoot current; | ||
uint totalBonds; | ||
bool resolved; | ||
} | ||
|
||
error Unauthorized(); | ||
error ProposerIsChallenger(); | ||
error InvalidDurations(); | ||
error PreviousGameNotResolved(); | ||
error InvalidBlockNumber(); | ||
error WrongTurn(); | ||
error ReadyToProve(); | ||
error NotReadyToProve(); | ||
error InvalidChallengeId(); | ||
error GameAlreadyResolved(); | ||
error ChallengeAlreadyResolved(); | ||
error ChallengeCantBeResolved(); | ||
error WrongBondAmount(); | ||
error TransferFailed(); | ||
error ClockNotExpired(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters