-
Notifications
You must be signed in to change notification settings - Fork 11
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
test: add liquid assets script to test network #312
Conversation
const createLiquidityPoolCall = (api: ApiPromise) => { | ||
// For now, we have to override the types of the Assets until PJS is updated | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
return api.tx.assetConversion.createPool(<any>native, <any>asset); |
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 is totally fine with me. I double checked the ts compilter issue happening with PJs and this is the right approach.
const addLiquidityCall = (api: ApiPromise, amountNative: number, amountAsset: number, to: KeyringPair) => { | ||
// For now, we have to override the types of the Assets until PJS is updated | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
return api.tx.assetConversion.addLiquidity(<any>native, <any>asset, amountNative, amountAsset, 0, 0, to.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.
Same with this, totally fine.
I think this should be totally fine, not much we can do. That being said if we can still create the liquid pool assets thats a step forward. In this case though we just can't transfer them to Trappist if I understand this correctly? |
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.
Overall, amazing script. LGTM!
Correct, right now there's no way to send the LP tokens to Trappist, but we create them just fine and we can even send them between accounts, so that's ok. |
Okay I think that's perfect then and the script does exactly what it intends on doing. Feel free to merge it in, whenever your'e ready |
Two questions I have regarding this:
<any>
when dealing with theasset-conversion-pallet
, because the types it expects come from thesubstrate-node
implementation and are incompatible with theKusama Asset Hub
implementation, but due to this I have to disableeslint
for those two lines.asset-conversion
so all the process runs on KAH, wondering how we feel about that.Edit: Issue to add asset-conversion to trappist.
Edit 2: Types on PJS that are used on Asset Conversion