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

fix: adapting scripts to prompt for forking and updating schemas #12

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions cli/wizard/commands/list-squid-token/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ const BASE_REPO_URL =
export async function listSquidToken() {
console.log(chalk.blue("\nGenerating token listing config...\n"));

const didFork = await confirm({
message:
"Are you running this wizard from a forked repository in your own Github organization?",
default: false,
});

if (!didFork) {
console.log(chalk.red("\nPlease fork this repository before continuing\n"));
process.exit(1);
}

const didRegisterViaPortal = await confirm({
message: "Did you register your token via ITS portal?",
default: false,
Expand Down Expand Up @@ -164,7 +175,7 @@ export type InterchainTokenDetailsApiResponse = {
axelarChainId: string;
tokenId: string;
deploymentMessageId: string;
deployer: string;
deployerAddress: string;
remoteTokens: RemoteInterchainTokenApiResponse[];
};

Expand All @@ -173,7 +184,7 @@ function parseAsInterchainTokenConfig(
): InterchainTokenConfig {
return {
tokenId: hash.parse(data.tokenId),
deployer: data.deployer,
deployer: data.deployerAddress,
originalMinter: data.originalMinterAddress,
prettySymbol: data.tokenSymbol,
decimals: data.tokenDecimals,
Expand Down
7 changes: 6 additions & 1 deletion registry/schemas/interchain-tokenlist.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@
"tokenId": { "type": "string", "pattern": "^0x[a-fA-F0-9]{64}$" },
"deployer": { "$ref": "#/definitions/chains/properties/tokenAddress" },
"originalMinter": {
"$ref": "#/definitions/chains/properties/tokenAddress"
"anyOf": [
{
"$ref": "#/definitions/chains/properties/tokenAddress"
},
{ "type": "null" }
]
},
"prettySymbol": { "type": "string" },
"decimals": { "type": "integer" },
Expand Down