-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bring in some override token logic so we can get token info fro…
…m tokens which handle bytes over strings on name decimals etc etc
- Loading branch information
1 parent
378ac48
commit 3c4365b
Showing
14 changed files
with
141 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ChainId } from '../../../enums/chain-id'; | ||
import { Token } from '../../../factories/token/models/token'; | ||
|
||
/** | ||
* DFORCE token contract | ||
*/ | ||
export class DFORCE { | ||
public static MAINNET(): Token { | ||
return { | ||
chainId: ChainId.MAINNET, | ||
contractAddress: '0x431ad2ff6a9C365805eBaD47Ee021148d6f7DBe0', | ||
decimals: 18, | ||
symbol: 'DF', | ||
name: 'dForce token', | ||
}; | ||
} | ||
} |
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,12 @@ | ||
import { Token } from '../../../factories/token/models/token'; | ||
import { DFORCE } from './dForce'; | ||
import { MAI } from './mkr'; | ||
|
||
const _tokenOverrideInfo: Token[] = [DFORCE.MAINNET(), MAI.MAINNET()]; | ||
|
||
export const isTokenOverrideInfo = (contractAddress: string) => { | ||
return _tokenOverrideInfo.find( | ||
(info) => | ||
info.contractAddress.toLowerCase() === contractAddress.toLowerCase() | ||
); | ||
}; |
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,17 @@ | ||
import { ChainId } from '../../../enums/chain-id'; | ||
import { Token } from '../../../factories/token/models/token'; | ||
|
||
/** | ||
* MAI token contract | ||
*/ | ||
export class MAI { | ||
public static MAINNET(): Token { | ||
return { | ||
chainId: ChainId.MAINNET, | ||
contractAddress: '0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2', | ||
decimals: 18, | ||
symbol: 'MAI', | ||
name: 'MAI token', | ||
}; | ||
} | ||
} |
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
Oops, something went wrong.