-
Notifications
You must be signed in to change notification settings - Fork 300
feat(statics): added flare p statics #6769
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
Conversation
e057a5f to
92ad8c2
Compare
92ad8c2 to
d74cc3b
Compare
yash-bitgo
left a 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.
looks good
| Networks.test.avalancheP, | ||
| UnderlyingAsset.AVAXP | ||
| ), | ||
| flrp('84749ce6-a3ca-4270-9970-4e21cca026ca', 'flrp', 'Flare P-Chain', Networks.main.flrP, UnderlyingAsset.FLRP), |
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.
do we not need to add new coins to coins.ts ?
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.
I saw they are migrated recently here.
| @@ -1,3 +1,36 @@ | |||
| // FlareNetwork interface for Flare-family chains | |||
| export interface FlareNetwork { | |||
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.
This should extend BaseNetwork.
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.
Covered here: https://github.com/BitGo/BitGoJS/pull/6770/files
| cChainBlockchainID = '2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5'; | ||
| avaxAssetID = ''; // This is not applicable to our chain, so just any string that passes validation will suffice | ||
| networkID = 14; | ||
| hrp = 'flare'; //The Human-Readable Part for Bech32 addresses on the network (e.g., avax for Mainnet). It's the prefix before the 1 in an address. |
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.
update the 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.
Covered here: https://github.com/BitGo/BitGoJS/pull/6770/files
| cChainBlockchainID = 'vE8M98mEQH6wk56sStD1ML8HApTgSqfJZLk9gQ3Fsd4i6m3Bi'; | ||
| avaxAssetID = ''; // This is not applicable to our chain, so just any string that passes validation will suffice | ||
| networkID = 114; | ||
| hrp = 'costwo'; //The Human-Readable Part for Bech32 addresses on the network (e.g., avax for Mainnet). It's the prefix before the 1 in an address. |
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.
update the comment
| forwarderImplementationAddress?: string; | ||
| blockchainID?: string; | ||
| cChainBlockchainID?: string; | ||
| avaxAssetID?: string; |
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.
why do we need this?
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.
Covered here: https://github.com/BitGo/BitGoJS/pull/6770/files
| accountExplorerUrl = 'https://coston2.testnet.flarescan.com/blockchain/pvm/address/'; | ||
| blockchainID = '11111111111111111111111111111111LpoYY'; | ||
| cChainBlockchainID = 'vE8M98mEQH6wk56sStD1ML8HApTgSqfJZLk9gQ3Fsd4i6m3Bi'; | ||
| avaxAssetID = ''; // This is not applicable to our chain, so just any string that passes validation will suffice |
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.
Why not remove this if it's not applicable. We are not using/extending AVAXNetwork, what's forcing us to keep this
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.
Since flarejs is extension of avax I thought of keeping it for now, but have removed it here
https://github.com/BitGo/BitGoJS/pull/6770/files
| family = CoinFamily.FLRP; | ||
| explorerUrl = 'https://coston2.testnet.flarescan.com/blockchain/pvm/transactions'; | ||
| accountExplorerUrl = 'https://coston2.testnet.flarescan.com/blockchain/pvm/address/'; | ||
| blockchainID = '11111111111111111111111111111111LpoYY'; |
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.
Is this same for mainnet and testnet?
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.
These settings I got from foundation
| }); | ||
| } else if (coin.family === CoinFamily.FLRP) { | ||
| it('does not require custody', () => { | ||
| coin.features.includes(CoinFeature.CUSTODY).should.eql(false); |
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.
If we do not plan to support Custody for FlareP chain, we should add this coinFeature to the disallowedFeatures
TICKET: WIN-6328