-
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.
Merge pull request #24 from uniswap-integration/feature/custom-network
Feature/custom network
- Loading branch information
Showing
14 changed files
with
312 additions
and
85 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,15 @@ | ||
import { Provider } from '@ethersproject/providers'; | ||
import { Multicall } from 'ethereum-multicall'; | ||
|
||
export class CustomMulticall extends Multicall { | ||
constructor( | ||
ethersProvider: Provider, | ||
multicallCustomContractAddress?: string | undefined | ||
) { | ||
super({ | ||
ethersProvider, | ||
tryAggregate: true, | ||
multicallCustomContractAddress, | ||
}); | ||
} | ||
} |
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,21 @@ | ||
import { Token } from '../../token/models/token'; | ||
|
||
export interface NativeCurrencyInfo { | ||
name: string; | ||
symbol: string; | ||
} | ||
|
||
export interface CustomNetwork { | ||
nameNetwork: string; | ||
multicallContractAddress: string; | ||
nativeCurrency: NativeCurrencyInfo; | ||
nativeWrappedTokenInfo: Token; | ||
// defined your base tokens here! | ||
baseTokens?: { | ||
usdt?: Token | undefined; | ||
dai?: Token | undefined; | ||
comp?: Token | undefined; | ||
usdc?: Token | undefined; | ||
wbtc?: Token | undefined; | ||
}; | ||
} |
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.