Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

instance.gno

0.51 Kb · 26 lines
 1package router
 2
 3import (
 4	"gno.land/r/gnoswap/router"
 5)
 6
 7type routerV1 struct {
 8	store router.IRouterStore
 9}
10
11// NewRouterV1 creates a router v1 implementation backed by routerStore.
12//
13// Parameters:
14//   - routerStore: storage implementation used for swap-fee and pending protocol-fee state
15//
16// Returns:
17//   - router: initialized IRouter implementation backed by routerStore
18func NewRouterV1(
19	routerStore router.IRouterStore,
20) router.IRouter {
21	instance := &routerV1{
22		store: routerStore,
23	}
24
25	return instance
26}