-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a base of the ERC20EthereumWeb3AtomexProtocolV1
- Loading branch information
1 parent
38d98bc
commit faa9f3c
Showing
5 changed files
with
72 additions
and
11 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
src/ethereum/atomexProtocol/erc20EthereumWeb3AtomexProtocolV1.ts
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,52 @@ | ||
import type BigNumber from 'bignumber.js'; | ||
|
||
import type { | ||
AtomexProtocolV1, AtomexProtocolV1InitiateParameters, AtomexProtocolV1RedeemParameters, AtomexProtocolV1RefundParameters, | ||
Transaction | ||
} from '../../blockchain/index'; | ||
import type { AtomexNetwork, CurrenciesProvider } from '../../common/index'; | ||
import type { DeepReadonly } from '../../core'; | ||
import type { ERC20EthereumWeb3AtomexProtocolV1Options } from '../models/atomexProtocolOptions'; | ||
|
||
export class ERC20EthereumWeb3AtomexProtocolV1 implements AtomexProtocolV1 { | ||
readonly version = 1; | ||
|
||
constructor( | ||
readonly atomexNetwork: AtomexNetwork, | ||
protected readonly currenciesProvider: CurrenciesProvider, | ||
protected readonly atomexProtocolOptions: DeepReadonly<ERC20EthereumWeb3AtomexProtocolV1Options> | ||
) { | ||
} | ||
|
||
get currencyId() { | ||
return this.atomexProtocolOptions.currencyId; | ||
} | ||
|
||
initiate(_params: AtomexProtocolV1InitiateParameters): Promise<Transaction> { | ||
throw new Error('Method not implemented.'); | ||
} | ||
|
||
getEstimatedInitiateFees(_params: Partial<AtomexProtocolV1InitiateParameters>): Promise<BigNumber> { | ||
throw new Error('Method not implemented.'); | ||
} | ||
|
||
redeem(_params: AtomexProtocolV1RedeemParameters): Promise<Transaction> { | ||
throw new Error('Method not implemented.'); | ||
} | ||
|
||
getRedeemReward(_nativeTokenPriceInUsd: number, _nativeTokenPriceInCurrency: number): Promise<BigNumber> { | ||
throw new Error('Method not implemented.'); | ||
} | ||
|
||
getEstimatedRedeemFees(_params: Partial<AtomexProtocolV1InitiateParameters>): Promise<BigNumber> { | ||
throw new Error('Method not implemented.'); | ||
} | ||
|
||
refund(_params: AtomexProtocolV1RefundParameters): Promise<Transaction> { | ||
throw new Error('Method not implemented.'); | ||
} | ||
|
||
getEstimatedRefundFees(_params: Partial<AtomexProtocolV1InitiateParameters>): Promise<BigNumber> { | ||
throw new Error('Method not implemented.'); | ||
} | ||
} |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export { EthereumWeb3AtomexProtocolV1 } from './ethereumWeb3AtomexProtocolV1'; | ||
export { ERC20EthereumWeb3AtomexProtocolV1 } from './erc20EthereumWeb3AtomexProtocolV1'; |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export { EthereumWeb3AtomexProtocolV1 } from './atomexProtocol/index'; | ||
export { EthereumWeb3AtomexProtocolV1, ERC20EthereumWeb3AtomexProtocolV1 } from './atomexProtocol/index'; | ||
export { EthereumBalancesProvider } from './balancesProviders/index'; | ||
export { EthereumSwapTransactionsProvider } from './swapTransactionsProviders/index'; | ||
export { ethereumMainnetCurrencies, ethereumTestnetCurrencies, createDefaultEthereumBlockchainOptions } from './config/index'; |
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