Skip to content

Commit 78b63c0

Browse files
authored
Merge branch 'main' into terminus-migration
2 parents 08ff188 + 4c82726 commit 78b63c0

File tree

10 files changed

+2104
-1
lines changed

10 files changed

+2104
-1
lines changed

.github/workflows/statblock.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: StatBlock tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "contracts/stats/**"
7+
- "cli/web3cli/test_statblock.py"
8+
- "cli/web3cli/StatBlock.py"
9+
- "cli/web3cli/IStatBlock.py"
10+
- "cli/web3cli/statblock_events.py"
11+
- ".github/workflows/statblock.yml"
12+
branches:
13+
- main
14+
jobs:
15+
build:
16+
runs-on: ubuntu-20.04
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: actions/setup-node@v3
20+
with:
21+
node-version: "16"
22+
- uses: actions/setup-python@v2
23+
with:
24+
python-version: "3.9"
25+
- name: Install ganache
26+
run: npm install -g ganache-cli
27+
- name: Upgrade pip
28+
env:
29+
BROWNIE_LIB: 1
30+
run: pip install -U pip
31+
- name: Install additional dev dependencies
32+
run: |
33+
pip install black moonworm
34+
- name: Install dependencies for CLI
35+
working-directory: cli/
36+
env:
37+
BROWNIE_LIB: 1
38+
run: |
39+
pip install -e .
40+
- name: Run tests
41+
working-directory: cli/
42+
run: bash test.sh web3cli.test_statblock

abi/IStatBlock.json

+267
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,267 @@
1+
[
2+
{
3+
"anonymous": false,
4+
"inputs": [
5+
{
6+
"indexed": true,
7+
"internalType": "address",
8+
"name": "tokenAddress",
9+
"type": "address"
10+
},
11+
{
12+
"indexed": true,
13+
"internalType": "uint256",
14+
"name": "tokenID",
15+
"type": "uint256"
16+
},
17+
{
18+
"indexed": true,
19+
"internalType": "uint256",
20+
"name": "statID",
21+
"type": "uint256"
22+
},
23+
{
24+
"indexed": false,
25+
"internalType": "uint256",
26+
"name": "value",
27+
"type": "uint256"
28+
}
29+
],
30+
"name": "StatAssigned",
31+
"type": "event"
32+
},
33+
{
34+
"anonymous": false,
35+
"inputs": [
36+
{
37+
"indexed": false,
38+
"internalType": "uint256",
39+
"name": "statID",
40+
"type": "uint256"
41+
}
42+
],
43+
"name": "StatCreated",
44+
"type": "event"
45+
},
46+
{
47+
"anonymous": false,
48+
"inputs": [
49+
{
50+
"indexed": true,
51+
"internalType": "uint256",
52+
"name": "statID",
53+
"type": "uint256"
54+
},
55+
{
56+
"indexed": false,
57+
"internalType": "string",
58+
"name": "descriptor",
59+
"type": "string"
60+
}
61+
],
62+
"name": "StatDescriptorUpdated",
63+
"type": "event"
64+
},
65+
{
66+
"inputs": [
67+
{
68+
"internalType": "address",
69+
"name": "tokenAddress",
70+
"type": "address"
71+
},
72+
{
73+
"internalType": "uint256",
74+
"name": "tokenID",
75+
"type": "uint256"
76+
},
77+
{
78+
"internalType": "uint256[]",
79+
"name": "statIDs",
80+
"type": "uint256[]"
81+
},
82+
{
83+
"internalType": "uint256[]",
84+
"name": "values",
85+
"type": "uint256[]"
86+
}
87+
],
88+
"name": "assignStats",
89+
"outputs": [],
90+
"stateMutability": "nonpayable",
91+
"type": "function"
92+
},
93+
{
94+
"inputs": [
95+
{
96+
"internalType": "address[]",
97+
"name": "tokenAddresses",
98+
"type": "address[]"
99+
},
100+
{
101+
"internalType": "uint256[]",
102+
"name": "tokenIDs",
103+
"type": "uint256[]"
104+
},
105+
{
106+
"internalType": "uint256[][]",
107+
"name": "statIDs",
108+
"type": "uint256[][]"
109+
},
110+
{
111+
"internalType": "uint256[][]",
112+
"name": "values",
113+
"type": "uint256[][]"
114+
}
115+
],
116+
"name": "batchAssignStats",
117+
"outputs": [],
118+
"stateMutability": "nonpayable",
119+
"type": "function"
120+
},
121+
{
122+
"inputs": [
123+
{
124+
"internalType": "address[]",
125+
"name": "tokenAddresses",
126+
"type": "address[]"
127+
},
128+
{
129+
"internalType": "uint256[]",
130+
"name": "tokenIDs",
131+
"type": "uint256[]"
132+
},
133+
{
134+
"internalType": "uint256[]",
135+
"name": "statIDs",
136+
"type": "uint256[]"
137+
}
138+
],
139+
"name": "batchGetStats",
140+
"outputs": [
141+
{
142+
"internalType": "uint256[][]",
143+
"name": "",
144+
"type": "uint256[][]"
145+
}
146+
],
147+
"stateMutability": "view",
148+
"type": "function"
149+
},
150+
{
151+
"inputs": [
152+
{
153+
"internalType": "string",
154+
"name": "descriptor",
155+
"type": "string"
156+
}
157+
],
158+
"name": "createStat",
159+
"outputs": [
160+
{
161+
"internalType": "uint256",
162+
"name": "",
163+
"type": "uint256"
164+
}
165+
],
166+
"stateMutability": "nonpayable",
167+
"type": "function"
168+
},
169+
{
170+
"inputs": [
171+
{
172+
"internalType": "uint256",
173+
"name": "",
174+
"type": "uint256"
175+
}
176+
],
177+
"name": "describeStat",
178+
"outputs": [
179+
{
180+
"internalType": "string",
181+
"name": "",
182+
"type": "string"
183+
}
184+
],
185+
"stateMutability": "view",
186+
"type": "function"
187+
},
188+
{
189+
"inputs": [
190+
{
191+
"internalType": "address",
192+
"name": "tokenAddress",
193+
"type": "address"
194+
},
195+
{
196+
"internalType": "uint256",
197+
"name": "tokenID",
198+
"type": "uint256"
199+
},
200+
{
201+
"internalType": "uint256[]",
202+
"name": "statIDs",
203+
"type": "uint256[]"
204+
}
205+
],
206+
"name": "getStats",
207+
"outputs": [
208+
{
209+
"internalType": "uint256[]",
210+
"name": "",
211+
"type": "uint256[]"
212+
}
213+
],
214+
"stateMutability": "view",
215+
"type": "function"
216+
},
217+
{
218+
"inputs": [
219+
{
220+
"internalType": "address",
221+
"name": "account",
222+
"type": "address"
223+
}
224+
],
225+
"name": "isAdministrator",
226+
"outputs": [
227+
{
228+
"internalType": "bool",
229+
"name": "",
230+
"type": "bool"
231+
}
232+
],
233+
"stateMutability": "view",
234+
"type": "function"
235+
},
236+
{
237+
"inputs": [
238+
{
239+
"internalType": "uint256",
240+
"name": "statID",
241+
"type": "uint256"
242+
},
243+
{
244+
"internalType": "string",
245+
"name": "descriptor",
246+
"type": "string"
247+
}
248+
],
249+
"name": "setStatDescriptor",
250+
"outputs": [],
251+
"stateMutability": "nonpayable",
252+
"type": "function"
253+
},
254+
{
255+
"inputs": [],
256+
"name": "statBlockVersion",
257+
"outputs": [
258+
{
259+
"internalType": "string",
260+
"name": "",
261+
"type": "string"
262+
}
263+
],
264+
"stateMutability": "view",
265+
"type": "function"
266+
}
267+
]

0 commit comments

Comments
 (0)