Skip to content

Commit

Permalink
Update script
Browse files Browse the repository at this point in the history
  • Loading branch information
huyminh1115 committed Jan 30, 2024
1 parent 6034ef1 commit f96dfa5
Show file tree
Hide file tree
Showing 3 changed files with 223 additions and 215 deletions.
14 changes: 7 additions & 7 deletions src/scripts/Platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1089,13 +1089,13 @@ async function main() {
let balanceBefore = Number(
Account(projects[i].publicKey).balance.get()
);
// tx = await Mina.transaction(
// { sender: projects[i].publicKey, fee },
// () => {
// treasuryContract.claimFund(claimFundInput[i]);
// }
// );
// await proveAndSend(tx, [projects[i]], Contract.TREASURY, 'claimFund');
tx = await Mina.transaction(
{ sender: projects[i].publicKey, fee },
() => {
treasuryContract.claimFund(claimFundInput[i]);
}
);
await proveAndSend(tx, [projects[i]], Contract.TREASURY, 'claimFund');
let balanceAfter = Number(
Account(projects[i].publicKey).balance.get()
);
Expand Down
17 changes: 8 additions & 9 deletions src/scripts/interactions/campaign/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ async function main() {
// Do this and state value of contract is fetched in Mina
await fetchZkAppState(zkAppAddress);
let nextCampaignId = Number(zkContract.nextCampaignId.get());
nextCampaignId = 4;

// Storage
let campaignInfoStorage = new CampaignInfoStorage();
Expand Down Expand Up @@ -165,23 +164,23 @@ async function main() {

// update storage:
ownerStorage.updateLeaf(
ownerStorage.calculateLeaf(action.owner),
Field(i)
Field(i),
ownerStorage.calculateLeaf(action.owner)
);
campaignInfoStorage.updateLeaf(
campaignInfoStorage.calculateLeaf(action.ipfsHash),
Field(i)
Field(i),
campaignInfoStorage.calculateLeaf(action.ipfsHash)
);
statusStorage.updateLeaf(
statusStorage.calculateLeaf(StatusEnum.APPLICATION),
Field(i)
Field(i),
statusStorage.calculateLeaf(StatusEnum.APPLICATION)
);
configStorage.updateLeaf(
Field(i),
configStorage.calculateLeaf({
committeeId: action.committeeId,
keyId: action.keyId,
}),
Field(i)
})
);

console.log('DONE');
Expand Down
Loading

0 comments on commit f96dfa5

Please sign in to comment.