Skip to content
Merged
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
6 changes: 2 additions & 4 deletions src/services/etherscanApi.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Address, Hex, Chain } from 'viem'
import { TransactionData, GetContractSourceCodeResponse } from '../types/types'
import { avalanche } from 'viem/chains'
import { plasma } from '../utils/customChains'
import { ChainApi } from '../types/types'


/**
* EtherscanApi class to interact with Etherscan API
* It uses the Etherscan API 2.0
Expand All @@ -20,9 +20,6 @@ class EtherscanApi implements ChainApi {

private getApiUrl(): string {
// TODO: Validate chain is supported by EtherscanAPI.
if (this.chain.id === plasma.id) {
return plasma.blockExplorers.default.apiUrl
}
return `https://api.etherscan.io/v2/api?chainid=${this.chain.id}&`
}

Expand Down Expand Up @@ -57,6 +54,7 @@ class EtherscanApi implements ChainApi {
console.log(`Snowscan fallback failed for address ${address}:`, error)
}
}

return null
}

Expand Down
1 change: 1 addition & 0 deletions src/services/hypernativeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class HypernativeApi {
Polygon: 'polygon',
HyperEVM: 'hyperliquid_evm',
Monad: 'monad',
Plasma: 'plasma',
}

public async createCustomAgentRateDeviation(input: CustomAgentInput): Promise<HypernativeAgent> {
Expand Down
Loading