[
  {
    "type": "constructor",
    "inputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "accumulateBuilderFee",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "token",
        "type": "address",
        "internalType": "Currency"
      },
      {
        "name": "amount",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "activateBuilder",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "authority",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "claimBuilderFees",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "tokenManager",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "token",
        "type": "address",
        "internalType": "Currency"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "collectFees",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "token",
        "type": "address",
        "internalType": "Currency"
      },
      {
        "name": "amount",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "deactivateBuilder",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "deductFees",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "token",
        "type": "address",
        "internalType": "Currency"
      },
      {
        "name": "amount",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "getBuilderFeeBps",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "feeBps",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getBuilderFeeVault",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "tokenManager",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getBuilderFeesAccumulatedByProtocol",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "builderId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "token",
        "type": "address",
        "internalType": "Currency"
      }
    ],
    "outputs": [
      {
        "name": "amount",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getBuilderInfo",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "outputs": [
      {
        "name": "info",
        "type": "tuple",
        "internalType": "struct IFeeManager.BuilderInfo",
        "components": [
          {
            "name": "feeRecipient",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "isActive",
            "type": "bool",
            "internalType": "bool"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getDefaultMakerFeeBps",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "int16",
        "internalType": "int16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getDefaultTakerFeeBps",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "int16",
        "internalType": "int16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getFeeBps",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "builderId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "makerFeeBps",
        "type": "int16",
        "internalType": "int16"
      },
      {
        "name": "takerFeeBps",
        "type": "int16",
        "internalType": "int16"
      },
      {
        "name": "builderFeeBps",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getFeeBpsByUserId",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "builderId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "userId",
        "type": "uint32",
        "internalType": "uint32"
      }
    ],
    "outputs": [
      {
        "name": "makerFeeBps",
        "type": "int16",
        "internalType": "int16"
      },
      {
        "name": "takerFeeBps",
        "type": "int16",
        "internalType": "int16"
      },
      {
        "name": "builderFeeBps",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getFeeTiers",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "maker",
        "type": "tuple",
        "internalType": "struct IFeeManager.CustomFee",
        "components": [
          {
            "name": "feeBps",
            "type": "int16",
            "internalType": "int16"
          },
          {
            "name": "isSet",
            "type": "bool",
            "internalType": "bool"
          }
        ]
      },
      {
        "name": "taker",
        "type": "tuple",
        "internalType": "struct IFeeManager.CustomFee",
        "components": [
          {
            "name": "feeBps",
            "type": "int16",
            "internalType": "int16"
          },
          {
            "name": "isSet",
            "type": "bool",
            "internalType": "bool"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getMakerFeeBps",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "int16",
        "internalType": "int16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getMarketFeeTiers",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "outputs": [
      {
        "name": "maker",
        "type": "tuple",
        "internalType": "struct IFeeManager.CustomFee",
        "components": [
          {
            "name": "feeBps",
            "type": "int16",
            "internalType": "int16"
          },
          {
            "name": "isSet",
            "type": "bool",
            "internalType": "bool"
          }
        ]
      },
      {
        "name": "taker",
        "type": "tuple",
        "internalType": "struct IFeeManager.CustomFee",
        "components": [
          {
            "name": "feeBps",
            "type": "int16",
            "internalType": "int16"
          },
          {
            "name": "isSet",
            "type": "bool",
            "internalType": "bool"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getMaxBuilderFeeBpsCap",
    "inputs": [],
    "outputs": [
      {
        "name": "cap",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getProtocolFeeVault",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "tokenManager",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getRelayerFeeTiers",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "relayer",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "maker",
        "type": "tuple",
        "internalType": "struct IFeeManager.CustomFee",
        "components": [
          {
            "name": "feeBps",
            "type": "int16",
            "internalType": "int16"
          },
          {
            "name": "isSet",
            "type": "bool",
            "internalType": "bool"
          }
        ]
      },
      {
        "name": "taker",
        "type": "tuple",
        "internalType": "struct IFeeManager.CustomFee",
        "components": [
          {
            "name": "feeBps",
            "type": "int16",
            "internalType": "int16"
          },
          {
            "name": "isSet",
            "type": "bool",
            "internalType": "bool"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getTakerFeeBps",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "int16",
        "internalType": "int16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getTotalFeesCollected",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "token",
        "type": "address",
        "internalType": "Currency"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "initialize",
    "inputs": [
      {
        "name": "authority",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "accountRegistry_",
        "type": "address",
        "internalType": "contract IAccountRegistry"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "isAllowed",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "isConsumingScheduledOp",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "pause",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "pauseFunction",
    "inputs": [
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "paused",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "pausedFunction",
    "inputs": [
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "registerBuilderCode",
    "inputs": [
      {
        "name": "feeRecipient",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "setAuthority",
    "inputs": [
      {
        "name": "newAuthority",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "setBuilderFeeVault",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "tokenManager",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "setMaxBuilderFeeBpsCap",
    "inputs": [
      {
        "name": "maxFeeBps",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "setProtocolFeeVault",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "tokenManager",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "unpause",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "unpauseFunction",
    "inputs": [
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "updateBuilderFeeBps",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "feeBps",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "updateBuilderFeeRecipient",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "newRecipient",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "updateDefaultMakerFee",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "newDefaultMakerFeeBps",
        "type": "int16",
        "internalType": "int16"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "updateDefaultTakerFee",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "newDefaultTakerFeeBps",
        "type": "int16",
        "internalType": "int16"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "updateFeeTier",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "newFeeTier",
        "type": "tuple",
        "internalType": "struct IFeeManager.FeeTier",
        "components": [
          {
            "name": "maker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          },
          {
            "name": "taker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          }
        ]
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "updateMarketFeeTier",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "newFeeTier",
        "type": "tuple",
        "internalType": "struct IFeeManager.FeeTier",
        "components": [
          {
            "name": "maker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          },
          {
            "name": "taker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          }
        ]
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "updateRelayerFeeTier",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "relayer",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "newFeeTier",
        "type": "tuple",
        "internalType": "struct IFeeManager.FeeTier",
        "components": [
          {
            "name": "maker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          },
          {
            "name": "taker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          }
        ]
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "withdrawTradingFees",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "tokenManager",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "token",
        "type": "address",
        "internalType": "Currency"
      },
      {
        "name": "amount",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "to",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "event",
    "name": "AuthorityUpdated",
    "inputs": [
      {
        "name": "authority",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "BuilderActivated",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "indexed": true,
        "internalType": "uint16"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "BuilderDeactivated",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "indexed": true,
        "internalType": "uint16"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "BuilderFeeBpsUpdated",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "indexed": true,
        "internalType": "uint16"
      },
      {
        "name": "protocol",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "oldFeeBps",
        "type": "uint16",
        "indexed": false,
        "internalType": "uint16"
      },
      {
        "name": "newFeeBps",
        "type": "uint16",
        "indexed": false,
        "internalType": "uint16"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "BuilderFeeRecipientUpdated",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "indexed": true,
        "internalType": "uint16"
      },
      {
        "name": "oldRecipient",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "newRecipient",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "BuilderFeeVaultUpdated",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "oldTokenManager",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "newTokenManager",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "BuilderRegistered",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "indexed": true,
        "internalType": "uint16"
      },
      {
        "name": "feeRecipient",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ClaimedBuilderFees",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "indexed": true,
        "internalType": "uint16"
      },
      {
        "name": "token",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "amount",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "to",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "CollectedBuilderFees",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "indexed": true,
        "internalType": "uint16"
      },
      {
        "name": "token",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "amount",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "CollectedFees",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "token",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "amount",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Initialized",
    "inputs": [
      {
        "name": "version",
        "type": "uint64",
        "indexed": false,
        "internalType": "uint64"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "MaxBuilderFeeBpsCapUpdated",
    "inputs": [
      {
        "name": "oldCap",
        "type": "uint16",
        "indexed": false,
        "internalType": "uint16"
      },
      {
        "name": "newCap",
        "type": "uint16",
        "indexed": false,
        "internalType": "uint16"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Paused",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "PausedFunction",
    "inputs": [
      {
        "name": "by",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "selector",
        "type": "bytes4",
        "indexed": true,
        "internalType": "bytes4"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ProtocolFeeVaultUpdated",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "oldVault",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "newVault",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Unpaused",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UnpausedFunction",
    "inputs": [
      {
        "name": "by",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "selector",
        "type": "bytes4",
        "indexed": true,
        "internalType": "bytes4"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdateDefaultMakerFee",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "oldDefaultMakerFeeBps",
        "type": "int16",
        "indexed": false,
        "internalType": "int16"
      },
      {
        "name": "newDefaultMakerFeeBps",
        "type": "int16",
        "indexed": false,
        "internalType": "int16"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdateDefaultTakerFee",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "oldDefaultTakerFeeBps",
        "type": "int16",
        "indexed": false,
        "internalType": "int16"
      },
      {
        "name": "newDefaultTakerFeeBps",
        "type": "int16",
        "indexed": false,
        "internalType": "int16"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdateFeeTier",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "account",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "oldFeeTier",
        "type": "tuple",
        "indexed": false,
        "internalType": "struct IFeeManager.FeeTier",
        "components": [
          {
            "name": "maker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          },
          {
            "name": "taker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          }
        ]
      },
      {
        "name": "newFeeTier",
        "type": "tuple",
        "indexed": false,
        "internalType": "struct IFeeManager.FeeTier",
        "components": [
          {
            "name": "maker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          },
          {
            "name": "taker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          }
        ]
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdateMarketFeeTier",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "indexed": true,
        "internalType": "uint16"
      },
      {
        "name": "oldFeeTier",
        "type": "tuple",
        "indexed": false,
        "internalType": "struct IFeeManager.FeeTier",
        "components": [
          {
            "name": "maker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          },
          {
            "name": "taker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          }
        ]
      },
      {
        "name": "newFeeTier",
        "type": "tuple",
        "indexed": false,
        "internalType": "struct IFeeManager.FeeTier",
        "components": [
          {
            "name": "maker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          },
          {
            "name": "taker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          }
        ]
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdateRelayerFeeTier",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "relayer",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "oldFeeTier",
        "type": "tuple",
        "indexed": false,
        "internalType": "struct IFeeManager.FeeTier",
        "components": [
          {
            "name": "maker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          },
          {
            "name": "taker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          }
        ]
      },
      {
        "name": "newFeeTier",
        "type": "tuple",
        "indexed": false,
        "internalType": "struct IFeeManager.FeeTier",
        "components": [
          {
            "name": "maker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          },
          {
            "name": "taker",
            "type": "tuple",
            "internalType": "struct IFeeManager.CustomFee",
            "components": [
              {
                "name": "feeBps",
                "type": "int16",
                "internalType": "int16"
              },
              {
                "name": "isSet",
                "type": "bool",
                "internalType": "bool"
              }
            ]
          }
        ]
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "WithdrawTradingFees",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "sender",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "token",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "amount",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "to",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "error",
    "name": "AccessManagedInvalidAuthority",
    "inputs": [
      {
        "name": "authority",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "AccessManagedRequiredDelay",
    "inputs": [
      {
        "name": "caller",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "delay",
        "type": "uint32",
        "internalType": "uint32"
      }
    ]
  },
  {
    "type": "error",
    "name": "AccessManagedUnauthorized",
    "inputs": [
      {
        "name": "caller",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "BuilderFeeBpsExceedsCap",
    "inputs": [
      {
        "name": "feeBps",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "cap",
        "type": "uint16",
        "internalType": "uint16"
      }
    ]
  },
  {
    "type": "error",
    "name": "BuilderFeeVaultAlreadyAssigned",
    "inputs": [
      {
        "name": "tokenManager",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "BuilderFeeVaultNotEmpty",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "outstandingWad",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "type": "error",
    "name": "BuilderIdCapExceeded",
    "inputs": []
  },
  {
    "type": "error",
    "name": "BuilderNotActive",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ]
  },
  {
    "type": "error",
    "name": "EnforcedPause",
    "inputs": []
  },
  {
    "type": "error",
    "name": "EnforcedPauseFunction",
    "inputs": [
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ]
  },
  {
    "type": "error",
    "name": "ExpectedPause",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ExpectedPauseFunction",
    "inputs": [
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ]
  },
  {
    "type": "error",
    "name": "InsufficientBalance",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "token",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "available",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "requested",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "type": "error",
    "name": "InvalidBuilderFeeVault",
    "inputs": [
      {
        "name": "tokenManager",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "InvalidBuilderId",
    "inputs": [
      {
        "name": "builderId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ]
  },
  {
    "type": "error",
    "name": "InvalidFeeBps",
    "inputs": [
      {
        "name": "feeBps",
        "type": "int16",
        "internalType": "int16"
      }
    ]
  },
  {
    "type": "error",
    "name": "InvalidInitialization",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidProtocolFeeVault",
    "inputs": [
      {
        "name": "tokenManager",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "InvalidSelector",
    "inputs": [
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ]
  },
  {
    "type": "error",
    "name": "MaxBuilderFeeBpsCapExceedsBpsDenominator",
    "inputs": [
      {
        "name": "maxFeeBps",
        "type": "uint16",
        "internalType": "uint16"
      }
    ]
  },
  {
    "type": "error",
    "name": "NegativeTakerFeeBps",
    "inputs": [
      {
        "name": "feeBps",
        "type": "int16",
        "internalType": "int16"
      }
    ]
  },
  {
    "type": "error",
    "name": "NotBuilderFeeRecipient",
    "inputs": [
      {
        "name": "caller",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "expected",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "NotInitializing",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ReentrancyGuardReentrantCall",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ZeroAddress",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ZeroAmount",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ZeroBuilderFeeRecipient",
    "inputs": []
  }
]
