forked from Giveth/impact-graph
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'staging' of github.com:GeneralMagicio/QAcc-BE into AddR…
…oundCaps
- Loading branch information
Showing
20 changed files
with
298 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class AddTokenPriceToRounds1727098387189 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
// Add `token_price` column to the `qf_round` table | ||
await queryRunner.query( | ||
`ALTER TABLE "qf_round" ADD "token_price" double precision DEFAULT NULL`, | ||
); | ||
|
||
// Add `token_price` column to the `early_access_round` table | ||
await queryRunner.query( | ||
`ALTER TABLE "early_access_round" ADD "token_price" double precision DEFAULT NULL`, | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
// Remove `token_price` column from both tables if needed | ||
await queryRunner.query(`ALTER TABLE "qf_round" DROP COLUMN "token_price"`); | ||
await queryRunner.query( | ||
`ALTER TABLE "early_access_round" DROP COLUMN "token_price"`, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class FixAddTokenPriceToRounds1727458215571 | ||
implements MigrationInterface | ||
{ | ||
name = 'FixAddTokenPriceToRounds1727458215571'; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TABLE "qf_round" RENAME COLUMN "token_price" TO "tokenPrice"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "early_access_round" RENAME COLUMN "token_price" TO "tokenPrice"`, | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TABLE "early_access_round" RENAME COLUMN "tokenPrice" TO "token_price"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "qf_round" RENAME COLUMN "tokenPrice" TO "token_price"`, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import config from '../config'; | ||
|
||
export const QACC_DONATION_TOKEN_ADDRESS: string = | ||
(config.get('QACC_DONATION_TOKEN_ADDRESS') as string) || | ||
'0xa2036f0538221a77a3937f1379699f44945018d0'; //https://zkevm.polygonscan.com/token/0xa2036f0538221a77a3937f1379699f44945018d0#readContract | ||
export const QACC_DONATION_TOKEN_SYMBOL = | ||
(config.get('QACC_DONATION_TOKEN_SYMBOL') as string) || 'MATIC'; | ||
export const QACC_DONATION_TOKEN_NAME = | ||
(config.get('QACC_DONATION_TOKEN_NAME') as string) || 'Matic token'; | ||
export const QACC_DONATION_TOKEN_DECIMALS = | ||
(+config.get('QACC_DONATION_TOKEN_DECIMALS') as number) || 18; | ||
export const QACC_DONATION_TOKEN_COINGECKO_ID = | ||
(config.get('QACC_DONATION_TOKEN_COINGECKO_ID') as string) || 'matic-network'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.