diff --git a/src/bridges.ts b/src/bridges.ts index 8b9fa06f..71d7477c 100644 --- a/src/bridges.ts +++ b/src/bridges.ts @@ -35,4 +35,13 @@ export const SQUID: Bridge = { fee: 0 } -export const BRIDGES: Bridge[] = [LIFI, SQUID] +export const HASHPORT: Bridge = { + id: 'hashport', + name: 'Hashport', + logo: 'https://raw.githubusercontent.com/pangolindex/sdk/master/src/images/bridges/hashport.png', + aggregator_address: '', + affiliate: '', + fee: 0 +} + +export const BRIDGES: Bridge[] = [LIFI, SQUID, HASHPORT] diff --git a/src/chains.ts b/src/chains.ts index 1ef61cd6..2538dc4c 100644 --- a/src/chains.ts +++ b/src/chains.ts @@ -74,7 +74,8 @@ interface ChefContract { export enum NetworkType { EVM = 'EVM', - COSMOS = 'COSMOS' + COSMOS = 'COSMOS', + HEDERA = "HEDERA", } export interface BridgeChain extends Omit { @@ -1162,6 +1163,58 @@ export const HEDERA_TESTNET: Chain = { blockExplorerUrls: ['https://ledger-testnet.hashlog.io'] } +export const HEDERA_MAINNET: Chain = { + id: 'hedera_mainnet', + chain_id: 295, // Hedera acutally doesn't have this concept. So this is our naming convention for non EVM chains without Chain IDs + name: 'Hedera', + symbol: `HBAR`, + mainnet: true, + evm: true, + pangolin_is_live: false, + tracked_by_debank: false, + supported_by_gelato: false, + rpc_uri: 'https://hcs.testnet.mirrornode.hedera.com:5600', + png_symbol: 'PBAR', + logo: 'https://app.hashport.network/assets/HederaNetwork.7978e94a.svg', + contracts: { + png: '0x0000000000000000000000000000000002Db0600', // 0.0.47908352 + factory: '0x0000000000000000000000000000000002eb241c', // 0.0.48964636 + router: '0x0000000000000000000000000000000002eb265a', // 0.0.48965210 + wrapped_native_token: '0x0000000000000000000000000000000002DfA5b2', // 0.0.48211378 + local_multisig: '', + community_treasury: '', + treasury_vester: '0x0000000000000000000000000000000002db05ff', //0.0.47908351 + mini_chef: { + address: '0x0000000000000000000000000000000002eb26e3', // 0.0.48965347 + active: true, + type: ChefType.PANGO_CHEF + }, + airdrop: { + address: '', + active: false, + type: AirdropType.NEAR_AIRDROP + }, + staking: [ + { + address: '0x0000000000000000000000000000000002ec28c3', // 0.0.49031363 + active: true, + reward_token: '0x0000000000000000000000000000000002Db0600', // 0.0.47908352 + type: StakingType.SAR_POSITIONS + } + ], + timelock: '', + governor: '', + migrator: '', + multicall: '0x0000000000000000000000000000000002E803bB' + }, + nativeCurrency: { + name: 'Hbar', + symbol: 'HBAR', + decimals: 8 + }, + blockExplorerUrls: ['https://ledger-testnet.hashlog.io'] +} + export const OEC_MAINNET: Chain = { id: 'oec_mainnet', chain_id: 66, @@ -1860,6 +1913,7 @@ export const ALL_CHAINS: Chain[] = [ COSTON_TESTNET, WAGMI_FUJI_SUBNET, HEDERA_TESTNET, + HEDERA_MAINNET, ETHEREUM_MAINNET, BSC_MAINNET, POLYGON_MAINNET, diff --git a/src/entities/bridgeCurrency.ts b/src/entities/bridgeCurrency.ts index 04d235f4..7c0d0cd7 100644 --- a/src/entities/bridgeCurrency.ts +++ b/src/entities/bridgeCurrency.ts @@ -8,6 +8,8 @@ export class BridgeCurrency extends Currency { public readonly chainId: string public readonly address: string public readonly logo?: string + public readonly reserveAmount?: string + public bridgeableNetworks?: BridgeCurrency[] /** * Constructs an instance of the base class `Currency`. The only instance of the base class `Currency` is `Currency.ETHER`. @@ -17,6 +19,8 @@ export class BridgeCurrency extends Currency { * @param decimals of the currency * @param symbol of the currency * @param name of the currency + * @param reverseAmount of the currency (Valid only Hashport Bridge) + * @param bridgeableNetworks of the currency (Valid only Hashport Bridge) */ protected constructor( address: string, @@ -24,12 +28,16 @@ export class BridgeCurrency extends Currency { decimals: number, logo?: string, symbol?: string, - name?: string + name?: string, + reverseAmount?: string, + bridgeableNetworks?: BridgeCurrency[], ) { super(decimals, symbol, name) this.address = address this.chainId = chainId this.logo = logo + this.reserveAmount = reverseAmount + this.bridgeableNetworks = bridgeableNetworks } } diff --git a/src/images/bridges/hashport.png b/src/images/bridges/hashport.png new file mode 100644 index 00000000..c22f2a9d Binary files /dev/null and b/src/images/bridges/hashport.png differ