-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...main/java/com/tangem/blockchain/blockchains/ethereum/providers/CanxiumProvidersBuilder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.tangem.blockchain.blockchains.ethereum.providers | ||
|
||
import com.tangem.blockchain.blockchains.ethereum.network.EthereumJsonRpcProvider | ||
import com.tangem.blockchain.common.Blockchain | ||
import com.tangem.blockchain.common.network.providers.OnlyPublicProvidersBuilder | ||
import com.tangem.blockchain.common.network.providers.ProviderType | ||
|
||
internal class CanxiumProvidersBuilder( | ||
override val providerTypes: List<ProviderType>, | ||
) : OnlyPublicProvidersBuilder<EthereumJsonRpcProvider>( | ||
providerTypes = providerTypes, | ||
) { | ||
override fun createProvider(url: String, blockchain: Blockchain) = EthereumJsonRpcProvider(url) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
.../java/com/tangem/blockchain/externallinkprovider/providers/CanxiumExternalLinkProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.tangem.blockchain.externallinkprovider.providers | ||
|
||
import com.tangem.blockchain.externallinkprovider.ExternalLinkProvider | ||
import com.tangem.blockchain.externallinkprovider.TxExploreState | ||
|
||
internal class CanxiumExternalLinkProvider : ExternalLinkProvider { | ||
|
||
override val explorerBaseUrl: String = "https://scan.canxium.org/" | ||
|
||
override fun explorerUrl(walletAddress: String, contractAddress: String?): String { | ||
return "${explorerBaseUrl}address/$walletAddress" | ||
} | ||
|
||
override fun getExplorerTxUrl(transactionHash: String): TxExploreState { | ||
return TxExploreState.Url("${explorerBaseUrl}tx/$transactionHash") | ||
} | ||
} |