-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(abstract-eth): add chain id as network identifier
- Loading branch information
1 parent
fbde1c3
commit f21c4d0
Showing
10 changed files
with
154 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,24 @@ | ||
export { TransferBuilder } from '@bitgo/sdk-coin-eth'; | ||
import { TransferBuilder as EthTransferBuilder } from '@bitgo/sdk-coin-eth'; | ||
|
||
/** CELO transfer builder */ | ||
export class TransferBuilder extends EthTransferBuilder { | ||
/** | ||
* Get the prefix used in generating an operation hash for sending tokens | ||
* See https://github.com/BitGo/eth-multisig-v2/blob/master/contracts/coins/CeloWalletSimple.sol | ||
* | ||
* @returns the string prefix | ||
*/ | ||
protected getTokenOperationHashPrefix(): string { | ||
return 'CELO-ERC20'; | ||
} | ||
|
||
/** | ||
* Get the prefix used in generating an operation hash for sending native coins | ||
* See https://github.com/BitGo/eth-multisig-v2/blob/master/contracts/coins/CeloWalletSimple.sol | ||
* | ||
* @returns the string prefix | ||
*/ | ||
protected getNativeOperationHashPrefix(): string { | ||
return 'CELO'; | ||
} | ||
} |
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,24 @@ | ||
export { TransferBuilder } from '@bitgo/abstract-eth'; | ||
import { TransferBuilder as EthTransferBuilder } from '@bitgo/sdk-coin-eth'; | ||
|
||
/** ETC transfer builder */ | ||
export class TransferBuilder extends EthTransferBuilder { | ||
/** | ||
* Get the prefix used in generating an operation hash for sending tokens | ||
* See https://github.com/BitGo/eth-multisig-v2/blob/master/contracts/coins/EtcWalletSimple.sol | ||
* | ||
* @returns the string prefix | ||
*/ | ||
protected getTokenOperationHashPrefix(): string { | ||
return 'ETC-ERC20'; | ||
} | ||
|
||
/** | ||
* Get the prefix used in generating an operation hash for sending native coins | ||
* See https://github.com/BitGo/eth-multisig-v2/blob/master/contracts/coins/EtcWalletSimple.sol | ||
* | ||
* @returns the string prefix | ||
*/ | ||
protected getNativeOperationHashPrefix(): string { | ||
return 'ETC'; | ||
} | ||
} |
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 +1,22 @@ | ||
export { TransferBuilder } from '@bitgo/abstract-eth'; | ||
import { TransferBuilder as EthTransferBuilder } from '@bitgo/abstract-eth'; | ||
|
||
/** ETH transfer builder */ | ||
export class TransferBuilder extends EthTransferBuilder { | ||
/** | ||
* Get the prefix used in generating an operation hash for sending tokens | ||
* | ||
* @returns the string prefix | ||
*/ | ||
protected getTokenOperationHashPrefix(): string { | ||
return 'ERC20'; | ||
} | ||
|
||
/** | ||
* Get the prefix used in generating an operation hash for sending native coins | ||
* | ||
* @returns the string prefix | ||
*/ | ||
protected getNativeOperationHashPrefix(): string { | ||
return 'ETHER'; | ||
} | ||
} |
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,24 @@ | ||
export { TransferBuilder } from '@bitgo/abstract-eth'; | ||
import { TransferBuilder as EthTransferBuilder } from '@bitgo/abstract-eth'; | ||
|
||
/** POLYGON transfer builder */ | ||
export class TransferBuilder extends EthTransferBuilder { | ||
/** | ||
* Get the prefix used in generating an operation hash for sending tokens | ||
* See https://github.com/BitGo/eth-multisig-v4/blob/master/contracts/coins/PolygonWalletSimple.sol | ||
* | ||
* @returns the string prefix | ||
*/ | ||
protected getTokenOperationHashPrefix(): string { | ||
return 'POLYGON-ERC20'; | ||
} | ||
|
||
/** | ||
* Get the prefix used in generating an operation hash for sending native coins | ||
* See https://github.com/BitGo/eth-multisig-v4/blob/master/contracts/coins/PolygonWalletSimple.sol | ||
* | ||
* @returns the string prefix | ||
*/ | ||
protected getNativeOperationHashPrefix(): string { | ||
return 'POLYGON'; | ||
} | ||
} |
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 +1,24 @@ | ||
export { TransferBuilder } from '@bitgo/sdk-coin-eth'; | ||
import { TransferBuilder as EthTransferBuilder } from '@bitgo/sdk-coin-eth'; | ||
|
||
/** RBTC transfer builder */ | ||
export class TransferBuilder extends EthTransferBuilder { | ||
/** | ||
* Get the prefix used in generating an operation hash for sending tokens | ||
* See https://github.com/BitGo/eth-multisig-v2/blob/master/contracts/coins/RskWalletSimple.sol | ||
* | ||
* @returns the string prefix | ||
*/ | ||
protected getTokenOperationHashPrefix(): string { | ||
return 'RSK-ERC20'; | ||
} | ||
|
||
/** | ||
* Get the prefix used in generating an operation hash for sending native coins | ||
* See https://github.com/BitGo/eth-multisig-v2/blob/master/contracts/coins/RskWalletSimple.sol | ||
* | ||
* @returns the string prefix | ||
*/ | ||
protected getNativeOperationHashPrefix(): string { | ||
return 'RSK'; | ||
} | ||
} |
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