-
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.
- Loading branch information
1 parent
1e27785
commit 1e6e2ac
Showing
3 changed files
with
31 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package main | ||
|
||
import ( | ||
"std" | ||
"gno.land/p/demo/testutils" | ||
|
||
banker "gno.land/p/demo/grc/grc20" | ||
) | ||
const uint64_max = 1<<64 - 1 | ||
|
||
func main() { | ||
b := banker.NewBanker("Dummy", "DUMMY", 6) | ||
var owner = testutils.TestAddress("owner") | ||
// Mint uint64_max - 1000 tokens for owner | ||
b.Mint(owner, uint64_max - 1000) | ||
// Try to mint 1001 tokens for owner, should fail because it exceeds the limit | ||
println(b.Mint(owner, 1001).Error()) | ||
|
||
} | ||
|
||
// Output: | ||
// you can't mint more than 1000 tokens |