Skip to content

Commit

Permalink
op-dispute-mon: Support asterisc kona game types. (ethereum-optimism#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ajsutton authored Dec 5, 2024
1 parent 9548d53 commit 750ed20
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion op-dispute-mon/mon/extract/caller.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ func (g *GameCallerCreator) CreateContract(ctx context.Context, game gameTypes.G
faultTypes.PermissionedGameType,
faultTypes.AsteriscGameType,
faultTypes.AlphabetGameType,
faultTypes.FastGameType:
faultTypes.FastGameType,
faultTypes.AsteriscKonaGameType:
fdg, err := contracts.NewFaultDisputeGameContract(ctx, g.m, game.Proxy, g.caller)
if err != nil {
return nil, fmt.Errorf("failed to create fault dispute game contract: %w", err)
Expand Down
8 changes: 6 additions & 2 deletions op-dispute-mon/mon/extract/caller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ func TestMetadataCreator_CreateContract(t *testing.T) {
name: "validFastGameType",
game: types.GameMetadata{GameType: uint32(faultTypes.FastGameType), Proxy: fdgAddr},
},
{
name: "validAsteriscKonaGameType",
game: types.GameMetadata{GameType: uint32(faultTypes.AsteriscKonaGameType), Proxy: fdgAddr},
},
{
name: "InvalidGameType",
game: types.GameMetadata{GameType: 3, Proxy: fdgAddr},
expectedErr: fmt.Errorf("unsupported game type: 3"),
game: types.GameMetadata{GameType: 4, Proxy: fdgAddr},
expectedErr: fmt.Errorf("unsupported game type: 4"),
},
}

Expand Down

0 comments on commit 750ed20

Please sign in to comment.