mirror of
https://github.com/galacticship/terra.git
synced 2024-11-12 19:27:52 +00:00
21 lines
477 B
Go
21 lines
477 B
Go
package prism
|
|
|
|
import (
|
|
"github.com/galacticship/terra"
|
|
"github.com/shopspring/decimal"
|
|
)
|
|
|
|
type Pair struct {
|
|
*terra.BasePair
|
|
}
|
|
|
|
func NewPair(querier *terra.Querier, contractAddress string, token1 terra.Token, token2 terra.Token, lpToken terra.Cw20Token) (*Pair, error) {
|
|
bp, err := terra.NewBasePair(querier, contractAddress, token1, token2, lpToken, decimal.NewFromFloat(0.003), NewAssetInfoFactory())
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &Pair{
|
|
bp,
|
|
}, nil
|
|
}
|