Skip to content

Commit

Permalink
use AlgorandClient, export contract
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-p committed Apr 22, 2024
1 parent 0501eec commit 2277a3a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
7 changes: 4 additions & 3 deletions template_content/__test__/{{ contract_name }}.test.ts.jinja
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, test, expect, beforeAll, beforeEach } from '@jest/globals';
import { algorandFixture } from '@algorandfoundation/algokit-utils/testing';
import { {{ contract_name }}Client } from '../contracts/clients/{{ contract_name }}Client';
import * as algokit from '@algorandfoundation/algokit-utils';
import { {{ contract_name }}Client } from '../contracts/clients/{{ contract_name }}Client';

const fixture = algorandFixture();
algokit.Config.configure({ populateAppCallResources: true });
Expand All @@ -13,15 +13,16 @@ describe('{{ contract_name }}', () => {

beforeAll(async () => {
await fixture.beforeEach();
const { algod, testAccount } = fixture.context;
const { testAccount } = fixture.context;
const { algorand } = fixture;

appClient = new {{ contract_name }}Client(
{
sender: testAccount,
resolveBy: 'id',
id: 0,
},
algod
algorand.client.algod
);

await appClient.create.createApplication({});
Expand Down
3 changes: 1 addition & 2 deletions template_content/contracts/{{ contract_name }}.algo.ts.jinja
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Contract } from '@algorandfoundation/tealscript';

// eslint-disable-next-line no-unused-vars
class {{ contract_name }} extends Contract {
export class {{ contract_name }} extends Contract {
/**
* Calculates the sum of two numbers
*
Expand Down
2 changes: 1 addition & 1 deletion template_content/package.json.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"fix": "eslint . --ext .ts --fix"
},
"dependencies": {
"@algorandfoundation/algokit-utils": "^5.5.0",
"@algorandfoundation/algokit-utils": "^6.0.2",
"algosdk": "^2.7.0"
},
"devDependencies": {
Expand Down

0 comments on commit 2277a3a

Please sign in to comment.