Skip to content

Commit

Permalink
Add support for Fantom chain
Browse files Browse the repository at this point in the history
  • Loading branch information
abdrasulov committed Mar 20, 2023
1 parent 172b90d commit 0ca20ff
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ enum class Chain(
ArbitrumOne(42161, 60, 15, false),
Avalanche(43114, 60, 15, true),
Gnosis(100, 60, 15, true),
Fantom(250, 60, 15, false),
EthereumGoerli(5, 1, 15, true);

val isMainNet = coinType != 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,9 @@ sealed class RpcSource() {
return Http(listOf(URL("https://rpc.gnosischain.com")), null)
}

fun fantomRpcHttp(): Http {
return Http(listOf(URL("https://rpc.fantom.network")), null)
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ class TransactionSource(val name: String, val type: SourceType) {
)
}

fun fantom(apiKey: String): TransactionSource {
return TransactionSource(
"ftmscan.com",
SourceType.Etherscan("https://api.ftmscan.com", "https://ftmscan.com", apiKey)
)
}

}

}

0 comments on commit 0ca20ff

Please sign in to comment.