Skip to content

Commit

Permalink
Merge pull request #152 from GeneralMagicio/updateFundingPotConfigs
Browse files Browse the repository at this point in the history
Update funding pot configs
  • Loading branch information
aminlatifi authored Dec 19, 2024
2 parents f155edb + 27f162e commit 0aa3e84
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
19 changes: 19 additions & 0 deletions migration/1734475040262-addMatchingFundsToProjectTable.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class AddMatchingFundsToProjectTable1734475040262
implements MigrationInterface
{
name = 'AddMatchingFundsToProjectTable1734475040262';

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "project" ADD "matchingFunds" integer`,
);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "project" DROP COLUMN "matchingFunds"`,
);
}
}
4 changes: 4 additions & 0 deletions src/entities/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,10 @@ export class Project extends BaseEntity {
@Column('integer', { array: true, default: [] })
batchNumbersWithSafeTransactions?: number[];

@Field(_type => Int, { nullable: true })
@Column({ type: 'int', nullable: true })
matchingFunds?: number;

// only projects with status active can be listed automatically
static pendingReviewSince(maximumDaysForListing: number) {
const maxDaysForListing = moment()
Expand Down
9 changes: 7 additions & 2 deletions src/scripts/runFundingPotService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ async function generateBatchFile(batchNumber: number, dryRun: boolean) {
? round.cumulativeUSDCapPerUserPerProject
: round.roundUSDCapPerUserPerProject) || '5000'
).toString(), // Default to 5000 for individual cap
INDIVIDUAL_2: isEarlyAccess ? '0' : '250', // Only required for QACC rounds
INDIVIDUAL_2: isEarlyAccess
? '0'
: (
round.roundUSDCapPerUserPerProjectWithGitcoinScoreOnly || '1000'
).toString(), // Only required for QACC rounds if for users with GP score only
TOTAL: (
(isEarlyAccess
? round.cumulativeUSDCapPerProject
Expand Down Expand Up @@ -122,6 +126,7 @@ async function fillProjectsData() {
SAFE: project.abc.projectAddress || '',
ORCHESTRATOR: project.abc.orchestratorAddress || '',
NFT: project.abc.nftContractAddress || '',
MATCHING_FUNDS: project.matchingFunds || '',
};
} else {
console.warn(
Expand Down Expand Up @@ -175,7 +180,7 @@ async function createEnvFile() {
'ANKR_NETWORK_ID=polygon_zkevm',
)
.replace(
'RPC_URL="https://rpc.ankr.com/base_sepolia"',
'RPC_URL="https://sepolia.base.org"',
'RPC_URL="https://zkevm-rpc.com"',
)
.replace('CHAIN_ID=84532', 'CHAIN_ID=1101')
Expand Down

0 comments on commit 0aa3e84

Please sign in to comment.