-
-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #287 from hummingbot/staging
sync gateway / staging -> master for gateway Hummingbot version 1.25.0
- Loading branch information
Showing
27 changed files
with
4,264 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { ContractsConfig } from '@bancor/carbon-sdk/contracts-api'; | ||
import { MatchType } from '@bancor/carbon-sdk'; | ||
import { AvailableNetworks } from '../../services/config-manager-types'; | ||
import { ConfigManagerV2 } from '../../services/config-manager-v2'; | ||
|
||
export namespace CarbonConfig { | ||
export interface NetworkConfig { | ||
allowedSlippage: string; | ||
gasLimitEstimate: number; | ||
ttl: number; | ||
tradingTypes: Array<string>; | ||
chainType: string; | ||
matchType: MatchType; | ||
availableNetworks: Array<AvailableNetworks>; | ||
carbonContractsConfig: ( | ||
chain: string, | ||
network: string | ||
) => Required<ContractsConfig>; | ||
} | ||
|
||
export const config: NetworkConfig = { | ||
allowedSlippage: ConfigManagerV2.getInstance().get( | ||
`carbon.allowedSlippage` | ||
), | ||
gasLimitEstimate: ConfigManagerV2.getInstance().get( | ||
`carbon.gasLimitEstimate` | ||
), | ||
ttl: ConfigManagerV2.getInstance().get(`carbon.ttl`), | ||
tradingTypes: ['AMM'], | ||
chainType: 'EVM', | ||
matchType: MatchType.Fast, | ||
availableNetworks: [ | ||
{ | ||
chain: 'ethereum', | ||
networks: Object.keys( | ||
ConfigManagerV2.getInstance().get('carbon.contractAddresses.ethereum') | ||
).filter((network) => | ||
Object.keys( | ||
ConfigManagerV2.getInstance().get('ethereum.networks') | ||
).includes(network) | ||
), | ||
}, | ||
], | ||
carbonContractsConfig: (chain: string, network: string) => { | ||
return { | ||
carbonControllerAddress: ConfigManagerV2.getInstance().get( | ||
`carbon.contractAddresses.${chain}.${network}.carbonControllerAddress` | ||
), | ||
multiCallAddress: ConfigManagerV2.getInstance().get( | ||
`carbon.contractAddresses.${chain}.${network}.multiCallAddress` | ||
), | ||
voucherAddress: ConfigManagerV2.getInstance().get( | ||
`carbon.contractAddresses.${chain}.${network}.voucherAddress` | ||
), | ||
}; | ||
}, | ||
}; | ||
} |
Oops, something went wrong.