Skip to content

Commit 6676ff0

Browse files
authored
Merge pull request #696 from balancer/add-plasma-support
add-plasma-support
2 parents 674f720 + 5d22996 commit 6676ff0

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/services/etherscanApi.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Address, Hex, Chain } from 'viem'
22
import { TransactionData, GetContractSourceCodeResponse } from '../types/types'
33
import { avalanche } from 'viem/chains'
4-
import { plasma } from '../utils/customChains'
54
import { ChainApi } from '../types/types'
65

6+
77
/**
88
* EtherscanApi class to interact with Etherscan API
99
* It uses the Etherscan API 2.0
@@ -20,9 +20,6 @@ class EtherscanApi implements ChainApi {
2020

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

@@ -57,6 +54,7 @@ class EtherscanApi implements ChainApi {
5754
console.log(`Snowscan fallback failed for address ${address}:`, error)
5855
}
5956
}
57+
6058
return null
6159
}
6260

src/services/hypernativeApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class HypernativeApi {
3232
Polygon: 'polygon',
3333
HyperEVM: 'hyperliquid_evm',
3434
Monad: 'monad',
35+
Plasma: 'plasma',
3536
}
3637

3738
public async createCustomAgentRateDeviation(input: CustomAgentInput): Promise<HypernativeAgent> {

0 commit comments

Comments
 (0)