-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add r/demo/tests/test20 + add grc20.TokenGetter to reduce boil…
…erplate when using grc20reg (#3397) - add `r/demo/tests/test20` - add `grc20.TokenGetter` to reduce boilerplate when using `grc20reg.Register(...)` Replaces #2549 Continues #3135 Signed-off-by: moul <[email protected]>
- Loading branch information
Showing
7 changed files
with
33 additions
and
8 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
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
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
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
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 @@ | ||
module gno.land/r/demo/tests/test20 |
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,20 @@ | ||
// 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" | ||
"gno.land/r/demo/grc20reg" | ||
) | ||
|
||
var Token, PrivateLedger = grc20.NewToken("Test20", "TST", 4) | ||
|
||
func init() { | ||
grc20reg.Register(Token.Getter(), "") | ||
} |
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