diff --git a/package.json b/package.json index dd85000c..85f8d911 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gnosis.pm/zodiac", - "version": "3.5.0", + "version": "3.5.1", "description": "Zodiac is a composable design philosophy and collection of standards for building DAO ecosystem tooling.", "author": "Auryn Macmillan ", "license": "LGPL-3.0+", diff --git a/sdk/abi/RolesV2Integrity.json b/sdk/abi/RolesV2Integrity.json new file mode 100644 index 00000000..0de4fe88 --- /dev/null +++ b/sdk/abi/RolesV2Integrity.json @@ -0,0 +1,113 @@ +[ + { + "inputs": [], + "name": "NotBFS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "UnsuitableChildCount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "UnsuitableChildTypeTree", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "UnsuitableCompValue", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "UnsuitableParameterType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "UnsuitableParent", + "type": "error" + }, + { + "inputs": [], + "name": "UnsuitableRootNode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "UnsupportedOperator", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint8", + "name": "parent", + "type": "uint8" + }, + { + "internalType": "enum ParameterType", + "name": "paramType", + "type": "ParameterType" + }, + { + "internalType": "enum Operator", + "name": "operator", + "type": "Operator" + }, + { + "internalType": "bytes", + "name": "compValue", + "type": "bytes" + } + ], + "internalType": "struct ConditionFlat[]", + "name": "conditions", + "type": "tuple[]" + } + ], + "name": "enforce", + "outputs": [], + "stateMutability": "pure", + "type": "function" + } +] \ No newline at end of file diff --git a/sdk/contracts.ts b/sdk/contracts.ts index d0389c26..4f3d3a54 100644 --- a/sdk/contracts.ts +++ b/sdk/contracts.ts @@ -17,6 +17,7 @@ import RealityErc20Abi from "./abi/RealityErc20.json"; import RealityEthAbi from "./abi/RealityEth.json"; import RolesV1Abi from "./abi/RolesV1.json"; import RolesV2Abi from "./abi/RolesV2.json"; +import RolesV2IntegrityAbi from "./abi/RolesV2Integrity.json"; import ScopeGuardAbi from "./abi/ScopeGuard.json"; import TellorAbi from "./abi/Tellor.json"; import { KnownContracts } from "./factory/types"; @@ -247,7 +248,11 @@ export const ContractAbis: Record = { [KnownContracts.REALITY_ETH]: RealityEthAbi, [KnownContracts.ROLES]: RolesV1Abi, [KnownContracts.ROLES_V1]: RolesV1Abi, - [KnownContracts.ROLES_V2]: RolesV2Abi, + [KnownContracts.ROLES_V2]: [ + ...RolesV2Abi, + // we add the custom errors from the Integrity lib so integrity check errors can be decoded + RolesV2IntegrityAbi.filter((fragment) => fragment.type === "error"), + ], [KnownContracts.SCOPE_GUARD]: ScopeGuardAbi, [KnownContracts.TELLOR]: TellorAbi, [KnownContracts.MULTISEND_ENCODER]: MultisendEncoderAbi,