Commit 750ed202 authored by Adrian Sutton's avatar Adrian Sutton Committed by GitHub

op-dispute-mon: Support asterisc kona game types. (#13270)

parent 9548d53a
......@@ -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)
......
......@@ -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"),
},
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment