Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into validate-zippySOL
Browse files Browse the repository at this point in the history
  • Loading branch information
0xSoju2 authored Feb 13, 2024
2 parents 4ab96ec + befe799 commit febf139
Show file tree
Hide file tree
Showing 7 changed files with 3,894 additions and 116 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This could include:
- Attestation from known developers on your validation PR: [Example1](https://github.com/jup-ag/token-list/pull/165), [Example2](https://github.com/jup-ag/token-list/pull/76)
- Support from your community in Jupiter's [#community-validation discord channel](https://discord.gg/jup)

Reminder: Tokens that meet minimum liquidity criteria will always be available for trading on the 'All' list even without immediate validation.
Reminder: Tokens that meet [minimum liquidity criteria](https://station.jup.ag/docs/get-your-token-onto-jup) will always be available for trading on the 'All' list even without immediate validation.

## Projects -- Open a PR to Request Validation:
- Open a PR like this [sample PR](https://github.com/jup-ag/token-list/pull/76) with your addition in the validated-tokens file.
Expand Down
20 changes: 10 additions & 10 deletions pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Validate [SSHIB](https://solscan.io/token/6VHL2vMKgrF1YQFSv29Rs1pj9VCRK29bD11NtDqerqHA)
# Validate [{Token Symbol}](https://solscan.io/token/{mint_address})

## Attestations (Please provide links):
- Tweet from your Twitter Account attesting the Mint address, tagging [@JupiterExchange](https://twitter.com/JupiterExchange) and showing community support: https://x.com/shibonsolana/status/1741126315565261245?s=46
- Coingecko/ CMC URL (If available): https://www.coingecko.com/en/coins/solana-shib / https://coinmarketcap.com/currencies/solana-shib/
- Tweet from your Twitter Account attesting the Mint address, tagging [@JupiterExchange](https://twitter.com/JupiterExchange) and showing community support: https://twitter.com/{your_account}/status/{your_tweet_id}
- Coingecko/ CMC URL (If available): https://www.coingecko.com/en/coins/{id}

## Validation (Please check off boxes):
- [x] The metadata provided in the PR matches what is on-chain (Mandatory)
- [x] Does not duplicate the symbol of another token on Jupiter's strict list (If not, review will be delayed)
- [x] Is Listed on Coingecko / CMC (Optional, but helpful for reviewers)
- [ ] The metadata provided in the PR matches what is on-chain (Mandatory)
- [ ] Does not duplicate the symbol of another token on Jupiter's strict list (If not, review will be delayed)
- [ ] Is Listed on Coingecko / CMC (Optional, but helpful for reviewers)

## Acknowledgement (Please check off boxes)
- [x] My change matches the format in the file (no spaces between fields).
- [x] My token is already live and trading on Jupiter.
- [x] !!! I read the README section on Community-Driven Validation and understand this PR will be only be reviewed when there is community support on Twitter.
- [x] Please make sure your pull request title has your token name. If it just says "Main", or "Validate", it will automatically be closed. PRs containing broken attestation or solscan links will also be closed.
- [ ] My change matches the format in the file (no spaces between fields).
- [ ] My token is already live and trading on Jupiter.
- [ ] !!! I read the README section on Community-Driven Validation and understand this PR will be only be reviewed when there is community support on Twitter.
- [ ] Please make sure your pull request title has your token name. If it just says "Main", or "Validate", it will automatically be closed. PRs containing broken attestation or solscan links will also be closed.
12 changes: 8 additions & 4 deletions src/logic.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as core from "@actions/core";
import { exec } from "@actions/exec";
import { canOnlyAddOneToken, detectDuplicateSymbol, detectDuplicateMints as detectDuplicateMints, validMintAddress, noEditsToPreviousLinesAllowed } from "./utils/validate";
import { detectDuplicateSymbol, detectDuplicateMints, canOnlyAddOneToken, validMintAddress, noEditsToPreviousLinesAllowed, isCommunityValidated, isSymbolConfusing } from "./utils/validate";
import { ValidatedTokensData } from "./types/types";
import { indexToLineNumber } from "./utils/validate";
import { parse } from "csv-parse/sync";
import fs from "fs";
import { allowedDuplicateSymbols, allowedNotCommunityValidated } from "./utils/duplicate-symbols";

export async function validateValidatedTokensCsv(filename: string): Promise<number> {
const [records, recordsRaw] = parseCsv(filename);
Expand All @@ -19,20 +20,23 @@ export async function validateValidatedTokensCsv(filename: string): Promise<numb
let invalidMintAddresses;
let notCommunityValidated;
let noEditsAllowed;
let potentiallyConfusingSymbols;

duplicateSymbols = detectDuplicateSymbol(recordsPrevious, records);
duplicateMints = detectDuplicateMints(records);
attemptsToAddMultipleTokens = canOnlyAddOneToken(recordsPrevious, records)
invalidMintAddresses = validMintAddress(records);
noEditsAllowed = noEditsToPreviousLinesAllowed(recordsPrevious, records);
// notCommunityValidated = validCommunityValidated(records);
notCommunityValidated = isCommunityValidated(records);
potentiallyConfusingSymbols = isSymbolConfusing(recordsPrevious, records);

console.log("No More Duplicate Symbols:", duplicateSymbols);
console.log("No More Duplicate Symbols:", duplicateSymbols, `(${allowedDuplicateSymbols.length} exceptions)`);
console.log("Duplicate Mints:", duplicateMints);
console.log("Attempts to Add Multiple Tokens:", attemptsToAddMultipleTokens);
console.log("Invalid Mint Addresses:", invalidMintAddresses);
console.log("Not Community Validated:", notCommunityValidated);
console.log("Not Community Validated:", notCommunityValidated, `(${allowedNotCommunityValidated.length} exceptions)`);
console.log("Edits to Existing Tokens:", noEditsAllowed);
console.log("Issues with Symbols in Added Tokens:", potentiallyConfusingSymbols);
return (duplicateSymbols + duplicateMints + attemptsToAddMultipleTokens + invalidMintAddresses + noEditsAllowed)
}

Expand Down
3 changes: 2 additions & 1 deletion src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ export interface ValidatedTokensData {
Line: number;
}

export interface DuplicateSymbol {
export interface AllowedException {
Name: string;
Symbol: string;
Mint: string;
"Community Validated": boolean;
}
Loading

0 comments on commit febf139

Please sign in to comment.