Skip to content

Commit

Permalink
update tokens files and README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rinchan01 committed Nov 28, 2024
1 parent 2286853 commit a49fc19
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ As of latest update, we consider `circulating = maxSupply - treasury - burn` and

In cases where `circulatingOnChain` is provided directly according to the asset's quantity on-chain or through external APIs, the `circulating` is the value of `circulatingOnChain`.

For tokens providing with `treasuryNft`, the `circulating` is the quantity of the asset in the latest address containing it.
For tokens providing with `treasuryNft`, the `circulating` is the quantity of the address containing the assets. In default, the amount is retrieved from the oldest address from the blockchain's point of view.

## How to add my token
### Requirements
As token verification prerequisites, ensure your token has:
- A pool with at least **1000 ADA TVL**
- A logo added in the [Cardano Token Registry](https://github.com/cardano-foundation/cardano-token-registry) or CIP-68 metadata
and follow the structure stated in the instructions below.
- A post of your policy ID on Twitter or your policy ID displayed on your landing page.

For tokens to be verified:
1. Create a transaction transfer **100 ADA** to Minswap wallet receiving token verification fee below.
2. Metadata includes: **the last 4 numbers of asset's policyId and asset's ticker**.
1. Create a transaction transfer **100 ADA** to Minswap wallet receiving token verification fee below. This fee appears as the cost for lifetime maintain this repository.
2. Metadata includes: **the last 4 numbers of asset's policyId and asset's ticker** (for example, Verify 70c6 MIN).
3. Attach the transaction hash to a comment in the yaml file pull request (instructions below).


Expand Down Expand Up @@ -76,9 +77,7 @@ treasuryNft: assetId
```
Alternatively, create an issue with above information and our team will update accordingly. The pull request will be processed faster.
2. Post your policy ID on Twitter or display your policy ID on your landing page.
3. Our team will verify and approve in first-in-first-out order.
Our team will verify and approve in first-in-first-out order.
## Usage
Expand Down
2 changes: 1 addition & 1 deletion internal/checkTVL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const blockfrostAdapter = new SDK.BlockfrostAdapter({
async function verifyTVL() {
const [v1Pools, { pools: v2Pools }] = await Promise.all([getAllV1Pools(), blockfrostAdapter.getAllV2Pools()]);

fs.readdir(TOKEN_DIR, async function (error, files) {
fs.readdir(TOKEN_DIR, async (error, files) => {
if (error) {
throw error;
}
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type Adapter = {

/**
* Get the amount held in the address holding a specific asset by the asset's ID.
* After obtaining a list of addresses possessing a specific asset in descending order, this retrieve the amount associated with the first address returned.
* After obtaining a list of addresses possessing a specific asset in blockchain's point of view ascending order, this retrieve the amount associated with the first address returned.
* This function currently supports Shen and DJED.
* @param tokenId The token's policy ID.
* @param nftId The concatenation of token's policy ID and hex-coded token name.
Expand Down
5 changes: 3 additions & 2 deletions src/apis/tokenApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export class TokenAPI {
public async getToken(tokenId: string) {
try {
const __dirname = import.meta.dirname;
const filePath = path.join(__dirname, `../${TOKENS_DIR}/${tokenId}.yaml`);
console.log(__dirname, TOKENS_DIR, tokenId);
const filePath = path.join(__dirname, `${TOKENS_DIR}/${tokenId}.yaml`);
const tokenFileData = fs.readFileSync(filePath, "utf-8");
const tokenData: TokenMetadata = {
tokenId,
Expand All @@ -34,7 +35,7 @@ export class TokenAPI {
*/
public async getTokens(options?: GetTokenOptions) {
const __dirname = import.meta.dirname;
const directory = path.join(__dirname, `../${TOKENS_DIR}`);
const directory = path.join(__dirname, `${TOKENS_DIR}`);
const tokenList: TokenMetadata[] = [];
const files = fs.readdirSync(directory);
for (const file of files) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ decimals: 6

verified: true

maxSupply: 25000000000000

treasury:
- stake178j4fcxw7pwgxw92yu28c2zqmjxnumumj52hxr9jtr6qwngf2ve5n # O Vesting Multisig

Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ decimals: 0

verified: true

maxSupply:

burn:
- addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4

0 comments on commit a49fc19

Please sign in to comment.