@@ -19,7 +19,6 @@ import {
1919import { encodingUtil } from '@algorandfoundation/puya-ts'
2020import assert from 'assert'
2121import { ABI_RETURN_VALUE_LOG_PREFIX , ALGORAND_ADDRESS_BYTE_LENGTH , ALGORAND_CHECKSUM_BYTE_LENGTH , UINT64_SIZE } from '../../constants'
22- import { lazyContext } from '../../context-helpers/internal-context'
2322import { AvmError , avmInvariant , CodeError , InternalError } from '../../errors'
2423import { nameOfType , type DeliberateAny } from '../../typescript-helpers'
2524import {
@@ -42,7 +41,6 @@ import { BytesBackedCls, Uint64BackedCls } from '../base'
4241import type { StubBytesCompat } from '../primitives'
4342import { BigUintCls , Bytes , BytesCls , getUint8Array , isBytes , Uint64Cls } from '../primitives'
4443import { Account , AccountCls , ApplicationCls , AssetCls } from '../reference'
45- import type { ApplicationCallTransaction } from '../transactions'
4644import { arrayProxyHandler } from './array-proxy'
4745import { ABI_LENGTH_SIZE , FALSE_BIGINT_VALUE , IS_INITIALISING_FROM_BYTES_SYMBOL , TRUE_BIGINT_VALUE } from './constants'
4846import {
@@ -1157,16 +1155,13 @@ export const getArc4Encoded = (value: DeliberateAny, sourceTypeInfoString?: stri
11571155 return value
11581156 }
11591157 if ( value instanceof AccountCls ) {
1160- const index = ( lazyContext . activeGroup . activeTransaction as ApplicationCallTransaction ) . apat . indexOf ( value )
1161- return index >= 0 ? new Uint ( { name : 'Uint<64>' , genericArgs : [ { name : '64' } ] } , asBigInt ( index ) ) : getArc4Encoded ( value . bytes )
1158+ return getArc4Encoded ( value . bytes )
11621159 }
11631160 if ( value instanceof AssetCls ) {
1164- const index = ( lazyContext . activeGroup . activeTransaction as ApplicationCallTransaction ) . apas . indexOf ( value )
1165- return index >= 0 ? new Uint ( { name : 'Uint<64>' , genericArgs : [ { name : '64' } ] } , asBigInt ( index ) ) : getArc4Encoded ( value . id )
1161+ return getArc4Encoded ( value . id )
11661162 }
11671163 if ( value instanceof ApplicationCls ) {
1168- const index = ( lazyContext . activeGroup . activeTransaction as ApplicationCallTransaction ) . apfa . indexOf ( value )
1169- return index >= 0 ? new Uint ( { name : 'Uint<64>' , genericArgs : [ { name : '64' } ] } , asBigInt ( index ) ) : getArc4Encoded ( value . id )
1164+ return getArc4Encoded ( value . id )
11701165 }
11711166 if ( typeof value === 'boolean' ) {
11721167 return new Bool ( { name : 'Bool' } , value )
0 commit comments