Skip to content
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

Open
wants to merge 35 commits into
base: master
Choose a base branch
from

Conversation

sander2
Copy link
Member

@sander2 sander2 commented Jan 30, 2023

Todo:

  • relay chain setup
  • amm curve pools
  • add interlay support (future pr)
  • (optional) some cleanup

Copy link
Contributor

@bvotteler bvotteler left a 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)?

[{ Token: "KBTC" }, { ForeignAsset: 2 }, 20_000], // movr
[{ Token: "KINT" }, { ForeignAsset: 2 }, 35_000], // movr
];
const basicPoolSetup = pools.map(([token1, token2, reward]) => {
Copy link
Contributor

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.

@sander2
Copy link
Member Author

sander2 commented Jan 30, 2023

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)?

Good point, I think I'll leave testnet-interlay for a future pr

scripts/init-testnet.ts Outdated Show resolved Hide resolved
@sander2 sander2 force-pushed the chore/testnet-init-script branch from 830f310 to e1aaa5b Compare January 31, 2023 15:17
@gregdhill gregdhill force-pushed the chore/testnet-init-script branch from 10cff71 to c05843a Compare January 31, 2023 15:25
@sander2 sander2 force-pushed the chore/testnet-init-script branch from 34bfe03 to 7d2fb48 Compare February 3, 2023 18:03
@sander2 sander2 changed the base branch from master to wip-feat-amm February 3, 2023 18:04
metaPoolId,
[
"10_000_000_000_000", // 10 KSM
Copy link
Member Author

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

{ Token: "KSM" },
{ Token: "KBTC" },
Copy link
Member Author

@sander2 sander2 Feb 8, 2023

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 updateRewardSchedule, but also createPair and addLiquidity. Won't that create a problem? edit: looks like createPair and addLiquidity do sorting automatically. The first question is still open though

Copy link
Member

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

Base automatically changed from wip-feat-amm to master March 13, 2023 14:01
@sander2 sander2 force-pushed the chore/testnet-init-script branch from cf927a3 to 28b69fa Compare June 7, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants