diff --git a/build.gradle.kts b/build.gradle.kts index a0544b438..c925cb25a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -51,7 +51,7 @@ allprojects { } group = "exchange.dydx.abacus" -version = "1.7.43" +version = "1.7.44" repositories { google() diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/output/input/TransferInput.kt b/src/commonMain/kotlin/exchange.dydx.abacus/output/input/TransferInput.kt index 17133955e..5c49f6dd4 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/output/input/TransferInput.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/output/input/TransferInput.kt @@ -208,8 +208,8 @@ data class TransferOutInputOptions( @Serializable data class TransferInputChainResource( val chainName: String?, - val rpc: String?, - val networkName: String?, + val rpc: String? = null, + val networkName: String? = null, val chainId: Int?, val iconUrl: String? ) diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainProcessor.kt index d9967c7d3..07ee41a16 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainProcessor.kt @@ -1,22 +1,17 @@ package exchange.dydx.abacus.processor.router.skip -import exchange.dydx.abacus.processor.base.BaseProcessor +import exchange.dydx.abacus.output.input.SelectionOption import exchange.dydx.abacus.protocols.ParserProtocol -internal class SkipChainProcessor(parser: ParserProtocol) : BaseProcessor(parser) { - private val keyMap = mapOf( - "string" to mapOf( - "chain_name" to "stringKey", - "networkIdentifier" to "stringKey", - "chain_id" to "type", - "logo_uri" to "iconUrl", - ), - ) - - override fun received( - existing: Map?, +internal class SkipChainProcessor(private val parser: ParserProtocol) { + fun received( payload: Map - ): Map { - return transform(existing, payload, keyMap) + ): SelectionOption { + return SelectionOption( + stringKey = parser.asString(payload["network_identifier"]) ?: parser.asString(payload["chain_name"]), + string = parser.asString(payload["network_identifier"]) ?: parser.asString(payload["chain_name"]), + type = parser.asString(payload["chain_id"]) ?: "", + iconUrl = parser.asString(payload["logo_uri"]), + ) } } diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainResourceProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainResourceProcessor.kt index d4906869d..849a6b4cc 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainResourceProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainResourceProcessor.kt @@ -1,23 +1,19 @@ package exchange.dydx.abacus.processor.router.skip -import exchange.dydx.abacus.processor.base.BaseProcessor +import exchange.dydx.abacus.output.input.TransferInputChainResource import exchange.dydx.abacus.protocols.ParserProtocol -internal class SkipChainResourceProcessor(parser: ParserProtocol) : BaseProcessor(parser) { - private val keyMap = mapOf( - "string" to mapOf( - "chain_name" to "chainName", - "rpc" to "rpc", - "networkName" to "networkName", - "chain_id" to "chainId", - "logo_uri" to "iconUrl", - ), - ) +internal class SkipChainResourceProcessor(private val parser: ParserProtocol) { - override fun received( - existing: Map?, + fun received( payload: Map - ): Map { - return transform(existing, payload, keyMap) + ): TransferInputChainResource { + return TransferInputChainResource( + chainName = parser.asString(payload["chain_name"]), + rpc = parser.asString(payload["rpc"]), + networkName = parser.asString(payload["networkName"]), + chainId = parser.asInt(payload["chain_id"]), + iconUrl = parser.asString(payload["logo_uri"]), + ) } } diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipProcessor.kt index edb9296ee..24d7c5349 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipProcessor.kt @@ -1,13 +1,20 @@ package exchange.dydx.abacus.processor.router.skip +import exchange.dydx.abacus.output.input.SelectionOption +import exchange.dydx.abacus.output.input.TransferInputChainResource import exchange.dydx.abacus.processor.base.BaseProcessor import exchange.dydx.abacus.processor.router.IRouterProcessor import exchange.dydx.abacus.processor.router.SharedRouterProcessor import exchange.dydx.abacus.protocols.ParserProtocol +import exchange.dydx.abacus.state.internalstate.InternalTransferInputState +import exchange.dydx.abacus.utils.mutable import exchange.dydx.abacus.utils.safeSet @Suppress("NotImplementedDeclaration") -internal class SkipProcessor(parser: ParserProtocol) : BaseProcessor(parser), IRouterProcessor { +internal class SkipProcessor( + parser: ParserProtocol, + private val internalState: InternalTransferInputState +) : BaseProcessor(parser), IRouterProcessor { override var chains: List? = null // possibly want to use a different variable so we aren't stuck with this bad type @@ -26,8 +33,25 @@ internal class SkipProcessor(parser: ParserProtocol) : BaseProcessor(parser), IR existing: Map?, payload: Map ): Map? { - throw NotImplementedError("receivedChains is not implemented in SkipProcessor!") + if (this.chains != null) { + return existing + } + this.chains = parser.asNativeList(payload["chains"]) + var modified = mutableMapOf() + existing?.let { + modified = it.mutable() + } + val chainOptions = chainOptions() + + internalState.chains = chainOptions + val selectedChainId = defaultChainId() + modified.safeSet("transfer.chain", selectedChainId) + selectedChainId?.let { + internalState.chainResources = chainResources(chainId = selectedChainId) + } + return modified } + override fun receivedTokens( existing: Map?, payload: Map @@ -72,7 +96,9 @@ internal class SkipProcessor(parser: ParserProtocol) : BaseProcessor(parser), IR } override fun defaultChainId(): String? { - throw NotImplementedError("defaultChainId is not implemented in SkipProcessor!") + val selectedChain = parser.asNativeMap(this.chains?.find { parser.asString(parser.asNativeMap(it)?.get("chain_id")) == "1" }) + + return parser.asString(selectedChain?.get("chain_id")) } override fun selectedTokenSymbol(tokenAddress: String?): String? { @@ -91,16 +117,41 @@ internal class SkipProcessor(parser: ParserProtocol) : BaseProcessor(parser), IR throw NotImplementedError("defaultTokenAddress is not implemented in SkipProcessor!") } - override fun chainResources(chainId: String?): Map? { - throw NotImplementedError("chainResources is not implemented in SkipProcessor!") + override fun chainResources(chainId: String?): Map? { + val chainResources = mutableMapOf() + chainId?.let { + this.chains?.find { + parser.asString(parser.asNativeMap(it)?.get("chain_id")) == chainId + }?.let { + val processor = SkipChainResourceProcessor(parser) + parser.asNativeMap(it)?.let { payload -> + chainResources[chainId] = processor.received(payload) + } + } + } + return chainResources } override fun tokenResources(chainId: String?): Map? { throw NotImplementedError("tokenResources is not implemented in SkipProcessor!") } - override fun chainOptions(): List { - throw NotImplementedError("chainOptions is not implemented in SkipProcessor!") + override fun chainOptions(): List { + val chainProcessor = SkipChainProcessor(parser) + val options = mutableListOf() + + this.chains?.let { + for (chain in it) { + parser.asNativeMap(chain)?.let { chain -> + if (parser.asString(chain.get("chainType")) != "cosmos") { + options.add(chainProcessor.received(chain)) + } + } + } + } + + options.sortBy { parser.asString(it.stringKey) } + return options } override fun tokenOptions(chainId: String?): List { diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidProcessor.kt index 866b34411..5e8a2b94d 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidProcessor.kt @@ -173,6 +173,8 @@ internal class SquidProcessor( override fun updateTokensDefaults(modified: MutableMap, selectedChainId: String?) { val tokenOptions = tokenOptions(selectedChainId) internalState.tokens = tokenOptions + modified.safeSet("transfer.depositOptions.assets", tokenOptions) + modified.safeSet("transfer.withdrawalOptions.assets", tokenOptions) modified.safeSet("transfer.token", defaultTokenAddress(selectedChainId)) internalState.tokenResources = tokenResources(selectedChainId) } diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/configs/V4StateManagerConfigs.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/configs/V4StateManagerConfigs.kt index 79d3aaa45..ef36530ee 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/configs/V4StateManagerConfigs.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/configs/V4StateManagerConfigs.kt @@ -115,10 +115,19 @@ class V4StateManagerConfigs( return if (environment.isMainNet) "noble-1" else "grand-1" } + fun skipV1Chains(): String { + return "$skipHost/v1/info/chains?include_evm=true" + } + fun nobleDenom(): String? { return "uusdc" } + private val skipHost: String + get() { + return "https://api.skip.money" + } + private val squidV2Host: String get() { return if (environment.isMainNet) { diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/model/TradingStateMachine+Squid.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/model/TradingStateMachine+Squid.kt index ddb14d6a9..156e6858c 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/model/TradingStateMachine+Squid.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/model/TradingStateMachine+Squid.kt @@ -6,7 +6,7 @@ import kollections.iListOf import kotlinx.serialization.json.Json import kotlinx.serialization.json.jsonObject -internal fun TradingStateMachine.squidChains(payload: String): StateChanges? { +internal fun TradingStateMachine.routerChains(payload: String): StateChanges? { val json = parser.decodeJsonObject(payload) return if (json != null) { input = squidProcessor.receivedChains(input, json) diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/OnboardingSupervisor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/OnboardingSupervisor.kt index 8fc8caf1b..522114ce1 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/OnboardingSupervisor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/OnboardingSupervisor.kt @@ -24,6 +24,7 @@ import exchange.dydx.abacus.state.manager.HumanReadableWithdrawPayload import exchange.dydx.abacus.state.manager.pendingCctpWithdraw import exchange.dydx.abacus.state.model.TradingStateMachine import exchange.dydx.abacus.state.model.TransferInputField +import exchange.dydx.abacus.state.model.routerChains import exchange.dydx.abacus.state.model.squidRoute import exchange.dydx.abacus.state.model.squidRouteV2 import exchange.dydx.abacus.state.model.squidStatus @@ -69,6 +70,17 @@ internal class OnboardingSupervisor( retrieveCctpChainIds() } + @Suppress("UnusedPrivateMember") + private fun retrieveSkipTransferChains() { + val oldState = stateMachine.state + val chainsUrl = helper.configs.skipV1Chains() + helper.get(chainsUrl, null, null) { _, response, httpCode, _ -> + if (helper.success(httpCode) && response != null) { + update(stateMachine.routerChains(response), oldState) + } + } + } + private fun retrieveTransferAssets() { val oldState = stateMachine.state val url = helper.configs.squidV2Assets() diff --git a/src/commonTest/kotlin/exchange.dydx.abacus/payload/v4/V4SquidTests.kt b/src/commonTest/kotlin/exchange.dydx.abacus/payload/v4/V4SquidTests.kt index 00c93356f..1af6d062c 100644 --- a/src/commonTest/kotlin/exchange.dydx.abacus/payload/v4/V4SquidTests.kt +++ b/src/commonTest/kotlin/exchange.dydx.abacus/payload/v4/V4SquidTests.kt @@ -1,7 +1,7 @@ package exchange.dydx.abacus.payload.v4 import exchange.dydx.abacus.state.model.TransferInputField -import exchange.dydx.abacus.state.model.squidChains +import exchange.dydx.abacus.state.model.routerChains import exchange.dydx.abacus.state.model.squidRoute import exchange.dydx.abacus.state.model.squidRouteV2 import exchange.dydx.abacus.state.model.squidStatus @@ -20,7 +20,7 @@ class V4SquidTests : V4BaseTests() { // Due to the JIT compiler nature for JVM (and Kotlin) and JS, Android/web would ran slow the first round. Second round give more accurate result setup() - val stateChange = perp.squidChains(mock.squidChainsMock.payload) + val stateChange = perp.routerChains(mock.squidChainsMock.payload) assertNotNull(stateChange) test({ @@ -47,7 +47,7 @@ class V4SquidTests : V4BaseTests() { // Due to the JIT compiler nature for JVM (and Kotlin) and JS, Android/web would ran slow the first round. Second round give more accurate result setup() - var stateChange = perp.squidChains(mock.squidChainsMock.payload) + var stateChange = perp.routerChains(mock.squidChainsMock.payload) assertNotNull(stateChange) stateChange = perp.squidTokens(mock.squidTokensMock.payload) @@ -112,7 +112,7 @@ class V4SquidTests : V4BaseTests() { perp.transfer("DEPOSIT", TransferInputField.type, 0) - var stateChange = perp.squidChains(mock.squidChainsMock.payload) + var stateChange = perp.routerChains(mock.squidChainsMock.payload) assertNotNull(stateChange) stateChange = perp.squidTokens(mock.squidTokensMock.payload) @@ -148,7 +148,7 @@ class V4SquidTests : V4BaseTests() { perp.transfer("DEPOSIT", TransferInputField.type, 0) - var stateChange = perp.squidChains(mock.squidChainsMock.payload) + var stateChange = perp.routerChains(mock.squidChainsMock.payload) assertNotNull(stateChange) stateChange = perp.squidTokens(mock.squidTokensMock.payload) @@ -219,7 +219,7 @@ class V4SquidTests : V4BaseTests() { fun testDefaultTokenAddress() { setup() - var stateChange = perp.squidChains(mock.squidChainsMock.payload) + var stateChange = perp.routerChains(mock.squidChainsMock.payload) assertNotNull(stateChange) stateChange = perp.squidTokens(mock.squidTokensMock.payload) @@ -232,7 +232,7 @@ class V4SquidTests : V4BaseTests() { fun testChainResources() { setup() - val stateChange = perp.squidChains(mock.squidChainsMock.payload) + val stateChange = perp.routerChains(mock.squidChainsMock.payload) assertNotNull(stateChange) val result = perp.squidProcessor.chainResources("1") @@ -245,7 +245,7 @@ class V4SquidTests : V4BaseTests() { fun testTokenResources() { setup() - var stateChange = perp.squidChains(mock.squidChainsMock.payload) + var stateChange = perp.routerChains(mock.squidChainsMock.payload) assertNotNull(stateChange) stateChange = perp.squidTokens(mock.squidTokensMock.payload) @@ -259,7 +259,7 @@ class V4SquidTests : V4BaseTests() { fun testTokenOptions() { setup() - var stateChange = perp.squidChains(mock.squidChainsMock.payload) + var stateChange = perp.routerChains(mock.squidChainsMock.payload) assertNotNull(stateChange) stateChange = perp.squidTokens(mock.squidTokensMock.payload) diff --git a/src/commonTest/kotlin/exchange.dydx.abacus/processor/router/skip/SkipProcessorTests.kt b/src/commonTest/kotlin/exchange.dydx.abacus/processor/router/skip/SkipProcessorTests.kt new file mode 100644 index 000000000..465951928 --- /dev/null +++ b/src/commonTest/kotlin/exchange.dydx.abacus/processor/router/skip/SkipProcessorTests.kt @@ -0,0 +1,57 @@ +package exchange.dydx.abacus.processor.router.skip +import exchange.dydx.abacus.output.input.SelectionOption +import exchange.dydx.abacus.output.input.TransferInputChainResource +import exchange.dydx.abacus.state.internalstate.InternalTransferInputState +import exchange.dydx.abacus.tests.payloads.SkipChainsMock +import exchange.dydx.abacus.utils.Parser +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.jsonObject +import kotlin.test.Test +import kotlin.test.assertEquals + +internal fun templateToJson(template: String): Map { + return Json.parseToJsonElement(template.trimIndent()).jsonObject.toMap() +} + +class SkipProcessorTests { + + internal val internalState = InternalTransferInputState() + internal val skipProcessor = SkipProcessor(parser = Parser(), internalState = internalState) + internal val skipChainsMock = SkipChainsMock() + + @Test + fun testReceivedChains() { + val modified = skipProcessor.receivedChains( + existing = mapOf(), + payload = templateToJson( + skipChainsMock.payload, + ), + ) + + val expectedChains = listOf( + SelectionOption(stringKey = "Ethereum", string = "Ethereum", type = "1", iconUrl = "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/info/logo.png"), + SelectionOption(stringKey = "aura", string = "aura", type = "xstaxy-1", iconUrl = "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/xstaxy/chain.png"), + SelectionOption(stringKey = "cheqd", string = "cheqd", type = "cheqd-mainnet-1", iconUrl = "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/cheqd-mainnet/chain.png"), + SelectionOption(stringKey = "kujira", string = "kujira", type = "kaiyo-1", iconUrl = "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/kaiyo/chain.png"), + SelectionOption(stringKey = "osmosis", string = "osmosis", type = "osmosis-1", iconUrl = "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/osmosis/chain.png"), + SelectionOption(stringKey = "stride", string = "stride", type = "stride-1", iconUrl = "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/stride/chain.png"), + ) + assertEquals(expectedChains, internalState.chains) + + val expectedChainResources = mapOf( + "1" to TransferInputChainResource( + chainName = "Ethereum", + chainId = 1, + iconUrl = "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/info/logo.png", + ), + ) + assertEquals(expectedChainResources, internalState.chainResources) + + val expectedModified = mapOf( + "transfer" to mapOf( + "chain" to "1", + ), + ) + assertEquals(expectedModified, modified) + } +} diff --git a/src/commonTest/kotlin/exchange.dydx.abacus/tests/payloads/SkipChainsMock.kt b/src/commonTest/kotlin/exchange.dydx.abacus/tests/payloads/SkipChainsMock.kt new file mode 100644 index 000000000..a25cf8b92 --- /dev/null +++ b/src/commonTest/kotlin/exchange.dydx.abacus/tests/payloads/SkipChainsMock.kt @@ -0,0 +1,187 @@ +package exchange.dydx.abacus.tests.payloads + +internal class SkipChainsMock { + internal val payload = """{ + "chains": [ + { + "chain_name": "kujira", + "chain_id": "kaiyo-1", + "pfm_enabled": false, + "cosmos_module_support": { + "authz": true, + "feegrant": true + }, + "supports_memo": true, + "logo_uri": "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/kaiyo/chain.png", + "bech32_prefix": "kujira", + "fee_assets": [ + { + "denom": "ibc/47BD209179859CDE4A2806763D7189B6E6FE13A17880FE2B42DE1E6C1E329E23", + "gas_price": null + }, + { + "denom": "ibc/EFF323CC632EC4F747C61BCE238A758EFDB7699C3226565F7C20DA06509D59A5", + "gas_price": null + } + ], + "chain_type": "cosmos", + "ibc_capabilities": { + "cosmos_pfm": false, + "cosmos_ibc_hooks": false, + "cosmos_memo": true, + "cosmos_autopilot": false + }, + "is_testnet": false + }, + { + "chain_name": "cheqd", + "chain_id": "cheqd-mainnet-1", + "pfm_enabled": false, + "cosmos_module_support": { + "authz": true, + "feegrant": true + }, + "supports_memo": true, + "logo_uri": "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/cheqd-mainnet/chain.png", + "bech32_prefix": "cheqd", + "fee_assets": [ + { + "denom": "ncheq", + "gas_price": { + "low": "25", + "average": "50", + "high": "100" + } + } + ], + "chain_type": "cosmos", + "ibc_capabilities": { + "cosmos_pfm": false, + "cosmos_ibc_hooks": false, + "cosmos_memo": true, + "cosmos_autopilot": false + }, + "is_testnet": false + }, + { + "chain_name": "osmosis", + "chain_id": "osmosis-1", + "pfm_enabled": true, + "cosmos_module_support": { + "authz": true, + "feegrant": false + }, + "supports_memo": true, + "logo_uri": "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/osmosis/chain.png", + "bech32_prefix": "osmo", + "fee_assets": [ + { + "denom": "uosmo", + "gas_price": { + "low": "0.0025", + "average": "0.025", + "high": "0.04" + } + } + ], + "chain_type": "cosmos", + "ibc_capabilities": { + "cosmos_pfm": true, + "cosmos_ibc_hooks": true, + "cosmos_memo": true, + "cosmos_autopilot": false + }, + "is_testnet": false + }, + { + "chain_name": "stride", + "chain_id": "stride-1", + "pfm_enabled": true, + "cosmos_module_support": { + "authz": false, + "feegrant": true + }, + "supports_memo": true, + "logo_uri": "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/stride/chain.png", + "bech32_prefix": "stride", + "fee_assets": [ + { + "denom": "stusaga", + "gas_price": { + "low": "0.01", + "average": "0.01", + "high": "0.01" + } + }, + { + "denom": "stuatom", + "gas_price": { + "low": "0.0001", + "average": "0.001", + "high": "0.01" + } + } + ], + "chain_type": "cosmos", + "ibc_capabilities": { + "cosmos_pfm": true, + "cosmos_ibc_hooks": false, + "cosmos_memo": true, + "cosmos_autopilot": true + }, + "is_testnet": false + }, + { + "chain_name": "aura", + "chain_id": "xstaxy-1", + "pfm_enabled": false, + "cosmos_module_support": { + "authz": true, + "feegrant": true + }, + "supports_memo": true, + "logo_uri": "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/xstaxy/chain.png", + "bech32_prefix": "aura", + "fee_assets": [ + { + "denom": "uaura", + "gas_price": { + "low": "0.001", + "average": "0.0025", + "high": "0.004" + } + } + ], + "chain_type": "cosmos", + "ibc_capabilities": { + "cosmos_pfm": false, + "cosmos_ibc_hooks": false, + "cosmos_memo": true, + "cosmos_autopilot": false + }, + "is_testnet": false + }, + { + "chain_name": "Ethereum", + "chain_id": "1", + "pfm_enabled": false, + "cosmos_module_support": { + "authz": false, + "feegrant": false + }, + "supports_memo": false, + "logo_uri": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/info/logo.png", + "bech32_prefix": "", + "fee_assets": [], + "chain_type": "evm", + "ibc_capabilities": { + "cosmos_pfm": false, + "cosmos_ibc_hooks": false, + "cosmos_memo": false, + "cosmos_autopilot": false + }, + "is_testnet": false + } + ] +}""" +} diff --git a/v4_abacus.podspec b/v4_abacus.podspec index 4bb221e77..2f4d0aeb1 100644 --- a/v4_abacus.podspec +++ b/v4_abacus.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'v4_abacus' - spec.version = '1.7.38' + spec.version = '1.7.43' spec.homepage = 'https://github.com/dydxprotocol/v4-abacus' spec.source = { :http=> ''} spec.authors = '' @@ -11,7 +11,7 @@ Pod::Spec.new do |spec| - if false + if !Dir.exist?('build/cocoapods/framework/Abacus.framework') || Dir.empty?('build/cocoapods/framework/Abacus.framework') raise " Kotlin framework 'Abacus' doesn't exist yet, so a proper Xcode project can't be generated.