Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions chain/exchange/types/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ type MatchedMarketDirection struct {
SellsExists bool
}

type TriggeredOrdersInMarket struct {
Market *DerivativeMarket
MarkPrice math.LegacyDec
MarketOrders []*DerivativeMarketOrder
LimitOrders []*DerivativeLimitOrder
HasLimitBuyOrders bool
HasLimitSellOrders bool
}

type TradingRewardAccountPoints struct {
Account sdk.AccAddress
Points math.LegacyDec
Expand Down
6 changes: 6 additions & 0 deletions chain/exchange/types/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ import (

var BinaryOptionsMarketRefundFlagPrice = math.LegacyNewDec(-1)

type DerivativeMarketInfo struct {
Market *DerivativeMarket
MarkPrice math.LegacyDec
Funding *PerpetualMarketFunding
}

func NewSpotMarketID(baseDenom, quoteDenom string) common.Hash {
basePeggyDenom, err := peggytypes.NewPeggyDenomFromString(baseDenom)
if err == nil {
Expand Down
5 changes: 5 additions & 0 deletions examples/chain/1_LocalOrderHash/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,9 @@ func main() {
// adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted
gasPrice = int64(float64(gasPrice) * 1.1)
chainClient.SetGasPrice(gasPrice)

gasPrice = chainClient.CurrentChainGasPrice()
// adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted
gasPrice = int64(float64(gasPrice) * 1.1)
chainClient.SetGasPrice(gasPrice)
}
4 changes: 2 additions & 2 deletions examples/chain/txfees/query/1_GetEipBaseFee/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"context"
"encoding/json"
"fmt"

"os"

rpchttp "github.com/cometbft/cometbft/rpc/client/http"

"github.com/InjectiveLabs/sdk-go/client"
chainclient "github.com/InjectiveLabs/sdk-go/client/chain"
"github.com/InjectiveLabs/sdk-go/client/common"
rpchttp "github.com/cometbft/cometbft/rpc/client/http"
)

func main() {
Expand Down
Loading