Skip to content

Commit 5e373bd

Browse files
AVM: Consolidate TEAL and AVM versions (#348)
1 parent 46577d5 commit 5e373bd

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/main/java/com/algorand/algosdk/logic/Logic.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,14 @@ public static ProgramData readProgram(byte[] program, List<byte[]> args) throws
250250
}
251251
// costs calculated dynamically starting in v4
252252
if (version < 4 && cost > MAX_COST) {
253-
throw new IllegalArgumentException("program too costly for Teal version < 4. consider using v4.");
253+
throw new IllegalArgumentException("program too costly for version < 4. consider using v4.");
254254
}
255255

256256
return new ProgramData(true, ints, bytes);
257257
}
258258

259259
/**
260-
* Retrieves TEAL supported version
260+
* Retrieves supported program version
261261
* @return int
262262
* @throws IOException
263263
*/
@@ -269,7 +269,7 @@ public static int getLogicSigVersion() throws IOException {
269269
}
270270

271271
/**
272-
* Retrieves max supported version of TEAL evaluator
272+
* Retrieves max supported program version of evaluator
273273
* @return int
274274
* @throws IOException
275275
*/

src/test/java/com/algorand/algosdk/logic/TestLogic.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public void testCheckProgramCostly() throws Exception {
213213
program2[0] = v;
214214
assertThatThrownBy(() -> readProgram(program2, args))
215215
.isInstanceOf(IllegalArgumentException.class)
216-
.hasMessage("program too costly for Teal version < 4. consider using v4.");
216+
.hasMessage("program too costly for version < 4. consider using v4.");
217217
}
218218

219219
for (byte v : versions) {
@@ -236,7 +236,7 @@ public void testCheckProgramInvalidOpcode() throws Exception {
236236
}
237237

238238
@Test
239-
public void testCheckProgramTealV2() throws Exception {
239+
public void testCheckProgramV2() throws Exception {
240240
assertThat(getEvalMaxVersion()).isGreaterThanOrEqualTo(2);
241241
assertThat(getLogicSigVersion()).isGreaterThanOrEqualTo(2);
242242

@@ -269,7 +269,7 @@ public void testCheckProgramTealV2() throws Exception {
269269
}
270270

271271
@Test
272-
public void testCheckProgramTealV3() throws Exception {
272+
public void testCheckProgramV3() throws Exception {
273273
assertThat(getEvalMaxVersion()).isGreaterThanOrEqualTo(3);
274274
assertThat(getLogicSigVersion()).isGreaterThanOrEqualTo(3);
275275

@@ -311,7 +311,7 @@ public void testCheckProgramTealV3() throws Exception {
311311
}
312312

313313
@Test
314-
public void testCheckProgramTealV4() throws Exception {
314+
public void testCheckProgramV4() throws Exception {
315315
assertThat(getEvalMaxVersion()).isGreaterThanOrEqualTo(4);
316316

317317
{
@@ -379,7 +379,7 @@ public void testCheckProgramTealV4() throws Exception {
379379
}
380380

381381
@Test
382-
public void testCheckProgramTealV5() throws Exception {
382+
public void testCheckProgramV5() throws Exception {
383383
assertThat(getEvalMaxVersion()).isGreaterThanOrEqualTo(5);
384384

385385
{
@@ -414,7 +414,7 @@ public void testCheckProgramTealV5() throws Exception {
414414
}
415415

416416
@Test
417-
public void testCheckProgramTealV6() throws Exception {
417+
public void testCheckProgramV6() throws Exception {
418418
assertThat(getEvalMaxVersion()).isGreaterThanOrEqualTo(6);
419419

420420
{

0 commit comments

Comments
 (0)