-
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
1 parent
b8314dd
commit 33844ee
Showing
12 changed files
with
67 additions
and
0 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
23 changes: 23 additions & 0 deletions
23
...n/java/com/tangem/blockchain/blockchains/ethereum/providers/VanarChainProvidersBuilder.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,23 @@ | ||
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.NetworkProvidersBuilder | ||
import com.tangem.blockchain.common.network.providers.ProviderType | ||
|
||
internal class VanarChainProvidersBuilder( | ||
override val providerTypes: List<ProviderType>, | ||
) : NetworkProvidersBuilder<EthereumJsonRpcProvider>() { | ||
|
||
override fun createProviders(blockchain: Blockchain): List<EthereumJsonRpcProvider> { | ||
return listOf( | ||
EthereumJsonRpcProvider("https://rpc.vanarchain.com"), // FIXME: use config during full integration | ||
) | ||
} | ||
|
||
override fun createTestnetProviders(blockchain: Blockchain): List<EthereumJsonRpcProvider> { | ||
return listOf( | ||
EthereumJsonRpcProvider("https://rpc-vanguard.vanarchain.com"), | ||
) | ||
} | ||
} |
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
23 changes: 23 additions & 0 deletions
23
...va/com/tangem/blockchain/externallinkprovider/providers/VanarChainExternalLinkProvider.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,23 @@ | ||
package com.tangem.blockchain.externallinkprovider.providers | ||
|
||
import com.tangem.blockchain.externallinkprovider.ExternalLinkProvider | ||
import com.tangem.blockchain.externallinkprovider.TxExploreState | ||
|
||
internal class VanarChainExternalLinkProvider(isTestnet: Boolean) : ExternalLinkProvider { | ||
|
||
override val explorerBaseUrl: String = if (isTestnet) { | ||
"https://explorer-vanguard.vanarchain.com/" | ||
} else { | ||
"https://explorer.vanarchain.com/" | ||
} | ||
|
||
override val testNetTopUpUrl: String = "https://faucet.vanarchain.com/" | ||
|
||
override fun explorerUrl(walletAddress: String, contractAddress: String?): String { | ||
return "${explorerBaseUrl}address/$walletAddress" | ||
} | ||
|
||
override fun getExplorerTxUrl(transactionHash: String): TxExploreState { | ||
return TxExploreState.Url("${explorerBaseUrl}tx/$transactionHash") | ||
} | ||
} |