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

Hashport && Li.Fi Multi-tx && BridgeSwap Tx Storage #100

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
11 changes: 10 additions & 1 deletion src/bridges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]
56 changes: 55 additions & 1 deletion src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ interface ChefContract {

export enum NetworkType {
EVM = 'EVM',
COSMOS = 'COSMOS'
COSMOS = 'COSMOS',
HEDERA = "HEDERA",
}

export interface BridgeChain extends Omit<Chain, 'chain_id'> {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -1860,6 +1913,7 @@ export const ALL_CHAINS: Chain[] = [
COSTON_TESTNET,
WAGMI_FUJI_SUBNET,
HEDERA_TESTNET,
HEDERA_MAINNET,
ETHEREUM_MAINNET,
BSC_MAINNET,
POLYGON_MAINNET,
Expand Down
10 changes: 9 additions & 1 deletion src/entities/bridgeCurrency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -17,19 +19,25 @@ 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,
chainId: string,
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
}
}
Binary file added src/images/bridges/hashport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.