11import type { Account , bytes , uint64 } from '@algorandfoundation/algorand-typescript'
2- import { arc4 , assert , BaseContract , Bytes , contract , Contract , Global , Txn , Uint64 } from '@algorandfoundation/algorand-typescript'
2+ import { assert , BaseContract , Bytes , contract , Contract , Global , Txn , Uint64 } from '@algorandfoundation/algorand-typescript'
33import { TestExecutionContext } from '@algorandfoundation/algorand-typescript-testing'
44import { afterEach , describe , expect , it } from 'vitest'
55import { lazyContext } from '../../src/context-helpers/internal-context'
@@ -39,8 +39,7 @@ class ContractARC4Create extends Contract {
3939 this . #stateTotals = Uint64 ( )
4040 }
4141
42- @arc4 . abimethod ( { onCreate : 'require' } )
43- create ( val : uint64 ) : void {
42+ createApplication ( val : uint64 ) : void {
4443 this . arg1 = val
4544 assert ( Global . currentApplicationId . globalNumBytes === 4 )
4645 assert ( Global . currentApplicationId . globalNumUint === 5 )
@@ -82,7 +81,7 @@ describe('arc4 contract creation', () => {
8281
8382 const contract = ctx . contract . create ( ContractARC4Create )
8483 ctx . txn . createScope ( [ ctx . any . txn . applicationCall ( { appId : ctx . ledger . getApplicationForContract ( contract ) , sender } ) ] ) . execute ( ( ) => {
85- contract . create ( arg1 )
84+ contract . createApplication ( arg1 )
8685 expect ( contract . arg1 ) . toEqual ( arg1 )
8786 expect ( contract . creator ) . toEqual ( sender )
8887 } )
@@ -96,7 +95,7 @@ describe('arc4 contract creation', () => {
9695 const appData = lazyContext . getApplicationData ( contract )
9796 expect ( appData . isCreating ) . toBe ( true )
9897
99- contract . create ( arg1 )
98+ contract . createApplication ( arg1 )
10099
101100 expect ( appData . isCreating ) . toBe ( false )
102101 expect ( contract . arg1 ) . toEqual ( arg1 )
0 commit comments