Skip to content

Commit

Permalink
Merge pull request #603 from cosmostation/feature/APP-804_support_humans
Browse files Browse the repository at this point in the history
[APP-804] Support Human.ai
  • Loading branch information
Kwonhyukjoon authored Nov 16, 2023
2 parents 2bed29e + 129c76e commit 99b7bf7
Show file tree
Hide file tree
Showing 29 changed files with 70 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/src/main/java/wannabit/io/cosmostaion/base/BaseChain.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public enum BaseChain {
ARCHWAY_MAIN("archway-mainnet"),
SEI_MAIN("sei-mainnet"),
TERRA_MAIN ("terra-mainnet"),
HUMANS_MAIN ("humans-mainnet"),
DYDX_MAIN ("dydx-mainnet"),
CELESTIA_MAIN ("celestia-mainnet"),
MINTSTATION_TEST ("mintstation-testnet");
Expand Down Expand Up @@ -332,6 +333,9 @@ public static BaseChain getChain(String chainName) {
if (chainName.equals(TERRA_MAIN.chainName)) {
return TERRA_MAIN;
}
if (chainName.equals(HUMANS_MAIN.chainName)) {
return HUMANS_MAIN;
}
if (chainName.equals(DYDX_MAIN.chainName)) {
return DYDX_MAIN;
}
Expand Down Expand Up @@ -370,6 +374,7 @@ public static ArrayList<BaseChain> SUPPORT_CHAINS() {
result.add(EVMOS_MAIN);
result.add(FETCHAI_MAIN);
result.add(GRABRIDGE_MAIN);
result.add(HUMANS_MAIN);
result.add(INJ_MAIN);
result.add(IXO_MAIN);
result.add(JUNO_MAIN);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ public static ChainConfig getChain(BaseChain baseChain) {
case GRABRIDGE_MAIN:
return new GravityBridge();

case HUMANS_MAIN:
return new Humans();

case INJ_MAIN:
return new Injective();

Expand Down
45 changes: 45 additions & 0 deletions app/src/main/java/wannabit/io/cosmostaion/base/chains/Humans.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package wannabit.io.cosmostaion.base.chains

import com.google.common.collect.ImmutableList
import org.bitcoinj.crypto.ChildNumber
import wannabit.io.cosmostaion.R
import wannabit.io.cosmostaion.base.BaseChain
import wannabit.io.cosmostaion.base.BaseConstant

class Humans : ChainConfig() {

override fun baseChain(): BaseChain { return BaseChain.HUMANS_MAIN }
override fun chainImg(): Int { return R.drawable.chain_humans }
override fun chainInfoImg(): Int { return R.drawable.infoicon_humans }
override fun chainInfoTitle(): Int { return R.string.str_front_guide_title_humans}
override fun chainInfoMsg(): Int { return R.string.str_front_guide_msg_humans }
override fun chainColor(): Int { return R.color.color_humans }
override fun chainBgColor(): Int { return R.color.colorTransBgHumans }
override fun chainTabColor(): Int { return R.color.color_tab_myvalidator_humans }
override fun chainName(): String { return "humans" }
override fun chainKoreanName(): String { return "휴먼스" }
override fun chainIdPrefix(): String { return "humans_" }

override fun mainDenomImg(): Int { return R.drawable.token_humans }
override fun mainDenom(): String { return "aheart" }
override fun decimal(): Int { return 18 }
override fun addressPrefix(): String { return "human" }
override fun ethAccountType(): Boolean { return true }

override fun dexSupport(): Boolean { return false }
override fun wcSupport(): Boolean { return false }
override fun authzSupport(): Boolean { return true }


override fun grpcUrl(): String { return "grpc-humans.cosmostation.io" }
override fun explorerUrl(): String { return BaseConstant.EXPLORER_BASE_URL + "humans/" }
override fun homeInfoLink(): String { return "https://humans.ai/" }
override fun blogInfoLink(): String { return "https://blog.humans.ai/" }
override fun coingeckoLink(): String { return BaseConstant.COINGECKO_URL + "humans-ai" }

override fun defaultPath(): String { return "m/44'/60'/0'/0/X" }

override fun setParentPath(customPath: Int): List<ChildNumber>? {
return ImmutableList.of(ChildNumber(44, true), ChildNumber(60, true), ChildNumber.ZERO_HARDENED, ChildNumber.ZERO)
}
}
8 changes: 8 additions & 0 deletions app/src/main/res/color/color_tab_myvalidator_humans.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true"
android:color="@color/color_humans" />

<item android:state_selected="false"
android:color="@color/colorGray4" />
</selector>
Binary file added app/src/main/res/drawable-hdpi/chain_humans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-hdpi/token_humans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/chain_humans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/token_humans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/chain_humans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/token_humans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/chain_humans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/token_humans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
<string name="str_front_guide_msg_archway"><![CDATA[Archwayは、dAppの貢献度に応じてリワードが開発者に分配されるように設計されたスマートコントラクトブロックチェーンです。]]></string>
<string name="str_front_guide_msg_sei"><![CDATA[Seiは速度、セキュリティ、および拡張性のために設計されたCosmosSDKベースのレイヤー1ブロックチェーンネットワークです。]]></string>
<string name="str_front_guide_msg_terra"><![CDATA[Terraネットワークは、Terra ClassicでハードフォークされたCosmos SDKベースの非許可型ブロックチェーンネットワークです。]]></string>
<string name="str_front_guide_msg_humans"><![CDATA[Humans.ai はAIアルゴリズムとAIモデルの生成を促すために設計された分散型AI生態系です。]]></string>
<string name="str_front_guide_msg_dydx"><![CDATA[dYdXは手数料なしで無期限取引を支援する脱中央化取引所のために設計されたCosmosSDKベースのアプリチェーンです。]]></string>
<string name="str_front_guide_msg_celestia"><![CDATA[簡単な脱中央化アプリケーションおよびブロックチェーンの配布を可能にするモジュール型ブロックチェーンネットワークです。]]></string>

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-ko/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
<string name="str_front_guide_msg_archway"><![CDATA[Archway는 dApp들의 기여도에 따라 리워드가 개발자들에게 분배되도록 설계된 스마트 컨트랙트 블록체인입니다.]]></string>
<string name="str_front_guide_msg_sei"><![CDATA[Sei는 속도, 보안 및 확장성을 위해 설계된 Cosmos SDK 기반 레이어 1 블록체인 네트워크입니다.]]></string>
<string name="str_front_guide_msg_terra"><![CDATA[Terra 네트워크는 Terra Classic 에서 하드포크된 Cosmos SDK 기반 비허가형 블록체인 네트워크입니다.]]></string>
<string name="str_front_guide_msg_humans"><![CDATA[Humans.ai는 AI 알고리즘과 AI 모델 생성을 독려하기 위해 설계된 분산형 AI 생태계입니다.]]></string>
<string name="str_front_guide_msg_dydx"><![CDATA[dYdX는 수수료 없는 무기한 거래를 지원하는 탈중앙화 거래소를 위해 설계된 Cosmos SDK 기반 앱체인입니다.]]></string>
<string name="str_front_guide_msg_celestia"><![CDATA[손쉬운 탈중앙화 어플리케이션 및 블록체인 배포를 가능하게 하는 모듈형 블록체인 네트워크.]]></string>

Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@
<color name="colorTransBgArchway">#45281F</color>
<color name="colorTransBgSei">#291C09</color>
<color name="colorTransBgTerra">#051742</color>
<color name="colorTransBgHumans">#2B2D31</color>
<color name="colorTransBgDydx">#161543</color>
<color name="colorTransBgMintstation">#1B2A51</color>
<color name="colorTransBgCelestia">#33143C</color>
>>>>>>> master


<color name="colorWhiteDayNight">#000000</color>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<color name="colorTransBgArchway">#FFF2ED</color>
<color name="colorTransBgSei">#FBF4EA</color>
<color name="colorTransBgTerra">#E7EDFF</color>
<color name="colorTransBgHumans">#E8EBEF</color>
<color name="colorTransBgDydx">#F0F0FF</color>
<color name="colorTransBgMintstation">#E7EDFD</color>
<color name="colorTransBgCelestia">#FCF3FF</color>
Expand Down Expand Up @@ -252,6 +253,8 @@

<color name="color_terra">#1E75EE</color>

<color name="color_humans">#8268FB</color>

<color name="color_mintstation">#376FFF</color>

<color name="color_dydx">#6966FF</color>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@
<string name="str_front_guide_title_archway" translatable="false"><![CDATA[ARCHWAY]]></string>
<string name="str_front_guide_title_sei" translatable="false"><![CDATA[SEI]]></string>
<string name="str_front_guide_title_terra" translatable="false"><![CDATA[TERRA]]></string>
<string name="str_front_guide_title_humans" translatable="false"><![CDATA[HUMANS]]></string>
<string name="str_front_guide_title_dydx" translatable="false"><![CDATA[DYDX]]></string>
<string name="str_front_guide_title_celestia" translatable="false"><![CDATA[CELESTIA]]></string>
<string name="str_front_guide_title_mintstation" translatable="false"><![CDATA[MINTSTATION-TESTNET]]></string>
Expand Down Expand Up @@ -391,6 +392,7 @@
<string name="str_front_guide_msg_archway"><![CDATA[Archway is a persmissionless smart contract blockchain designed to incentivize the deployments of dApps.]]></string>
<string name="str_front_guide_msg_sei"><![CDATA[Sei is a Cosmos SDK-based layer 1 blockchain network designed for speed, security and scalability.]]></string>
<string name="str_front_guide_msg_terra"><![CDATA[Terra is a Cosmos SDK-based permissionless blockchain network hard forked from Terra Classic network.]]></string>
<string name="str_front_guide_msg_humans"><![CDATA[Humans.ai is a decentralized AI ecosystem designed to incentivize the creation of AI algorithms and models.]]></string>
<string name="str_front_guide_msg_dydx"><![CDATA[dYdX is a standalone Cosmos appchain designed for a decentralized exchange that supports zero-fee perpetual trading.]]></string>
<string name="str_front_guide_msg_celestia"><![CDATA[A modular consensus and data network that enables seamless, scalable Web3 application deployment.]]></string>
<string name="str_front_guide_msg_mintstation" translatable="false"><![CDATA[MintStation-Testnet]]></string>
Expand Down

0 comments on commit 99b7bf7

Please sign in to comment.