Skip to content

Commit baa633a

Browse files
πŸ”„ synced file(s) with circlefin/modularwallets-android-sdk-dev (#10)
synced local file(s) with [circlefin/modularwallets-android-sdk-dev](https://github.com/circlefin/modularwallets-android-sdk-dev). <details> <summary>Changed files</summary> <ul> <li>synced local directory <code>lib/</code> with remote directory <code>lib/</code></li><li>synced local <code>lib/build.gradle.kts</code> with remote <code>lib/build.gradle.kts.public</code></li> </ul> </details> --- This PR was created automatically by the [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) workflow run [#16491412077](https://github.com/circlefin/modularwallets-android-sdk-dev/actions/runs/16491412077)
1 parent 2adbb4e commit baa633a

File tree

5 files changed

+67
-11
lines changed

5 files changed

+67
-11
lines changed

β€Žlib/build.gradle.ktsβ€Ž

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,28 @@ fun buildNum(): Int {
4747
}
4848
}
4949

50-
fun majorNumber(): Int {
51-
return if (project.hasProperty("MAJOR_NUMBER")) {
52-
project.property("MAJOR_NUMBER").toString().toInt()
50+
fun versionTag(): String {
51+
return if (project.hasProperty("VERSION_TAG")) {
52+
project.property("VERSION_TAG").toString()
5353
} else {
54-
extra["versionMajor"] as Int
54+
"0.0.0"
5555
}
5656
}
5757

58-
fun isInternalBuild(): Boolean {
59-
return majorNumber() == 0
60-
58+
fun isPublicRelease(): Boolean {
59+
return if (project.hasProperty("IS_PUBLIC_RELEASE")) {
60+
project.property("IS_PUBLIC_RELEASE").toString().toBoolean()
61+
} else {
62+
false
63+
}
6164
}
6265

6366
fun apiVersion(): String {
64-
return if (isInternalBuild()) {
65-
"${majorNumber()}.${extra["versionMedium"]}.${extra["versionMinorPublished"]}-${buildNum()}" // internal build's buildNum is action build number
67+
val tag = versionTag().removePrefix("v") // Remove "v" prefix for Maven compatibility
68+
return if (isPublicRelease()) {
69+
tag // Public release: use tag version directly (e.g., "1.3.1")
6670
} else {
67-
"${majorNumber()}.${extra["versionMedium"]}.${buildNum()}" // release build's buildNum is extracted from the git tag
71+
"${tag}-${buildNum()}" // Internal build: tag + build number (e.g., "1.3.1-35")
6872
}
6973
}
7074

@@ -109,7 +113,7 @@ android {
109113
minSdk = 28
110114
version = libraryVersion()
111115
buildConfigField("String", "version", "\"${version}\"")
112-
buildConfigField("boolean", "INTERNAL_BUILD", "${isInternalBuild()}")
116+
buildConfigField("boolean", "INTERNAL_BUILD", "${!isPublicRelease()}")
113117
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
114118
testInstrumentationRunnerArguments += mapOf(
115119
"notPackage" to "com.circle.modularwallets.core.manual"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright 2025 Circle Internet Group, Inc. All rights reserved.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at.
9+
*
10+
* Http://www.apache.org/licenses/LICENSE-2.0.
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
package com.circle.modularwallets.core.chains
20+
21+
object Avalanche : Chain() {
22+
override val chainId: Long
23+
get() = 43_114
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright 2025 Circle Internet Group, Inc. All rights reserved.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at.
9+
*
10+
* Http://www.apache.org/licenses/LICENSE-2.0.
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
package com.circle.modularwallets.core.chains
20+
21+
object AvalancheFuji : Chain() {
22+
override val chainId: Long
23+
get() = 43_113
24+
}

β€Žlib/src/main/java/com/circle/modularwallets/core/constants/AbiConstants.ktβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ internal val CONTRACT_ADDRESS: Map<String, String> = mapOf(
2727
Token.Arbitrum_USDC.name to "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
2828
Token.Arbitrum_ARB.name to "0x912CE59144191C1204E64559FE8253a0e49E6548",
2929
Token.ArbitrumSepolia_USDC.name to "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
30+
Token.Avalanche_USDC.name to "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
31+
Token.AvalancheFuji_USDC.name to "0x5425890298aed601595a70AB815c96711a31Bc65",
3032
Token.Base_USDC.name to "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
3133
Token.BaseSepolia_USDC.name to "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
3234
Token.Optimism_USDC.name to "0x0b2c639c533813f4aa9d7837caf62653d097ff85",

β€Žlib/src/main/java/com/circle/modularwallets/core/models/Token.ktβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ enum class Token {
2727
Arbitrum_USDC,
2828
Arbitrum_ARB,
2929
ArbitrumSepolia_USDC,
30+
Avalanche_USDC,
31+
AvalancheFuji_USDC,
3032
Base_USDC,
3133
BaseSepolia_USDC,
3234
Optimism_USDC,

0 commit comments

Comments
Β (0)