Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add newchain gitshock-finance #261

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ enum class Chain(
Optimism(10, 60, 15, false),
ArbitrumOne(42161, 60, 15, false),
Avalanche(43114, 60, 15, true),
Gitshock(212, 1, 15, true),
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://api.avax.network/ext/bc/C/rpc")), null)
}

fun gitshockRpcHttp(): Http {
return Http(listOf(URL("https://rpc-cartenz.gitshock.com")), null)
}

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

fun gitshockscan(apiKey: String): TransactionSource {
return TransactionSource(
"gitscan.gitshock.com",
SourceType.EtherScan("https://api.scan.gitshock.com", "https://gitscan.gitshock.com", apiKey)
)
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class OneInchKit(
) {

val getRouterAddress: Address = when (evmKit.chain) {
Chain.Ethereum, Chain.BinanceSmartChain, Chain.Polygon, Chain.ArbitrumOne, Chain.Avalanche -> Address("0x1111111254fb6c44bac0bed2854e76f90643097d")
Chain.Ethereum, Chain.BinanceSmartChain, Chain.Polygon, Chain.ArbitrumOne, Chain.Avalanche, Chain.Avalanche, Chain.Gitshock -> Address("0x1111111254fb6c44bac0bed2854e76f90643097d")
Chain.Optimism -> Address("0x1111111254760f7ab3f16433eea9304126dcd199")
Chain.EthereumGoerli -> Address("0x11111112542d85b3ef69ae05771c2dccff4faa26")
else -> throw IllegalArgumentException("Invalid Chain: ${evmKit.chain.id}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class TokenFactory(chain: Chain) {
Chain.Ethereum -> "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
Chain.Optimism -> "0x4200000000000000000000000000000000000006"
Chain.BinanceSmartChain -> "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"
Chain.Gitshock -> "0x9805275fB2f4d75cb1f55ff8ca13541124b7a52B"
Chain.Polygon -> "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"
Chain.Avalanche -> "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7"
Chain.EthereumGoerli -> "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6"
Expand Down