Skip to content

Commit

Permalink
update for MACI v1.2.2 interface change
Browse files Browse the repository at this point in the history
  • Loading branch information
yuetloo committed May 19, 2024
1 parent 8f79a27 commit 98611ce
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 51 deletions.
3 changes: 0 additions & 3 deletions contracts/contracts/MACICommon.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ contract MACICommon {
struct Factories {
address pollFactory;
address tallyFactory;
// subsidyFactory is not currently used, it's just a place holder here
address subsidyFactory;
address messageProcessorFactory;
}

}
1 change: 0 additions & 1 deletion contracts/contracts/MACIFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ contract MACIFactory is Ownable(msg.sender), Params, SnarkCommon, DomainObjs, MA
error InvalidVkRegistry();
error InvalidPollFactory();
error InvalidTallyFactory();
error InvalidSubsidyFactory();
error InvalidMessageProcessorFactory();
error InvalidVerifier();

Expand Down
10 changes: 2 additions & 8 deletions contracts/e2e/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ import {
DEFAULT_GET_LOG_BATCH_SIZE,
DEFAULT_SR_QUEUE_OPS,
} from '../utils/constants'
import {
getContractAt,
getEventArg,
getQualifiedContractName,
} from '../utils/contracts'
import { getContractAt, getEventArg } from '../utils/contracts'
import { deployPoseidonLibraries, deployMaciFactory } from '../utils/testutils'
import { getIpfsHash } from '../utils/ipfs'
import {
Expand All @@ -37,7 +33,7 @@ import { DEFAULT_CIRCUIT } from '../utils/circuits'
import { MaciParameters } from '../utils/maciParameters'
import { existsSync, mkdirSync } from 'fs'
import path from 'path'
import { FundingRound, Poll } from '../typechain-types'
import { FundingRound } from '../typechain-types'
import { JSONFile } from '../utils/JSONFile'
import { EContracts } from '../utils/types'
import { getTalyFilePath } from '../utils/misc'
Expand Down Expand Up @@ -398,7 +394,6 @@ describe('End-to-end Tests', function () {
await proveOnChain({
pollId,
proofDir: genProofArgs.outputDir,
subsidyEnabled: false,
maciAddress,
messageProcessorAddress,
tallyAddress,
Expand All @@ -418,7 +413,6 @@ describe('End-to-end Tests', function () {
await proveOnChain({
pollId,
proofDir: genProofArgs.outputDir,
subsidyEnabled: false,
maciAddress,
messageProcessorAddress,
tallyAddress,
Expand Down
1 change: 0 additions & 1 deletion contracts/tasks/helpers/ConstructorArguments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ async function getMaciConstructorArguments(
maci.pollFactory(),
maci.messageProcessorFactory(),
maci.tallyFactory(),
maci.subsidyFactory(),
maci.signUpGatekeeper(),
maci.initialVoiceCreditProxy(),
maci.topupCredit(),
Expand Down
1 change: 0 additions & 1 deletion contracts/tasks/runners/proveOnChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ task('prove-on-chain', 'Prove on chain with the MACI proofs')
await proveOnChain({
pollId,
proofDir,
subsidyEnabled: false,
maciAddress,
messageProcessorAddress,
tallyAddress,
Expand Down
2 changes: 0 additions & 2 deletions contracts/tasks/subtasks/clrfund/08-maciFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ subtask
const factories = {
pollFactory: pollFactoryContractAddress,
tallyFactory: tallyFactoryContractAddress,
// subsidy is not currently used
subsidyFactory: ZERO_ADDRESS,
messageProcessorFactory: messageProcessorFactoryContractAddress,
}

Expand Down
2 changes: 0 additions & 2 deletions contracts/utils/testutils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ export async function deployMaciFactory({
const factories = {
pollFactory: pollFactory.target,
tallyFactory: tallyFactory.target,
// subsidy is not currently used
subsidyFactory: ZERO_ADDRESS,
messageProcessorFactory: messageProcessorFactory.target,
}

Expand Down
42 changes: 22 additions & 20 deletions subgraph/abis/MACIFactory.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
"name": "tallyFactory",
"type": "address"
},
{
"internalType": "address",
"name": "subsidyFactory",
"type": "address"
},
{
"internalType": "address",
"name": "messageProcessorFactory",
Expand Down Expand Up @@ -52,11 +47,6 @@
"name": "InvalidPollFactory",
"type": "error"
},
{
"inputs": [],
"name": "InvalidSubsidyFactory",
"type": "error"
},
{
"inputs": [],
"name": "InvalidTallyFactory",
Expand All @@ -77,6 +67,28 @@
"name": "NotInitialized",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "OwnableInvalidOwner",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "OwnableUnauthorizedAccount",
"type": "error"
},
{
"inputs": [],
"name": "ProcessVkNotSet",
Expand Down Expand Up @@ -224,11 +236,6 @@
"internalType": "address",
"name": "tally",
"type": "address"
},
{
"internalType": "address",
"name": "subsidy",
"type": "address"
}
],
"internalType": "struct MACI.PollContracts",
Expand All @@ -253,11 +260,6 @@
"name": "tallyFactory",
"type": "address"
},
{
"internalType": "address",
"name": "subsidyFactory",
"type": "address"
},
{
"internalType": "address",
"name": "messageProcessorFactory",
Expand Down
13 changes: 0 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9912,19 +9912,6 @@ ethers@^5.0.3, ethers@^5.5.1, ethers@^5.7.2:
"@ethersproject/web" "5.7.1"
"@ethersproject/wordlists" "5.7.0"

ethers@^6.11.1:
version "6.11.1"
resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.11.1.tgz#96aae00b627c2e35f9b0a4d65c7ab658259ee6af"
integrity sha512-mxTAE6wqJQAbp5QAe/+o+rXOID7Nw91OZXvgpjDa1r4fAbq2Nu314oEZSbjoRLacuCzs7kUC3clEvkCQowffGg==
dependencies:
"@adraffy/ens-normalize" "1.10.1"
"@noble/curves" "1.2.0"
"@noble/hashes" "1.3.2"
"@types/node" "18.15.13"
aes-js "4.0.0-beta.5"
tslib "2.4.0"
ws "8.5.0"

ethers@^6.12.0, ethers@^6.12.1:
version "6.12.1"
resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.12.1.tgz#517ff6d66d4fd5433e38e903051da3e57c87ff37"
Expand Down

0 comments on commit 98611ce

Please sign in to comment.