Skip to content

Commit

Permalink
Merge pull request #20 from algorandfoundation/fix-contract-generator
Browse files Browse the repository at this point in the history
fix: fix contract generator deploy config
  • Loading branch information
neilcampbell authored May 6, 2024
2 parents ec93ae6 + 7e118d8 commit dc69a47
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ def deploy(
app_spec: algokit_utils.ApplicationSpecification,
deployer: algokit_utils.Account,
) -> None:
from smart_contracts.artifacts.hello_world.client import (
HelloWorldClient,
from smart_contracts.artifacts.{{ contract_name }}.client import (
{{ contract_name.split('_')|map('capitalize')|join }}Client,
)

app_client = HelloWorldClient(
app_client = {{ contract_name.split('_')|map('capitalize')|join }}Client(
algod_client,
creator=deployer,
indexer_client=indexer_client,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ def deploy(
app_spec: algokit_utils.ApplicationSpecification,
deployer: algokit_utils.Account,
) -> None:
from smart_contracts.artifacts.hello_world.client import (
HelloWorldClient,
from smart_contracts.artifacts.cool_contract.client import (
CoolContractClient,
)

app_client = HelloWorldClient(
app_client = CoolContractClient(
algod_client,
creator=deployer,
indexer_client=indexer_client,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as algokit from '@algorandfoundation/algokit-utils'
import { HelloWorldClient } from '../artifacts/hello_world/client'
import { {{ contract_name.split('_')|map('capitalize')|join }}Client } from '../artifacts/{{ contract_name }}/client'

// Below is a showcase of various deployment options you can use in TypeScript Client
export async function deploy() {
console.log('=== Deploying HelloWorld ===')
console.log('=== Deploying {{ contract_name.split('_')|map('capitalize')|join }} ===')

const algod = algokit.getAlgoClient()
const indexer = algokit.getAlgoIndexerClient()
Expand All @@ -16,7 +16,7 @@ export async function deploy() {
},
algod,
)
const appClient = new HelloWorldClient(
const appClient = new {{ contract_name.split('_')|map('capitalize')|join }}Client(
{
resolveBy: 'creatorAndName',
findExistingUsing: indexer,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as algokit from '@algorandfoundation/algokit-utils'
import { HelloWorldClient } from '../artifacts/hello_world/client'
import { CoolContractClient } from '../artifacts/cool_contract/client'

// Below is a showcase of various deployment options you can use in TypeScript Client
export async function deploy() {
console.log('=== Deploying HelloWorld ===')
console.log('=== Deploying CoolContract ===')

const algod = algokit.getAlgoClient()
const indexer = algokit.getAlgoIndexerClient()
Expand All @@ -16,7 +16,7 @@ export async function deploy() {
},
algod,
)
const appClient = new HelloWorldClient(
const appClient = new CoolContractClient(
{
resolveBy: 'creatorAndName',
findExistingUsing: indexer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ def deploy(
app_spec: algokit_utils.ApplicationSpecification,
deployer: algokit_utils.Account,
) -> None:
from smart_contracts.artifacts.hello_world.client import (
HelloWorldClient,
from smart_contracts.artifacts.{{ contract_name }}.client import (
{{ contract_name.split('_')|map('capitalize')|join }}Client,
)

app_client = HelloWorldClient(
app_client = {{ contract_name.split('_')|map('capitalize')|join }}Client(
algod_client,
creator=deployer,
indexer_client=indexer_client,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ def deploy(
app_spec: algokit_utils.ApplicationSpecification,
deployer: algokit_utils.Account,
) -> None:
from smart_contracts.artifacts.hello_world.client import (
HelloWorldClient,
from smart_contracts.artifacts.cool_contract.client import (
CoolContractClient,
)

app_client = HelloWorldClient(
app_client = CoolContractClient(
algod_client,
creator=deployer,
indexer_client=indexer_client,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as algokit from '@algorandfoundation/algokit-utils'
import { HelloWorldClient } from '../artifacts/hello_world/client'
import { {{ contract_name.split('_')|map('capitalize')|join }}Client } from '../artifacts/{{ contract_name }}/client'

// Below is a showcase of various deployment options you can use in TypeScript Client
export async function deploy() {
console.log('=== Deploying HelloWorld ===')
console.log('=== Deploying {{ contract_name.split('_')|map('capitalize')|join }} ===')

const algod = algokit.getAlgoClient()
const indexer = algokit.getAlgoIndexerClient()
Expand All @@ -16,7 +16,7 @@ export async function deploy() {
},
algod,
)
const appClient = new HelloWorldClient(
const appClient = new {{ contract_name.split('_')|map('capitalize')|join }}Client(
{
resolveBy: 'creatorAndName',
findExistingUsing: indexer,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as algokit from '@algorandfoundation/algokit-utils'
import { HelloWorldClient } from '../artifacts/hello_world/client'
import { CoolContractClient } from '../artifacts/cool_contract/client'

// Below is a showcase of various deployment options you can use in TypeScript Client
export async function deploy() {
console.log('=== Deploying HelloWorld ===')
console.log('=== Deploying CoolContract ===')

const algod = algokit.getAlgoClient()
const indexer = algokit.getAlgoIndexerClient()
Expand All @@ -16,7 +16,7 @@ export async function deploy() {
},
algod,
)
const appClient = new HelloWorldClient(
const appClient = new CoolContractClient(
{
resolveBy: 'creatorAndName',
findExistingUsing: indexer,
Expand Down

0 comments on commit dc69a47

Please sign in to comment.