Skip to content

Commit

Permalink
Update script for Project contract
Browse files Browse the repository at this point in the history
  • Loading branch information
huyminh1115 committed Jan 22, 2024
1 parent 791454c commit c0fdeb0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/scripts/interactions/project/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ async function main() {
await compile(CreateProject, cache);
await compile(ProjectContract, cache);

const projectAddress =
'B62qoGy5GKNRaa2P8uh4ppdRqnCVjNyHqVSsaD4JMcE6FawLRKmmN4u';
const projectAddress = process.env.BERKELEY_PROJECT_ADDRESS as string;
const projectContract = new ProjectContract(
PublicKey.fromBase58(projectAddress)
);
Expand Down Expand Up @@ -129,14 +128,14 @@ async function main() {
}

// update storage:
memberStorage.updateInternal(Field(i), tree1);
memberStorage.updateInternal(Field(nextProjectId + i), tree1);
projectInfoStorage.updateLeaf(
projectInfoStorage.calculateLeaf(reduceActions[i].ipfsHash),
Field(i)
Field(nextProjectId + i)
);
payeeStorage.updateLeaf(
payeeStorage.calculateLeaf(reduceActions[i].payeeAccount),
Field(i)
Field(nextProjectId + i)
);

console.log('DONE');
Expand Down

0 comments on commit c0fdeb0

Please sign in to comment.