update contracts and approval logs

This commit is contained in:
2025-08-27 05:08:13 +07:00
parent 9d808cfe1a
commit 5d7f73a794
4 changed files with 214 additions and 90 deletions

View File

@@ -5,11 +5,11 @@ import {Ticker} from '../../src/generated/ManagingApiTypes'
test('GMX Orders Closing', async (t) => {
await t.test('should close all orders for BTC', async () => {
const sdk = await getClientForAddress('0x932167388dD9aad41149b3cA23eBD489E2E2DD78')
const sdk = await getClientForAddress('0x0b4A132cb6ed8fa66953bf61a53D0B91DaCaAd78')
const result = await cancelGmxOrdersImpl(
sdk,
Ticker.ETH
Ticker.BTC
)
console.log('Orders closing result:', result)
assert.ok(result, 'Orders closing result should be defined')

View File

@@ -5,12 +5,12 @@ import {TradeDirection} from '../../src/generated/ManagingApiTypes'
test('GMX Position Closing', async (t) => {
await t.test('should close a long position for BTC', async () => {
const sdk = await getClientForAddress('0x932167388dD9aad41149b3cA23eBD489E2E2DD78')
const sdk = await getClientForAddress('0x0b4A132cb6ed8fa66953bf61a53D0B91DaCaAd78')
const result = await closeGmxPositionImpl(
sdk,
"SUI",
TradeDirection.Short
"BTC",
TradeDirection.Long
)
console.log('Position closing result:', result)
assert.ok(result, 'Position closing result should be defined')