Skip to content

Commit 044c292

Browse files
feat: add example comment tag
1 parent 4ce8e56 commit 044c292

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

projects/typescript-examples/contracts/ReferenceAccountApp/contract.algo.ts

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
import type { uint64 } from '@algorandfoundation/algorand-typescript'
1414
import { Address } from '@algorandfoundation/algorand-typescript/arc4'
1515

16+
// example: REFERENCE_ACCOUNT_APP_EXAMPLE
1617
/**
1718
* A contract that maintains a per-account counter in local state
1819
* Accounts must opt in to use the counter
@@ -87,3 +88,4 @@ export default class ReferenceAccountApp extends Contract {
8788
return value
8889
}
8990
}
91+
// example: REFERENCE_ACCOUNT_APP_EXAMPLE

projects/typescript-examples/contracts/ReferenceAccountAsset/contract.algo.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Contract, abimethod, Account, Asset, assert } from '@algorandfoundation/algorand-typescript'
22
import { Address } from '@algorandfoundation/algorand-typescript/arc4'
33

4+
// example: REFERENCE_ACCOUNT_ASSET_EXAMPLE
45
/**
56
* A contract that demonstrates how to reference both accounts and assets in a smart contract
67
*/
@@ -34,3 +35,4 @@ export default class ReferenceAccountAsset extends Contract {
3435
return asset.balance(account)
3536
}
3637
}
38+
// example: REFERENCE_ACCOUNT_ASSET_EXAMPLE

projects/typescript-examples/contracts/ReferenceAppBox/contract.algo.ts

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
} from '@algorandfoundation/algorand-typescript'
1414
import type { uint64 } from '@algorandfoundation/algorand-typescript'
1515

16+
// example: REFERENCE_APP_BOX_EXAMPLE
1617
/**
1718
* A contract that uses box storage to maintain a counter for each account
1819
* Each account needs to pay for the Minimum Balance Requirement (MBR) for their box
@@ -128,3 +129,4 @@ export default class ReferenceAppBox extends Contract {
128129
this.boxMbr.value = Uint64(2500) + this.boxSize.value * Uint64(400)
129130
}
130131
}
132+
// example: REFERENCE_APP_BOX_EXAMPLE

0 commit comments

Comments
 (0)