create-near-app 5.2.1-0 → 5.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -3,16 +3,16 @@ import { NearBindgen, near, call, view } from 'near-sdk-js';
|
|
|
3
3
|
|
|
4
4
|
@NearBindgen({})
|
|
5
5
|
class HelloNear {
|
|
6
|
-
|
|
6
|
+
message: string = "Hello";
|
|
7
7
|
|
|
8
8
|
@view({}) // This method is read-only and can be called for free
|
|
9
9
|
get_greeting(): string {
|
|
10
|
-
return this.
|
|
10
|
+
return this.message;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
@call({}) // This method changes the state, for which it cost gas
|
|
14
|
-
set_greeting({
|
|
15
|
-
near.log(`Saving greeting ${
|
|
16
|
-
this.
|
|
14
|
+
set_greeting({ message }: { message: string }): void {
|
|
15
|
+
near.log(`Saving greeting ${message}`);
|
|
16
|
+
this.message = message;
|
|
17
17
|
}
|
|
18
18
|
}
|