mirror of
https://github.com/galacticship/terra.git
synced 2024-11-12 19:27:52 +00:00
21 lines
487 B
Go
21 lines
487 B
Go
package terraswap
|
|
|
|
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), terra.NewAssetInfoFactory())
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &Pair{
|
|
bp,
|
|
}, nil
|
|
}
|