-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add abstract-eth classes #3978
add abstract-eth classes #3978
Conversation
8808fee
to
83ea644
Compare
import { TransactionBuilder as EthTransactionBuilder, TransactionPrebuild } from '@bitgo/sdk-coin-eth'; | ||
|
||
export type CoinNames = { | ||
[network: string]: string; | ||
}; | ||
|
||
export class EthLikeToken extends AbstractEthLikeCoin { | ||
export class EthLikeToken extends AbstractEthLikeTssCoin { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would need an EthLikeTokenTss? will this mean all the token implementation even for multisig will have tss enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on above comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added EthLikeMPCToken class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using ECDSA in the class name is more descriptive than using EthLike
imo, and do these changes need to be extended to polygon
as well?
import { MPCAlgorithm } from '@bitgo/sdk-core'; | ||
import { AbstractEthLikeCoin } from './abstractEthLikeCoin'; | ||
|
||
export abstract class AbstractEthLikeTssCoin extends AbstractEthLikeCoin { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export abstract class AbstractEthLikeTssCoin extends AbstractEthLikeCoin { | |
export abstract class AbstractEcdsaCoin extends AbstractEthLikeCoin { |
import { TransactionBuilder as EthTransactionBuilder, TransactionPrebuild } from '@bitgo/sdk-coin-eth'; | ||
|
||
export type CoinNames = { | ||
[network: string]: string; | ||
}; | ||
|
||
export class EthLikeToken extends AbstractEthLikeCoin { | ||
export class EthLikeToken extends AbstractEthLikeTssCoin { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on above comment
Actually this class will be specific to EthLike coins i.e. EVM compatible coins only like arbitrum, optimism, etc. Using ECDSA in the name will give an impression that it is generic because there can be other ecdsa coins as well like cosmos, hence the name. We are mainly adding this class so all the common methods which are required for the upcoming EVM compatible chains will reside here. Polygon supports both multisig and TSS wallets, so the Polygon class has many methods which are specific to multisig implementation and it is currently extending Eth class. So we won't be able to extend this to Polygon. |
b27345b
to
eb99545
Compare
This PR adds AbstractEthLikeMPCCoin and EthLikeMPCToken classes which will have all the common methods used by Ethlike MPC coins