-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
- Loading branch information
Showing
2 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
loadpkg gno.land/r/demo/users | ||
|
||
adduser gui | ||
|
||
gnoland start | ||
|
||
! gnokey maketx addpkg -pkgdir $WORK -pkgpath gno.land/r/guil/counter -gas-fee 1000000ugnot -gas-wanted 100000000 -broadcast -chainid=tendermint_test test1 | ||
stderr 'unauthorized user' | ||
|
||
gnokey maketx call -pkgpath gno.land/r/demo/users -func Invite -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test -args $USER_ADDR_gui test1 | ||
|
||
gnokey maketx call -pkgpath gno.land/r/demo/users -func Register -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test -args $USER_ADDR_test1 -args 'guiland' -args 'im gui' gui | ||
|
||
gnokey maketx addpkg -pkgdir $WORK -pkgpath gno.land/r/guiland/counter -gas-fee 1000000ugnot -gas-wanted 100000000 -broadcast -chainid=tendermint_test gui | ||
|
||
-- counter.gno -- | ||
package counter | ||
|
||
import "strconv" | ||
|
||
var count = 0 | ||
|
||
func Inc() { | ||
count += 1 | ||
} | ||
|
||
func Render(path string) string { | ||
return "# Counter: " + strconv.Itoa(count) | ||
} | ||
|
||
|
||
-- gno.mod -- | ||
module gno.land/r/guiland/counter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters