Skip to content

Commit

Permalink
Merge pull request #51 from PhearZero/optimize-client-imports
Browse files Browse the repository at this point in the history
chore: optimize client imports
  • Loading branch information
robdmoore authored Aug 12, 2023
2 parents bf986a3 + b8f01d6 commit 2de43ed
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 25 deletions.
11 changes: 6 additions & 5 deletions examples/helloworld/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* requires: @algorandfoundation/algokit-utils: ^2
*/
import * as algokit from '@algorandfoundation/algokit-utils'
import {
import type {
AppCallTransactionResult,
AppCallTransactionResultOfType,
CoreAppCallArgs,
Expand All @@ -14,16 +14,17 @@ import {
TealTemplateParams,
ABIAppCallArg,
} from '@algorandfoundation/algokit-utils/types/app'
import {
import type {
AppClientCallCoreParams,
AppClientCompilationParams,
AppClientDeployCoreParams,
AppDetails,
ApplicationClient,
} from '@algorandfoundation/algokit-utils/types/app-client'
import { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec'
import { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction'
import { Algodv2, OnApplicationComplete, Transaction, TransactionWithSigner, AtomicTransactionComposer } from 'algosdk'
import type { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec'
import type { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction'
import type { TransactionWithSigner } from 'algosdk'
import { Algodv2, OnApplicationComplete, Transaction, AtomicTransactionComposer } from 'algosdk'
export const APP_SPEC: AppSpec = {
"hints": {
"hello(string)string": {
Expand Down
11 changes: 6 additions & 5 deletions examples/lifecycle/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* requires: @algorandfoundation/algokit-utils: ^2
*/
import * as algokit from '@algorandfoundation/algokit-utils'
import {
import type {
AppCallTransactionResult,
AppCallTransactionResultOfType,
CoreAppCallArgs,
Expand All @@ -14,16 +14,17 @@ import {
TealTemplateParams,
ABIAppCallArg,
} from '@algorandfoundation/algokit-utils/types/app'
import {
import type {
AppClientCallCoreParams,
AppClientCompilationParams,
AppClientDeployCoreParams,
AppDetails,
ApplicationClient,
} from '@algorandfoundation/algokit-utils/types/app-client'
import { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec'
import { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction'
import { Algodv2, OnApplicationComplete, Transaction, TransactionWithSigner, AtomicTransactionComposer } from 'algosdk'
import type { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec'
import type { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction'
import type { TransactionWithSigner } from 'algosdk'
import { Algodv2, OnApplicationComplete, Transaction, AtomicTransactionComposer } from 'algosdk'
export const APP_SPEC: AppSpec = {
"hints": {
"hello(string)string": {
Expand Down
11 changes: 6 additions & 5 deletions examples/state/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* requires: @algorandfoundation/algokit-utils: ^2
*/
import * as algokit from '@algorandfoundation/algokit-utils'
import {
import type {
AppCallTransactionResult,
AppCallTransactionResultOfType,
CoreAppCallArgs,
Expand All @@ -14,16 +14,17 @@ import {
TealTemplateParams,
ABIAppCallArg,
} from '@algorandfoundation/algokit-utils/types/app'
import {
import type {
AppClientCallCoreParams,
AppClientCompilationParams,
AppClientDeployCoreParams,
AppDetails,
ApplicationClient,
} from '@algorandfoundation/algokit-utils/types/app-client'
import { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec'
import { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction'
import { Algodv2, OnApplicationComplete, Transaction, TransactionWithSigner, AtomicTransactionComposer } from 'algosdk'
import type { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec'
import type { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction'
import type { TransactionWithSigner } from 'algosdk'
import { Algodv2, OnApplicationComplete, Transaction, AtomicTransactionComposer } from 'algosdk'
export const APP_SPEC: AppSpec = {
"hints": {
"call_abi(string)string": {
Expand Down
11 changes: 6 additions & 5 deletions examples/voting/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* requires: @algorandfoundation/algokit-utils: ^2
*/
import * as algokit from '@algorandfoundation/algokit-utils'
import {
import type {
AppCallTransactionResult,
AppCallTransactionResultOfType,
CoreAppCallArgs,
Expand All @@ -14,16 +14,17 @@ import {
TealTemplateParams,
ABIAppCallArg,
} from '@algorandfoundation/algokit-utils/types/app'
import {
import type {
AppClientCallCoreParams,
AppClientCompilationParams,
AppClientDeployCoreParams,
AppDetails,
ApplicationClient,
} from '@algorandfoundation/algokit-utils/types/app-client'
import { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec'
import { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction'
import { Algodv2, OnApplicationComplete, Transaction, TransactionWithSigner, AtomicTransactionComposer } from 'algosdk'
import type { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec'
import type { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction'
import type { TransactionWithSigner } from 'algosdk'
import { Algodv2, OnApplicationComplete, Transaction, AtomicTransactionComposer } from 'algosdk'
export const APP_SPEC: AppSpec = {
"hints": {
"create(string,byte[],string,uint64,uint64,uint8[],uint64,string)void": {
Expand Down
11 changes: 6 additions & 5 deletions src/client/imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DocumentParts } from '../output/writer'

export function* imports(): DocumentParts {
yield `import * as algokit from '@algorandfoundation/algokit-utils'
import {
import type {
AppCallTransactionResult,
AppCallTransactionResultOfType,
CoreAppCallArgs,
Expand All @@ -11,14 +11,15 @@ import {
TealTemplateParams,
ABIAppCallArg,
} from '@algorandfoundation/algokit-utils/types/app'
import {
import type {
AppClientCallCoreParams,
AppClientCompilationParams,
AppClientDeployCoreParams,
AppDetails,
ApplicationClient,
} from '@algorandfoundation/algokit-utils/types/app-client'
import { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec'
import { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction'
import { Algodv2, OnApplicationComplete, Transaction, TransactionWithSigner, AtomicTransactionComposer } from 'algosdk'`
import type { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec'
import type { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction'
import type { TransactionWithSigner } from 'algosdk'
import { Algodv2, OnApplicationComplete, Transaction, AtomicTransactionComposer } from 'algosdk'`
}

0 comments on commit 2de43ed

Please sign in to comment.