Skip to content

Commit

Permalink
eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-p committed Dec 18, 2024
1 parent a1f333e commit 3ea8b6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7493,6 +7493,7 @@ declare type AssetFreezeTxn = Required<AssetFreezeParams>;

if (this.isDynamicType(tVar.type) || isNumeric(tVar.type)) {
if (program === 'lsig' || (program === 'approval' && !dynamicTemplateWarning)) {
// eslint-disable-next-line no-console
console.warn(
`WARNING: Due to dynamic template variable type for ${tVar.name} (${typeInfoToABIString(
tVar.type
Expand Down
4 changes: 4 additions & 0 deletions tests/common.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
/* eslint-disable func-names */

import fs from 'fs';
Expand Down Expand Up @@ -213,6 +214,7 @@ export async function runMethod({
const trace = resp.simulateResponse.txnGroups[0].txnResults[0].execTrace!.approvalProgramTrace!;
// eslint-disable-next-line no-use-before-define
const fullTrace = await getFullTrace(trace, approvalProgramTeal, algodClient);
// eslint-disable-next-line no-use-before-define
printFullTrace(fullTrace);
console.warn(e);
throw e;
Expand All @@ -231,6 +233,7 @@ type FullTrace = {
stack: (string | number)[];
}[];

// eslint-disable-next-line @typescript-eslint/no-explicit-any
async function getFullTrace(simTrace: any[], teal: string, algod: algosdk.Algodv2): Promise<FullTrace> {
const result = await algod.compile(teal).sourcemap(true).do();

Expand All @@ -247,6 +250,7 @@ async function getFullTrace(simTrace: any[], teal: string, algod: algosdk.Algodv
newStack = newStack.slice(0, -t.stackPopCount);
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
t.stackAdditions?.forEach((s: any) => {
if (s.bytes) {
newStack.push(`0x${Buffer.from(s.bytes, 'base64').toString('hex')}`);
Expand Down

0 comments on commit 3ea8b6c

Please sign in to comment.