From efcda38fb40517ecc7ad8f52d5d84f1c102d2200 Mon Sep 17 00:00:00 2001 From: Claudia Date: Fri, 24 Jan 2025 19:59:45 +0100 Subject: [PATCH] feat: generate the artifacts --- artifacts/src/abis/admin-plugin-abis.ts | 394 ---- .../abis.ts} | 1014 ++++++----- artifacts/src/abis/index.ts | 11 +- .../abis.ts} | 307 +++- .../src/abis/{osx-abis.ts => osx/abis.ts} | 74 +- .../staged-proposal-processor-plugin/abis.ts | 1608 +++++++++++++++++ .../abis.ts} | 799 +++++++- 7 files changed, 3274 insertions(+), 933 deletions(-) delete mode 100644 artifacts/src/abis/admin-plugin-abis.ts rename artifacts/src/abis/{staged-proposal-processor-plugin-abis.ts => admin-plugin/abis.ts} (51%) rename artifacts/src/abis/{multisig-plugin-abis.ts => multisig-plugin/abis.ts} (80%) rename artifacts/src/abis/{osx-abis.ts => osx/abis.ts} (98%) create mode 100644 artifacts/src/abis/staged-proposal-processor-plugin/abis.ts rename artifacts/src/abis/{token-voting-plugin-abis.ts => token-voting-plugin/abis.ts} (76%) diff --git a/artifacts/src/abis/admin-plugin-abis.ts b/artifacts/src/abis/admin-plugin-abis.ts deleted file mode 100644 index 43d9b109..00000000 --- a/artifacts/src/abis/admin-plugin-abis.ts +++ /dev/null @@ -1,394 +0,0 @@ -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Admin -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const adminAbi = [ - { - type: 'error', - inputs: [ - {name: 'dao', internalType: 'address', type: 'address'}, - {name: 'where', internalType: 'address', type: 'address'}, - {name: 'who', internalType: 'address', type: 'address'}, - {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, - ], - name: 'DaoUnauthorized', - }, - { - type: 'event', - anonymous: false, - inputs: [ - {name: 'version', internalType: 'uint8', type: 'uint8', indexed: false}, - ], - name: 'Initialized', - }, - { - type: 'event', - anonymous: false, - inputs: [ - { - name: 'members', - internalType: 'address[]', - type: 'address[]', - indexed: false, - }, - ], - name: 'MembersAdded', - }, - { - type: 'event', - anonymous: false, - inputs: [ - { - name: 'members', - internalType: 'address[]', - type: 'address[]', - indexed: false, - }, - ], - name: 'MembersRemoved', - }, - { - type: 'event', - anonymous: false, - inputs: [ - { - name: 'definingContract', - internalType: 'address', - type: 'address', - indexed: true, - }, - ], - name: 'MembershipContractAnnounced', - }, - { - type: 'event', - anonymous: false, - inputs: [ - { - name: 'proposalId', - internalType: 'uint256', - type: 'uint256', - indexed: true, - }, - { - name: 'creator', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'startDate', - internalType: 'uint64', - type: 'uint64', - indexed: false, - }, - {name: 'endDate', internalType: 'uint64', type: 'uint64', indexed: false}, - {name: 'metadata', internalType: 'bytes', type: 'bytes', indexed: false}, - { - name: 'actions', - internalType: 'struct IDAO.Action[]', - type: 'tuple[]', - components: [ - {name: 'to', internalType: 'address', type: 'address'}, - {name: 'value', internalType: 'uint256', type: 'uint256'}, - {name: 'data', internalType: 'bytes', type: 'bytes'}, - ], - indexed: false, - }, - { - name: 'allowFailureMap', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, - ], - name: 'ProposalCreated', - }, - { - type: 'event', - anonymous: false, - inputs: [ - { - name: 'proposalId', - internalType: 'uint256', - type: 'uint256', - indexed: true, - }, - ], - name: 'ProposalExecuted', - }, - { - type: 'function', - inputs: [], - name: 'EXECUTE_PROPOSAL_PERMISSION_ID', - outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], - stateMutability: 'view', - }, - { - type: 'function', - inputs: [ - {name: '_metadata', internalType: 'bytes', type: 'bytes'}, - { - name: '_actions', - internalType: 'struct IDAO.Action[]', - type: 'tuple[]', - components: [ - {name: 'to', internalType: 'address', type: 'address'}, - {name: 'value', internalType: 'uint256', type: 'uint256'}, - {name: 'data', internalType: 'bytes', type: 'bytes'}, - ], - }, - {name: '_startDate', internalType: 'uint64', type: 'uint64'}, - {name: '_endDate', internalType: 'uint64', type: 'uint64'}, - ], - name: 'createProposal', - outputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], - stateMutability: 'nonpayable', - }, - { - type: 'function', - inputs: [], - name: 'dao', - outputs: [{name: '', internalType: 'contract IDAO', type: 'address'}], - stateMutability: 'view', - }, - { - type: 'function', - inputs: [ - {name: '_metadata', internalType: 'bytes', type: 'bytes'}, - { - name: '_actions', - internalType: 'struct IDAO.Action[]', - type: 'tuple[]', - components: [ - {name: 'to', internalType: 'address', type: 'address'}, - {name: 'value', internalType: 'uint256', type: 'uint256'}, - {name: 'data', internalType: 'bytes', type: 'bytes'}, - ], - }, - {name: '_allowFailureMap', internalType: 'uint256', type: 'uint256'}, - ], - name: 'executeProposal', - outputs: [], - stateMutability: 'nonpayable', - }, - { - type: 'function', - inputs: [{name: '_dao', internalType: 'contract IDAO', type: 'address'}], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - }, - { - type: 'function', - inputs: [{name: '_account', internalType: 'address', type: 'address'}], - name: 'isMember', - outputs: [{name: '', internalType: 'bool', type: 'bool'}], - stateMutability: 'view', - }, - { - type: 'function', - inputs: [], - name: 'pluginType', - outputs: [ - {name: '', internalType: 'enum IPlugin.PluginType', type: 'uint8'}, - ], - stateMutability: 'pure', - }, - { - type: 'function', - inputs: [], - name: 'proposalCount', - outputs: [{name: '', internalType: 'uint256', type: 'uint256'}], - stateMutability: 'view', - }, - { - type: 'function', - inputs: [], - name: 'protocolVersion', - outputs: [{name: '', internalType: 'uint8[3]', type: 'uint8[3]'}], - stateMutability: 'pure', - }, - { - type: 'function', - inputs: [{name: '_forwarder', internalType: 'address', type: 'address'}], - name: 'setForwarder', - outputs: [], - stateMutability: 'nonpayable', - }, - { - type: 'function', - inputs: [{name: '_interfaceId', internalType: 'bytes4', type: 'bytes4'}], - name: 'supportsInterface', - outputs: [{name: '', internalType: 'bool', type: 'bool'}], - stateMutability: 'view', - }, - { - type: 'function', - inputs: [], - name: 'trustedForwarder', - outputs: [{name: '', internalType: 'address', type: 'address'}], - stateMutability: 'view', - }, -] as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// AdminSetup -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const adminSetupAbi = [ - {type: 'constructor', inputs: [], stateMutability: 'nonpayable'}, - { - type: 'error', - inputs: [{name: 'admin', internalType: 'address', type: 'address'}], - name: 'AdminAddressInvalid', - }, - {type: 'error', inputs: [], name: 'NonUpgradeablePlugin'}, - { - type: 'function', - inputs: [], - name: 'implementation', - outputs: [{name: '', internalType: 'address', type: 'address'}], - stateMutability: 'view', - }, - { - type: 'function', - inputs: [ - {name: '_dao', internalType: 'address', type: 'address'}, - {name: '_data', internalType: 'bytes', type: 'bytes'}, - ], - name: 'prepareInstallation', - outputs: [ - {name: 'plugin', internalType: 'address', type: 'address'}, - { - name: 'preparedSetupData', - internalType: 'struct IPluginSetup.PreparedSetupData', - type: 'tuple', - components: [ - {name: 'helpers', internalType: 'address[]', type: 'address[]'}, - { - name: 'permissions', - internalType: 'struct PermissionLib.MultiTargetPermission[]', - type: 'tuple[]', - components: [ - { - name: 'operation', - internalType: 'enum PermissionLib.Operation', - type: 'uint8', - }, - {name: 'where', internalType: 'address', type: 'address'}, - {name: 'who', internalType: 'address', type: 'address'}, - {name: 'condition', internalType: 'address', type: 'address'}, - {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, - ], - }, - ], - }, - ], - stateMutability: 'nonpayable', - }, - { - type: 'function', - inputs: [ - {name: '_dao', internalType: 'address', type: 'address'}, - { - name: '_payload', - internalType: 'struct IPluginSetup.SetupPayload', - type: 'tuple', - components: [ - {name: 'plugin', internalType: 'address', type: 'address'}, - { - name: 'currentHelpers', - internalType: 'address[]', - type: 'address[]', - }, - {name: 'data', internalType: 'bytes', type: 'bytes'}, - ], - }, - ], - name: 'prepareUninstallation', - outputs: [ - { - name: 'permissions', - internalType: 'struct PermissionLib.MultiTargetPermission[]', - type: 'tuple[]', - components: [ - { - name: 'operation', - internalType: 'enum PermissionLib.Operation', - type: 'uint8', - }, - {name: 'where', internalType: 'address', type: 'address'}, - {name: 'who', internalType: 'address', type: 'address'}, - {name: 'condition', internalType: 'address', type: 'address'}, - {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, - ], - }, - ], - stateMutability: 'pure', - }, - { - type: 'function', - inputs: [ - {name: '_dao', internalType: 'address', type: 'address'}, - {name: '_fromBuild', internalType: 'uint16', type: 'uint16'}, - { - name: '_payload', - internalType: 'struct IPluginSetup.SetupPayload', - type: 'tuple', - components: [ - {name: 'plugin', internalType: 'address', type: 'address'}, - { - name: 'currentHelpers', - internalType: 'address[]', - type: 'address[]', - }, - {name: 'data', internalType: 'bytes', type: 'bytes'}, - ], - }, - ], - name: 'prepareUpdate', - outputs: [ - {name: '', internalType: 'bytes', type: 'bytes'}, - { - name: '', - internalType: 'struct IPluginSetup.PreparedSetupData', - type: 'tuple', - components: [ - {name: 'helpers', internalType: 'address[]', type: 'address[]'}, - { - name: 'permissions', - internalType: 'struct PermissionLib.MultiTargetPermission[]', - type: 'tuple[]', - components: [ - { - name: 'operation', - internalType: 'enum PermissionLib.Operation', - type: 'uint8', - }, - {name: 'where', internalType: 'address', type: 'address'}, - {name: 'who', internalType: 'address', type: 'address'}, - {name: 'condition', internalType: 'address', type: 'address'}, - {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, - ], - }, - ], - }, - ], - stateMutability: 'pure', - }, - { - type: 'function', - inputs: [], - name: 'protocolVersion', - outputs: [{name: '', internalType: 'uint8[3]', type: 'uint8[3]'}], - stateMutability: 'pure', - }, - { - type: 'function', - inputs: [{name: '_interfaceId', internalType: 'bytes4', type: 'bytes4'}], - name: 'supportsInterface', - outputs: [{name: '', internalType: 'bool', type: 'bool'}], - stateMutability: 'view', - }, -] as const; diff --git a/artifacts/src/abis/staged-proposal-processor-plugin-abis.ts b/artifacts/src/abis/admin-plugin/abis.ts similarity index 51% rename from artifacts/src/abis/staged-proposal-processor-plugin-abis.ts rename to artifacts/src/abis/admin-plugin/abis.ts index 39f7153e..22ea4480 100644 --- a/artifacts/src/abis/staged-proposal-processor-plugin-abis.ts +++ b/artifacts/src/abis/admin-plugin/abis.ts @@ -1,60 +1,8 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// AlwaysTrueCondition +// Admin ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -export const alwaysTrueConditionAbi = [ - { - type: 'function', - inputs: [ - {name: '_where', internalType: 'address', type: 'address'}, - {name: '_who', internalType: 'address', type: 'address'}, - {name: '_permissionId', internalType: 'bytes32', type: 'bytes32'}, - {name: '_data', internalType: 'bytes', type: 'bytes'}, - ], - name: 'isGranted', - outputs: [{name: '', internalType: 'bool', type: 'bool'}], - stateMutability: 'pure', - }, - { - type: 'function', - inputs: [], - name: 'protocolVersion', - outputs: [{name: '', internalType: 'uint8[3]', type: 'uint8[3]'}], - stateMutability: 'pure', - }, - { - type: 'function', - inputs: [{name: '_interfaceId', internalType: 'bytes4', type: 'bytes4'}], - name: 'supportsInterface', - outputs: [{name: '', internalType: 'bool', type: 'bool'}], - stateMutability: 'view', - }, -] as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Errors -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const errorsAbi = [ - {type: 'error', inputs: [], name: 'CallerNotABody'}, - {type: 'error', inputs: [], name: 'EmptyMetadata'}, - {type: 'error', inputs: [], name: 'InsufficientGas'}, - {type: 'error', inputs: [], name: 'NotPossible'}, - { - type: 'error', - inputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], - name: 'ProposalCannotExecute', - }, - {type: 'error', inputs: [], name: 'ProposalNotExists'}, - {type: 'error', inputs: [], name: 'StageCountZero'}, - {type: 'error', inputs: [], name: 'StageDurationAlreadyPassed'}, -] as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// StagedProposalProcessor -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const stagedProposalProcessorAbi = [ +export const adminAbi = [ { type: 'error', inputs: [ @@ -65,82 +13,74 @@ export const stagedProposalProcessorAbi = [ ], name: 'DaoUnauthorized', }, - {type: 'error', inputs: [], name: 'EmptyMetadata'}, - {type: 'error', inputs: [], name: 'InsufficientGas'}, - {type: 'error', inputs: [], name: 'ProposalNotExists'}, - {type: 'error', inputs: [], name: 'StageCountZero'}, - {type: 'error', inputs: [], name: 'StageDurationAlreadyPassed'}, + {type: 'error', inputs: [], name: 'DelegateCallFailed'}, + {type: 'error', inputs: [], name: 'FunctionDeprecated'}, + {type: 'error', inputs: [], name: 'FunctionNotSupported'}, { - type: 'event', - anonymous: false, + type: 'error', inputs: [ { - name: 'previousAdmin', - internalType: 'address', - type: 'address', - indexed: false, - }, - { - name: 'newAdmin', - internalType: 'address', - type: 'address', - indexed: false, + name: 'targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], }, ], - name: 'AdminChanged', + name: 'InvalidTargetConfig', }, { type: 'event', anonymous: false, inputs: [ - { - name: 'beacon', - internalType: 'address', - type: 'address', - indexed: true, - }, + {name: 'version', internalType: 'uint8', type: 'uint8', indexed: false}, ], - name: 'BeaconUpgraded', + name: 'Initialized', }, { type: 'event', anonymous: false, inputs: [ - {name: 'version', internalType: 'uint8', type: 'uint8', indexed: false}, + { + name: 'members', + internalType: 'address[]', + type: 'address[]', + indexed: false, + }, ], - name: 'Initialized', + name: 'MembersAdded', }, { type: 'event', anonymous: false, inputs: [ { - name: 'releaseMetadata', - internalType: 'bytes', - type: 'bytes', + name: 'members', + internalType: 'address[]', + type: 'address[]', indexed: false, }, ], - name: 'MetadataUpdated', + name: 'MembersRemoved', }, { type: 'event', anonymous: false, inputs: [ { - name: 'proposalId', - internalType: 'bytes32', - type: 'bytes32', - indexed: true, - }, - { - name: 'stageId', - internalType: 'uint256', - type: 'uint256', + name: 'definingContract', + internalType: 'address', + type: 'address', indexed: true, }, ], - name: 'ProposalAdvanced', + name: 'MembershipContractAnnounced', }, { type: 'event', @@ -164,21 +104,11 @@ export const stagedProposalProcessorAbi = [ type: 'uint64', indexed: false, }, - { - name: 'endDate', - internalType: 'uint64', - type: 'uint64', - indexed: false, - }, - { - name: 'metadata', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, + {name: 'endDate', internalType: 'uint64', type: 'uint64', indexed: false}, + {name: 'metadata', internalType: 'bytes', type: 'bytes', indexed: false}, { name: 'actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -214,118 +144,40 @@ export const stagedProposalProcessorAbi = [ anonymous: false, inputs: [ { - name: 'proposalId', - internalType: 'bytes32', - type: 'bytes32', - indexed: true, - }, - { - name: 'plugin', - internalType: 'address', - type: 'address', - indexed: true, - }, - ], - name: 'ProposalResult', - }, - { - type: 'event', - anonymous: false, - inputs: [ - { - name: 'stages', - internalType: 'struct StagedProposalProcessor.Stage[]', - type: 'tuple[]', + name: 'newTargetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', components: [ + {name: 'target', internalType: 'address', type: 'address'}, { - name: 'plugins', - internalType: 'struct StagedProposalProcessor.Plugin[]', - type: 'tuple[]', - components: [ - { - name: 'pluginAddress', - internalType: 'address', - type: 'address', - }, - {name: 'isManual', internalType: 'bool', type: 'bool'}, - {name: 'allowedBody', internalType: 'address', type: 'address'}, - { - name: 'proposalType', - internalType: 'enum StagedProposalProcessor.ProposalType', - type: 'uint8', - }, - ], + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', }, - {name: 'maxAdvance', internalType: 'uint64', type: 'uint64'}, - {name: 'minAdvance', internalType: 'uint64', type: 'uint64'}, - {name: 'stageDuration', internalType: 'uint64', type: 'uint64'}, - {name: 'approvalThreshold', internalType: 'uint16', type: 'uint16'}, - {name: 'vetoThreshold', internalType: 'uint16', type: 'uint16'}, ], indexed: false, }, ], - name: 'StagesUpdated', - }, - { - type: 'event', - anonymous: false, - inputs: [ - { - name: 'implementation', - internalType: 'address', - type: 'address', - indexed: true, - }, - ], - name: 'Upgraded', - }, - { - type: 'function', - inputs: [], - name: 'ADVANCE_PROPOSAL_PERMISSION_ID', - outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], - stateMutability: 'view', - }, - { - type: 'function', - inputs: [], - name: 'CREATE_PROPOSAL_PERMISSION_ID', - outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], - stateMutability: 'view', - }, - { - type: 'function', - inputs: [], - name: 'UPDATE_METADATA_PERMISSION_ID', - outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], - stateMutability: 'view', + name: 'TargetSet', }, { type: 'function', inputs: [], - name: 'UPDATE_STAGES_PERMISSION_ID', + name: 'EXECUTE_PROPOSAL_PERMISSION_ID', outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], stateMutability: 'view', }, { type: 'function', inputs: [], - name: 'UPGRADE_PLUGIN_PERMISSION_ID', + name: 'SET_TARGET_CONFIG_PERMISSION_ID', outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], stateMutability: 'view', }, { type: 'function', - inputs: [{name: '_proposalId', internalType: 'bytes32', type: 'bytes32'}], - name: 'advanceProposal', - outputs: [], - stateMutability: 'nonpayable', - }, - { - type: 'function', - inputs: [{name: '_proposalId', internalType: 'bytes32', type: 'bytes32'}], - name: 'canProposalAdvance', + inputs: [{name: '', internalType: 'uint256', type: 'uint256'}], + name: 'canExecute', outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, @@ -335,7 +187,7 @@ export const stagedProposalProcessorAbi = [ {name: '_metadata', internalType: 'bytes', type: 'bytes'}, { name: '_actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -343,8 +195,9 @@ export const stagedProposalProcessorAbi = [ {name: 'data', internalType: 'bytes', type: 'bytes'}, ], }, - {name: '_startDate', internalType: 'uint64', type: 'uint64'}, {name: '', internalType: 'uint64', type: 'uint64'}, + {name: '', internalType: 'uint64', type: 'uint64'}, + {name: '_data', internalType: 'bytes', type: 'bytes'}, ], name: 'createProposal', outputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], @@ -352,24 +205,10 @@ export const stagedProposalProcessorAbi = [ }, { type: 'function', - inputs: [ - {name: '_metadata', internalType: 'bytes', type: 'bytes'}, - { - name: '_actions', - internalType: 'struct IDAO.Action[]', - type: 'tuple[]', - components: [ - {name: 'to', internalType: 'address', type: 'address'}, - {name: 'value', internalType: 'uint256', type: 'uint256'}, - {name: 'data', internalType: 'bytes', type: 'bytes'}, - ], - }, - {name: '_allowFailureMap', internalType: 'uint256', type: 'uint256'}, - {name: '_startDate', internalType: 'uint64', type: 'uint64'}, - ], - name: 'createProposal', - outputs: [{name: 'proposalId', internalType: 'bytes32', type: 'bytes32'}], - stateMutability: 'nonpayable', + inputs: [], + name: 'customProposalParamsABI', + outputs: [{name: '', internalType: 'string', type: 'string'}], + stateMutability: 'pure', }, { type: 'function', @@ -380,65 +219,47 @@ export const stagedProposalProcessorAbi = [ }, { type: 'function', - inputs: [], - name: 'getCurrentConfigIndex', - outputs: [{name: '', internalType: 'uint16', type: 'uint16'}], - stateMutability: 'view', - }, - { - type: 'function', - inputs: [], - name: 'getMetadata', - outputs: [{name: '', internalType: 'bytes', type: 'bytes'}], + inputs: [{name: '', internalType: 'uint256', type: 'uint256'}], + name: 'execute', + outputs: [], stateMutability: 'view', }, { type: 'function', inputs: [ - {name: '_proposalId', internalType: 'bytes32', type: 'bytes32'}, - {name: '_stageId', internalType: 'uint16', type: 'uint16'}, + {name: '_metadata', internalType: 'bytes', type: 'bytes'}, { - name: '_proposalType', - internalType: 'enum StagedProposalProcessor.ProposalType', - type: 'uint8', + name: '_actions', + internalType: 'struct Action[]', + type: 'tuple[]', + components: [ + {name: 'to', internalType: 'address', type: 'address'}, + {name: 'value', internalType: 'uint256', type: 'uint256'}, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], }, - {name: '_body', internalType: 'address', type: 'address'}, + {name: '_allowFailureMap', internalType: 'uint256', type: 'uint256'}, ], - name: 'getPluginResult', - outputs: [{name: '', internalType: 'bool', type: 'bool'}], - stateMutability: 'view', + name: 'executeProposal', + outputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + stateMutability: 'nonpayable', }, { type: 'function', - inputs: [{name: '_proposalId', internalType: 'bytes32', type: 'bytes32'}], - name: 'getProposal', + inputs: [], + name: 'getCurrentTargetConfig', outputs: [ { name: '', - internalType: 'struct StagedProposalProcessor.Proposal', + internalType: 'struct IPlugin.TargetConfig', type: 'tuple', components: [ - {name: 'allowFailureMap', internalType: 'uint256', type: 'uint256'}, - {name: 'creator', internalType: 'address', type: 'address'}, - { - name: 'lastStageTransition', - internalType: 'uint64', - type: 'uint64', - }, - {name: 'metadata', internalType: 'bytes', type: 'bytes'}, + {name: 'target', internalType: 'address', type: 'address'}, { - name: 'actions', - internalType: 'struct IDAO.Action[]', - type: 'tuple[]', - components: [ - {name: 'to', internalType: 'address', type: 'address'}, - {name: 'value', internalType: 'uint256', type: 'uint256'}, - {name: 'data', internalType: 'bytes', type: 'bytes'}, - ], + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', }, - {name: 'currentStage', internalType: 'uint16', type: 'uint16'}, - {name: 'stageConfigIndex', internalType: 'uint16', type: 'uint16'}, - {name: 'executed', internalType: 'bool', type: 'bool'}, ], }, ], @@ -447,37 +268,19 @@ export const stagedProposalProcessorAbi = [ { type: 'function', inputs: [], - name: 'getStages', + name: 'getTargetConfig', outputs: [ { name: '', - internalType: 'struct StagedProposalProcessor.Stage[]', - type: 'tuple[]', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', components: [ + {name: 'target', internalType: 'address', type: 'address'}, { - name: 'plugins', - internalType: 'struct StagedProposalProcessor.Plugin[]', - type: 'tuple[]', - components: [ - { - name: 'pluginAddress', - internalType: 'address', - type: 'address', - }, - {name: 'isManual', internalType: 'bool', type: 'bool'}, - {name: 'allowedBody', internalType: 'address', type: 'address'}, - { - name: 'proposalType', - internalType: 'enum StagedProposalProcessor.ProposalType', - type: 'uint8', - }, - ], + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', }, - {name: 'maxAdvance', internalType: 'uint64', type: 'uint64'}, - {name: 'minAdvance', internalType: 'uint64', type: 'uint64'}, - {name: 'stageDuration', internalType: 'uint64', type: 'uint64'}, - {name: 'approvalThreshold', internalType: 'uint16', type: 'uint16'}, - {name: 'vetoThreshold', internalType: 'uint16', type: 'uint16'}, ], }, ], @@ -485,53 +288,40 @@ export const stagedProposalProcessorAbi = [ }, { type: 'function', - inputs: [], - name: 'implementation', - outputs: [{name: '', internalType: 'address', type: 'address'}], + inputs: [{name: '', internalType: 'uint256', type: 'uint256'}], + name: 'hasSucceeded', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, { type: 'function', inputs: [ {name: '_dao', internalType: 'contract IDAO', type: 'address'}, - {name: '_trustedForwarder', internalType: 'address', type: 'address'}, { - name: '_stages', - internalType: 'struct StagedProposalProcessor.Stage[]', - type: 'tuple[]', + name: '_targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', components: [ + {name: 'target', internalType: 'address', type: 'address'}, { - name: 'plugins', - internalType: 'struct StagedProposalProcessor.Plugin[]', - type: 'tuple[]', - components: [ - { - name: 'pluginAddress', - internalType: 'address', - type: 'address', - }, - {name: 'isManual', internalType: 'bool', type: 'bool'}, - {name: 'allowedBody', internalType: 'address', type: 'address'}, - { - name: 'proposalType', - internalType: 'enum StagedProposalProcessor.ProposalType', - type: 'uint8', - }, - ], + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', }, - {name: 'maxAdvance', internalType: 'uint64', type: 'uint64'}, - {name: 'minAdvance', internalType: 'uint64', type: 'uint64'}, - {name: 'stageDuration', internalType: 'uint64', type: 'uint64'}, - {name: 'approvalThreshold', internalType: 'uint16', type: 'uint16'}, - {name: 'vetoThreshold', internalType: 'uint16', type: 'uint16'}, ], }, - {name: '_metadata', internalType: 'bytes', type: 'bytes'}, ], name: 'initialize', outputs: [], stateMutability: 'nonpayable', }, + { + type: 'function', + inputs: [{name: '_account', internalType: 'address', type: 'address'}], + name: 'isMember', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, { type: 'function', inputs: [], @@ -555,25 +345,24 @@ export const stagedProposalProcessorAbi = [ outputs: [{name: '', internalType: 'uint8[3]', type: 'uint8[3]'}], stateMutability: 'pure', }, - { - type: 'function', - inputs: [], - name: 'proxiableUUID', - outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], - stateMutability: 'view', - }, { type: 'function', inputs: [ - {name: '_proposalId', internalType: 'bytes32', type: 'bytes32'}, { - name: '_proposalType', - internalType: 'enum StagedProposalProcessor.ProposalType', - type: 'uint8', + name: '_targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], }, - {name: '_tryAdvance', internalType: 'bool', type: 'bool'}, ], - name: 'reportProposalResult', + name: 'setTargetConfig', outputs: [], stateMutability: 'nonpayable', }, @@ -584,105 +373,192 @@ export const stagedProposalProcessorAbi = [ outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, +] as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// AdminSetup +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const adminSetupAbi = [ + {type: 'constructor', inputs: [], stateMutability: 'nonpayable'}, + { + type: 'error', + inputs: [{name: 'admin', internalType: 'address', type: 'address'}], + name: 'AdminAddressInvalid', + }, + {type: 'error', inputs: [], name: 'NonUpgradeablePlugin'}, { type: 'function', inputs: [], - name: 'trustedForwarder', - outputs: [{name: '', internalType: 'address', type: 'address'}], + name: 'EXECUTE_PROPOSAL_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], stateMutability: 'view', }, { type: 'function', - inputs: [{name: '_metadata', internalType: 'bytes', type: 'bytes'}], - name: 'updateMetadata', - outputs: [], - stateMutability: 'nonpayable', + inputs: [], + name: 'implementation', + outputs: [{name: '', internalType: 'address', type: 'address'}], + stateMutability: 'view', }, { type: 'function', inputs: [ - { - name: '_stages', - internalType: 'struct StagedProposalProcessor.Stage[]', - type: 'tuple[]', - components: [ - { - name: 'plugins', - internalType: 'struct StagedProposalProcessor.Plugin[]', - type: 'tuple[]', + {name: '_dao', internalType: 'address', type: 'address'}, + {name: '_data', internalType: 'bytes', type: 'bytes'}, + ], + name: 'prepareInstallation', + outputs: [ + {name: 'plugin', internalType: 'address', type: 'address'}, + { + name: 'preparedSetupData', + internalType: 'struct IPluginSetup.PreparedSetupData', + type: 'tuple', + components: [ + {name: 'helpers', internalType: 'address[]', type: 'address[]'}, + { + name: 'permissions', + internalType: 'struct PermissionLib.MultiTargetPermission[]', + type: 'tuple[]', components: [ { - name: 'pluginAddress', - internalType: 'address', - type: 'address', - }, - {name: 'isManual', internalType: 'bool', type: 'bool'}, - {name: 'allowedBody', internalType: 'address', type: 'address'}, - { - name: 'proposalType', - internalType: 'enum StagedProposalProcessor.ProposalType', + name: 'operation', + internalType: 'enum PermissionLib.Operation', type: 'uint8', }, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'condition', internalType: 'address', type: 'address'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, ], }, - {name: 'maxAdvance', internalType: 'uint64', type: 'uint64'}, - {name: 'minAdvance', internalType: 'uint64', type: 'uint64'}, - {name: 'stageDuration', internalType: 'uint64', type: 'uint64'}, - {name: 'approvalThreshold', internalType: 'uint16', type: 'uint16'}, - {name: 'vetoThreshold', internalType: 'uint16', type: 'uint16'}, ], }, ], - name: 'updateStages', - outputs: [], stateMutability: 'nonpayable', }, { type: 'function', inputs: [ - {name: 'newImplementation', internalType: 'address', type: 'address'}, + {name: '_dao', internalType: 'address', type: 'address'}, + { + name: '_payload', + internalType: 'struct IPluginSetup.SetupPayload', + type: 'tuple', + components: [ + {name: 'plugin', internalType: 'address', type: 'address'}, + { + name: 'currentHelpers', + internalType: 'address[]', + type: 'address[]', + }, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + }, ], - name: 'upgradeTo', - outputs: [], - stateMutability: 'nonpayable', + name: 'prepareUninstallation', + outputs: [ + { + name: 'permissions', + internalType: 'struct PermissionLib.MultiTargetPermission[]', + type: 'tuple[]', + components: [ + { + name: 'operation', + internalType: 'enum PermissionLib.Operation', + type: 'uint8', + }, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'condition', internalType: 'address', type: 'address'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + }, + ], + stateMutability: 'pure', }, { type: 'function', inputs: [ - {name: 'newImplementation', internalType: 'address', type: 'address'}, - {name: 'data', internalType: 'bytes', type: 'bytes'}, + {name: '_dao', internalType: 'address', type: 'address'}, + {name: '_fromBuild', internalType: 'uint16', type: 'uint16'}, + { + name: '_payload', + internalType: 'struct IPluginSetup.SetupPayload', + type: 'tuple', + components: [ + {name: 'plugin', internalType: 'address', type: 'address'}, + { + name: 'currentHelpers', + internalType: 'address[]', + type: 'address[]', + }, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + }, ], - name: 'upgradeToAndCall', - outputs: [], - stateMutability: 'payable', + name: 'prepareUpdate', + outputs: [ + {name: '', internalType: 'bytes', type: 'bytes'}, + { + name: '', + internalType: 'struct IPluginSetup.PreparedSetupData', + type: 'tuple', + components: [ + {name: 'helpers', internalType: 'address[]', type: 'address[]'}, + { + name: 'permissions', + internalType: 'struct PermissionLib.MultiTargetPermission[]', + type: 'tuple[]', + components: [ + { + name: 'operation', + internalType: 'enum PermissionLib.Operation', + type: 'uint8', + }, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'condition', internalType: 'address', type: 'address'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + }, + ], + }, + ], + stateMutability: 'nonpayable', }, -] as const; + { + type: 'function', + inputs: [], + name: 'protocolVersion', + outputs: [{name: '', internalType: 'uint8[3]', type: 'uint8[3]'}], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [{name: '_interfaceId', internalType: 'bytes4', type: 'bytes4'}], + name: 'supportsInterface', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// StagedProposalProcessorSetup +// AdminSetupZkSync ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -export const stagedProposalProcessorSetupAbi = [ +export const adminSetupZkSyncAbi = [ {type: 'constructor', inputs: [], stateMutability: 'nonpayable'}, { type: 'error', - inputs: [ - {name: 'fromBuild', internalType: 'uint16', type: 'uint16'}, - {name: 'thisBuild', internalType: 'uint16', type: 'uint16'}, - ], - name: 'InvalidUpdatePath', + inputs: [{name: 'admin', internalType: 'address', type: 'address'}], + name: 'AdminAddressInvalid', }, + {type: 'error', inputs: [], name: 'NonUpgradeablePlugin'}, { type: 'function', inputs: [], - name: 'ADVANCE_PROPOSAL_PERMISSION_ID', - outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], - stateMutability: 'view', - }, - { - type: 'function', - inputs: [], - name: 'UPDATE_STAGES_PERMISSION_ID', + name: 'EXECUTE_PROPOSAL_PERMISSION_ID', outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], stateMutability: 'view', }, @@ -721,11 +597,7 @@ export const stagedProposalProcessorSetupAbi = [ {name: 'where', internalType: 'address', type: 'address'}, {name: 'who', internalType: 'address', type: 'address'}, {name: 'condition', internalType: 'address', type: 'address'}, - { - name: 'permissionId', - internalType: 'bytes32', - type: 'bytes32', - }, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, ], }, ], @@ -771,7 +643,7 @@ export const stagedProposalProcessorSetupAbi = [ ], }, ], - stateMutability: 'view', + stateMutability: 'pure', }, { type: 'function', @@ -815,17 +687,13 @@ export const stagedProposalProcessorSetupAbi = [ {name: 'where', internalType: 'address', type: 'address'}, {name: 'who', internalType: 'address', type: 'address'}, {name: 'condition', internalType: 'address', type: 'address'}, - { - name: 'permissionId', - internalType: 'bytes32', - type: 'bytes32', - }, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, ], }, ], }, ], - stateMutability: 'pure', + stateMutability: 'nonpayable', }, { type: 'function', @@ -841,21 +709,210 @@ export const stagedProposalProcessorSetupAbi = [ outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// TrustedForwarder +// AdminZkSync ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -export const trustedForwarderAbi = [ - {type: 'error', inputs: [], name: 'NotPossible'}, +export const adminZkSyncAbi = [ + { + type: 'constructor', + inputs: [ + {name: '_dao', internalType: 'contract IDAO', type: 'address'}, + { + name: '_targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'error', + inputs: [ + {name: 'dao', internalType: 'address', type: 'address'}, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + name: 'DaoUnauthorized', + }, + {type: 'error', inputs: [], name: 'DelegateCallFailed'}, + {type: 'error', inputs: [], name: 'FunctionDeprecated'}, + {type: 'error', inputs: [], name: 'FunctionNotSupported'}, + { + type: 'error', + inputs: [ + { + name: 'targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + name: 'InvalidTargetConfig', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'members', + internalType: 'address[]', + type: 'address[]', + indexed: false, + }, + ], + name: 'MembersAdded', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'members', + internalType: 'address[]', + type: 'address[]', + indexed: false, + }, + ], + name: 'MembersRemoved', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'definingContract', + internalType: 'address', + type: 'address', + indexed: true, + }, + ], + name: 'MembershipContractAnnounced', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'proposalId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + { + name: 'creator', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'startDate', + internalType: 'uint64', + type: 'uint64', + indexed: false, + }, + {name: 'endDate', internalType: 'uint64', type: 'uint64', indexed: false}, + {name: 'metadata', internalType: 'bytes', type: 'bytes', indexed: false}, + { + name: 'actions', + internalType: 'struct Action[]', + type: 'tuple[]', + components: [ + {name: 'to', internalType: 'address', type: 'address'}, + {name: 'value', internalType: 'uint256', type: 'uint256'}, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + indexed: false, + }, + { + name: 'allowFailureMap', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'ProposalCreated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'proposalId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + ], + name: 'ProposalExecuted', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'newTargetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + indexed: false, + }, + ], + name: 'TargetSet', + }, + { + type: 'function', + inputs: [], + name: 'EXECUTE_PROPOSAL_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'SET_TARGET_CONFIG_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{name: '', internalType: 'uint256', type: 'uint256'}], + name: 'canExecute', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, { type: 'function', inputs: [ - {name: '_callId', internalType: 'bytes32', type: 'bytes32'}, + {name: '_metadata', internalType: 'bytes', type: 'bytes'}, { name: '_actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -863,13 +920,160 @@ export const trustedForwarderAbi = [ {name: 'data', internalType: 'bytes', type: 'bytes'}, ], }, - {name: '_allowFailureMap', internalType: 'uint256', type: 'uint256'}, + {name: '', internalType: 'uint64', type: 'uint64'}, + {name: '', internalType: 'uint64', type: 'uint64'}, + {name: '_data', internalType: 'bytes', type: 'bytes'}, ], + name: 'createProposal', + outputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [], + name: 'customProposalParamsABI', + outputs: [{name: '', internalType: 'string', type: 'string'}], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [], + name: 'dao', + outputs: [{name: '', internalType: 'contract IDAO', type: 'address'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{name: '', internalType: 'uint256', type: 'uint256'}], name: 'execute', + outputs: [], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + {name: '_metadata', internalType: 'bytes', type: 'bytes'}, + { + name: '_actions', + internalType: 'struct Action[]', + type: 'tuple[]', + components: [ + {name: 'to', internalType: 'address', type: 'address'}, + {name: 'value', internalType: 'uint256', type: 'uint256'}, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + }, + {name: '_allowFailureMap', internalType: 'uint256', type: 'uint256'}, + ], + name: 'executeProposal', + outputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [], + name: 'getCurrentTargetConfig', outputs: [ - {name: 'execResults', internalType: 'bytes[]', type: 'bytes[]'}, - {name: 'failureMap', internalType: 'uint256', type: 'uint256'}, + { + name: '', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'getTargetConfig', + outputs: [ + { + name: '', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{name: '', internalType: 'uint256', type: 'uint256'}], + name: 'hasSucceeded', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{name: '_account', internalType: 'address', type: 'address'}], + name: 'isMember', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'pluginType', + outputs: [ + {name: '', internalType: 'enum IPlugin.PluginType', type: 'uint8'}, + ], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [], + name: 'proposalCount', + outputs: [{name: '', internalType: 'uint256', type: 'uint256'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'protocolVersion', + outputs: [{name: '', internalType: 'uint8[3]', type: 'uint8[3]'}], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [ + { + name: '_targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + name: 'setTargetConfig', + outputs: [], stateMutability: 'nonpayable', }, -] as const; + { + type: 'function', + inputs: [{name: '_interfaceId', internalType: 'bytes4', type: 'bytes4'}], + name: 'supportsInterface', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, +] as const diff --git a/artifacts/src/abis/index.ts b/artifacts/src/abis/index.ts index 9fe29e2f..6ac805dd 100644 --- a/artifacts/src/abis/index.ts +++ b/artifacts/src/abis/index.ts @@ -1,5 +1,6 @@ -export * from './admin-plugin-abis'; -export * from './multisig-plugin-abis'; -export * from './token-voting-plugin-abis'; -export * from './staged-proposal-processor-plugin-abis'; -export * from './osx-abis'; + +export * from './osx/abis'; +export * from './admin-plugin/abis'; +export * from './multisig-plugin/abis'; +export * from './token-voting-plugin/abis'; +export * from './staged-proposal-processor-plugin/abis'; diff --git a/artifacts/src/abis/multisig-plugin-abis.ts b/artifacts/src/abis/multisig-plugin/abis.ts similarity index 80% rename from artifacts/src/abis/multisig-plugin-abis.ts rename to artifacts/src/abis/multisig-plugin/abis.ts index 5f466eec..3b793718 100644 --- a/artifacts/src/abis/multisig-plugin-abis.ts +++ b/artifacts/src/abis/multisig-plugin/abis.ts @@ -61,7 +61,45 @@ export const iMultisigAbi = [ outputs: [], stateMutability: 'nonpayable', }, -] as const; +] as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ListedCheckCondition +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const listedCheckConditionAbi = [ + { + type: 'constructor', + inputs: [{name: '_multisig', internalType: 'address', type: 'address'}], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [ + {name: '_where', internalType: 'address', type: 'address'}, + {name: '_who', internalType: 'address', type: 'address'}, + {name: '_permissionId', internalType: 'bytes32', type: 'bytes32'}, + {name: '_data', internalType: 'bytes', type: 'bytes'}, + ], + name: 'isGranted', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'protocolVersion', + outputs: [{name: '', internalType: 'uint8[3]', type: 'uint8[3]'}], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [{name: '_interfaceId', internalType: 'bytes4', type: 'bytes4'}], + name: 'supportsInterface', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Multisig @@ -76,6 +114,7 @@ export const multisigAbi = [ ], name: 'AddresslistLengthOutOfBounds', }, + {type: 'error', inputs: [], name: 'AlreadyInitialized'}, { type: 'error', inputs: [ @@ -102,11 +141,32 @@ export const multisigAbi = [ ], name: 'DateOutOfBounds', }, + {type: 'error', inputs: [], name: 'DelegateCallFailed'}, + {type: 'error', inputs: [], name: 'FunctionDeprecated'}, { type: 'error', inputs: [{name: 'member', internalType: 'address', type: 'address'}], name: 'InvalidAddresslistUpdate', }, + { + type: 'error', + inputs: [ + { + name: 'targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + name: 'InvalidTargetConfig', + }, { type: 'error', inputs: [ @@ -115,6 +175,16 @@ export const multisigAbi = [ ], name: 'MinApprovalsOutOfBounds', }, + { + type: 'error', + inputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'NonexistentProposal', + }, + { + type: 'error', + inputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'ProposalAlreadyExists', + }, { type: 'error', inputs: [{name: 'sender', internalType: 'address', type: 'address'}], @@ -218,6 +288,14 @@ export const multisigAbi = [ ], name: 'MembershipContractAnnounced', }, + { + type: 'event', + anonymous: false, + inputs: [ + {name: 'metadata', internalType: 'bytes', type: 'bytes', indexed: false}, + ], + name: 'MetadataSet', + }, { type: 'event', anonymous: false, @@ -258,7 +336,7 @@ export const multisigAbi = [ {name: 'metadata', internalType: 'bytes', type: 'bytes', indexed: false}, { name: 'actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -289,6 +367,27 @@ export const multisigAbi = [ ], name: 'ProposalExecuted', }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'newTargetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + indexed: false, + }, + ], + name: 'TargetSet', + }, { type: 'event', anonymous: false, @@ -309,6 +408,27 @@ export const multisigAbi = [ outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], stateMutability: 'view', }, + { + type: 'function', + inputs: [], + name: 'EXECUTE_PROPOSAL_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'SET_METADATA_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'SET_TARGET_CONFIG_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, { type: 'function', inputs: [], @@ -377,7 +497,7 @@ export const multisigAbi = [ {name: '_metadata', internalType: 'bytes', type: 'bytes'}, { name: '_actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -387,6 +507,7 @@ export const multisigAbi = [ }, {name: '_startDate', internalType: 'uint64', type: 'uint64'}, {name: '_endDate', internalType: 'uint64', type: 'uint64'}, + {name: '_data', internalType: 'bytes', type: 'bytes'}, ], name: 'createProposal', outputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], @@ -398,7 +519,7 @@ export const multisigAbi = [ {name: '_metadata', internalType: 'bytes', type: 'bytes'}, { name: '_actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -416,6 +537,13 @@ export const multisigAbi = [ outputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], stateMutability: 'nonpayable', }, + { + type: 'function', + inputs: [], + name: 'customProposalParamsABI', + outputs: [{name: '', internalType: 'string', type: 'string'}], + stateMutability: 'pure', + }, { type: 'function', inputs: [], @@ -430,6 +558,34 @@ export const multisigAbi = [ outputs: [], stateMutability: 'nonpayable', }, + { + type: 'function', + inputs: [], + name: 'getCurrentTargetConfig', + outputs: [ + { + name: '', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'getMetadata', + outputs: [{name: '', internalType: 'bytes', type: 'bytes'}], + stateMutability: 'view', + }, { type: 'function', inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], @@ -450,7 +606,7 @@ export const multisigAbi = [ }, { name: 'actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -459,6 +615,40 @@ export const multisigAbi = [ ], }, {name: 'allowFailureMap', internalType: 'uint256', type: 'uint256'}, + { + name: 'targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'getTargetConfig', + outputs: [ + { + name: '', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, ], stateMutability: 'view', }, @@ -472,6 +662,13 @@ export const multisigAbi = [ outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, + { + type: 'function', + inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'hasSucceeded', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, { type: 'function', inputs: [], @@ -493,11 +690,35 @@ export const multisigAbi = [ {name: 'minApprovals', internalType: 'uint16', type: 'uint16'}, ], }, + { + name: '_targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + {name: '_pluginMetadata', internalType: 'bytes', type: 'bytes'}, ], name: 'initialize', outputs: [], stateMutability: 'nonpayable', }, + { + type: 'function', + inputs: [ + {name: '_fromBuild', internalType: 'uint16', type: 'uint16'}, + {name: '_initData', internalType: 'bytes', type: 'bytes'}, + ], + name: 'initializeFrom', + outputs: [], + stateMutability: 'nonpayable', + }, { type: 'function', inputs: [{name: '_account', internalType: 'address', type: 'address'}], @@ -578,23 +799,37 @@ export const multisigAbi = [ }, { type: 'function', - inputs: [{name: '_forwarder', internalType: 'address', type: 'address'}], - name: 'setForwarder', + inputs: [{name: '_metadata', internalType: 'bytes', type: 'bytes'}], + name: 'setMetadata', outputs: [], stateMutability: 'nonpayable', }, { type: 'function', - inputs: [{name: '_interfaceId', internalType: 'bytes4', type: 'bytes4'}], - name: 'supportsInterface', - outputs: [{name: '', internalType: 'bool', type: 'bool'}], - stateMutability: 'view', + inputs: [ + { + name: '_targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + name: 'setTargetConfig', + outputs: [], + stateMutability: 'nonpayable', }, { type: 'function', - inputs: [], - name: 'trustedForwarder', - outputs: [{name: '', internalType: 'address', type: 'address'}], + inputs: [{name: '_interfaceId', internalType: 'bytes4', type: 'bytes4'}], + name: 'supportsInterface', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, { @@ -633,45 +868,7 @@ export const multisigAbi = [ outputs: [], stateMutability: 'payable', }, -] as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// MultisigCondition -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const multisigConditionAbi = [ - { - type: 'constructor', - inputs: [{name: '_multisig', internalType: 'address', type: 'address'}], - stateMutability: 'nonpayable', - }, - { - type: 'function', - inputs: [ - {name: '_where', internalType: 'address', type: 'address'}, - {name: '_who', internalType: 'address', type: 'address'}, - {name: '_permissionId', internalType: 'bytes32', type: 'bytes32'}, - {name: '_data', internalType: 'bytes', type: 'bytes'}, - ], - name: 'isGranted', - outputs: [{name: '', internalType: 'bool', type: 'bool'}], - stateMutability: 'view', - }, - { - type: 'function', - inputs: [], - name: 'protocolVersion', - outputs: [{name: '', internalType: 'uint8[3]', type: 'uint8[3]'}], - stateMutability: 'pure', - }, - { - type: 'function', - inputs: [{name: '_interfaceId', internalType: 'bytes4', type: 'bytes4'}], - name: 'supportsInterface', - outputs: [{name: '', internalType: 'bool', type: 'bool'}], - stateMutability: 'view', - }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // MultisigSetup @@ -774,7 +971,7 @@ export const multisigSetupAbi = [ type: 'function', inputs: [ {name: '_dao', internalType: 'address', type: 'address'}, - {name: '_currentBuild', internalType: 'uint16', type: 'uint16'}, + {name: '_fromBuild', internalType: 'uint16', type: 'uint16'}, { name: '_payload', internalType: 'struct IPluginSetup.SetupPayload', @@ -834,4 +1031,4 @@ export const multisigSetupAbi = [ outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, -] as const; +] as const diff --git a/artifacts/src/abis/osx-abis.ts b/artifacts/src/abis/osx/abis.ts similarity index 98% rename from artifacts/src/abis/osx-abis.ts rename to artifacts/src/abis/osx/abis.ts index 4b20064e..0e00071b 100644 --- a/artifacts/src/abis/osx-abis.ts +++ b/artifacts/src/abis/osx/abis.ts @@ -26,7 +26,7 @@ export const callbackHandlerAbi = [ ], name: 'CallbackReceived', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // DAO @@ -39,6 +39,7 @@ export const daoAbi = [ inputs: [{name: 'index', internalType: 'uint256', type: 'uint256'}], name: 'ActionFailed', }, + {type: 'error', inputs: [], name: 'AlreadyInitialized'}, {type: 'error', inputs: [], name: 'AnyAddressDisallowedForWhoAndWhere'}, { type: 'error', @@ -188,7 +189,7 @@ export const daoAbi = [ }, { name: 'actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -471,7 +472,7 @@ export const daoAbi = [ {name: '_callId', internalType: 'bytes32', type: 'bytes32'}, { name: '_actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -675,7 +676,7 @@ export const daoAbi = [ stateMutability: 'payable', }, {type: 'receive', stateMutability: 'payable'}, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // DAOFactory @@ -746,6 +747,42 @@ export const daoFactoryAbi = [ name: 'createDao', outputs: [ {name: 'createdDao', internalType: 'contract DAO', type: 'address'}, + { + name: 'installedPlugins', + internalType: 'struct DAOFactory.InstalledPlugin[]', + type: 'tuple[]', + components: [ + {name: 'plugin', internalType: 'address', type: 'address'}, + { + name: 'preparedSetupData', + internalType: 'struct IPluginSetup.PreparedSetupData', + type: 'tuple', + components: [ + {name: 'helpers', internalType: 'address[]', type: 'address[]'}, + { + name: 'permissions', + internalType: 'struct PermissionLib.MultiTargetPermission[]', + type: 'tuple[]', + components: [ + { + name: 'operation', + internalType: 'enum PermissionLib.Operation', + type: 'uint8', + }, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'condition', internalType: 'address', type: 'address'}, + { + name: 'permissionId', + internalType: 'bytes32', + type: 'bytes32', + }, + ], + }, + ], + }, + ], + }, ], stateMutability: 'nonpayable', }, @@ -792,7 +829,7 @@ export const daoFactoryAbi = [ outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // DAORegistry @@ -825,6 +862,7 @@ export const daoRegistryAbi = [ ], name: 'DaoUnauthorized', }, + {type: 'error', inputs: [], name: 'ENSNotSupported'}, { type: 'error', inputs: [{name: 'subdomain', internalType: 'string', type: 'string'}], @@ -1004,7 +1042,7 @@ export const daoRegistryAbi = [ outputs: [], stateMutability: 'payable', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // ENSSubdomainRegistrar @@ -1189,7 +1227,7 @@ export const ensSubdomainRegistrarAbi = [ outputs: [], stateMutability: 'payable', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // IEIP4824 @@ -1203,7 +1241,7 @@ export const ieip4824Abi = [ outputs: [{name: '_daoURI', internalType: 'string', type: 'string'}], stateMutability: 'view', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // IPluginRepo @@ -1267,7 +1305,7 @@ export const iPluginRepoAbi = [ outputs: [], stateMutability: 'nonpayable', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // InterfaceBasedRegistry @@ -1401,7 +1439,7 @@ export const interfaceBasedRegistryAbi = [ outputs: [], stateMutability: 'payable', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // PermissionManager @@ -1603,7 +1641,7 @@ export const permissionManagerAbi = [ outputs: [], stateMutability: 'nonpayable', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // PlaceholderSetup @@ -1744,7 +1782,7 @@ export const placeholderSetupAbi = [ ], }, ], - stateMutability: 'pure', + stateMutability: 'nonpayable', }, { type: 'function', @@ -1760,7 +1798,7 @@ export const placeholderSetupAbi = [ outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // PluginRepo @@ -2289,7 +2327,7 @@ export const pluginRepoAbi = [ outputs: [], stateMutability: 'payable', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // PluginRepoFactory @@ -2366,7 +2404,7 @@ export const pluginRepoFactoryAbi = [ outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // PluginRepoRegistry @@ -2399,7 +2437,7 @@ export const pluginRepoRegistryAbi = [ ], name: 'DaoUnauthorized', }, - {type: 'error', inputs: [], name: 'EmptyPluginRepoSubdomain'}, + {type: 'error', inputs: [], name: 'ENSNotSupported'}, { type: 'error', inputs: [{name: 'subdomain', internalType: 'string', type: 'string'}], @@ -2577,7 +2615,7 @@ export const pluginRepoRegistryAbi = [ outputs: [], stateMutability: 'payable', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // PluginSetupProcessor @@ -3359,4 +3397,4 @@ export const pluginSetupProcessorAbi = [ outputs: [], stateMutability: 'view', }, -] as const; +] as const diff --git a/artifacts/src/abis/staged-proposal-processor-plugin/abis.ts b/artifacts/src/abis/staged-proposal-processor-plugin/abis.ts new file mode 100644 index 00000000..7fe08f9f --- /dev/null +++ b/artifacts/src/abis/staged-proposal-processor-plugin/abis.ts @@ -0,0 +1,1608 @@ +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Errors +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const errorsAbi = [ + { + type: 'error', + inputs: [{name: 'body', internalType: 'address', type: 'address'}], + name: 'BodyResultTypeNotSet', + }, + { + type: 'error', + inputs: [ + {name: 'stageId', internalType: 'uint256', type: 'uint256'}, + {name: 'body', internalType: 'address', type: 'address'}, + ], + name: 'DuplicateBodyAddress', + }, + {type: 'error', inputs: [], name: 'EmptyMetadata'}, + {type: 'error', inputs: [], name: 'IncorrectActionCount'}, + {type: 'error', inputs: [], name: 'InsufficientGas'}, + {type: 'error', inputs: [], name: 'InterfaceNotSupported'}, + {type: 'error', inputs: [], name: 'InvalidCustomParamsForFirstStage'}, + { + type: 'error', + inputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'NonexistentProposal', + }, + { + type: 'error', + inputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'ProposalAdvanceForbidden', + }, + { + type: 'error', + inputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'ProposalAlreadyCancelled', + }, + { + type: 'error', + inputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'ProposalAlreadyExists', + }, + { + type: 'error', + inputs: [ + {name: 'proposalId', internalType: 'uint256', type: 'uint256'}, + {name: 'stageId', internalType: 'uint16', type: 'uint16'}, + ], + name: 'ProposalCanNotBeCancelled', + }, + { + type: 'error', + inputs: [ + {name: 'proposalId', internalType: 'uint256', type: 'uint256'}, + {name: 'stageId', internalType: 'uint16', type: 'uint16'}, + ], + name: 'ProposalCanNotBeEdited', + }, + { + type: 'error', + inputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'ProposalExecutionForbidden', + }, + {type: 'error', inputs: [], name: 'StageCountZero'}, + {type: 'error', inputs: [], name: 'StageDurationsInvalid'}, + { + type: 'error', + inputs: [ + {name: 'currentStageId', internalType: 'uint64', type: 'uint64'}, + {name: 'reportedStageId', internalType: 'uint64', type: 'uint64'}, + ], + name: 'StageIdInvalid', + }, + {type: 'error', inputs: [], name: 'StageThresholdsInvalid'}, + { + type: 'error', + inputs: [{name: '', internalType: 'uint64', type: 'uint64'}], + name: 'StartDateInvalid', + }, + {type: 'error', inputs: [], name: 'Uint16MaxSizeExceeded'}, + { + type: 'error', + inputs: [ + {name: 'proposalId', internalType: 'uint256', type: 'uint256'}, + {name: 'currentState', internalType: 'uint8', type: 'uint8'}, + {name: 'allowedStates', internalType: 'bytes32', type: 'bytes32'}, + ], + name: 'UnexpectedProposalState', + }, +] as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// SPPRuleCondition +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const sppRuleConditionAbi = [ + { + type: 'constructor', + inputs: [ + {name: '_dao', internalType: 'address', type: 'address'}, + { + name: '_rules', + internalType: 'struct RuledCondition.Rule[]', + type: 'tuple[]', + components: [ + {name: 'id', internalType: 'uint8', type: 'uint8'}, + {name: 'op', internalType: 'uint8', type: 'uint8'}, + {name: 'value', internalType: 'uint240', type: 'uint240'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [], + name: 'UPDATE_RULES_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'dao', + outputs: [{name: '', internalType: 'contract IDAO', type: 'address'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{name: '_x', internalType: 'uint256', type: 'uint256'}], + name: 'decodeRuleValue', + outputs: [ + {name: 'a', internalType: 'uint32', type: 'uint32'}, + {name: 'b', internalType: 'uint32', type: 'uint32'}, + {name: 'c', internalType: 'uint32', type: 'uint32'}, + ], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [ + {name: 'startingRuleIndex', internalType: 'uint256', type: 'uint256'}, + {name: 'successRuleIndex', internalType: 'uint256', type: 'uint256'}, + {name: 'failureRuleIndex', internalType: 'uint256', type: 'uint256'}, + ], + name: 'encodeIfElse', + outputs: [{name: '', internalType: 'uint240', type: 'uint240'}], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [ + {name: 'ruleIndex1', internalType: 'uint256', type: 'uint256'}, + {name: 'ruleIndex2', internalType: 'uint256', type: 'uint256'}, + ], + name: 'encodeLogicalOperator', + outputs: [{name: '', internalType: 'uint240', type: 'uint240'}], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [], + name: 'getRules', + outputs: [ + { + name: '', + internalType: 'struct RuledCondition.Rule[]', + type: 'tuple[]', + components: [ + {name: 'id', internalType: 'uint8', type: 'uint8'}, + {name: 'op', internalType: 'uint8', type: 'uint8'}, + {name: 'value', internalType: 'uint240', type: 'uint240'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + {name: '_dao', internalType: 'address', type: 'address'}, + { + name: '_rules', + internalType: 'struct RuledCondition.Rule[]', + type: 'tuple[]', + components: [ + {name: 'id', internalType: 'uint8', type: 'uint8'}, + {name: 'op', internalType: 'uint8', type: 'uint8'}, + {name: 'value', internalType: 'uint240', type: 'uint240'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + }, + ], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [ + {name: '_where', internalType: 'address', type: 'address'}, + {name: '_who', internalType: 'address', type: 'address'}, + {name: '_permissionId', internalType: 'bytes32', type: 'bytes32'}, + {name: '', internalType: 'bytes', type: 'bytes'}, + ], + name: 'isGranted', + outputs: [{name: 'isPermitted', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'protocolVersion', + outputs: [{name: '', internalType: 'uint8[3]', type: 'uint8[3]'}], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [{name: '_interfaceId', internalType: 'bytes4', type: 'bytes4'}], + name: 'supportsInterface', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + { + name: '_rules', + internalType: 'struct RuledCondition.Rule[]', + type: 'tuple[]', + components: [ + {name: 'id', internalType: 'uint8', type: 'uint8'}, + {name: 'op', internalType: 'uint8', type: 'uint8'}, + {name: 'value', internalType: 'uint240', type: 'uint240'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + }, + ], + name: 'updateRules', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'event', + anonymous: false, + inputs: [ + {name: 'version', internalType: 'uint8', type: 'uint8', indexed: false}, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'rules', + internalType: 'struct RuledCondition.Rule[]', + type: 'tuple[]', + components: [ + {name: 'id', internalType: 'uint8', type: 'uint8'}, + {name: 'op', internalType: 'uint8', type: 'uint8'}, + {name: 'value', internalType: 'uint240', type: 'uint240'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + indexed: false, + }, + ], + name: 'RulesUpdated', + }, + { + type: 'error', + inputs: [ + {name: 'dao', internalType: 'address', type: 'address'}, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + name: 'DaoUnauthorized', + }, +] as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// StagedProposalProcessor +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const stagedProposalProcessorAbi = [ + { + type: 'function', + inputs: [], + name: 'SET_METADATA_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'SET_TARGET_CONFIG_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'UPGRADE_PLUGIN_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'advanceProposal', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'canExecute', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'canProposalAdvance', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'cancel', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [ + {name: '_metadata', internalType: 'bytes', type: 'bytes'}, + { + name: '_actions', + internalType: 'struct Action[]', + type: 'tuple[]', + components: [ + {name: 'to', internalType: 'address', type: 'address'}, + {name: 'value', internalType: 'uint256', type: 'uint256'}, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + }, + {name: '_allowFailureMap', internalType: 'uint128', type: 'uint128'}, + {name: '_startDate', internalType: 'uint64', type: 'uint64'}, + {name: '_proposalParams', internalType: 'bytes[][]', type: 'bytes[][]'}, + ], + name: 'createProposal', + outputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [ + {name: '_metadata', internalType: 'bytes', type: 'bytes'}, + { + name: '_actions', + internalType: 'struct Action[]', + type: 'tuple[]', + components: [ + {name: 'to', internalType: 'address', type: 'address'}, + {name: 'value', internalType: 'uint256', type: 'uint256'}, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + }, + {name: '_startDate', internalType: 'uint64', type: 'uint64'}, + {name: '', internalType: 'uint64', type: 'uint64'}, + {name: '_data', internalType: 'bytes', type: 'bytes'}, + ], + name: 'createProposal', + outputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [], + name: 'customProposalParamsABI', + outputs: [{name: '', internalType: 'string', type: 'string'}], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [], + name: 'dao', + outputs: [{name: '', internalType: 'contract IDAO', type: 'address'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + {name: '_proposalId', internalType: 'uint256', type: 'uint256'}, + {name: '_metadata', internalType: 'bytes', type: 'bytes'}, + { + name: '_actions', + internalType: 'struct Action[]', + type: 'tuple[]', + components: [ + {name: 'to', internalType: 'address', type: 'address'}, + {name: 'value', internalType: 'uint256', type: 'uint256'}, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + }, + ], + name: 'edit', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'execute', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [ + {name: '_proposalId', internalType: 'uint256', type: 'uint256'}, + {name: '_stageId', internalType: 'uint16', type: 'uint16'}, + {name: '_body', internalType: 'address', type: 'address'}, + ], + name: 'getBodyProposalId', + outputs: [{name: '', internalType: 'uint256', type: 'uint256'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + {name: '_proposalId', internalType: 'uint256', type: 'uint256'}, + {name: '_stageId', internalType: 'uint16', type: 'uint16'}, + {name: '_body', internalType: 'address', type: 'address'}, + ], + name: 'getBodyResult', + outputs: [ + { + name: '', + internalType: 'enum StagedProposalProcessor.ResultType', + type: 'uint8', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + {name: '_proposalId', internalType: 'uint256', type: 'uint256'}, + {name: '_stageId', internalType: 'uint16', type: 'uint16'}, + {name: '_index', internalType: 'uint256', type: 'uint256'}, + ], + name: 'getCreateProposalParams', + outputs: [{name: '', internalType: 'bytes', type: 'bytes'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'getCurrentConfigIndex', + outputs: [{name: '', internalType: 'uint16', type: 'uint16'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'getCurrentTargetConfig', + outputs: [ + { + name: '', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'getMetadata', + outputs: [{name: '', internalType: 'bytes', type: 'bytes'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'getProposal', + outputs: [ + { + name: '', + internalType: 'struct StagedProposalProcessor.Proposal', + type: 'tuple', + components: [ + {name: 'allowFailureMap', internalType: 'uint128', type: 'uint128'}, + {name: 'lastStageTransition', internalType: 'uint64', type: 'uint64'}, + {name: 'currentStage', internalType: 'uint16', type: 'uint16'}, + {name: 'stageConfigIndex', internalType: 'uint16', type: 'uint16'}, + {name: 'executed', internalType: 'bool', type: 'bool'}, + {name: 'canceled', internalType: 'bool', type: 'bool'}, + {name: 'creator', internalType: 'address', type: 'address'}, + { + name: 'actions', + internalType: 'struct Action[]', + type: 'tuple[]', + components: [ + {name: 'to', internalType: 'address', type: 'address'}, + {name: 'value', internalType: 'uint256', type: 'uint256'}, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + }, + { + name: 'targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + {name: '_proposalId', internalType: 'uint256', type: 'uint256'}, + {name: '_stageId', internalType: 'uint16', type: 'uint16'}, + ], + name: 'getProposalTally', + outputs: [ + {name: 'approvals', internalType: 'uint256', type: 'uint256'}, + {name: 'vetoes', internalType: 'uint256', type: 'uint256'}, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{name: '_index', internalType: 'uint256', type: 'uint256'}], + name: 'getStages', + outputs: [ + { + name: '', + internalType: 'struct StagedProposalProcessor.Stage[]', + type: 'tuple[]', + components: [ + { + name: 'bodies', + internalType: 'struct StagedProposalProcessor.Body[]', + type: 'tuple[]', + components: [ + {name: 'addr', internalType: 'address', type: 'address'}, + {name: 'isManual', internalType: 'bool', type: 'bool'}, + {name: 'tryAdvance', internalType: 'bool', type: 'bool'}, + { + name: 'resultType', + internalType: 'enum StagedProposalProcessor.ResultType', + type: 'uint8', + }, + ], + }, + {name: 'maxAdvance', internalType: 'uint64', type: 'uint64'}, + {name: 'minAdvance', internalType: 'uint64', type: 'uint64'}, + {name: 'voteDuration', internalType: 'uint64', type: 'uint64'}, + {name: 'approvalThreshold', internalType: 'uint16', type: 'uint16'}, + {name: 'vetoThreshold', internalType: 'uint16', type: 'uint16'}, + {name: 'cancelable', internalType: 'bool', type: 'bool'}, + {name: 'editable', internalType: 'bool', type: 'bool'}, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'getTargetConfig', + outputs: [ + { + name: '', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'getTrustedForwarder', + outputs: [{name: '', internalType: 'address', type: 'address'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{name: '_account', internalType: 'address', type: 'address'}], + name: 'hasAdvancePermission', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{name: '_account', internalType: 'address', type: 'address'}], + name: 'hasExecutePermission', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'hasSucceeded', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'implementation', + outputs: [{name: '', internalType: 'address', type: 'address'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + {name: '_dao', internalType: 'contract IDAO', type: 'address'}, + {name: '_trustedForwarder', internalType: 'address', type: 'address'}, + { + name: '_stages', + internalType: 'struct StagedProposalProcessor.Stage[]', + type: 'tuple[]', + components: [ + { + name: 'bodies', + internalType: 'struct StagedProposalProcessor.Body[]', + type: 'tuple[]', + components: [ + {name: 'addr', internalType: 'address', type: 'address'}, + {name: 'isManual', internalType: 'bool', type: 'bool'}, + {name: 'tryAdvance', internalType: 'bool', type: 'bool'}, + { + name: 'resultType', + internalType: 'enum StagedProposalProcessor.ResultType', + type: 'uint8', + }, + ], + }, + {name: 'maxAdvance', internalType: 'uint64', type: 'uint64'}, + {name: 'minAdvance', internalType: 'uint64', type: 'uint64'}, + {name: 'voteDuration', internalType: 'uint64', type: 'uint64'}, + {name: 'approvalThreshold', internalType: 'uint16', type: 'uint16'}, + {name: 'vetoThreshold', internalType: 'uint16', type: 'uint16'}, + {name: 'cancelable', internalType: 'bool', type: 'bool'}, + {name: 'editable', internalType: 'bool', type: 'bool'}, + ], + }, + {name: '_pluginMetadata', internalType: 'bytes', type: 'bytes'}, + { + name: '_targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [{name: '_forwarder', internalType: 'address', type: 'address'}], + name: 'isTrustedForwarder', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'pluginType', + outputs: [ + {name: '', internalType: 'enum IPlugin.PluginType', type: 'uint8'}, + ], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [], + name: 'proposalCount', + outputs: [{name: '', internalType: 'uint256', type: 'uint256'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'protocolVersion', + outputs: [{name: '', internalType: 'uint8[3]', type: 'uint8[3]'}], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [], + name: 'proxiableUUID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + {name: '_proposalId', internalType: 'uint256', type: 'uint256'}, + {name: '_stageId', internalType: 'uint16', type: 'uint16'}, + { + name: '_resultType', + internalType: 'enum StagedProposalProcessor.ResultType', + type: 'uint8', + }, + {name: '_tryAdvance', internalType: 'bool', type: 'bool'}, + ], + name: 'reportProposalResult', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [{name: '_metadata', internalType: 'bytes', type: 'bytes'}], + name: 'setMetadata', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [ + { + name: '_targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + name: 'setTargetConfig', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [{name: '_forwarder', internalType: 'address', type: 'address'}], + name: 'setTrustedForwarder', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'state', + outputs: [ + { + name: '', + internalType: 'enum StagedProposalProcessor.ProposalState', + type: 'uint8', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{name: '_interfaceId', internalType: 'bytes4', type: 'bytes4'}], + name: 'supportsInterface', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + { + name: '_stages', + internalType: 'struct StagedProposalProcessor.Stage[]', + type: 'tuple[]', + components: [ + { + name: 'bodies', + internalType: 'struct StagedProposalProcessor.Body[]', + type: 'tuple[]', + components: [ + {name: 'addr', internalType: 'address', type: 'address'}, + {name: 'isManual', internalType: 'bool', type: 'bool'}, + {name: 'tryAdvance', internalType: 'bool', type: 'bool'}, + { + name: 'resultType', + internalType: 'enum StagedProposalProcessor.ResultType', + type: 'uint8', + }, + ], + }, + {name: 'maxAdvance', internalType: 'uint64', type: 'uint64'}, + {name: 'minAdvance', internalType: 'uint64', type: 'uint64'}, + {name: 'voteDuration', internalType: 'uint64', type: 'uint64'}, + {name: 'approvalThreshold', internalType: 'uint16', type: 'uint16'}, + {name: 'vetoThreshold', internalType: 'uint16', type: 'uint16'}, + {name: 'cancelable', internalType: 'bool', type: 'bool'}, + {name: 'editable', internalType: 'bool', type: 'bool'}, + ], + }, + ], + name: 'updateStages', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [ + {name: 'newImplementation', internalType: 'address', type: 'address'}, + ], + name: 'upgradeTo', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [ + {name: 'newImplementation', internalType: 'address', type: 'address'}, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + name: 'upgradeToAndCall', + outputs: [], + stateMutability: 'payable', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'previousAdmin', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'newAdmin', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'AdminChanged', + }, + { + type: 'event', + anonymous: false, + inputs: [ + {name: 'beacon', internalType: 'address', type: 'address', indexed: true}, + ], + name: 'BeaconUpgraded', + }, + { + type: 'event', + anonymous: false, + inputs: [ + {name: 'version', internalType: 'uint8', type: 'uint8', indexed: false}, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + {name: 'metadata', internalType: 'bytes', type: 'bytes', indexed: false}, + ], + name: 'MetadataSet', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'proposalId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + {name: 'stageId', internalType: 'uint16', type: 'uint16', indexed: true}, + {name: 'sender', internalType: 'address', type: 'address', indexed: true}, + ], + name: 'ProposalAdvanced', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'proposalId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + {name: 'stageId', internalType: 'uint16', type: 'uint16', indexed: true}, + {name: 'sender', internalType: 'address', type: 'address', indexed: true}, + ], + name: 'ProposalCanceled', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'proposalId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + { + name: 'creator', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'startDate', + internalType: 'uint64', + type: 'uint64', + indexed: false, + }, + {name: 'endDate', internalType: 'uint64', type: 'uint64', indexed: false}, + {name: 'metadata', internalType: 'bytes', type: 'bytes', indexed: false}, + { + name: 'actions', + internalType: 'struct Action[]', + type: 'tuple[]', + components: [ + {name: 'to', internalType: 'address', type: 'address'}, + {name: 'value', internalType: 'uint256', type: 'uint256'}, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + indexed: false, + }, + { + name: 'allowFailureMap', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'ProposalCreated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'proposalId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + {name: 'stageId', internalType: 'uint16', type: 'uint16', indexed: true}, + {name: 'sender', internalType: 'address', type: 'address', indexed: true}, + {name: 'metadata', internalType: 'bytes', type: 'bytes', indexed: false}, + { + name: 'actions', + internalType: 'struct Action[]', + type: 'tuple[]', + components: [ + {name: 'to', internalType: 'address', type: 'address'}, + {name: 'value', internalType: 'uint256', type: 'uint256'}, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + indexed: false, + }, + ], + name: 'ProposalEdited', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'proposalId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + ], + name: 'ProposalExecuted', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'proposalId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + {name: 'stageId', internalType: 'uint16', type: 'uint16', indexed: true}, + {name: 'body', internalType: 'address', type: 'address', indexed: true}, + ], + name: 'ProposalResultReported', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'stages', + internalType: 'struct StagedProposalProcessor.Stage[]', + type: 'tuple[]', + components: [ + { + name: 'bodies', + internalType: 'struct StagedProposalProcessor.Body[]', + type: 'tuple[]', + components: [ + {name: 'addr', internalType: 'address', type: 'address'}, + {name: 'isManual', internalType: 'bool', type: 'bool'}, + {name: 'tryAdvance', internalType: 'bool', type: 'bool'}, + { + name: 'resultType', + internalType: 'enum StagedProposalProcessor.ResultType', + type: 'uint8', + }, + ], + }, + {name: 'maxAdvance', internalType: 'uint64', type: 'uint64'}, + {name: 'minAdvance', internalType: 'uint64', type: 'uint64'}, + {name: 'voteDuration', internalType: 'uint64', type: 'uint64'}, + {name: 'approvalThreshold', internalType: 'uint16', type: 'uint16'}, + {name: 'vetoThreshold', internalType: 'uint16', type: 'uint16'}, + {name: 'cancelable', internalType: 'bool', type: 'bool'}, + {name: 'editable', internalType: 'bool', type: 'bool'}, + ], + indexed: false, + }, + ], + name: 'StagesUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'proposalId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + {name: 'stageId', internalType: 'uint16', type: 'uint16', indexed: true}, + {name: 'body', internalType: 'address', type: 'address', indexed: true}, + { + name: 'bodyProposalId', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'SubProposalCreated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'proposalId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + {name: 'stageId', internalType: 'uint16', type: 'uint16', indexed: true}, + {name: 'body', internalType: 'address', type: 'address', indexed: true}, + {name: 'reason', internalType: 'bytes', type: 'bytes', indexed: false}, + ], + name: 'SubProposalNotCreated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'newTargetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + indexed: false, + }, + ], + name: 'TargetSet', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'forwarder', + internalType: 'address', + type: 'address', + indexed: true, + }, + ], + name: 'TrustedForwarderUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'implementation', + internalType: 'address', + type: 'address', + indexed: true, + }, + ], + name: 'Upgraded', + }, + {type: 'error', inputs: [], name: 'AlreadyInitialized'}, + { + type: 'error', + inputs: [{name: 'body', internalType: 'address', type: 'address'}], + name: 'BodyResultTypeNotSet', + }, + { + type: 'error', + inputs: [ + {name: 'dao', internalType: 'address', type: 'address'}, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + name: 'DaoUnauthorized', + }, + {type: 'error', inputs: [], name: 'DelegateCallFailed'}, + { + type: 'error', + inputs: [ + {name: 'stageId', internalType: 'uint256', type: 'uint256'}, + {name: 'body', internalType: 'address', type: 'address'}, + ], + name: 'DuplicateBodyAddress', + }, + {type: 'error', inputs: [], name: 'FunctionDeprecated'}, + {type: 'error', inputs: [], name: 'InsufficientGas'}, + {type: 'error', inputs: [], name: 'InterfaceNotSupported'}, + { + type: 'error', + inputs: [ + { + name: 'targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + name: 'InvalidTargetConfig', + }, + { + type: 'error', + inputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'NonexistentProposal', + }, + { + type: 'error', + inputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'ProposalAdvanceForbidden', + }, + { + type: 'error', + inputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'ProposalAlreadyExists', + }, + { + type: 'error', + inputs: [ + {name: 'proposalId', internalType: 'uint256', type: 'uint256'}, + {name: 'stageId', internalType: 'uint16', type: 'uint16'}, + ], + name: 'ProposalCanNotBeCancelled', + }, + { + type: 'error', + inputs: [ + {name: 'proposalId', internalType: 'uint256', type: 'uint256'}, + {name: 'stageId', internalType: 'uint16', type: 'uint16'}, + ], + name: 'ProposalCanNotBeEdited', + }, + { + type: 'error', + inputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'ProposalExecutionForbidden', + }, + {type: 'error', inputs: [], name: 'StageCountZero'}, + {type: 'error', inputs: [], name: 'StageDurationsInvalid'}, + { + type: 'error', + inputs: [ + {name: 'currentStageId', internalType: 'uint64', type: 'uint64'}, + {name: 'reportedStageId', internalType: 'uint64', type: 'uint64'}, + ], + name: 'StageIdInvalid', + }, + {type: 'error', inputs: [], name: 'StageThresholdsInvalid'}, + { + type: 'error', + inputs: [{name: '', internalType: 'uint64', type: 'uint64'}], + name: 'StartDateInvalid', + }, + {type: 'error', inputs: [], name: 'Uint16MaxSizeExceeded'}, + { + type: 'error', + inputs: [ + {name: 'proposalId', internalType: 'uint256', type: 'uint256'}, + {name: 'currentState', internalType: 'uint8', type: 'uint8'}, + {name: 'allowedStates', internalType: 'bytes32', type: 'bytes32'}, + ], + name: 'UnexpectedProposalState', + }, +] as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// StagedProposalProcessorSetup +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const stagedProposalProcessorSetupAbi = [ + {type: 'constructor', inputs: [], stateMutability: 'nonpayable'}, + { + type: 'function', + inputs: [], + name: 'CONDITION_IMPLEMENTATION', + outputs: [{name: '', internalType: 'address', type: 'address'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'implementation', + outputs: [{name: '', internalType: 'address', type: 'address'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + {name: '_dao', internalType: 'address', type: 'address'}, + {name: '_installationParams', internalType: 'bytes', type: 'bytes'}, + ], + name: 'prepareInstallation', + outputs: [ + {name: 'spp', internalType: 'address', type: 'address'}, + { + name: 'preparedSetupData', + internalType: 'struct IPluginSetup.PreparedSetupData', + type: 'tuple', + components: [ + {name: 'helpers', internalType: 'address[]', type: 'address[]'}, + { + name: 'permissions', + internalType: 'struct PermissionLib.MultiTargetPermission[]', + type: 'tuple[]', + components: [ + { + name: 'operation', + internalType: 'enum PermissionLib.Operation', + type: 'uint8', + }, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'condition', internalType: 'address', type: 'address'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + }, + ], + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [ + {name: '_dao', internalType: 'address', type: 'address'}, + { + name: '_payload', + internalType: 'struct IPluginSetup.SetupPayload', + type: 'tuple', + components: [ + {name: 'plugin', internalType: 'address', type: 'address'}, + { + name: 'currentHelpers', + internalType: 'address[]', + type: 'address[]', + }, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + }, + ], + name: 'prepareUninstallation', + outputs: [ + { + name: 'permissions', + internalType: 'struct PermissionLib.MultiTargetPermission[]', + type: 'tuple[]', + components: [ + { + name: 'operation', + internalType: 'enum PermissionLib.Operation', + type: 'uint8', + }, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'condition', internalType: 'address', type: 'address'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + }, + ], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [ + {name: '_dao', internalType: 'address', type: 'address'}, + {name: '_fromBuild', internalType: 'uint16', type: 'uint16'}, + { + name: '_payload', + internalType: 'struct IPluginSetup.SetupPayload', + type: 'tuple', + components: [ + {name: 'plugin', internalType: 'address', type: 'address'}, + { + name: 'currentHelpers', + internalType: 'address[]', + type: 'address[]', + }, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + }, + ], + name: 'prepareUpdate', + outputs: [ + {name: '', internalType: 'bytes', type: 'bytes'}, + { + name: '', + internalType: 'struct IPluginSetup.PreparedSetupData', + type: 'tuple', + components: [ + {name: 'helpers', internalType: 'address[]', type: 'address[]'}, + { + name: 'permissions', + internalType: 'struct PermissionLib.MultiTargetPermission[]', + type: 'tuple[]', + components: [ + { + name: 'operation', + internalType: 'enum PermissionLib.Operation', + type: 'uint8', + }, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'condition', internalType: 'address', type: 'address'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + }, + ], + }, + ], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [], + name: 'protocolVersion', + outputs: [{name: '', internalType: 'uint8[3]', type: 'uint8[3]'}], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [{name: '_interfaceId', internalType: 'bytes4', type: 'bytes4'}], + name: 'supportsInterface', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, + { + type: 'error', + inputs: [ + {name: 'fromBuild', internalType: 'uint16', type: 'uint16'}, + {name: 'thisBuild', internalType: 'uint16', type: 'uint16'}, + ], + name: 'InvalidUpdatePath', + }, +] as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// StagedProposalProcessorSetupZkSync +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const stagedProposalProcessorSetupZkSyncAbi = [ + {type: 'constructor', inputs: [], stateMutability: 'nonpayable'}, + { + type: 'function', + inputs: [], + name: 'CONDITION_IMPLEMENTATION', + outputs: [{name: '', internalType: 'address', type: 'address'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'implementation', + outputs: [{name: '', internalType: 'address', type: 'address'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + {name: '_dao', internalType: 'address', type: 'address'}, + {name: '_installationParams', internalType: 'bytes', type: 'bytes'}, + ], + name: 'prepareInstallation', + outputs: [ + {name: 'spp', internalType: 'address', type: 'address'}, + { + name: 'preparedSetupData', + internalType: 'struct IPluginSetup.PreparedSetupData', + type: 'tuple', + components: [ + {name: 'helpers', internalType: 'address[]', type: 'address[]'}, + { + name: 'permissions', + internalType: 'struct PermissionLib.MultiTargetPermission[]', + type: 'tuple[]', + components: [ + { + name: 'operation', + internalType: 'enum PermissionLib.Operation', + type: 'uint8', + }, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'condition', internalType: 'address', type: 'address'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + }, + ], + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [ + {name: '_dao', internalType: 'address', type: 'address'}, + { + name: '_payload', + internalType: 'struct IPluginSetup.SetupPayload', + type: 'tuple', + components: [ + {name: 'plugin', internalType: 'address', type: 'address'}, + { + name: 'currentHelpers', + internalType: 'address[]', + type: 'address[]', + }, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + }, + ], + name: 'prepareUninstallation', + outputs: [ + { + name: 'permissions', + internalType: 'struct PermissionLib.MultiTargetPermission[]', + type: 'tuple[]', + components: [ + { + name: 'operation', + internalType: 'enum PermissionLib.Operation', + type: 'uint8', + }, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'condition', internalType: 'address', type: 'address'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + }, + ], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [ + {name: '_dao', internalType: 'address', type: 'address'}, + {name: '_fromBuild', internalType: 'uint16', type: 'uint16'}, + { + name: '_payload', + internalType: 'struct IPluginSetup.SetupPayload', + type: 'tuple', + components: [ + {name: 'plugin', internalType: 'address', type: 'address'}, + { + name: 'currentHelpers', + internalType: 'address[]', + type: 'address[]', + }, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + }, + ], + name: 'prepareUpdate', + outputs: [ + {name: '', internalType: 'bytes', type: 'bytes'}, + { + name: '', + internalType: 'struct IPluginSetup.PreparedSetupData', + type: 'tuple', + components: [ + {name: 'helpers', internalType: 'address[]', type: 'address[]'}, + { + name: 'permissions', + internalType: 'struct PermissionLib.MultiTargetPermission[]', + type: 'tuple[]', + components: [ + { + name: 'operation', + internalType: 'enum PermissionLib.Operation', + type: 'uint8', + }, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'condition', internalType: 'address', type: 'address'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + }, + ], + }, + ], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [], + name: 'protocolVersion', + outputs: [{name: '', internalType: 'uint8[3]', type: 'uint8[3]'}], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [{name: '_interfaceId', internalType: 'bytes4', type: 'bytes4'}], + name: 'supportsInterface', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, + { + type: 'error', + inputs: [ + {name: 'fromBuild', internalType: 'uint16', type: 'uint16'}, + {name: 'thisBuild', internalType: 'uint16', type: 'uint16'}, + ], + name: 'InvalidUpdatePath', + }, +] as const diff --git a/artifacts/src/abis/token-voting-plugin-abis.ts b/artifacts/src/abis/token-voting-plugin/abis.ts similarity index 76% rename from artifacts/src/abis/token-voting-plugin-abis.ts rename to artifacts/src/abis/token-voting-plugin/abis.ts index 434c9fa2..04d2bf97 100644 --- a/artifacts/src/abis/token-voting-plugin-abis.ts +++ b/artifacts/src/abis/token-voting-plugin/abis.ts @@ -407,7 +407,7 @@ export const governanceErc20Abi = [ outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'nonpayable', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // GovernanceWrappedERC20 @@ -795,7 +795,7 @@ export const governanceWrappedErc20Abi = [ outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'nonpayable', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // IERC20MintableUpgradeable @@ -812,7 +812,7 @@ export const ierc20MintableUpgradeableAbi = [ outputs: [], stateMutability: 'nonpayable', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // IGovernanceWrappedERC20 @@ -839,7 +839,7 @@ export const iGovernanceWrappedErc20Abi = [ outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'nonpayable', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // IMajorityVoting @@ -917,6 +917,13 @@ export const iMajorityVotingAbi = [ ], stateMutability: 'view', }, + { + type: 'function', + inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'isMinApprovalReached', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, { type: 'function', inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], @@ -938,6 +945,13 @@ export const iMajorityVotingAbi = [ outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, + { + type: 'function', + inputs: [], + name: 'minApproval', + outputs: [{name: '', internalType: 'uint256', type: 'uint256'}], + stateMutability: 'view', + }, { type: 'function', inputs: [], @@ -967,13 +981,14 @@ export const iMajorityVotingAbi = [ outputs: [], stateMutability: 'nonpayable', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // MajorityVotingBase ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// export const majorityVotingBaseAbi = [ + {type: 'error', inputs: [], name: 'AlreadyInitialized'}, { type: 'error', inputs: [ @@ -992,6 +1007,27 @@ export const majorityVotingBaseAbi = [ ], name: 'DateOutOfBounds', }, + {type: 'error', inputs: [], name: 'DelegateCallFailed'}, + {type: 'error', inputs: [], name: 'FunctionDeprecated'}, + { + type: 'error', + inputs: [ + { + name: 'targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + name: 'InvalidTargetConfig', + }, { type: 'error', inputs: [ @@ -1000,6 +1036,16 @@ export const majorityVotingBaseAbi = [ ], name: 'MinDurationOutOfBounds', }, + { + type: 'error', + inputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'NonexistentProposal', + }, + { + type: 'error', + inputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'ProposalAlreadyExists', + }, { type: 'error', inputs: [{name: 'sender', internalType: 'address', type: 'address'}], @@ -1066,6 +1112,14 @@ export const majorityVotingBaseAbi = [ ], name: 'Initialized', }, + { + type: 'event', + anonymous: false, + inputs: [ + {name: 'metadata', internalType: 'bytes', type: 'bytes', indexed: false}, + ], + name: 'MetadataSet', + }, { type: 'event', anonymous: false, @@ -1092,7 +1146,7 @@ export const majorityVotingBaseAbi = [ {name: 'metadata', internalType: 'bytes', type: 'bytes', indexed: false}, { name: 'actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -1123,6 +1177,27 @@ export const majorityVotingBaseAbi = [ ], name: 'ProposalExecuted', }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'newTargetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + indexed: false, + }, + ], + name: 'TargetSet', + }, { type: 'event', anonymous: false, @@ -1162,6 +1237,19 @@ export const majorityVotingBaseAbi = [ ], name: 'VoteCast', }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'minApprovals', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'VotingMinApprovalUpdated', + }, { type: 'event', anonymous: false, @@ -1199,6 +1287,34 @@ export const majorityVotingBaseAbi = [ ], name: 'VotingSettingsUpdated', }, + { + type: 'function', + inputs: [], + name: 'CREATE_PROPOSAL_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'EXECUTE_PROPOSAL_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'SET_METADATA_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'SET_TARGET_CONFIG_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, { type: 'function', inputs: [], @@ -1224,7 +1340,7 @@ export const majorityVotingBaseAbi = [ type: 'function', inputs: [ {name: '_proposalId', internalType: 'uint256', type: 'uint256'}, - {name: '_voter', internalType: 'address', type: 'address'}, + {name: '_account', internalType: 'address', type: 'address'}, { name: '_voteOption', internalType: 'enum IMajorityVoting.VoteOption', @@ -1238,10 +1354,10 @@ export const majorityVotingBaseAbi = [ { type: 'function', inputs: [ - {name: 'metadata', internalType: 'bytes', type: 'bytes'}, + {name: '_metadata', internalType: 'bytes', type: 'bytes'}, { - name: 'actions', - internalType: 'struct IDAO.Action[]', + name: '_actions', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -1249,8 +1365,15 @@ export const majorityVotingBaseAbi = [ {name: 'data', internalType: 'bytes', type: 'bytes'}, ], }, - {name: 'startDate', internalType: 'uint64', type: 'uint64'}, - {name: 'endDate', internalType: 'uint64', type: 'uint64'}, + {name: '_allowFailureMap', internalType: 'uint256', type: 'uint256'}, + {name: '_startDate', internalType: 'uint64', type: 'uint64'}, + {name: '_endDate', internalType: 'uint64', type: 'uint64'}, + { + name: '_voteOption', + internalType: 'enum IMajorityVoting.VoteOption', + type: 'uint8', + }, + {name: '_tryEarlyExecution', internalType: 'bool', type: 'bool'}, ], name: 'createProposal', outputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], @@ -1262,7 +1385,7 @@ export const majorityVotingBaseAbi = [ {name: '_metadata', internalType: 'bytes', type: 'bytes'}, { name: '_actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -1270,20 +1393,21 @@ export const majorityVotingBaseAbi = [ {name: 'data', internalType: 'bytes', type: 'bytes'}, ], }, - {name: '_allowFailureMap', internalType: 'uint256', type: 'uint256'}, {name: '_startDate', internalType: 'uint64', type: 'uint64'}, {name: '_endDate', internalType: 'uint64', type: 'uint64'}, - { - name: '_voteOption', - internalType: 'enum IMajorityVoting.VoteOption', - type: 'uint8', - }, - {name: '_tryEarlyExecution', internalType: 'bool', type: 'bool'}, + {name: '_data', internalType: 'bytes', type: 'bytes'}, ], name: 'createProposal', outputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], stateMutability: 'nonpayable', }, + { + type: 'function', + inputs: [], + name: 'customProposalParamsABI', + outputs: [{name: '', internalType: 'string', type: 'string'}], + stateMutability: 'view', + }, { type: 'function', inputs: [], @@ -1298,6 +1422,34 @@ export const majorityVotingBaseAbi = [ outputs: [], stateMutability: 'nonpayable', }, + { + type: 'function', + inputs: [], + name: 'getCurrentTargetConfig', + outputs: [ + { + name: '', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'getMetadata', + outputs: [{name: '', internalType: 'bytes', type: 'bytes'}], + stateMutability: 'view', + }, { type: 'function', inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], @@ -1334,7 +1486,7 @@ export const majorityVotingBaseAbi = [ }, { name: 'actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -1343,6 +1495,40 @@ export const majorityVotingBaseAbi = [ ], }, {name: 'allowFailureMap', internalType: 'uint256', type: 'uint256'}, + { + name: 'targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'getTargetConfig', + outputs: [ + { + name: '', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, ], stateMutability: 'view', }, @@ -1362,6 +1548,13 @@ export const majorityVotingBaseAbi = [ ], stateMutability: 'view', }, + { + type: 'function', + inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'hasSucceeded', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, { type: 'function', inputs: [], @@ -1369,6 +1562,13 @@ export const majorityVotingBaseAbi = [ outputs: [{name: '', internalType: 'address', type: 'address'}], stateMutability: 'view', }, + { + type: 'function', + inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'isMinApprovalReached', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, { type: 'function', inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], @@ -1390,6 +1590,13 @@ export const majorityVotingBaseAbi = [ outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, + { + type: 'function', + inputs: [], + name: 'minApproval', + outputs: [{name: '', internalType: 'uint256', type: 'uint256'}], + stateMutability: 'view', + }, { type: 'function', inputs: [], @@ -1441,6 +1648,34 @@ export const majorityVotingBaseAbi = [ outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], stateMutability: 'view', }, + { + type: 'function', + inputs: [{name: '_metadata', internalType: 'bytes', type: 'bytes'}], + name: 'setMetadata', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [ + { + name: '_targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + name: 'setTargetConfig', + outputs: [], + stateMutability: 'nonpayable', + }, { type: 'function', inputs: [], @@ -1462,6 +1697,13 @@ export const majorityVotingBaseAbi = [ outputs: [{name: '', internalType: 'uint256', type: 'uint256'}], stateMutability: 'view', }, + { + type: 'function', + inputs: [{name: '_minApprovals', internalType: 'uint256', type: 'uint256'}], + name: 'updateMinApprovals', + outputs: [], + stateMutability: 'nonpayable', + }, { type: 'function', inputs: [ @@ -1537,13 +1779,14 @@ export const majorityVotingBaseAbi = [ ], stateMutability: 'view', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // TokenVoting ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// export const tokenVotingAbi = [ + {type: 'error', inputs: [], name: 'AlreadyInitialized'}, { type: 'error', inputs: [ @@ -1562,6 +1805,27 @@ export const tokenVotingAbi = [ ], name: 'DateOutOfBounds', }, + {type: 'error', inputs: [], name: 'DelegateCallFailed'}, + {type: 'error', inputs: [], name: 'FunctionDeprecated'}, + { + type: 'error', + inputs: [ + { + name: 'targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + name: 'InvalidTargetConfig', + }, { type: 'error', inputs: [ @@ -1571,6 +1835,16 @@ export const tokenVotingAbi = [ name: 'MinDurationOutOfBounds', }, {type: 'error', inputs: [], name: 'NoVotingPower'}, + { + type: 'error', + inputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'NonexistentProposal', + }, + { + type: 'error', + inputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'ProposalAlreadyExists', + }, { type: 'error', inputs: [{name: 'sender', internalType: 'address', type: 'address'}], @@ -1676,6 +1950,14 @@ export const tokenVotingAbi = [ ], name: 'MembershipContractAnnounced', }, + { + type: 'event', + anonymous: false, + inputs: [ + {name: 'metadata', internalType: 'bytes', type: 'bytes', indexed: false}, + ], + name: 'MetadataSet', + }, { type: 'event', anonymous: false, @@ -1702,7 +1984,7 @@ export const tokenVotingAbi = [ {name: 'metadata', internalType: 'bytes', type: 'bytes', indexed: false}, { name: 'actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -1738,20 +2020,41 @@ export const tokenVotingAbi = [ anonymous: false, inputs: [ { - name: 'implementation', - internalType: 'address', - type: 'address', - indexed: true, + name: 'newTargetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + indexed: false, }, ], - name: 'Upgraded', + name: 'TargetSet', }, { type: 'event', anonymous: false, inputs: [ { - name: 'proposalId', + name: 'implementation', + internalType: 'address', + type: 'address', + indexed: true, + }, + ], + name: 'Upgraded', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'proposalId', internalType: 'uint256', type: 'uint256', indexed: true, @@ -1772,6 +2075,19 @@ export const tokenVotingAbi = [ ], name: 'VoteCast', }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'minApprovals', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'VotingMinApprovalUpdated', + }, { type: 'event', anonymous: false, @@ -1816,6 +2132,27 @@ export const tokenVotingAbi = [ outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], stateMutability: 'view', }, + { + type: 'function', + inputs: [], + name: 'EXECUTE_PROPOSAL_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'SET_METADATA_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'SET_TARGET_CONFIG_PERMISSION_ID', + outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + stateMutability: 'view', + }, { type: 'function', inputs: [], @@ -1841,7 +2178,7 @@ export const tokenVotingAbi = [ type: 'function', inputs: [ {name: '_proposalId', internalType: 'uint256', type: 'uint256'}, - {name: '_voter', internalType: 'address', type: 'address'}, + {name: '_account', internalType: 'address', type: 'address'}, { name: '_voteOption', internalType: 'enum IMajorityVoting.VoteOption', @@ -1858,7 +2195,7 @@ export const tokenVotingAbi = [ {name: '_metadata', internalType: 'bytes', type: 'bytes'}, { name: '_actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -1866,8 +2203,15 @@ export const tokenVotingAbi = [ {name: 'data', internalType: 'bytes', type: 'bytes'}, ], }, + {name: '_allowFailureMap', internalType: 'uint256', type: 'uint256'}, {name: '_startDate', internalType: 'uint64', type: 'uint64'}, {name: '_endDate', internalType: 'uint64', type: 'uint64'}, + { + name: '_voteOption', + internalType: 'enum IMajorityVoting.VoteOption', + type: 'uint8', + }, + {name: '_tryEarlyExecution', internalType: 'bool', type: 'bool'}, ], name: 'createProposal', outputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], @@ -1879,7 +2223,7 @@ export const tokenVotingAbi = [ {name: '_metadata', internalType: 'bytes', type: 'bytes'}, { name: '_actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -1887,20 +2231,21 @@ export const tokenVotingAbi = [ {name: 'data', internalType: 'bytes', type: 'bytes'}, ], }, - {name: '_allowFailureMap', internalType: 'uint256', type: 'uint256'}, {name: '_startDate', internalType: 'uint64', type: 'uint64'}, {name: '_endDate', internalType: 'uint64', type: 'uint64'}, - { - name: '_voteOption', - internalType: 'enum IMajorityVoting.VoteOption', - type: 'uint8', - }, - {name: '_tryEarlyExecution', internalType: 'bool', type: 'bool'}, + {name: '_data', internalType: 'bytes', type: 'bytes'}, ], name: 'createProposal', outputs: [{name: 'proposalId', internalType: 'uint256', type: 'uint256'}], stateMutability: 'nonpayable', }, + { + type: 'function', + inputs: [], + name: 'customProposalParamsABI', + outputs: [{name: '', internalType: 'string', type: 'string'}], + stateMutability: 'pure', + }, { type: 'function', inputs: [], @@ -1915,6 +2260,34 @@ export const tokenVotingAbi = [ outputs: [], stateMutability: 'nonpayable', }, + { + type: 'function', + inputs: [], + name: 'getCurrentTargetConfig', + outputs: [ + { + name: '', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'getMetadata', + outputs: [{name: '', internalType: 'bytes', type: 'bytes'}], + stateMutability: 'view', + }, { type: 'function', inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], @@ -1951,7 +2324,7 @@ export const tokenVotingAbi = [ }, { name: 'actions', - internalType: 'struct IDAO.Action[]', + internalType: 'struct Action[]', type: 'tuple[]', components: [ {name: 'to', internalType: 'address', type: 'address'}, @@ -1960,6 +2333,40 @@ export const tokenVotingAbi = [ ], }, {name: 'allowFailureMap', internalType: 'uint256', type: 'uint256'}, + { + name: 'targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'getTargetConfig', + outputs: [ + { + name: '', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, ], stateMutability: 'view', }, @@ -1988,6 +2395,13 @@ export const tokenVotingAbi = [ ], stateMutability: 'view', }, + { + type: 'function', + inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'hasSucceeded', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, { type: 'function', inputs: [], @@ -2024,11 +2438,36 @@ export const tokenVotingAbi = [ internalType: 'contract IVotesUpgradeable', type: 'address', }, + { + name: '_targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + {name: '_minApprovals', internalType: 'uint256', type: 'uint256'}, + {name: '_pluginMetadata', internalType: 'bytes', type: 'bytes'}, ], name: 'initialize', outputs: [], stateMutability: 'nonpayable', }, + { + type: 'function', + inputs: [ + {name: '_fromBuild', internalType: 'uint16', type: 'uint16'}, + {name: '_initData', internalType: 'bytes', type: 'bytes'}, + ], + name: 'initializeFrom', + outputs: [], + stateMutability: 'nonpayable', + }, { type: 'function', inputs: [{name: '_account', internalType: 'address', type: 'address'}], @@ -2036,6 +2475,13 @@ export const tokenVotingAbi = [ outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, + { + type: 'function', + inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], + name: 'isMinApprovalReached', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, { type: 'function', inputs: [{name: '_proposalId', internalType: 'uint256', type: 'uint256'}], @@ -2057,6 +2503,13 @@ export const tokenVotingAbi = [ outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, + { + type: 'function', + inputs: [], + name: 'minApproval', + outputs: [{name: '', internalType: 'uint256', type: 'uint256'}], + stateMutability: 'view', + }, { type: 'function', inputs: [], @@ -2110,8 +2563,29 @@ export const tokenVotingAbi = [ }, { type: 'function', - inputs: [{name: '_forwarder', internalType: 'address', type: 'address'}], - name: 'setForwarder', + inputs: [{name: '_metadata', internalType: 'bytes', type: 'bytes'}], + name: 'setMetadata', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [ + { + name: '_targetConfig', + internalType: 'struct IPlugin.TargetConfig', + type: 'tuple', + components: [ + {name: 'target', internalType: 'address', type: 'address'}, + { + name: 'operation', + internalType: 'enum IPlugin.Operation', + type: 'uint8', + }, + ], + }, + ], + name: 'setTargetConfig', outputs: [], stateMutability: 'nonpayable', }, @@ -2138,10 +2612,10 @@ export const tokenVotingAbi = [ }, { type: 'function', - inputs: [], - name: 'trustedForwarder', - outputs: [{name: '', internalType: 'address', type: 'address'}], - stateMutability: 'view', + inputs: [{name: '_minApprovals', internalType: 'uint256', type: 'uint256'}], + name: 'updateMinApprovals', + outputs: [], + stateMutability: 'nonpayable', }, { type: 'function', @@ -2218,7 +2692,7 @@ export const tokenVotingAbi = [ ], stateMutability: 'view', }, -] as const; +] as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // TokenVotingSetup @@ -2260,31 +2734,199 @@ export const tokenVotingSetupAbi = [ name: 'TokenNotERC20', }, { - type: 'error', - inputs: [{name: 'length', internalType: 'uint256', type: 'uint256'}], - name: 'WrongHelpersArrayLength', + type: 'function', + inputs: [], + name: 'governanceERC20Base', + outputs: [{name: '', internalType: 'address', type: 'address'}], + stateMutability: 'view', }, { type: 'function', inputs: [], - name: 'EXECUTE_PERMISSION_ID', - outputs: [{name: '', internalType: 'bytes32', type: 'bytes32'}], + name: 'governanceWrappedERC20Base', + outputs: [{name: '', internalType: 'address', type: 'address'}], stateMutability: 'view', }, { type: 'function', inputs: [], - name: 'governanceERC20Base', + name: 'implementation', outputs: [{name: '', internalType: 'address', type: 'address'}], stateMutability: 'view', }, + { + type: 'function', + inputs: [ + {name: '_dao', internalType: 'address', type: 'address'}, + {name: '_data', internalType: 'bytes', type: 'bytes'}, + ], + name: 'prepareInstallation', + outputs: [ + {name: 'plugin', internalType: 'address', type: 'address'}, + { + name: 'preparedSetupData', + internalType: 'struct IPluginSetup.PreparedSetupData', + type: 'tuple', + components: [ + {name: 'helpers', internalType: 'address[]', type: 'address[]'}, + { + name: 'permissions', + internalType: 'struct PermissionLib.MultiTargetPermission[]', + type: 'tuple[]', + components: [ + { + name: 'operation', + internalType: 'enum PermissionLib.Operation', + type: 'uint8', + }, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'condition', internalType: 'address', type: 'address'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + }, + ], + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [ + {name: '_dao', internalType: 'address', type: 'address'}, + { + name: '_payload', + internalType: 'struct IPluginSetup.SetupPayload', + type: 'tuple', + components: [ + {name: 'plugin', internalType: 'address', type: 'address'}, + { + name: 'currentHelpers', + internalType: 'address[]', + type: 'address[]', + }, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + }, + ], + name: 'prepareUninstallation', + outputs: [ + { + name: 'permissions', + internalType: 'struct PermissionLib.MultiTargetPermission[]', + type: 'tuple[]', + components: [ + { + name: 'operation', + internalType: 'enum PermissionLib.Operation', + type: 'uint8', + }, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'condition', internalType: 'address', type: 'address'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + {name: '_dao', internalType: 'address', type: 'address'}, + {name: '_fromBuild', internalType: 'uint16', type: 'uint16'}, + { + name: '_payload', + internalType: 'struct IPluginSetup.SetupPayload', + type: 'tuple', + components: [ + {name: 'plugin', internalType: 'address', type: 'address'}, + { + name: 'currentHelpers', + internalType: 'address[]', + type: 'address[]', + }, + {name: 'data', internalType: 'bytes', type: 'bytes'}, + ], + }, + ], + name: 'prepareUpdate', + outputs: [ + {name: 'initData', internalType: 'bytes', type: 'bytes'}, + { + name: 'preparedSetupData', + internalType: 'struct IPluginSetup.PreparedSetupData', + type: 'tuple', + components: [ + {name: 'helpers', internalType: 'address[]', type: 'address[]'}, + { + name: 'permissions', + internalType: 'struct PermissionLib.MultiTargetPermission[]', + type: 'tuple[]', + components: [ + { + name: 'operation', + internalType: 'enum PermissionLib.Operation', + type: 'uint8', + }, + {name: 'where', internalType: 'address', type: 'address'}, + {name: 'who', internalType: 'address', type: 'address'}, + {name: 'condition', internalType: 'address', type: 'address'}, + {name: 'permissionId', internalType: 'bytes32', type: 'bytes32'}, + ], + }, + ], + }, + ], + stateMutability: 'nonpayable', + }, { type: 'function', inputs: [], - name: 'governanceWrappedERC20Base', - outputs: [{name: '', internalType: 'address', type: 'address'}], + name: 'protocolVersion', + outputs: [{name: '', internalType: 'uint8[3]', type: 'uint8[3]'}], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [{name: 'token', internalType: 'address', type: 'address'}], + name: 'supportsIVotesInterface', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, + { + type: 'function', + inputs: [{name: '_interfaceId', internalType: 'bytes4', type: 'bytes4'}], + name: 'supportsInterface', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, +] as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// TokenVotingSetupZkSync +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const tokenVotingSetupZkSyncAbi = [ + {type: 'constructor', inputs: [], stateMutability: 'nonpayable'}, + { + type: 'error', + inputs: [ + {name: 'fromBuild', internalType: 'uint16', type: 'uint16'}, + {name: 'thisBuild', internalType: 'uint16', type: 'uint16'}, + ], + name: 'InvalidUpdatePath', + }, + { + type: 'error', + inputs: [{name: 'token', internalType: 'address', type: 'address'}], + name: 'TokenNotContract', + }, + { + type: 'error', + inputs: [{name: 'token', internalType: 'address', type: 'address'}], + name: 'TokenNotERC20', + }, { type: 'function', inputs: [], @@ -2416,6 +3058,51 @@ export const tokenVotingSetupAbi = [ ], }, ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [], + name: 'protocolVersion', + outputs: [{name: '', internalType: 'uint8[3]', type: 'uint8[3]'}], + stateMutability: 'pure', + }, + { + type: 'function', + inputs: [{name: 'token', internalType: 'address', type: 'address'}], + name: 'supportsIVotesInterface', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{name: '_interfaceId', internalType: 'bytes4', type: 'bytes4'}], + name: 'supportsInterface', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], + stateMutability: 'view', + }, +] as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// VotingPowerCondition +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const votingPowerConditionAbi = [ + { + type: 'constructor', + inputs: [{name: '_tokenVoting', internalType: 'address', type: 'address'}], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [ + {name: '_where', internalType: 'address', type: 'address'}, + {name: '_who', internalType: 'address', type: 'address'}, + {name: '_permissionId', internalType: 'bytes32', type: 'bytes32'}, + {name: '_data', internalType: 'bytes', type: 'bytes'}, + ], + name: 'isGranted', + outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, { @@ -2432,4 +3119,4 @@ export const tokenVotingSetupAbi = [ outputs: [{name: '', internalType: 'bool', type: 'bool'}], stateMutability: 'view', }, -] as const; +] as const