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

feat: migrate simple, kitchen-sink, calculator examples from tealscript to puya-ts #14

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

boblat
Copy link
Contributor

@boblat boblat commented Mar 6, 2025

No description provided.

@boblat boblat force-pushed the feat/calculator-example branch 3 times, most recently from f949227 to a2b1741 Compare March 7, 2025 02:58
@boblat boblat force-pushed the feat/calculator-example branch from 932b873 to 03b2e29 Compare March 7, 2025 09:15
@boblat boblat changed the title feat: add calculator example in tealscript and puya-ts feat: migrate simple, kitchen-sink, calculator examples from tealscript to puya-ts Mar 7, 2025
import type { uint64 } from "@algorandfoundation/algorand-typescript";

// eslint-disable-next-line no-unused-vars
export class Calculator extends arc4.Contract {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be good if we tried to reduce the usage of arc4 as much as possible (ie. just use Contract instead of arc4.Contract). TEALScript has no explicit mention of ARC4/ABI anywhere in the API and obviously ARC4 is new to TypeScript developers. The more code we can write without having to use it the better and finding areas where it's required is during the migration process is a good way to figure out what needs to be worked on

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been updated to use just Contract.

@boblat boblat force-pushed the feat/calculator-example branch 3 times, most recently from 6e926a0 to 31e2cd5 Compare March 10, 2025 04:07
@boblat boblat force-pushed the feat/calculator-example branch 2 times, most recently from c0672d6 to c2c652d Compare March 10, 2025 04:14
@boblat boblat force-pushed the feat/calculator-example branch from c2c652d to 5eb777f Compare March 10, 2025 04:15
@joe-p
Copy link
Contributor

joe-p commented Mar 10, 2025

One thing I noticed is that there's a lot of noise in the diffs due to formatting which makes migration look more burdensome than it is. For example:

CleanShot 2025-03-10 at 09 04 35@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants