Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work #46

Merged
merged 31 commits into from
Dec 5, 2024
Merged

Work #46

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
36a1661
feat: Support property checks and spreading of arc4 structs
tristanmenzel Nov 12, 2024
32bdda3
test: Include teal output for approvals
tristanmenzel Nov 12, 2024
73ef7a6
test: Uncomment and add test for implicit struct casting to object ty…
tristanmenzel Nov 12, 2024
ad871e8
test: Include awst files in approvals
tristanmenzel Nov 12, 2024
005551a
fix: Resolve issue with resolution of algo-ts types from namespace ob…
tristanmenzel Nov 16, 2024
df9a59b
fix: Expand supported args for uint64 constructor
tristanmenzel Nov 19, 2024
94f03bd
fix: Use default name of Anonymous for unnamed object types
tristanmenzel Nov 21, 2024
9ecccf0
chore: Update deps
tristanmenzel Nov 21, 2024
fadeecc
fix: itob for uint64 should return 8 bytes when evaluating to a constant
tristanmenzel Nov 21, 2024
991547c
test: Expand test coverage of primitives
tristanmenzel Nov 21, 2024
9747254
fix: Error when parsing an unsafe numeric literal
tristanmenzel Nov 25, 2024
49f0cd6
fix: Generate a name for anonymous types used in ABI methods + stabil…
tristanmenzel Nov 25, 2024
607d15f
feat: Add DynamicBytes and StaticBytes types
tristanmenzel Nov 27, 2024
5451cd3
build: Override npm version to resolve audit issue
tristanmenzel Nov 27, 2024
08912a1
feat: support fromBytes and fromLog methods for ARC4Encoded types
tristanmenzel Nov 27, 2024
7df6574
refactor: Update AWST nodes to include AssertExpression and make use …
tristanmenzel Nov 27, 2024
dfad42c
feat: Include option for outputting arc56 json files
tristanmenzel Nov 27, 2024
7845ca1
feat: Parse jsdoc comments where available and include them in AWST
tristanmenzel Nov 27, 2024
cc9d48e
refactor: Export all ptypes under namesapce
tristanmenzel Nov 27, 2024
14666a3
Merge remote-tracking branch 'origin/alpha' into work
tristanmenzel Nov 27, 2024
a4c4d75
chore: Regenerate approvals
tristanmenzel Nov 27, 2024
77772d0
test: Exclude packages dir from puya-ts test run
tristanmenzel Nov 27, 2024
51558c7
chore: Reviewfixes
tristanmenzel Nov 29, 2024
c4e53ab
feat: Add interpretAsArc4, decodeArc4, and encodeArc4 functions in pl…
tristanmenzel Nov 30, 2024
b2e5dac
chore: Update approvals
tristanmenzel Nov 30, 2024
0fda7b5
refactor: export ARC4Encoded for stub impelmentation and fix typo for…
boblat Dec 2, 2024
757e8a4
feat: Pre-compiled contracts
tristanmenzel Dec 3, 2024
e0cce03
chore: Update algokit-utils dependency
tristanmenzel Dec 4, 2024
d0bfed7
feat: ARC28 emit function
tristanmenzel Dec 5, 2024
677255e
chore: Use tsconfig paths for local package + regenerate approvals
tristanmenzel Dec 5, 2024
674d6b2
fix: Bug when creating UintN<128> instance with a literal larger than…
tristanmenzel Dec 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions .github/workflows/ci-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
diffTextLen=${#diffText}
[ $diffTextLen -eq 0 ] && echo 'No changes' || (echo 'ERROR: Code differs to published version. Please bump package version or revert changes'; echo $diffText; exit 1;)


ci-puya-ts:
name: 'Build @algorandfoundation/puya-ts'
uses: ./.github/workflows/node-ci.yml
Expand All @@ -48,5 +47,5 @@ jobs:
python-version: 3.12.6
pre-test-script: |
pipx install algokit --python 3.12.6
algokit localnet start
algokit localnet reset --update
pipx install git+https://github.com/algorandfoundation/puya --python 3.12.6
23 changes: 18 additions & 5 deletions examples/hello-world-abi/contract.algo.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
import { arc4, log } from '@algorandfoundation/algorand-typescript'
import { arc4 } from '@algorandfoundation/algorand-typescript'

/**
* An abstract base class for a simple example contract
*/
abstract class Intermediate extends arc4.Contract {
/**
* sayBananas method
* @returns The string "Bananas"
*/
@arc4.abimethod({ allowActions: ['NoOp'], readonly: true })
public sayBananas(): string {
const result = `Bananas`
log(result)
return result
return `Bananas`
}
}

/**
* A simple hello world example contract
*/
export default class HelloWorldContract extends Intermediate {
/**
* sayHello method
* @param firstName The first name of the person to greet
* @param lastName THe last name of the person to greet
* @returns The string "Hello {firstName} {lastName"}
*/
public sayHello(firstName: string, lastName: string): string {
const result = `Hello ${firstName} ${lastName}`
log(result)
return result
}
}
Loading
Loading