Skip to content

Commit

Permalink
will be update when more clarity, will be used as the gnofundme token…
Browse files Browse the repository at this point in the history
… as suggested by @moul
  • Loading branch information
MalekLahbib committed Sep 24, 2024
1 parent 3df2cf4 commit e7c1698
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions examples/gno.land/r/malek_/gfmt/gfmt.gno
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import (
)

var (
banker *grc20.Banker
admin *ownable.Ownable
Token grc20.Token
banker *grc20.Banker
admin *ownable.Ownable
Token grc20.Token
ErrInvalidUint64 = errors.New("invalid uint64, must be between 0 and 18446744073709551615")
)

func init() {
Expand All @@ -39,6 +40,11 @@ func Deposit() {
}

func Withdraw(amount uint64) {
// check for overflow
// if amount < 0 || amount > 18446744073709551615 {
// panic("Invalid amount: Overflow uint64")
// }

require(amount >= gfmtMinDeposit, ufmt.Sprintf("Deposit below minimum: %d/%d gfmt.", amount, gfmtMinDeposit))

caller := std.PrevRealm().Addr()
Expand Down

0 comments on commit e7c1698

Please sign in to comment.