Closed khoangt closed 2 years ago
Describe the bug Field not found: 'Solnet.Programs.SystemProgram.SysVarRentKey'. When call NewOrderAsync
To Reproduce Market market = await _serumClient.GetMarketAsync(AppInfo.Instance.UsdtUsdc.Address); _marketManager = MarketFactory.GetMarket( new PublicKey(AppInfo.Instance.UsdtUsdc.Address), _wallet.Account, SignRequest, serumClient: _serumClient); await _marketManager.InitAsync();
OrderBookSide askOrderBookSide = await _serumClient.GetOrderBookSideAsync(market.Asks.Key); var ask = askOrderBookSide.GetOrders().Min(order => order.RawPrice) / AppInfo.Instance.UsdtUsdc.PriceDecimal; Order order = new OrderBuilder() .SetPrice((float)ask) .SetQuantity(5) .SetSide(Side.Buy) .SetOrderType(OrderType.Limit) .SetSelfTradeBehavior(SelfTradeBehavior.DecrementTake) .SetClientOrderId((ulong)DateTime.Now.Ticks) .Build(); SignatureConfirmation sigConf = await _marketManager.NewOrderAsync(order);
Thanks for reporting this. I'll push a fix and bump Solnet version later today.
Released version 1.0.7 that bumps Solnet to 0.4.16 and fixes these issues
1.0.7
0.4.16
Describe the bug Field not found: 'Solnet.Programs.SystemProgram.SysVarRentKey'. When call NewOrderAsync
To Reproduce Market market = await _serumClient.GetMarketAsync(AppInfo.Instance.UsdtUsdc.Address); _marketManager = MarketFactory.GetMarket( new PublicKey(AppInfo.Instance.UsdtUsdc.Address), _wallet.Account, SignRequest, serumClient: _serumClient); await _marketManager.InitAsync();