-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactions.ts
40 lines (33 loc) · 941 Bytes
/
actions.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { ActionSchema, SolidityType } from "@stackr/sdk";
const baseTimeStamp = {
timestamp: SolidityType.UINT,
};
const startTournamentSchema = new ActionSchema("startTournament", {
...baseTimeStamp,
});
const matchAction = new ActionSchema("matchAction", {
matchId: SolidityType.UINT,
...baseTimeStamp,
});
const matchPlayerAction = new ActionSchema("matchPlayerAction", {
matchId: SolidityType.UINT,
playerId: SolidityType.UINT,
...baseTimeStamp,
});
const teamActionSchema = new ActionSchema("teamAction", {
teamId: SolidityType.UINT,
...baseTimeStamp,
});
const addPlayerSchema = new ActionSchema("addPlayer", {
teamId: SolidityType.UINT,
playerName: SolidityType.STRING,
...baseTimeStamp,
});
export const schemas = {
startMatch: matchAction,
endMatch: matchAction,
logGoal: matchPlayerAction,
startTournament: startTournamentSchema,
logByes: teamActionSchema,
addPlayer: addPlayerSchema,
};