add sepolia testnet (#129)
This commit is contained in:
Submodule emerald-grpc updated: 0e10f0de56...8e814567e1
@@ -11,7 +11,8 @@ enum class BlockchainType {
|
|||||||
chain == Chain.OPTIMISM ||
|
chain == Chain.OPTIMISM ||
|
||||||
chain == Chain.BSC ||
|
chain == Chain.BSC ||
|
||||||
chain == Chain.TESTNET_GOERLI ||
|
chain == Chain.TESTNET_GOERLI ||
|
||||||
chain == Chain.ETHEREUM
|
chain == Chain.ETHEREUM ||
|
||||||
|
chain == Chain.TESTNET_SEPOLIA
|
||||||
) {
|
) {
|
||||||
return EVM_POS
|
return EVM_POS
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ enum class Chain(val id: Int, val chainCode: String, val chainName: String) {
|
|||||||
"ROPSTEN",
|
"ROPSTEN",
|
||||||
"Ropsten Testnet"
|
"Ropsten Testnet"
|
||||||
),
|
),
|
||||||
TESTNET_RINKEBY(10007, "RINKEBY", "Rinkeby Testnet");
|
TESTNET_RINKEBY(10007, "RINKEBY", "Rinkeby Testnet"),
|
||||||
|
TESTNET_SEPOLIA(10008, "SEPOLIA", "Sepolia Testnet");
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun byId(id: Int): Chain {
|
fun byId(id: Int): Chain {
|
||||||
|
|||||||
@@ -64,7 +64,9 @@ class Global {
|
|||||||
"ropsten" to Chain.TESTNET_ROPSTEN,
|
"ropsten" to Chain.TESTNET_ROPSTEN,
|
||||||
"ropsten-testnet" to Chain.TESTNET_ROPSTEN,
|
"ropsten-testnet" to Chain.TESTNET_ROPSTEN,
|
||||||
"bitcoin" to Chain.BITCOIN,
|
"bitcoin" to Chain.BITCOIN,
|
||||||
"bitcoin-testnet" to Chain.TESTNET_BITCOIN
|
"bitcoin-testnet" to Chain.TESTNET_BITCOIN,
|
||||||
|
"sepolia" to Chain.TESTNET_SEPOLIA,
|
||||||
|
"sepolia-testnet" to Chain.TESTNET_SEPOLIA,
|
||||||
)
|
)
|
||||||
|
|
||||||
fun chainById(id: String?): Chain {
|
fun chainById(id: String?): Chain {
|
||||||
|
|||||||
@@ -225,6 +225,10 @@ class DefaultEthereumMethods(
|
|||||||
"\"5\""
|
"\"5\""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Chain.TESTNET_SEPOLIA == chain -> {
|
||||||
|
"\"11155111\""
|
||||||
|
}
|
||||||
|
|
||||||
else -> throw RpcException(-32602, "Invalid chain")
|
else -> throw RpcException(-32602, "Invalid chain")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -263,6 +267,10 @@ class DefaultEthereumMethods(
|
|||||||
"\"0x5\""
|
"\"0x5\""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Chain.TESTNET_SEPOLIA == chain -> {
|
||||||
|
"\"0xaa36a7\""
|
||||||
|
}
|
||||||
|
|
||||||
else -> throw RpcException(-32602, "Invalid chain")
|
else -> throw RpcException(-32602, "Invalid chain")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ open class EthereumMultistream(
|
|||||||
private var subscribe = EthereumEgressSubscription(this, NoPendingTxes())
|
private var subscribe = EthereumEgressSubscription(this, NoPendingTxes())
|
||||||
|
|
||||||
private val supportsEIP1559 = when (chain) {
|
private val supportsEIP1559 = when (chain) {
|
||||||
Chain.ETHEREUM, Chain.TESTNET_ROPSTEN, Chain.TESTNET_GOERLI, Chain.TESTNET_RINKEBY -> true
|
Chain.ETHEREUM, Chain.TESTNET_ROPSTEN, Chain.TESTNET_GOERLI, Chain.TESTNET_RINKEBY, Chain.TESTNET_SEPOLIA -> true
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
private val feeEstimation = if (supportsEIP1559) EthereumPriorityFees(this, reader, 256)
|
private val feeEstimation = if (supportsEIP1559) EthereumPriorityFees(this, reader, 256)
|
||||||
|
|||||||
Reference in New Issue
Block a user