diff --git a/public/configs/v1/env.json b/public/configs/v1/env.json
index f4137ab3c4..d3d9d5816d 100644
--- a/public/configs/v1/env.json
+++ b/public/configs/v1/env.json
@@ -1,7 +1,7 @@
{
"apps": {
"ios": {
- "scheme": "dydx-t-v4"
+ "scheme": "dydxv4"
}
},
"tokens": {
@@ -35,11 +35,11 @@
"image": "/currencies/usdc.png"
}
},
- "[mainnet chain id]": {
- "comment": "Change according to mainnet release",
+ "dydx-mainnet-1": {
+ "comment": "Mainnet",
"chain": {
- "name": "TokenName",
- "denom": "tokenDenom",
+ "name": "DYDX",
+ "denom": "adydx",
"decimals": 18,
"image": "/currencies/dydx.png"
},
@@ -74,7 +74,7 @@
"accountExportLearnMore": "https://help.dydx.exchange/en/articles/8565867-secret-phrase-on-dydx-chain",
"walletLearnMore": "https://www.dydx.academy/video/defi-wallet",
"withdrawalGateLearnMore": "https://help.dydx.exchange/en/articles/8981384-withdrawals-on-dydx-chain#h_23e97bc665",
- "adjustTargetLeverageLearnMore": "",
+ "adjustTargetLeverageLearnMore": "https://help.dydx.trade/en/articles/172975-isolated-margin",
"launchIncentive": "https://cloud.chaoslabs.co",
"tradingRewardsLearnMore": "https://docs.dydx.exchange/concepts-trading/rewards_fees_and_parameters",
"exchangeStats": "https://app.mode.com/dydx_eng/reports/58822121650d?secret_key=391d9214fe6aefec35b7d35c",
@@ -112,7 +112,7 @@
"keplrDashboard": "https://testnet.keplr.app/",
"strideZoneApp": "https://testnet.stride.zone",
"accountExportLearnMore": "https://help.dydx.exchange/en/articles/8565867-secret-phrase-on-dydx-chain",
- "adjustTargetLeverageLearnMore": "",
+ "adjustTargetLeverageLearnMore": "https://help.dydx.trade/en/articles/172975-isolated-margin",
"walletLearnMore": "https://www.dydx.academy/video/defi-wallet",
"withdrawalGateLearnMore": "https://help.dydx.exchange/en/articles/8981384-withdrawals-on-dydx-chain#h_23e97bc665",
"launchIncentive": "https://cloud.chaoslabs.co",
@@ -132,45 +132,46 @@
"dydxLearnMore": "https://www.mintscan.io/dydx",
"affiliateProgram": ""
},
- "[mainnet chain id]": {
- "tos": "[HTTP link to TOS]",
- "privacy": "[HTTP link to Privacy Policy]",
- "statusPage": "[HTTP link to status page]",
- "mintscan": "[HTTP link to Mintscan, with {tx_hash} placeholder]",
- "mintscanBase": "[HTTP link to TOS mintscan base url]",
- "feedback": "[HTTP link to feedback form, can be null]",
- "blogs": "[HTTP link to blogs, can be null]",
- "foundation": "[HTTP link to foundation, can be null]",
- "reduceOnlyLearnMore": "[HTTP link to reduce-only learn more, can be null]",
- "documentation": "[HTTP link to documentation, can be null]",
- "community": "[HTTP link to community, can be null]",
- "help": "[HTTP link to help page, can be null]",
- "vaultLearnMore": "[HTTP link to help page, can be null]",
- "governanceLearnMore": "[HTTP link to governance learn more, can be null]",
- "newMarketProposalLearnMore": "[HTTP link to new market proposal learn more, can be null]",
- "stakingLearnMore": "[HTTP link to staking learn more, can be null]",
- "keplrDashboard": "[HTTP link to keplr dashboard, can be null]",
- "strideZoneApp": "[HTTP link to stride zone app, can be null]",
- "accountExportLearnMore": "[HTTP link to account export learn more, can be null]",
- "adjustTargetLeverageLearnMore": "[HTTP link to adjust target leverage learn more, can be null]",
- "walletLearnMore": "[HTTP link to wallet learn more, can be null]",
- "withdrawalGateLearnMore": "[HTTP link to withdrawal gate learn more, can be null]",
- "launchIncentive": "[HTTP link to launch incentive host, can be null]",
- "tradingRewardsLearnMore": "[HTTP link to trading rewards learn more, can be null]",
- "exchangeStats": "[HTTP link to exchange stats, can be null]",
- "initialMarginFractionLearnMore": "[HTTP link to governance functionalities liquidity tiers, can be null]",
- "equityTiersLearnMore": "[HTTP link to equity tiers learn more, can be null]",
- "contractLossMechanismLearnMore": "[HTTP link to documentation on contract loss mechanisms]",
- "isolatedMarginLearnMore": "[HTTP link to documentation on isolated margin]",
- "mintscanValidatorsLearnMore": "[HTTP link to mintscan info on validators]",
- "protocolStaking": "[HTTP link to protocol staking info]",
- "stakingAndClaimingRewardsLearnMore": "[HTTP link to staking and claiming rewards learn more]",
- "predictionMarketLearnMore": "[HTTP link to prediction market learn more]",
- "discoveryProgram": "[HTTP link to discovery program learn more]",
- "getInTouch": "[HTTP link to get in touch with traders]",
- "deployerTermsAndConditions": "[HTTP link to terms and conditions, can be null]",
- "dydxLearnMore": "[HTTP link to information about the dYdX blockchain]",
- "affiliateProgram": "[HTTP link to information about the affiliate program]"
+ "dydx-mainnet-1": {
+ "tos": "https://dydx.trade/terms",
+ "privacy": "https://dydx.trade/privacy",
+ "statusPage": "https://status.dydx.trade/",
+ "mintscan": "https://www.mintscan.io/dydx/tx/{tx_hash}",
+ "mintscanBase": "https://www.mintscan.io/dydx",
+ "feedback": "https://www.dydxopsdao.com/feedback",
+ "blogs": "https://www.dydx.foundation/blog",
+ "foundation": "https://www.dydx.foundation",
+ "reduceOnlyLearnMore": "https://help.dydx.trade/en/articles/8607918-reduce-only-order",
+ "documentation": "https://docs.dydx.exchange/",
+ "community": "https://discord.com/invite/dydx",
+ "help": "https://help.dydx.trade/",
+ "governanceLearnMore": "https://help.dydx.trade/en/collections/6936883-governance-staking",
+ "newMarketProposalLearnMore": "https://dydx.exchange/blog/new-market-proposals",
+ "stakingLearnMore": "https://help.dydx.trade/en/articles/8581388-accessing-governance-and-staking-on-dydx-chain",
+ "keplrDashboard": "https://wallet.keplr.app/chains/dydx?tab=staking",
+ "strideZoneApp": "https://app.stride.zone/?chain=DYDX",
+ "accountExportLearnMore": "https://help.dydx.trade/en/articles/8581269-secret-phrase-on-dydx-chain",
+ "adjustTargetLeverageLearnMore": "https://help.dydx.trade/en/articles/172975-isolated-margin",
+ "walletLearnMore": "https://help.dydx.trade/en/articles/166997-supported-default-wallets-on-dydx-chain",
+ "withdrawalGateLearnMore": "https://help.dydx.trade/en/articles/9004706-withdrawals-on-dydx-chain#h_e61f043370",
+ "launchIncentive": "https://cloud.chaoslabs.co",
+ "tradingRewardsLearnMore": "https://docs.dydx.exchange/concepts-trading/rewards_fees_and_parameters",
+ "exchangeStats": "https://app.mode.com/dydx_eng/reports/58822121650d?secret_key=391d9214fe6aefec35b7d35c",
+ "initialMarginFractionLearnMore": "https://docs.dydx.exchange/governance/functionalities#liquidity-tiers",
+ "equityTiersLearnMore": "https://help.dydx.trade/en/articles/171918-equity-tiers-and-rate-limits",
+ "fetAgixMarketWindDownProposal": "https://www.mintscan.io/dydx/proposals/61",
+ "contractLossMechanismLearnMore": "https://help.dydx.trade/en/articles/166973-contract-loss-mechanisms-on-dydx-chain",
+ "isolatedMarginLearnMore": "https://help.dydx.trade/en/articles/172975-isolated-margin",
+ "mintscanValidatorsLearnMore": "https://www.mintscan.io/dydx/validators",
+ "protocolStaking": "https://protocolstaking.info/",
+ "stakingAndClaimingRewardsLearnMore": "https://help.dydx.trade/en/articles/178571-staking-and-unstaking-dydx-and-claiming-staking-rewards",
+ "rndrParamProposal": "https://www.mintscan.io/dydx/proposals/126",
+ "predictionMarketLearnMore": "https://help.dydx.trade/en/articles/221756-prediction-markets-faq",
+ "discoveryProgram": "https://www.dydx.foundation/blog/dydx-discovery-user-interviews?utm_source=dYdXTelegram&utm_medium=GlobalSocial&utm_campaign=GlobalSocial",
+ "getInTouch": "https://t.me/+amt-yoIUwDplN2I5",
+ "deployerTermsAndConditions": "https://www.dydx.trade/terms",
+ "dydxLearnMore": "https://www.mintscan.io/dydx",
+ "affiliateProgram": ""
}
},
"wallets": {
@@ -210,21 +211,21 @@
"signTypedDataAction": "dYdX Chain Onboarding",
"signTypedDataDomainName": "dYdX Chain"
},
- "[mainnet chain id]": {
+ "dydx-mainnet-1": {
"walletconnect": {
"client": {
- "name": "[Name of the app]",
- "description": "[Description of the app]",
- "iconUrl": "[Relative URL of the icon URL]"
+ "name": "dYdX v4",
+ "description": "dYdX v4 App",
+ "iconUrl": "/logos/dydx-x.png"
},
"v2": {
- "projectId": "[Project ID]"
+ "projectId": "fd67e5fbec90c07b6012699738d4a487"
}
},
"walletSegue": {
- "callbackUrl": "[Relative callback URL for WalletSegue, should match apple-app-site-association]"
+ "callbackUrl": "/walletsegue"
},
- "images": "[Relative URL for wallet images]",
+ "images": "/wallets/",
"signTypedDataAction": "dYdX Chain Onboarding",
"signTypedDataDomainName": "dYdX Chain"
}
@@ -244,11 +245,11 @@
"newMarketsMethodology": "https://docs.google.com/spreadsheets/d/1zjkV9R7R_7KMItuzqzvKGwefSBRfE-ZNAx1LH55OcqY/edit?usp=sharing"
}
},
- "[mainnet chain id]": {
+ "dydx-mainnet-1": {
"newMarketProposal": {
- "initialDepositAmount": 0,
- "delayBlocks": 0,
- "newMarketsMethodology": "[URL to spreadsheet or document that explains methodology]"
+ "initialDepositAmount": 2000000000000000000000,
+ "delayBlocks": 3600,
+ "newMarketsMethodology": "https://docs.google.com/spreadsheets/d/1046uSR2sltA6siZGnvBlgUp4xlPNM7dPFvUgdACgTy4/edit?usp=sharing"
}
}
},
@@ -303,7 +304,6 @@
"deployerName": "dYdX",
"rewardsHistoryStartDateMs": "1704844800000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": false,
"endpoints": {
"indexers": [
@@ -317,7 +317,6 @@
],
"skip": "https://api.skip.money",
"solanaRpcUrl": "https://api.mainnet-beta.solana.com/",
- "metadataService": "https://66iv2m87ol.execute-api.ap-northeast-1.amazonaws.com/mainnet/metadata-service/v1",
"nobleValidator": "https://noble-testnet-rpc.polkachu.com/",
"osmosisValidator": "https://rpc.osmotest5.osmosis.zone/",
"neutronValidator": "https://neutron-testnet-rpc.polkachu.com/",
@@ -344,7 +343,6 @@
"deployerName": "dYdX",
"rewardsHistoryStartDateMs": "1704844800000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": false,
"endpoints": {
"indexers": [
@@ -358,7 +356,6 @@
],
"skip": "https://api.skip.money",
"solanaRpcUrl": "https://api.mainnet-beta.solana.com/",
- "metadataService": "https://66iv2m87ol.execute-api.ap-northeast-1.amazonaws.com/mainnet/metadata-service/v1",
"nobleValidator": "https://noble-testnet-rpc.polkachu.com/",
"osmosisValidator": "https://rpc.osmotest5.osmosis.zone/",
"neutronValidator": "https://neutron-testnet-rpc.polkachu.com/",
@@ -383,7 +380,6 @@
"deployerName": "dYdX",
"rewardsHistoryStartDateMs": "1704844800000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": false,
"endpoints": {
"indexers": [
@@ -397,7 +393,6 @@
],
"skip": "https://api.skip.money",
"solanaRpcUrl": "https://api.mainnet-beta.solana.com/",
- "metadataService": "https://66iv2m87ol.execute-api.ap-northeast-1.amazonaws.com/mainnet/metadata-service/v1",
"nobleValidator": "https://noble-testnet-rpc.polkachu.com/",
"osmosisValidator": "https://rpc.osmotest5.osmosis.zone/",
"neutronValidator": "https://neutron-testnet-rpc.polkachu.com/",
@@ -424,7 +419,6 @@
"deployerName": "dYdX",
"rewardsHistoryStartDateMs": "1704844800000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": false,
"endpoints": {
"indexers": [
@@ -438,7 +432,6 @@
],
"skip": "https://api.skip.money",
"solanaRpcUrl": "https://api.mainnet-beta.solana.com/",
- "metadataService": "https://66iv2m87ol.execute-api.ap-northeast-1.amazonaws.com/mainnet/metadata-service/v1",
"nobleValidator": "https://noble-testnet-rpc.polkachu.com/",
"osmosisValidator": "https://rpc.osmotest5.osmosis.zone/",
"neutronValidator": "https://neutron-testnet-rpc.polkachu.com/",
@@ -465,7 +458,6 @@
"deployerName": "dYdX",
"rewardsHistoryStartDateMs": "1704844800000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": false,
"endpoints": {
"indexers": [
@@ -479,7 +471,6 @@
],
"skip": "https://api.skip.money",
"solanaRpcUrl": "https://api.mainnet-beta.solana.com/",
- "metadataService": "https://66iv2m87ol.execute-api.ap-northeast-1.amazonaws.com/mainnet/metadata-service/v1",
"nobleValidator": "https://noble-testnet-rpc.polkachu.com/",
"osmosisValidator": "https://rpc.osmotest5.osmosis.zone/",
"neutronValidator": "https://neutron-testnet-rpc.polkachu.com/",
@@ -504,7 +495,6 @@
"deployerName": "dYdX",
"rewardsHistoryStartDateMs": "1704844800000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": false,
"endpoints": {
"indexers": [
@@ -519,7 +509,6 @@
],
"skip": "https://api.skip.money",
"solanaRpcUrl": "https://api.mainnet-beta.solana.com/",
- "metadataService": "https://66iv2m87ol.execute-api.ap-northeast-1.amazonaws.com/mainnet/metadata-service/v1",
"nobleValidator": "https://noble-testnet-rpc.polkachu.com/",
"osmosisValidator": "https://rpc.osmotest5.osmosis.zone/",
"neutronValidator": "https://neutron-testnet-rpc.polkachu.com/",
@@ -544,7 +533,6 @@
"deployerName": "dYdX",
"rewardsHistoryStartDateMs": "1704844800000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": false,
"endpoints": {
"indexers": [
@@ -559,7 +547,6 @@
],
"skip": "https://api.skip.money",
"solanaRpcUrl": "https://api.mainnet-beta.solana.com/",
- "metadataService": "https://66iv2m87ol.execute-api.ap-northeast-1.amazonaws.com/mainnet/metadata-service/v1",
"nobleValidator": "https://noble-testnet-rpc.polkachu.com/",
"osmosisValidator": "https://rpc.osmotest5.osmosis.zone/",
"neutronValidator": "https://neutron-testnet-rpc.polkachu.com/",
@@ -569,7 +556,7 @@
"ios": {
"minimalVersion": "1.0",
"build": 40000,
- "url": "https://apps.apple.com/app/dydx/id1564787350"
+ "url": "https://apps.apple.com/app/dydx/id6475599596"
},
"android": {
"minimalVersion": "1.1",
@@ -596,7 +583,6 @@
"deployerName": "dYdX",
"rewardsHistoryStartDateMs": "1704844800000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": false,
"endpoints": {
"indexers": [
@@ -611,7 +597,6 @@
],
"skip": "https://api.skip.money",
"solanaRpcUrl": "https://api.mainnet-beta.solana.com/",
- "metadataService": "https://66iv2m87ol.execute-api.ap-northeast-1.amazonaws.com/mainnet/metadata-service/v1",
"nobleValidator": "https://noble-testnet-rpc.polkachu.com/",
"osmosisValidator": "https://rpc.osmotest5.osmosis.zone/",
"neutronValidator": "https://neutron-testnet-rpc.polkachu.com/",
@@ -628,7 +613,7 @@
}
},
"dydxprotocol-testnet": {
- "name": "v4 Public Testnet",
+ "name": "Testnet",
"ethereumChainId": "11155111",
"dydxChainId": "dydx-testnet-4",
"chainName": "dYdX Chain",
@@ -636,7 +621,6 @@
"deployerName": "dYdX",
"rewardsHistoryStartDateMs": "1704844800000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": false,
"endpoints": {
"indexers": [
@@ -654,7 +638,6 @@
],
"skip": "https://api.skip.money",
"solanaRpcUrl": "https://api.mainnet-beta.solana.com/",
- "metadataService": "https://66iv2m87ol.execute-api.ap-northeast-1.amazonaws.com/mainnet/metadata-service/v1",
"nobleValidator": "https://noble-testnet-rpc.polkachu.com/",
"osmosisValidator": "https://rpc.osmotest5.osmosis.zone/",
"neutronValidator": "https://neutron-testnet-rpc.polkachu.com/",
@@ -684,7 +667,6 @@
"deployerName": "dYdX",
"rewardsHistoryStartDateMs": "1704844800000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": false,
"endpoints": {
"indexers": [
@@ -698,7 +680,6 @@
],
"skip": "https://api.skip.money",
"solanaRpcUrl": "https://api.mainnet-beta.solana.com/",
- "metadataService": "https://66iv2m87ol.execute-api.ap-northeast-1.amazonaws.com/mainnet/metadata-service/v1",
"nobleValidator": "https://noble-testnet-rpc.polkachu.com/",
"osmosisValidator": "https://rpc.osmotest5.osmosis.zone/",
"neutronValidator": "https://neutron-testnet-rpc.polkachu.com/",
@@ -725,7 +706,6 @@
"deployerName": "dYdX",
"rewardsHistoryStartDateMs": "1704844800000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": false,
"endpoints": {
"indexers": [
@@ -741,7 +721,6 @@
"solanaRpcUrl": "https://api.mainnet-beta.solana.com/",
"nobleValidator": "https://noble-testnet-rpc.polkachu.com/",
"osmosisValidator": "https://rpc.osmotest5.osmosis.zone/",
- "metadataService": "https://66iv2m87ol.execute-api.ap-northeast-1.amazonaws.com/mainnet/metadata-service/v1",
"neutronValidator": "https://neutron-testnet-rpc.polkachu.com/",
"geo": "https://api.dydx.exchange/v4/geo",
"stakingAPR": "https://apybara-proxy-web-testnet.infrastructure-34d.workers.dev/v0/protocols/dydx",
@@ -766,7 +745,6 @@
"deployerName": "dYdX",
"rewardsHistoryStartDateMs": "1704844800000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": false,
"endpoints": {
"indexers": [
@@ -782,7 +760,6 @@
"solanaRpcUrl": "https://api.mainnet-beta.solana.com/",
"nobleValidator": "https://noble-testnet-rpc.polkachu.com/",
"osmosisValidator": "https://rpc.osmotest5.osmosis.zone/",
- "metadataService": "https://66iv2m87ol.execute-api.ap-northeast-1.amazonaws.com/mainnet/metadata-service/v1",
"neutronValidator": "https://neutron-testnet-rpc.polkachu.com/",
"geo": "https://api.dydx.exchange/v4/geo",
"stakingAPR": "https://apybara-proxy-web-testnet.infrastructure-34d.workers.dev/v0/protocols/dydx",
@@ -807,7 +784,6 @@
"deployerName": "dYdX",
"rewardsHistoryStartDateMs": "1704844800000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": false,
"endpoints": {
"indexers": [
@@ -823,7 +799,6 @@
"solanaRpcUrl": "https://api.mainnet-beta.solana.com/",
"nobleValidator": "https://noble-testnet-rpc.polkachu.com/",
"osmosisValidator": "https://rpc.osmotest5.osmosis.zone/",
- "metadataService": "https://66iv2m87ol.execute-api.ap-northeast-1.amazonaws.com/mainnet/metadata-service/v1",
"neutronValidator": "https://neutron-testnet-rpc.polkachu.com/",
"geo": "https://api.dydx.exchange/v4/geo",
"stakingAPR": "https://apybara-proxy-web-testnet.infrastructure-34d.workers.dev/v0/protocols/dydx",
@@ -848,7 +823,6 @@
"deployerName": "dYdX",
"rewardsHistoryStartDateMs": "1704844800000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": false,
"endpoints": {
"indexers": [
@@ -864,7 +838,6 @@
"solanaRpcUrl": "https://api.mainnet-beta.solana.com/",
"nobleValidator": "https://noble-testnet-rpc.polkachu.com/",
"osmosisValidator": "https://rpc.osmotest5.osmosis.zone/",
- "metadataService": "https://66iv2m87ol.execute-api.ap-northeast-1.amazonaws.com/mainnet/metadata-service/v1",
"neutronValidator": "https://neutron-testnet-rpc.polkachu.com/",
"geo": "https://api.dydx.exchange/v4/geo",
"stakingAPR": "https://apybara-proxy-web-testnet.infrastructure-34d.workers.dev/v0/protocols/dydx",
@@ -889,7 +862,6 @@
"deployerName": "dYdX",
"rewardsHistoryStartDateMs": "1704844800000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": false,
"endpoints": {
"indexers": [
@@ -905,7 +877,6 @@
"solanaRpcUrl": "https://api.mainnet-beta.solana.com/",
"nobleValidator": "https://noble-testnet-rpc.polkachu.com/",
"osmosisValidator": "https://rpc.osmotest5.osmosis.zone/",
- "metadataService": "https://66iv2m87ol.execute-api.ap-northeast-1.amazonaws.com/mainnet/metadata-service/v1",
"neutronValidator": "https://neutron-testnet-rpc.polkachu.com/",
"geo": "https://api.dydx.exchange/v4/geo",
"stakingAPR": "https://apybara-proxy-web-testnet.infrastructure-34d.workers.dev/v0/protocols/dydx",
@@ -922,42 +893,77 @@
}
},
"dydxprotocol-mainnet": {
- "name": "v4",
+ "name": "Mainnet",
"ethereumChainId": "1",
- "dydxChainId": "[mainnet chain id]",
+ "dydxChainId": "dydx-mainnet-1",
"chainName": "dYdX Chain",
"chainLogo": "/dydx-chain.png",
- "deployerName": "[deployer name]",
+ "deployerName": "dYdX Ops subDAO",
"rewardsHistoryStartDateMs": "1706486400000",
"megavaultHistoryStartDateMs": "1704844800000",
- "megavaultOperatorName": "Contoso Corporation",
"isMainNet": true,
"endpoints": {
"indexers": [
{
- "api": "[REST endpoint]",
- "socket": "[Websocket endpoint]"
+ "api": "https://indexer.dydx.trade",
+ "socket": "wss://indexer.dydx.trade"
}
],
"validators": [
- "[Validator endpoint 1",
- "[Validator endpoint n]"
- ],
- "skip": "[Skip endpoint for mainnet]",
- "solanaRpcUrl": "[Solana rpc url for mainnet]",
- "metadataService": "[metadata service endpoint for mainnet]",
- "nobleValidator": "[noble validator endpoint for mainnet]",
- "osmosisValidator": "[osmosis validator endpoint for mainnet]",
- "neutronValidator": "[neutron validator endpoint for mainnet]",
- "geo": "[geo endpoint for mainnet]",
- "stakingAPR": "[staking APR endpoint for mainnet]"
+ "https://dydx-dao-rpc.polkachu.com",
+ "https://dydx-mainnet-full-rpc.public.blastapi.io",
+ "https://dydx-ops-rpc.kingnodes.com"
+ ],
+ "0xsquid": "https://api.squidrouter.com",
+ "skip": "https://api.skip.money",
+ "nobleValidator": "https://noble-yx-rpc.polkachu.com/",
+ "geo": "https://api.dydx.exchange/v4/geo",
+ "stakingAPR": "https://apybara-proxy-web-mainnet.infrastructure-34d.workers.dev/v0/protocols/dydx",
+ "solanaRpcUrl": "https://alchemy-solana-proxy-web-mainnet.infrastructure-34d.workers.dev",
+ "osmosisValidator": "https://rpc.osmosis.zone",
+ "neutronValidator": "https://neutron-rpc.publicnode.com"
},
- "stakingValidators": [],
+ "ios": {
+ "minimalVersion": "1.8.0",
+ "build": 31072,
+ "url": "https://apps.apple.com/app/id6475599596"
+ },
+ "android": {
+ "minimalVersion": "1.9.0",
+ "build": 54,
+ "url": "https://play.google.com/store/apps/details?id=trade.opsdao.dydxchain&pli=1"
+ },
+ "apps": {
+ "ios": {
+ "minimalVersion": "1.7.0",
+ "build": 31072,
+ "url": "https://apps.apple.com/app/id6475599596"
+ },
+ "android": {
+ "minimalVersion": "1.9.0",
+ "build": 54,
+ "url": "https://play.google.com/store/apps/details?id=trade.opsdao.dydxchain&pli=1"
+ }
+ },
+ "stakingValidators": [
+ "dydxvaloper15xgxv2j45uc4er8z9tfz5m0f0e74ymv6xj9l9d",
+ "dydxvaloper1cpz0jtj6rkezzs7z8k5gy6py05sxdkmyvggvvh",
+ "dydxvaloper199fjq4rnfvz24cktl8cervx8h8e90ruk3yrrdn",
+ "dydxvaloper1mwhwf9rqh64ktr8t8xnz37nhg7vvy42ec56jwe",
+ "dydxvaloper140l6y2gp3gxvay6qtn70re7z2s0gn57zq7tkd8",
+ "dydxvaloper1y6ncfxx8x9sqec97pehjw0k32slw63850ltjrn",
+ "dydxvaloper15wphegl8esn7r2rgj9j3xf870v78lxg8yfjn95",
+ "dydxvaloper1t8hjjca8kecjtuhs2qy83maurj78fq2z5c44z5",
+ "dydxvaloper1j4ljutnh66r55a29jydgca7pfmhd40e3nlcfa4"
+ ],
"featureFlags": {
- "checkForGeo": false,
+ "checkForGeo": true,
+ "reduceOnlySupported": true,
+ "usePessimisticCollateralCheck": false,
+ "useOptimisticCollateralCheck": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true,
- "CCTPDepositOnly": true,
+ "CCTPDepositOnly": false,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
diff --git a/src/App.tsx b/src/App.tsx
index 112decb40c..e1d3b2c064 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -43,7 +43,8 @@ import { config, privyConfig } from '@/lib/wagmi';
import { RestrictionWarning } from './components/RestrictionWarning';
import { ComplianceStates } from './constants/compliance';
import { DialogTypes } from './constants/dialogs';
-import { SkipProvider } from './hooks/transfers/skipClient';
+import { SkipProvider, useSkipClient } from './hooks/transfers/skipClient';
+import { assetsQueryFn, chainsQueryFn } from './hooks/transfers/useTransfers';
import { useAnalytics } from './hooks/useAnalytics';
import { useBreakpoints } from './hooks/useBreakpoints';
import { useCommandMenu } from './hooks/useCommandMenu';
@@ -86,6 +87,8 @@ const Content = () => {
const { complianceState } = useComplianceState();
const showRestrictionWarning = complianceState === ComplianceStates.READ_ONLY;
+ const { skipClient, skipClientId } = useSkipClient();
+
const pathFromHash = useMemo(() => {
if (location.hash === '') {
return '';
@@ -101,6 +104,17 @@ const Content = () => {
}
}, [dispatch]);
+ useEffect(() => {
+ appQueryClient.prefetchQuery({
+ queryKey: ['transferEligibleChains', skipClientId],
+ queryFn: () => chainsQueryFn(skipClient),
+ });
+ appQueryClient.prefetchQuery({
+ queryKey: ['transferEligibleAssets', skipClientId],
+ queryFn: () => assetsQueryFn(skipClient),
+ });
+ }, [skipClient]);
+
return (
<>
diff --git a/src/constants/abacus.ts b/src/constants/abacus.ts
index 10cd149498..efcba48781 100644
--- a/src/constants/abacus.ts
+++ b/src/constants/abacus.ts
@@ -89,6 +89,7 @@ export const PerpetualMarketType = Abacus.exchange.dydx.abacus.output.PerpetualM
// ------ Configs ------ //
export const StatsigConfig = Abacus.exchange.dydx.abacus.state.manager.StatsigConfig;
+export const AutoSweepConfig = Abacus.exchange.dydx.abacus.state.manager.AutoSweepConfig;
export type Configs = Abacus.exchange.dydx.abacus.output.Configs;
export type FeeDiscount = Abacus.exchange.dydx.abacus.output.FeeDiscount;
export type FeeTier = Abacus.exchange.dydx.abacus.output.FeeTier;
diff --git a/src/constants/graz.ts b/src/constants/graz.ts
index 0ac2411240..4f96f7e9cc 100644
--- a/src/constants/graz.ts
+++ b/src/constants/graz.ts
@@ -42,6 +42,10 @@ export const getNeutronChainId = () => {
return isMainnet ? CosmosChainId.Neutron : CosmosChainId.NeutronTestnet;
};
+export const getSolanaChainId = () => {
+ return isMainnet ? 'solana' : 'solana-devnet';
+};
+
const osmosisChainId = getOsmosisChainId();
const nobleChainId = getNobleChainId();
const neutronChainId = getNeutronChainId();
diff --git a/src/constants/notifications.ts b/src/constants/notifications.ts
index 55788fea28..84c5f99ab8 100644
--- a/src/constants/notifications.ts
+++ b/src/constants/notifications.ts
@@ -207,6 +207,7 @@ export enum TransferNotificationTypes {
Deposit = 'deposit',
}
+// TODO: fix typo
export type TransferNotifcation = {
id?: string;
txHash: string;
diff --git a/src/constants/transfers.ts b/src/constants/transfers.ts
index 41fbd4f4ed..a56ecfc53d 100644
--- a/src/constants/transfers.ts
+++ b/src/constants/transfers.ts
@@ -96,14 +96,18 @@ export const getDefaultTokenDenomFromAssets = (assets: Asset[]): string => {
const nativeChainToken = assets.find((asset) => {
return isNativeDenom(asset.denom);
});
+ const uusdcToken = assets.find((asset) => {
+ return asset.denom === 'uusdc' || asset.originDenom === 'uusdc';
+ });
// If not cctp or native chain token, default to the first item in the list
- const defaultTokenDenom = cctpToken?.denom ?? nativeChainToken?.denom ?? assets[0]?.denom;
+ const defaultTokenDenom =
+ cctpToken?.denom ?? nativeChainToken?.denom ?? uusdcToken?.denom ?? assets[0]?.denom;
return defaultTokenDenom;
};
export const getDefaultChainIDFromNetworkType = (networkType: NetworkType): string | undefined => {
if (networkType === 'evm') return '1';
if (networkType === 'svm') return 'solana';
- if (networkType === 'cosmos') return 'noble';
+ if (networkType === 'cosmos') return 'noble-1';
return undefined;
};
diff --git a/src/hooks/transfers/skipClient.tsx b/src/hooks/transfers/skipClient.tsx
index 2eb2276f2b..003accaf61 100644
--- a/src/hooks/transfers/skipClient.tsx
+++ b/src/hooks/transfers/skipClient.tsx
@@ -1,5 +1,9 @@
import { createContext, useContext, useMemo } from 'react';
+import {
+ MsgWithdrawFromSubaccount,
+ TYPE_URL_MSG_WITHDRAW_FROM_SUBACCOUNT,
+} from '@dydxprotocol/v4-client-js';
import { SkipClient } from '@skip-go/client';
import { getNeutronChainId, getNobleChainId, getOsmosisChainId } from '@/constants/graz';
@@ -28,9 +32,9 @@ const useSkipClientContext = () => {
useEndpointsConfig();
const { compositeClient } = useDydxClient();
const selectedDydxChainId = useAppSelector(getSelectedDydxChainId);
- const skipClient = useMemo(
- () =>
- new SkipClient({
+ const { skipClient, skipClientId } = useMemo(
+ () => ({
+ skipClient: new SkipClient({
endpointOptions: {
getRpcEndpointForChain: async (chainId: string) => {
if (chainId === getNobleChainId()) return nobleValidator;
@@ -44,8 +48,12 @@ const useSkipClientContext = () => {
throw new Error(`Error: no rpc endpoint found for chainId: ${chainId}`);
},
},
+ registryTypes: [[TYPE_URL_MSG_WITHDRAW_FROM_SUBACCOUNT, MsgWithdrawFromSubaccount]],
}),
+ skipClientId: crypto.randomUUID(),
+ }),
[
+ compositeClient?.network.validatorConfig.restEndpoint,
neutronValidator,
nobleValidator,
osmosisValidator,
@@ -54,5 +62,5 @@ const useSkipClientContext = () => {
validators,
]
);
- return { skipClient };
+ return { skipClient, skipClientId };
};
diff --git a/src/hooks/transfers/useTransfers.tsx b/src/hooks/transfers/useTransfers.tsx
index d9feeff0a3..8b3a7d2e7c 100644
--- a/src/hooks/transfers/useTransfers.tsx
+++ b/src/hooks/transfers/useTransfers.tsx
@@ -1,7 +1,7 @@
import { useMemo, useState } from 'react';
import { NOBLE_BECH32_PREFIX } from '@dydxprotocol/v4-client-js';
-import { Chain, MsgsDirectRequest } from '@skip-go/client';
+import { Chain, MsgsDirectRequest, SkipClient } from '@skip-go/client';
import { useQuery } from '@tanstack/react-query';
import { parseUnits } from 'viem';
@@ -14,7 +14,6 @@ import {
OSMO_BECH32_PREFIX,
} from '@/constants/graz';
import {
- COSMOS_SWAP_VENUES,
getDefaultChainIDFromNetworkType,
getDefaultTokenDenomFromAssets,
getNetworkTypeFromWalletNetworkType,
@@ -28,12 +27,41 @@ import { useAppSelector } from '@/state/appTypes';
import { convertBech32Address } from '@/lib/addressUtils';
import { isNativeDenom } from '@/lib/assetUtils';
+import { MustBigNumber } from '@/lib/numbers';
import { useAccounts } from '../useAccounts';
+import { useDebounce } from '../useDebounce';
import { useSkipClient } from './skipClient';
+export const chainsQueryFn = async (skipClient: SkipClient) => {
+ const skipSupportedChains = await skipClient.chains({
+ includeEVM: true,
+ includeSVM: true,
+ });
+ const chainsByNetworkMap = skipSupportedChains.reduce<{ [key: string]: Chain[] }>(
+ (chainsMap, nextChain) => {
+ const chainsListForNetworkType = chainsMap[nextChain.chainType] ?? [];
+ chainsMap[nextChain.chainType] = [...chainsListForNetworkType, nextChain];
+ return chainsMap;
+ },
+ {}
+ );
+ return {
+ skipSupportedChains,
+ chainsByNetworkMap,
+ };
+};
+
+export const assetsQueryFn = async (skipClient: SkipClient) => {
+ const assetsByChain = await skipClient.assets({
+ includeEvmAssets: true,
+ includeSvmAssets: true,
+ });
+ return { assetsByChain };
+};
+
export const useTransfers = () => {
- const { skipClient } = useSkipClient();
+ const { skipClient, skipClientId } = useSkipClient();
const { dydxAddress, sourceAccount } = useAccounts();
const selectedDydxChainId = useAppSelector(getSelectedDydxChainId);
@@ -51,39 +79,19 @@ export const useTransfers = () => {
const [transferType, setTransferType] = useState(TransferType.Withdraw);
const [amount, setAmount] = useState('');
+ const debouncedAmount = useDebounce(amount, 500);
+ const debouncedAmountBN = useMemo(() => MustBigNumber(debouncedAmount), [debouncedAmount]);
+
const chainsQuery = useQuery({
- queryKey: ['transferEligibleChains'],
- queryFn: async () => {
- const skipSupportedChains = await skipClient.chains({
- includeEVM: true,
- includeSVM: true,
- });
- const chainsByNetworkMap = skipSupportedChains.reduce>(
- (chainsMap, nextChain) => {
- const chainsListForNetworkType = chainsMap[nextChain.chainType] ?? [];
- chainsMap[nextChain.chainType] = [...chainsListForNetworkType, nextChain];
- return chainsMap;
- },
- {}
- );
- return {
- skipSupportedChains,
- chainsByNetworkMap,
- };
- },
+ queryKey: ['transferEligibleChains', skipClientId],
+ queryFn: () => chainsQueryFn(skipClient),
refetchOnWindowFocus: false,
refetchOnMount: false,
refetchOnReconnect: false,
});
const assetsQuery = useQuery({
- queryKey: ['transferEligibleAssets'],
- queryFn: async () => {
- const assetsByChain = await skipClient.assets({
- includeEvmAssets: true,
- includeSvmAssets: true,
- });
- return { assetsByChain };
- },
+ queryKey: ['transferEligibleAssets', skipClientId],
+ queryFn: () => assetsQueryFn(skipClient),
refetchOnWindowFocus: false,
refetchOnMount: false,
refetchOnReconnect: false,
@@ -136,7 +144,7 @@ export const useTransfers = () => {
!!fromAddress &&
!!toAddress &&
!!transferType &&
- !!amount &&
+ !!debouncedAmount &&
!!dydxAddress;
const routeQuery = useQuery({
@@ -149,7 +157,7 @@ export const useTransfers = () => {
fromAddress,
toAddress,
transferType,
- amount,
+ debouncedAmount,
dydxAddress,
selectedDydxChainId,
],
@@ -187,27 +195,14 @@ export const useTransfers = () => {
};
// WITHDRAWALS
if (transferType === TransferType.Withdraw) {
- if (isTokenCctp(toToken)) {
- return skipClient.msgsDirect({
- ...baseParams,
- chainIdsToAddresses: {
- [selectedDydxChainId]: dydxAddress,
- [toToken.chainID]: toAddress,
- },
- bridges: ['IBC', 'CCTP'],
- allowMultiTx: true,
- });
- }
- // Non cctp withdrawals
return skipClient.msgsDirect({
...baseParams,
chainIdsToAddresses: {
[selectedDydxChainId]: dydxAddress,
[toToken.chainID]: toAddress,
- ...cosmosChainAddresses,
},
- bridges: ['IBC', 'AXELAR'],
- swapVenues: COSMOS_SWAP_VENUES,
+ bridges: ['IBC', 'CCTP'],
+ allowMultiTx: true,
});
}
@@ -235,15 +230,11 @@ export const useTransfers = () => {
swapVenues: SWAP_VENUES,
});
},
+
enabled: hasAllParams,
});
- const route = routeQuery?.data;
-
- // TODO [onboarding-rewrite]: maybe abstract away the adding of transfer notifications to this hook instead of having
- // withdrawal and deposit modals handle them separately in multiple places
- // const { addOrUpdateTransferNotification } = useLocalNotifications();
-
+ const { route, txs } = routeQuery?.data ?? {};
return {
// TODO [onboarding-rewrite]: Think about trimming this list
// Right now we're exposing everything, but there's a good chance we can only expose a few properties
@@ -267,9 +258,12 @@ export const useTransfers = () => {
transferType,
setTransferType,
route,
+ txs,
defaultChainId,
defaultTokenDenom,
toToken,
fromToken,
+ debouncedAmount,
+ debouncedAmountBN,
};
};
diff --git a/src/hooks/useAccounts.tsx b/src/hooks/useAccounts.tsx
index 3c98f0c24d..010da09d95 100644
--- a/src/hooks/useAccounts.tsx
+++ b/src/hooks/useAccounts.tsx
@@ -312,6 +312,7 @@ const useAccountsContext = () => {
return {
// Wallet connection
sourceAccount,
+ localNobleWallet,
// Wallet selection
selectWallet,