mirror of
https://github.com/galacticship/terra.git
synced 2024-11-14 20:27:51 +00:00
34 lines
655 B
Go
34 lines
655 B
Go
|
package prism
|
||
|
|
||
|
import (
|
||
|
"github.com/galacticship/terra"
|
||
|
"github.com/pkg/errors"
|
||
|
)
|
||
|
|
||
|
type Prism struct {
|
||
|
Amps *Amps
|
||
|
YLUNAStaking *YLUNAStaking
|
||
|
Farm *Farm
|
||
|
}
|
||
|
|
||
|
func NewPrism(querier *terra.Querier) (*Prism, error) {
|
||
|
amps, err := NewAmps(querier)
|
||
|
if err != nil {
|
||
|
return nil, errors.Wrap(err, "creating amps")
|
||
|
}
|
||
|
ylunastaking, err := NewYLUNAStaking(querier)
|
||
|
if err != nil {
|
||
|
return nil, errors.Wrap(err, "creating yluna staking")
|
||
|
}
|
||
|
farm, err := NewFarm(querier)
|
||
|
if err != nil {
|
||
|
return nil, errors.Wrap(err, "creating farm")
|
||
|
}
|
||
|
|
||
|
return &Prism{
|
||
|
Amps: amps,
|
||
|
YLUNAStaking: ylunastaking,
|
||
|
Farm: farm,
|
||
|
}, nil
|
||
|
}
|