Skip to content

Commit

Permalink
number -> uint64
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-p committed Mar 19, 2024
1 parent bca0bf0 commit 4f8d6a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions template_content/contracts/{{ project_name }}.algo.ts.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class {{ camel_case_name }} extends Contract {
* @param b
* @returns The sum of a and b
*/
private getSum(a: number, b: number): number {
private getSum(a: uint64, b: uint64): uint64 {
return a + b;
}

Expand All @@ -21,7 +21,7 @@ class {{ camel_case_name }} extends Contract {
* @param b
* @returns The difference between a and b.
*/
private getDifference(a: number, b: number): number {
private getDifference(a: uint64, b: uint64): uint64 {
return a >= b ? a - b : b - a;
}

Expand All @@ -34,8 +34,8 @@ class {{ camel_case_name }} extends Contract {
*
* @returns The result of the operation
*/
doMath(a: number, b: number, operation: string): number {
let result: number;
doMath(a: uint64, b: uint64, operation: string): uint64 {
let result: uint64;

if (operation === 'sum') {
result = this.getSum(a, b);
Expand Down

0 comments on commit 4f8d6a6

Please sign in to comment.