Skip to content

Commit

Permalink
added schema
Browse files Browse the repository at this point in the history
  • Loading branch information
gagdiez committed Aug 5, 2024
1 parent f4bb0d6 commit 174c64e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contract-ts/src/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import { NearBindgen, near, call, view } from 'near-sdk-js';
class HelloNear {
greeting: string = 'Hello';

static schema = { // JS contracts need a schema
"greeting": "string"
};

@view({}) // This method is read-only and can be called for free
get_greeting(): string {
return this.greeting;
Expand Down

0 comments on commit 174c64e

Please sign in to comment.