From bf78184b5125d4eb6520dfcfea98f595ba6d9d4c Mon Sep 17 00:00:00 2001 From: Chenyao Yu <4844716+chenyaoy@users.noreply.github.com> Date: Fri, 4 Oct 2024 01:57:14 -0400 Subject: [PATCH] fix --- public/configs/otherMarketData.json | 44 +++++++++---------- scripts/markets/help.ts | 13 +++--- scripts/markets/validate-other-market-data.ts | 2 +- 3 files changed, 28 insertions(+), 31 deletions(-) diff --git a/public/configs/otherMarketData.json b/public/configs/otherMarketData.json index 9e7bc7396..a3daa92ec 100644 --- a/public/configs/otherMarketData.json +++ b/public/configs/otherMarketData.json @@ -2491,7 +2491,7 @@ }, { "exchangeName": "uniswapv3_api-base", - "ticker": "BRETT,UNISWAP-V3-BASE,0X532F27101965DD16442E59D40670FAF5EBB142E4/WETH,UNISWAP-V3-BASE,0X4200000000000000000000000000000000000006", + "ticker": "BRETT,UNISWAP_V3_BASE,0X532F27101965DD16442E59D40670FAF5EBB142E4/WETH,UNISWAP_V3_BASE,0X4200000000000000000000000000000000000006", "adjustByMarket": "ETH-USD" } ], @@ -7610,7 +7610,7 @@ }, { "exchangeName": "uniswapv3_api-base", - "ticker": "WETH,UNISWAP-V3-BASE,0X4200000000000000000000000000000000000006/NPC,UNISWAP-V3-BASE,0XB166E8B140D35D9D8226E40C09F757BAC5A4D87D", + "ticker": "WETH,UNISWAP_V3_BASE,0X4200000000000000000000000000000000000006/NPC,UNISWAP_V3_BASE,0XB166E8B140D35D9D8226E40C09F757BAC5A4D87D", "adjustByMarket": "ETH-USD", "invert": true } @@ -9595,7 +9595,7 @@ }, { "exchangeName": "uniswapv3_api-base", - "ticker": "TRUMP,UNISWAP-V3-BASE,0X57F5FBD3DE65DFC0BD3630F732969E5FB97E6D37/WETH,UNISWAP-V3-BASE,0X4200000000000000000000000000000000000006", + "ticker": "TRUMP,UNISWAP_V3_BASE,0X57F5FBD3DE65DFC0BD3630F732969E5FB97E6D37/WETH,UNISWAP_V3_BASE,0X4200000000000000000000000000000000000006", "adjustByMarket": "ETH-USD" } ], @@ -9814,7 +9814,7 @@ "exchangeConfigJson": [ { "exchangeName": "uniswapv3_api-base", - "ticker": "ANDY,UNISWAP-V3-BASE,0X18A8BD1FE17A1BB9FFB39ECD83E9489CFD17A022/WETH,UNISWAP-V3-BASE,0X4200000000000000000000000000000000000006", + "ticker": "ANDY,UNISWAP_V3_BASE,0X18A8BD1FE17A1BB9FFB39ECD83E9489CFD17A022/WETH,UNISWAP_V3_BASE,0X4200000000000000000000000000000000000006", "adjustByMarket": "ETH-USD" }, { @@ -13335,7 +13335,7 @@ }, { "exchangeName": "uniswapv3_api-base", - "ticker": "TOSHI,UNISWAP-V3-BASE,0XAC1BD2486AAF3B5C0FC3FD868558B082A531B2B4/WETH,UNISWAP-V3-BASE,0X4200000000000000000000000000000000000006", + "ticker": "TOSHI,UNISWAP_V3_BASE,0XAC1BD2486AAF3B5C0FC3FD868558B082A531B2B4/WETH,UNISWAP_V3_BASE,0X4200000000000000000000000000000000000006", "adjustByMarket": "ETH-USD" } ], @@ -14743,7 +14743,7 @@ }, { "exchangeName": "uniswapv3_api-base", - "ticker": "BWB,UNISWAP-V3-BASE,0X619C4BBBD65F836B78B36CBE781513861D57F39D/WETH,UNISWAP-V3-BASE,0X4200000000000000000000000000000000000006", + "ticker": "BWB,UNISWAP_V3_BASE,0X619C4BBBD65F836B78B36CBE781513861D57F39D/WETH,UNISWAP_V3_BASE,0X4200000000000000000000000000000000000006", "adjustByMarket": "ETH-USD" } ], @@ -18075,12 +18075,12 @@ "cmcId": 31163.0 } }, - "MOCHI,UNISWAP-V3-BASE,0XF6E932CA12AFA26665DC4DDE7E27BE02A7C02E50": { - "title": "Add MOCHI,UNISWAP-V3-BASE,0XF6E932CA12AFA26665DC4DDE7E27BE02A7C02E50-USD perpetual market", - "summary": "Add the x/prices, x/perpetuals and x/clob parameters needed for a MOCHI,UNISWAP-V3-BASE,0XF6E932CA12AFA26665DC4DDE7E27BE02A7C02E50-USD perpetual market. Create the market in INITIALIZING status and transition it to ACTIVE status after 3600 blocks. Added via the new market widget.", + "MOCHI,UNISWAP_V3_BASE,0XF6E932CA12AFA26665DC4DDE7E27BE02A7C02E50": { + "title": "Add MOCHI,UNISWAP_V3_BASE,0XF6E932CA12AFA26665DC4DDE7E27BE02A7C02E50-USD perpetual market", + "summary": "Add the x/prices, x/perpetuals and x/clob parameters needed for a MOCHI,UNISWAP_V3_BASE,0XF6E932CA12AFA26665DC4DDE7E27BE02A7C02E50-USD perpetual market. Create the market in INITIALIZING status and transition it to ACTIVE status after 3600 blocks. Added via the new market widget.", "params": { "id": 399, - "ticker": "MOCHI,UNISWAP-V3-BASE,0XF6E932CA12AFA26665DC4DDE7E27BE02A7C02E50-USD", + "ticker": "MOCHI,UNISWAP_V3_BASE,0XF6E932CA12AFA26665DC4DDE7E27BE02A7C02E50-USD", "marketType": "PERPETUAL_MARKET_TYPE_ISOLATED", "priceExponent": -15, "minPriceChange": 800, @@ -18088,7 +18088,7 @@ "exchangeConfigJson": [ { "exchangeName": "uniswapv3_api-base", - "ticker": "MOCHI,UNISWAP-V3-BASE,0XF6E932CA12AFA26665DC4DDE7E27BE02A7C02E50/WETH,UNISWAP-V3-BASE,0X4200000000000000000000000000000000000006", + "ticker": "MOCHI,UNISWAP_V3_BASE,0XF6E932CA12AFA26665DC4DDE7E27BE02A7C02E50/WETH,UNISWAP_V3_BASE,0X4200000000000000000000000000000000000006", "adjustByMarket": "ETH-USD" } ], @@ -21748,7 +21748,7 @@ }, { "exchangeName": "uniswapv3_api-base", - "ticker": "SPEC,UNISWAP-V3-BASE,0X96419929D7949D6A801A6909C145C8EEF6A40431/WETH,UNISWAP-V3-BASE,0X4200000000000000000000000000000000000006", + "ticker": "SPEC,UNISWAP_V3_BASE,0X96419929D7949D6A801A6909C145C8EEF6A40431/WETH,UNISWAP_V3_BASE,0X4200000000000000000000000000000000000006", "adjustByMarket": "ETH-USD" } ], @@ -25101,12 +25101,12 @@ "cmcId": 22125.0 } }, - "WEWE,UNISWAP-V3-BASE,0X6B9BB36519538E0C073894E964E90172E1C0B41F": { - "title": "Add WEWE,UNISWAP-V3-BASE,0X6B9BB36519538E0C073894E964E90172E1C0B41F-USD perpetual market", - "summary": "Add the x/prices, x/perpetuals and x/clob parameters needed for a WEWE,UNISWAP-V3-BASE,0X6B9BB36519538E0C073894E964E90172E1C0B41F-USD perpetual market. Create the market in INITIALIZING status and transition it to ACTIVE status after 3600 blocks. Added via the new market widget.", + "WEWE,UNISWAP_V3_BASE,0X6B9BB36519538E0C073894E964E90172E1C0B41F": { + "title": "Add WEWE,UNISWAP_V3_BASE,0X6B9BB36519538E0C073894E964E90172E1C0B41F-USD perpetual market", + "summary": "Add the x/prices, x/perpetuals and x/clob parameters needed for a WEWE,UNISWAP_V3_BASE,0X6B9BB36519538E0C073894E964E90172E1C0B41F-USD perpetual market. Create the market in INITIALIZING status and transition it to ACTIVE status after 3600 blocks. Added via the new market widget.", "params": { "id": 588, - "ticker": "WEWE,UNISWAP-V3-BASE,0X6B9BB36519538E0C073894E964E90172E1C0B41F-USD", + "ticker": "WEWE,UNISWAP_V3_BASE,0X6B9BB36519538E0C073894E964E90172E1C0B41F-USD", "marketType": "PERPETUAL_MARKET_TYPE_ISOLATED", "priceExponent": -13, "minPriceChange": 800, @@ -25114,7 +25114,7 @@ "exchangeConfigJson": [ { "exchangeName": "uniswapv3_api-base", - "ticker": "WEWE,UNISWAP-V3-BASE,0X6B9BB36519538E0C073894E964E90172E1C0B41F/WETH,UNISWAP-V3-BASE,0X4200000000000000000000000000000000000006", + "ticker": "WEWE,UNISWAP_V3_BASE,0X6B9BB36519538E0C073894E964E90172E1C0B41F/WETH,UNISWAP_V3_BASE,0X4200000000000000000000000000000000000006", "adjustByMarket": "ETH-USD" } ], @@ -25136,12 +25136,12 @@ "cmcId": 32343.0 } }, - "OWO,UNISWAP-V3-BASE,0X5D559EA7BB2DAE4B694A079CB8328A2145FD32F6": { - "title": "Add OWO,UNISWAP-V3-BASE,0X5D559EA7BB2DAE4B694A079CB8328A2145FD32F6-USD perpetual market", - "summary": "Add the x/prices, x/perpetuals and x/clob parameters needed for a OWO,UNISWAP-V3-BASE,0X5D559EA7BB2DAE4B694A079CB8328A2145FD32F6-USD perpetual market. Create the market in INITIALIZING status and transition it to ACTIVE status after 3600 blocks. Added via the new market widget.", + "OWO,UNISWAP_V3_BASE,0X5D559EA7BB2DAE4B694A079CB8328A2145FD32F6": { + "title": "Add OWO,UNISWAP_V3_BASE,0X5D559EA7BB2DAE4B694A079CB8328A2145FD32F6-USD perpetual market", + "summary": "Add the x/prices, x/perpetuals and x/clob parameters needed for a OWO,UNISWAP_V3_BASE,0X5D559EA7BB2DAE4B694A079CB8328A2145FD32F6-USD perpetual market. Create the market in INITIALIZING status and transition it to ACTIVE status after 3600 blocks. Added via the new market widget.", "params": { "id": 589, - "ticker": "OWO,UNISWAP-V3-BASE,0X5D559EA7BB2DAE4B694A079CB8328A2145FD32F6-USD", + "ticker": "OWO,UNISWAP_V3_BASE,0X5D559EA7BB2DAE4B694A079CB8328A2145FD32F6-USD", "marketType": "PERPETUAL_MARKET_TYPE_ISOLATED", "priceExponent": -11, "minPriceChange": 800, @@ -25149,7 +25149,7 @@ "exchangeConfigJson": [ { "exchangeName": "uniswapv3_api-base", - "ticker": "OWO,UNISWAP-V3-BASE,0X5D559EA7BB2DAE4B694A079CB8328A2145FD32F6/WETH,UNISWAP-V3-BASE,0X4200000000000000000000000000000000000006", + "ticker": "OWO,UNISWAP_V3_BASE,0X5D559EA7BB2DAE4B694A079CB8328A2145FD32F6/WETH,UNISWAP_V3_BASE,0X4200000000000000000000000000000000000006", "adjustByMarket": "ETH-USD" } ], diff --git a/scripts/markets/help.ts b/scripts/markets/help.ts index 55eaf6ad0..3e3d1c0cf 100644 --- a/scripts/markets/help.ts +++ b/scripts/markets/help.ts @@ -211,7 +211,7 @@ export async function createAndSendMarketMapProposal( Quote: modifiedTicker.split('/')[1], }, decimals: Math.abs(priceExponent).toString(), - enabled: true, + enabled: false, min_provider_count: minExchanges.toString(), metadata_JSON: '', }, @@ -224,9 +224,9 @@ export async function createAndSendMarketMapProposal( "summary":"Add markets to market map", "messages": [ { - "@type": "/slinky.marketmap.v1.MsgCreateMarkets", + "@type": "/slinky.marketmap.v1.MsgUpsertMarkets", "authority": "dydx10d07y265gmmuvt4z0w9aw880jnsr700jnmapky", - "create_markets": markets, + "markets": markets, }, ], "deposit":"5000000000000000000adv4tnt", @@ -237,15 +237,12 @@ export async function createAndSendMarketMapProposal( fs.writeFileSync(proposalFile, JSON.stringify(proposal, null, 2), 'utf-8'); try { - await execCLI( - binary, - ['keys', 'show', 'alice'], - ) + await execCLI(binary, ['keys', 'show', 'alice']); } catch (error) { await execCLI( binary, ['keys', 'add', 'alice', '--recover'], - 'merge panther lobster crazy road hollow amused security before critic about cliff exhibit cause coyote talent happy where lion river tobacco option coconut small', + 'merge panther lobster crazy road hollow amused security before critic about cliff exhibit cause coyote talent happy where lion river tobacco option coconut small' ) } diff --git a/scripts/markets/validate-other-market-data.ts b/scripts/markets/validate-other-market-data.ts index 1bbd7234a..904be57e4 100644 --- a/scripts/markets/validate-other-market-data.ts +++ b/scripts/markets/validate-other-market-data.ts @@ -330,7 +330,7 @@ async function validateAgainstLocalnet(proposals: Proposal[]): Promise { filteredProposals, network.validatorConfig.restEndpoint, network.validatorConfig.chainId, - 'v4-chain/protocol/build/dydxprotocold', + 'v4-chain/protocol/build/dydxprotocold' ); console.log("Submitted market map proposal"); await sleep(5000);