From 7a7c65e80c4cb2c7541eda79bbde3ba863ed12ab Mon Sep 17 00:00:00 2001 From: moul <94029+moul@users.noreply.github.com> Date: Mon, 8 Jul 2024 15:16:33 -0500 Subject: [PATCH] feat: add r/demo/tests/test20 Signed-off-by: moul <94029+moul@users.noreply.github.com> --- examples/gno.land/r/demo/tests/test20/gno.mod | 3 +++ .../gno.land/r/demo/tests/test20/test20.gno | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 examples/gno.land/r/demo/tests/test20/gno.mod create mode 100644 examples/gno.land/r/demo/tests/test20/test20.gno diff --git a/examples/gno.land/r/demo/tests/test20/gno.mod b/examples/gno.land/r/demo/tests/test20/gno.mod new file mode 100644 index 00000000000..5be8c8d409f --- /dev/null +++ b/examples/gno.land/r/demo/tests/test20/gno.mod @@ -0,0 +1,3 @@ +module gno.land/r/demo/tests/test20 + +require gno.land/p/demo/grc/grc20 v0.0.0-latest diff --git a/examples/gno.land/r/demo/tests/test20/test20.gno b/examples/gno.land/r/demo/tests/test20/test20.gno new file mode 100644 index 00000000000..6d1aaf108bf --- /dev/null +++ b/examples/gno.land/r/demo/tests/test20/test20.gno @@ -0,0 +1,18 @@ +// Package test20 implements a deliberately insecure ERC20 token for testing purposes. +// The Test20 token allows anyone to mint any amount of tokens to any address, making +// it unsuitable for production use. The primary goal of this package is to facilitate +// testing and experimentation without any security measures or restrictions. +// +// WARNING: This token is highly insecure and should not be used in any +// production environment. It is intended solely for testing and +// educational purposes. +package test20 + +import "gno.land/p/demo/grc/grc20" + +var ( + Banker = grc20.NewBanker("Test20", "TST", 4) + Token = Banker.Token() +) + +// XXX func init() { grc20reg.Register(Pub, "") } // Depends on #2516