From 4c37bf6f23bd60f631ce3726c8502a7cbf0e8f28 Mon Sep 17 00:00:00 2001 From: Jeff Thompson Date: Wed, 15 May 2024 10:50:14 +0200 Subject: [PATCH] chore: Add gnoland/testdata/time-simple.txtar Signed-off-by: Jeff Thompson --- .../cmd/gnoland/testdata/time-simple.txtar | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 gno.land/cmd/gnoland/testdata/time-simple.txtar 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() +}