diff --git a/gno.land/cmd/gnoland/testdata/time-simple.txtar b/gno.land/cmd/gnoland/testdata/time-simple.txtar new file mode 100644 index 00000000000..932a5721695 --- /dev/null +++ b/gno.land/cmd/gnoland/testdata/time-simple.txtar @@ -0,0 +1,18 @@ +# Originally, the addpkg failed due to changes in PR https://github.com/gnolang/gno/pull/1702 . +# This bug was fixed with https://github.com/gnolang/gno/pull/2105 . + +gnoland start + +gnokey maketx addpkg -pkgdir $WORK -pkgpath gno.land/r/time_simple -gas-fee 1ugnot -gas-wanted 10000000 -broadcast -chainid=tendermint_test test1 +stdout OK! + +-- time_simple.gno -- +package time_simple + +import ( + "time" +) + +func GetUnixTime() int64 { + return time.Now().Unix() +}