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

Update funding pot configs #152

Merged
merged 3 commits into from
Dec 19, 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
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 @@ -468,6 +468,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
Loading