-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…process GSW-692 test: minimize init process
- Loading branch information
Showing
27 changed files
with
343 additions
and
136 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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/grc20_wrapper |
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,37 @@ | ||
package grc20wrapper | ||
|
||
import ( | ||
pRegistry "gno.land/r/demo/pool" | ||
rRegistry "gno.land/r/demo/router" | ||
sRegistry "gno.land/r/demo/staker" | ||
) | ||
|
||
func init() { | ||
pRegistry.RegisterGRC20Interface("gno.land/r/demo/wugnot", WugnotTokenInterface{}) | ||
rRegistry.RegisterGRC20Interface("gno.land/r/demo/wugnot", WugnotTokenInterface{}) | ||
sRegistry.RegisterGRC20Interface("gno.land/r/demo/wugnot", WugnotTokenInterface{}) | ||
|
||
pRegistry.RegisterGRC20Interface("gno.land/r/demo/bar", BarTokenInterface{}) | ||
rRegistry.RegisterGRC20Interface("gno.land/r/demo/bar", BarTokenInterface{}) | ||
sRegistry.RegisterGRC20Interface("gno.land/r/demo/bar", BarTokenInterface{}) | ||
|
||
pRegistry.RegisterGRC20Interface("gno.land/r/demo/baz", BazTokenInterface{}) | ||
rRegistry.RegisterGRC20Interface("gno.land/r/demo/baz", BazTokenInterface{}) | ||
sRegistry.RegisterGRC20Interface("gno.land/r/demo/baz", BazTokenInterface{}) | ||
|
||
pRegistry.RegisterGRC20Interface("gno.land/r/demo/foo", FooTokenInterface{}) | ||
rRegistry.RegisterGRC20Interface("gno.land/r/demo/foo", FooTokenInterface{}) | ||
sRegistry.RegisterGRC20Interface("gno.land/r/demo/foo", FooTokenInterface{}) | ||
|
||
pRegistry.RegisterGRC20Interface("gno.land/r/demo/gns", GnsTokenInterface{}) | ||
rRegistry.RegisterGRC20Interface("gno.land/r/demo/gns", GnsTokenInterface{}) | ||
sRegistry.RegisterGRC20Interface("gno.land/r/demo/gns", GnsTokenInterface{}) | ||
|
||
pRegistry.RegisterGRC20Interface("gno.land/r/demo/obl", OblTokenInterface{}) | ||
rRegistry.RegisterGRC20Interface("gno.land/r/demo/obl", OblTokenInterface{}) | ||
sRegistry.RegisterGRC20Interface("gno.land/r/demo/obl", OblTokenInterface{}) | ||
|
||
pRegistry.RegisterGRC20Interface("gno.land/r/demo/qux", QuxTokenInterface{}) | ||
rRegistry.RegisterGRC20Interface("gno.land/r/demo/qux", QuxTokenInterface{}) | ||
sRegistry.RegisterGRC20Interface("gno.land/r/demo/qux", QuxTokenInterface{}) | ||
} |
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,33 @@ | ||
package grc20wrapper | ||
|
||
import ( | ||
"gno.land/r/demo/users" | ||
|
||
"gno.land/r/demo/bar" | ||
|
||
pRegistry "gno.land/r/demo/pool" | ||
rRegistry "gno.land/r/demo/router" | ||
sRegistry "gno.land/r/demo/staker" | ||
) | ||
|
||
type BarTokenInterface struct{} | ||
|
||
func (BarTokenInterface) Transfer() func(to users.AddressOrName, amount uint64) { | ||
return bar.Transfer | ||
} | ||
|
||
func (BarTokenInterface) TransferFrom() func(from, to users.AddressOrName, amount uint64) { | ||
return bar.TransferFrom | ||
} | ||
|
||
func (BarTokenInterface) BalanceOf() func(owner users.AddressOrName) uint64 { | ||
return bar.BalanceOf | ||
} | ||
|
||
func (BarTokenInterface) Approve() func(spender users.AddressOrName, amount uint64) { | ||
return bar.Approve | ||
} | ||
|
||
var _ pRegistry.GRC20Interface = BarTokenInterface{} | ||
var _ rRegistry.GRC20Interface = BarTokenInterface{} | ||
var _ sRegistry.GRC20Interface = BarTokenInterface{} |
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,33 @@ | ||
package grc20wrapper | ||
|
||
import ( | ||
"gno.land/r/demo/users" | ||
|
||
"gno.land/r/demo/baz" | ||
|
||
pRegistry "gno.land/r/demo/pool" | ||
rRegistry "gno.land/r/demo/router" | ||
sRegistry "gno.land/r/demo/staker" | ||
) | ||
|
||
type BazTokenInterface struct{} | ||
|
||
func (BazTokenInterface) Transfer() func(to users.AddressOrName, amount uint64) { | ||
return baz.Transfer | ||
} | ||
|
||
func (BazTokenInterface) TransferFrom() func(from, to users.AddressOrName, amount uint64) { | ||
return baz.TransferFrom | ||
} | ||
|
||
func (BazTokenInterface) BalanceOf() func(owner users.AddressOrName) uint64 { | ||
return baz.BalanceOf | ||
} | ||
|
||
func (BazTokenInterface) Approve() func(spender users.AddressOrName, amount uint64) { | ||
return baz.Approve | ||
} | ||
|
||
var _ pRegistry.GRC20Interface = BazTokenInterface{} | ||
var _ rRegistry.GRC20Interface = BazTokenInterface{} | ||
var _ sRegistry.GRC20Interface = BazTokenInterface{} |
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,33 @@ | ||
package grc20wrapper | ||
|
||
import ( | ||
"gno.land/r/demo/users" | ||
|
||
"gno.land/r/demo/foo" | ||
|
||
pRegistry "gno.land/r/demo/pool" | ||
rRegistry "gno.land/r/demo/router" | ||
sRegistry "gno.land/r/demo/staker" | ||
) | ||
|
||
type FooTokenInterface struct{} | ||
|
||
func (FooTokenInterface) Transfer() func(to users.AddressOrName, amount uint64) { | ||
return foo.Transfer | ||
} | ||
|
||
func (FooTokenInterface) TransferFrom() func(from, to users.AddressOrName, amount uint64) { | ||
return foo.TransferFrom | ||
} | ||
|
||
func (FooTokenInterface) BalanceOf() func(owner users.AddressOrName) uint64 { | ||
return foo.BalanceOf | ||
} | ||
|
||
func (FooTokenInterface) Approve() func(spender users.AddressOrName, amount uint64) { | ||
return foo.Approve | ||
} | ||
|
||
var _ pRegistry.GRC20Interface = FooTokenInterface{} | ||
var _ rRegistry.GRC20Interface = FooTokenInterface{} | ||
var _ sRegistry.GRC20Interface = FooTokenInterface{} |
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,33 @@ | ||
package grc20wrapper | ||
|
||
import ( | ||
"gno.land/r/demo/users" | ||
|
||
"gno.land/r/demo/gns" | ||
|
||
pRegistry "gno.land/r/demo/pool" | ||
rRegistry "gno.land/r/demo/router" | ||
sRegistry "gno.land/r/demo/staker" | ||
) | ||
|
||
type GnsTokenInterface struct{} | ||
|
||
func (GnsTokenInterface) Transfer() func(to users.AddressOrName, amount uint64) { | ||
return gns.Transfer | ||
} | ||
|
||
func (GnsTokenInterface) TransferFrom() func(from, to users.AddressOrName, amount uint64) { | ||
return gns.TransferFrom | ||
} | ||
|
||
func (GnsTokenInterface) BalanceOf() func(owner users.AddressOrName) uint64 { | ||
return gns.BalanceOf | ||
} | ||
|
||
func (GnsTokenInterface) Approve() func(spender users.AddressOrName, amount uint64) { | ||
return gns.Approve | ||
} | ||
|
||
var _ pRegistry.GRC20Interface = GnsTokenInterface{} | ||
var _ rRegistry.GRC20Interface = GnsTokenInterface{} | ||
var _ sRegistry.GRC20Interface = GnsTokenInterface{} |
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,33 @@ | ||
package grc20wrapper | ||
|
||
import ( | ||
"gno.land/r/demo/users" | ||
|
||
"gno.land/r/demo/obl" | ||
|
||
pRegistry "gno.land/r/demo/pool" | ||
rRegistry "gno.land/r/demo/router" | ||
sRegistry "gno.land/r/demo/staker" | ||
) | ||
|
||
type OblTokenInterface struct{} | ||
|
||
func (OblTokenInterface) Transfer() func(to users.AddressOrName, amount uint64) { | ||
return obl.Transfer | ||
} | ||
|
||
func (OblTokenInterface) TransferFrom() func(from, to users.AddressOrName, amount uint64) { | ||
return obl.TransferFrom | ||
} | ||
|
||
func (OblTokenInterface) BalanceOf() func(owner users.AddressOrName) uint64 { | ||
return obl.BalanceOf | ||
} | ||
|
||
func (OblTokenInterface) Approve() func(spender users.AddressOrName, amount uint64) { | ||
return obl.Approve | ||
} | ||
|
||
var _ pRegistry.GRC20Interface = OblTokenInterface{} | ||
var _ rRegistry.GRC20Interface = OblTokenInterface{} | ||
var _ sRegistry.GRC20Interface = OblTokenInterface{} |
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,33 @@ | ||
package grc20wrapper | ||
|
||
import ( | ||
"gno.land/r/demo/users" | ||
|
||
"gno.land/r/demo/qux" | ||
|
||
pRegistry "gno.land/r/demo/pool" | ||
rRegistry "gno.land/r/demo/router" | ||
sRegistry "gno.land/r/demo/staker" | ||
) | ||
|
||
type QuxTokenInterface struct{} | ||
|
||
func (QuxTokenInterface) Transfer() func(to users.AddressOrName, amount uint64) { | ||
return qux.Transfer | ||
} | ||
|
||
func (QuxTokenInterface) TransferFrom() func(from, to users.AddressOrName, amount uint64) { | ||
return qux.TransferFrom | ||
} | ||
|
||
func (QuxTokenInterface) BalanceOf() func(owner users.AddressOrName) uint64 { | ||
return qux.BalanceOf | ||
} | ||
|
||
func (QuxTokenInterface) Approve() func(spender users.AddressOrName, amount uint64) { | ||
return qux.Approve | ||
} | ||
|
||
var _ pRegistry.GRC20Interface = QuxTokenInterface{} | ||
var _ rRegistry.GRC20Interface = QuxTokenInterface{} | ||
var _ sRegistry.GRC20Interface = QuxTokenInterface{} |
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,33 @@ | ||
package grc20wrapper | ||
|
||
import ( | ||
"gno.land/r/demo/users" | ||
|
||
"gno.land/r/demo/wugnot" | ||
|
||
pRegistry "gno.land/r/demo/pool" | ||
rRegistry "gno.land/r/demo/router" | ||
sRegistry "gno.land/r/demo/staker" | ||
) | ||
|
||
type WugnotTokenInterface struct{} | ||
|
||
func (WugnotTokenInterface) Transfer() func(to users.AddressOrName, amount uint64) { | ||
return wugnot.Transfer | ||
} | ||
|
||
func (WugnotTokenInterface) TransferFrom() func(from, to users.AddressOrName, amount uint64) { | ||
return wugnot.TransferFrom | ||
} | ||
|
||
func (WugnotTokenInterface) BalanceOf() func(owner users.AddressOrName) uint64 { | ||
return wugnot.BalanceOf | ||
} | ||
|
||
func (WugnotTokenInterface) Approve() func(spender users.AddressOrName, amount uint64) { | ||
return wugnot.Approve | ||
} | ||
|
||
var _ pRegistry.GRC20Interface = WugnotTokenInterface{} | ||
var _ rRegistry.GRC20Interface = WugnotTokenInterface{} | ||
var _ sRegistry.GRC20Interface = WugnotTokenInterface{} |
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
Oops, something went wrong.