From 80977ebc3142a95c89bb71cda1da6cc479f47d38 Mon Sep 17 00:00:00 2001 From: moul <94029+moul@users.noreply.github.com> Date: Sun, 7 Jul 2024 23:46:37 -0500 Subject: [PATCH] chore: cleanup grc20 Signed-off-by: moul <94029+moul@users.noreply.github.com> --- examples/gno.land/p/demo/grc/grc20/token.gno | 43 -------------------- 1 file changed, 43 deletions(-) diff --git a/examples/gno.land/p/demo/grc/grc20/token.gno b/examples/gno.land/p/demo/grc/grc20/token.gno index e13599e90bb..7f3b784932a 100644 --- a/examples/gno.land/p/demo/grc/grc20/token.gno +++ b/examples/gno.land/p/demo/grc/grc20/token.gno @@ -2,8 +2,6 @@ package grc20 import ( "std" - - "gno.land/p/demo/grc/exts" ) // token implements the Token interface. @@ -45,44 +43,3 @@ func (t *token) TransferFrom(from, to std.Address, amount uint64) error { } return t.banker.Transfer(from, to, amount) } - -type Token2 interface { - exts.TokenMetadata - - // Returns the amount of tokens in existence. - TotalSupply() uint64 - - // Returns the amount of tokens owned by `account`. - BalanceOf(account std.Address) uint64 - - // Moves `amount` tokens from the caller's account to `to`. - // - // Returns an error if the operation failed. - Transfer(to std.Address, amount uint64) error - - // Returns the remaining number of tokens that `spender` will be - // allowed to spend on behalf of `owner` through {transferFrom}. This is - // zero by default. - // - // This value changes when {approve} or {transferFrom} are called. - Allowance(owner, spender std.Address) uint64 - - // Sets `amount` as the allowance of `spender` over the caller's tokens. - // - // Returns an error if the operation failed. - // - // IMPORTANT: Beware that changing an allowance with this method brings the risk - // that someone may use both the old and the new allowance by unfortunate - // transaction ordering. One possible solution to mitigate this race - // condition is to first reduce the spender's allowance to 0 and set the - // desired value afterwards: - // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - Approve(spender std.Address, amount uint64) error - - // Moves `amount` tokens from `from` to `to` using the - // allowance mechanism. `amount` is then deducted from the caller's - // allowance. - // - // Returns an error if the operation failed. - TransferFrom(from, to std.Address, amount uint64) error -}