-
Notifications
You must be signed in to change notification settings - Fork 20
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
chore: add testnet initialization script #554
base: master
Are you sure you want to change the base?
Conversation
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.
LGTM
Just one question: Are we okay with all constructed markets pointing to kusama/kintsugi related currencies like KSM, KBTC, and KINT even if this is called with with-defaults-of="testnet-interlay"
(or parachain-endpoint
of interlay testnet)?
scripts/init-testnet.ts
Outdated
[{ Token: "KBTC" }, { ForeignAsset: 2 }, 20_000], // movr | ||
[{ Token: "KINT" }, { ForeignAsset: 2 }, 35_000], // movr | ||
]; | ||
const basicPoolSetup = pools.map(([token1, token2, reward]) => { |
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.
You may need to explicitly indicate types for the tuple so TS knows which types to expect.
IIRC, it will think it could be any of the tuple's internal types, ie. treating the input as array of mixed types rather than a tuple.
Good point, I think I'll leave testnet-interlay for a future pr |
830f310
to
e1aaa5b
Compare
10cff71
to
c05843a
Compare
34bfe03
to
7d2fb48
Compare
scripts/init-testnet.ts
Outdated
metaPoolId, | ||
[ | ||
"10_000_000_000_000", // 10 KSM |
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.
"10_000_000_000_000"
gets interpreted as 140004000400040000
scripts/init-testnet.ts
Outdated
{ Token: "KSM" }, | ||
{ Token: "KBTC" }, |
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.
Are you sure this is the only one that need to change? Also, this not only impacts edit: looks like updateRewardSchedule
, but also createPair
and addLiquidity
. Won't that create a problem?createPair
and addLiquidity
do sorting automatically. The first question is still open though
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.
Yes the index of the Token
variant will come before ForeignAsset
Signed-off-by: Gregory Hill <[email protected]>
Signed-off-by: Gregory Hill <[email protected]>
Signed-off-by: Gregory Hill <[email protected]>
Signed-off-by: Gregory Hill <[email protected]>
Signed-off-by: Gregory Hill <[email protected]>
cf927a3
to
28b69fa
Compare
Signed-off-by: Gregory Hill <[email protected]>
Signed-off-by: Gregory Hill <[email protected]>
Todo: