diff --git a/packages/foundry/contracts/pools/ConstantProductPool.sol b/packages/foundry/contracts/pools/ConstantProductPool.sol index ba6f6d93..898e7ed2 100644 --- a/packages/foundry/contracts/pools/ConstantProductPool.sol +++ b/packages/foundry/contracts/pools/ConstantProductPool.sol @@ -7,6 +7,7 @@ import { PoolSwapParams, Rounding } from "@balancer-labs/v3-interfaces/contracts import { IVault } from "@balancer-labs/v3-interfaces/contracts/vault/IVault.sol"; import { FixedPoint } from "@balancer-labs/v3-solidity-utils/contracts/math/FixedPoint.sol"; import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; +import { SwapKind } from "@balancer-labs/v3-interfaces/contracts/vault/VaultTypes.sol"; /** * @title Constant Product Pool @@ -25,15 +26,23 @@ contract ConstantProductPool is BalancerPoolToken, IBasePool { /** * @notice Execute a swap in the pool. - * @param params Swap parameters (see above for struct definition) + * @dev For AMM math walkthrough, see https://www.youtube.com/watch?v=QNPyFs8Wybk + * @param params Swap parameters * @return amountCalculatedScaled18 Calculated amount for the swap */ function onSwap(PoolSwapParams calldata params) external pure returns (uint256 amountCalculatedScaled18) { - uint256 poolBalancetokenOut = params.balancesScaled18[params.indexOut]; - uint256 poolBalancetokenIn = params.balancesScaled18[params.indexIn]; - uint256 amountTokenIn = params.amountGivenScaled18; + uint256 poolBalancetokenIn = params.balancesScaled18[params.indexIn]; // X + uint256 poolBalancetokenOut = params.balancesScaled18[params.indexOut]; // Y - amountCalculatedScaled18 = (poolBalancetokenOut * amountTokenIn) / (poolBalancetokenIn + amountTokenIn); + if (params.kind == SwapKind.EXACT_IN) { + uint256 amountTokenIn = params.amountGivenScaled18; // dx + // dy = (Y * dx) / (X + dx) + amountCalculatedScaled18 = (poolBalancetokenOut * amountTokenIn) / (poolBalancetokenIn + amountTokenIn); + } else { + uint256 amountTokenOut = params.amountGivenScaled18; // dy + // dx = (X * dy) / (Y + dx) + amountCalculatedScaled18 = (poolBalancetokenIn * amountTokenOut) / (poolBalancetokenOut + amountTokenOut); + } } /** diff --git a/packages/nextjs/components/Footer.tsx b/packages/nextjs/components/Footer.tsx index fc0216e0..5375bd80 100644 --- a/packages/nextjs/components/Footer.tsx +++ b/packages/nextjs/components/Footer.tsx @@ -14,26 +14,32 @@ export const Footer = () => { href="https://github.com/balancer/scaffold-balancer-v3" target="_blank" rel="noreferrer" - className="link" + className="link no-underline hover:underline" > Github + ·
- - Docs + + Contracts
·
- Contracts + Docs
diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index b5811a9b..f91b1314 100644 --- a/packages/nextjs/contracts/deployedContracts.ts +++ b/packages/nextjs/contracts/deployedContracts.ts @@ -5,9 +5,10109 @@ import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract"; const deployedContracts = { + 1: { + MockToken1: { + address: "0xf2cb3cfa36bfb95e0fd855c1b41ab19c517fcdb9", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "name", + type: "string", + internalType: "string", + }, + { + name: "symbol", + type: "string", + internalType: "string", + }, + { + name: "initialSupply", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "allowance", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "decimals", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "mint", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "name", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "symbol", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "totalSupply", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "Approval", + inputs: [ + { + name: "owner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "spender", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Transfer", + inputs: [ + { + name: "from", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "to", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "ERC20InsufficientAllowance", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "allowance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC20InsufficientBalance", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidApprover", + inputs: [ + { + name: "approver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidReceiver", + inputs: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidSender", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidSpender", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + }, + ], + inheritedFunctions: { + allowance: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + approve: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + balanceOf: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + decimals: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + name: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + symbol: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + totalSupply: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + transfer: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + transferFrom: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + }, + }, + MockToken2: { + address: "0xc3549920b94a795d75e6c003944943d552c46f97", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "name", + type: "string", + internalType: "string", + }, + { + name: "symbol", + type: "string", + internalType: "string", + }, + { + name: "initialSupply", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "allowance", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "decimals", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "mint", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "name", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "symbol", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "totalSupply", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "Approval", + inputs: [ + { + name: "owner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "spender", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Transfer", + inputs: [ + { + name: "from", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "to", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "ERC20InsufficientAllowance", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "allowance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC20InsufficientBalance", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidApprover", + inputs: [ + { + name: "approver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidReceiver", + inputs: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidSender", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidSpender", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + }, + ], + inheritedFunctions: { + allowance: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + approve: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + balanceOf: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + decimals: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + name: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + symbol: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + totalSupply: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + transfer: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + transferFrom: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + }, + }, + MockVeBAL: { + address: "0xab8eb9f37bd460df99b11767aa843a8f27fb7a6e", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "name", + type: "string", + internalType: "string", + }, + { + name: "symbol", + type: "string", + internalType: "string", + }, + { + name: "initialSupply", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "allowance", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "decimals", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "mint", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "name", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "symbol", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "totalSupply", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "Approval", + inputs: [ + { + name: "owner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "spender", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Transfer", + inputs: [ + { + name: "from", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "to", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "ERC20InsufficientAllowance", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "allowance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC20InsufficientBalance", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidApprover", + inputs: [ + { + name: "approver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidReceiver", + inputs: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidSender", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidSpender", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + }, + ], + inheritedFunctions: { + allowance: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + approve: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + balanceOf: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + decimals: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + name: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + symbol: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + totalSupply: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + transfer: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + transferFrom: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + }, + }, + ConstantSumFactory: { + address: "0x205cfc23ef26922e116135500abb4b12ab6d4668", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "vault", + type: "address", + internalType: "contract IVault", + }, + { + name: "pauseWindowDuration", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "create", + inputs: [ + { + name: "name", + type: "string", + internalType: "string", + }, + { + name: "symbol", + type: "string", + internalType: "string", + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "tokens", + type: "tuple[]", + internalType: "struct TokenConfig[]", + components: [ + { + name: "token", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenType", + type: "uint8", + internalType: "enum TokenType", + }, + { + name: "rateProvider", + type: "address", + internalType: "contract IRateProvider", + }, + { + name: "paysYieldFees", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "swapFeePercentage", + type: "uint256", + internalType: "uint256", + }, + { + name: "protocolFeeExempt", + type: "bool", + internalType: "bool", + }, + { + name: "roleAccounts", + type: "tuple", + internalType: "struct PoolRoleAccounts", + components: [ + { + name: "pauseManager", + type: "address", + internalType: "address", + }, + { + name: "swapFeeManager", + type: "address", + internalType: "address", + }, + { + name: "poolCreator", + type: "address", + internalType: "address", + }, + ], + }, + { + name: "poolHooksContract", + type: "address", + internalType: "address", + }, + { + name: "liquidityManagement", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + outputs: [ + { + name: "pool", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "disable", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "getActionId", + inputs: [ + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getAuthorizer", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IAuthorizer", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getDefaultLiquidityManagement", + inputs: [], + outputs: [ + { + name: "liquidityManagement", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getDefaultPoolHooksContract", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getDeploymentAddress", + inputs: [ + { + name: "constructorArgs", + type: "bytes", + internalType: "bytes", + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getNewPoolPauseWindowEndTime", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getOriginalPauseWindowEndTime", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPauseWindowDuration", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolCount", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPools", + inputs: [], + outputs: [ + { + name: "", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolsInRange", + inputs: [ + { + name: "start", + type: "uint256", + internalType: "uint256", + }, + { + name: "count", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "pools", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getVault", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IVault", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isDisabled", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isPoolFromFactory", + inputs: [ + { + name: "pool", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "event", + name: "FactoryDisabled", + inputs: [], + anonymous: false, + }, + { + type: "event", + name: "PoolCreated", + inputs: [ + { + name: "pool", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "Create2EmptyBytecode", + inputs: [], + }, + { + type: "error", + name: "Create2FailedDeployment", + inputs: [], + }, + { + type: "error", + name: "Create2InsufficientBalance", + inputs: [ + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "Disabled", + inputs: [], + }, + { + type: "error", + name: "IndexOutOfBounds", + inputs: [], + }, + { + type: "error", + name: "PoolPauseWindowDurationOverflow", + inputs: [], + }, + { + type: "error", + name: "SenderNotAllowed", + inputs: [], + }, + { + type: "error", + name: "StandardPoolWithCreator", + inputs: [], + }, + ], + inheritedFunctions: { + disable: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getActionId: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getAuthorizer: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDefaultLiquidityManagement: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDefaultPoolHooksContract: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDeploymentAddress: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getNewPoolPauseWindowEndTime: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getOriginalPauseWindowEndTime: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPauseWindowDuration: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPoolCount: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPools: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPoolsInRange: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getVault: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + isDisabled: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + isPoolFromFactory: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + }, + }, + VeBALFeeDiscountHookExample: { + address: "0xbb57fe325e769dedb1236525a91cded842143fa7", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "vault", + type: "address", + internalType: "contract IVault", + }, + { + name: "allowedFactory", + type: "address", + internalType: "address", + }, + { + name: "veBAL", + type: "address", + internalType: "address", + }, + { + name: "trustedRouter", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "getHookFlags", + inputs: [], + outputs: [ + { + name: "hookFlags", + type: "tuple", + internalType: "struct HookFlags", + components: [ + { + name: "enableHookAdjustedAmounts", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeInitialize", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterInitialize", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallComputeDynamicSwapFee", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeSwap", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterSwap", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeAddLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterAddLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeRemoveLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterRemoveLiquidity", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "onAfterAddLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum AddLiquidityKind", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "amountsInRaw", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterInitialize", + inputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterRemoveLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum RemoveLiquidityKind", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "amountsOutRaw", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterSwap", + inputs: [ + { + name: "", + type: "tuple", + internalType: "struct AfterSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "tokenIn", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenOut", + type: "address", + internalType: "contract IERC20", + }, + { + name: "amountInScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountOutScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokenInBalanceScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokenOutBalanceScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountCalculatedScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountCalculatedRaw", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "pool", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeAddLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum AddLiquidityKind", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeInitialize", + inputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeRemoveLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum RemoveLiquidityKind", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeSwap", + inputs: [ + { + name: "", + type: "tuple", + internalType: "struct PoolSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "amountGivenScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "balancesScaled18", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "indexIn", + type: "uint256", + internalType: "uint256", + }, + { + name: "indexOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onComputeDynamicSwapFeePercentage", + inputs: [ + { + name: "params", + type: "tuple", + internalType: "struct PoolSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "amountGivenScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "balancesScaled18", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "indexIn", + type: "uint256", + internalType: "uint256", + }, + { + name: "indexOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "staticSwapFeePercentage", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "onRegister", + inputs: [ + { + name: "factory", + type: "address", + internalType: "address", + }, + { + name: "pool", + type: "address", + internalType: "address", + }, + { + name: "", + type: "tuple[]", + internalType: "struct TokenConfig[]", + components: [ + { + name: "token", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenType", + type: "uint8", + internalType: "enum TokenType", + }, + { + name: "rateProvider", + type: "address", + internalType: "contract IRateProvider", + }, + { + name: "paysYieldFees", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "VeBALFeeDiscountHookExampleRegistered", + inputs: [ + { + name: "hooksContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "factory", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "pool", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "SenderIsNotVault", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + ], + }, + ], + inheritedFunctions: { + getHookFlags: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterAddLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterInitialize: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterRemoveLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterSwap: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeAddLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeInitialize: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeRemoveLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeSwap: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onComputeDynamicSwapFeePercentage: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onRegister: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + }, + }, + ConstantProductFactory: { + address: "0x53e4daff2073f848dc3f7a8d7cc95b3607212a73", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "vault", + type: "address", + internalType: "contract IVault", + }, + { + name: "pauseWindowDuration", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "create", + inputs: [ + { + name: "name", + type: "string", + internalType: "string", + }, + { + name: "symbol", + type: "string", + internalType: "string", + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "tokens", + type: "tuple[]", + internalType: "struct TokenConfig[]", + components: [ + { + name: "token", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenType", + type: "uint8", + internalType: "enum TokenType", + }, + { + name: "rateProvider", + type: "address", + internalType: "contract IRateProvider", + }, + { + name: "paysYieldFees", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "swapFeePercentage", + type: "uint256", + internalType: "uint256", + }, + { + name: "protocolFeeExempt", + type: "bool", + internalType: "bool", + }, + { + name: "roleAccounts", + type: "tuple", + internalType: "struct PoolRoleAccounts", + components: [ + { + name: "pauseManager", + type: "address", + internalType: "address", + }, + { + name: "swapFeeManager", + type: "address", + internalType: "address", + }, + { + name: "poolCreator", + type: "address", + internalType: "address", + }, + ], + }, + { + name: "poolHooksContract", + type: "address", + internalType: "address", + }, + { + name: "liquidityManagement", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + outputs: [ + { + name: "pool", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "disable", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "getActionId", + inputs: [ + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getAuthorizer", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IAuthorizer", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getDefaultLiquidityManagement", + inputs: [], + outputs: [ + { + name: "liquidityManagement", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getDefaultPoolHooksContract", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getDeploymentAddress", + inputs: [ + { + name: "constructorArgs", + type: "bytes", + internalType: "bytes", + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getNewPoolPauseWindowEndTime", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getOriginalPauseWindowEndTime", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPauseWindowDuration", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolCount", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPools", + inputs: [], + outputs: [ + { + name: "", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolsInRange", + inputs: [ + { + name: "start", + type: "uint256", + internalType: "uint256", + }, + { + name: "count", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "pools", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getVault", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IVault", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isDisabled", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isPoolFromFactory", + inputs: [ + { + name: "pool", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "event", + name: "FactoryDisabled", + inputs: [], + anonymous: false, + }, + { + type: "event", + name: "PoolCreated", + inputs: [ + { + name: "pool", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "Create2EmptyBytecode", + inputs: [], + }, + { + type: "error", + name: "Create2FailedDeployment", + inputs: [], + }, + { + type: "error", + name: "Create2InsufficientBalance", + inputs: [ + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "Disabled", + inputs: [], + }, + { + type: "error", + name: "IndexOutOfBounds", + inputs: [], + }, + { + type: "error", + name: "PoolPauseWindowDurationOverflow", + inputs: [], + }, + { + type: "error", + name: "SenderNotAllowed", + inputs: [], + }, + { + type: "error", + name: "StandardPoolWithCreator", + inputs: [], + }, + ], + inheritedFunctions: { + disable: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getActionId: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getAuthorizer: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDefaultLiquidityManagement: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDefaultPoolHooksContract: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDeploymentAddress: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getNewPoolPauseWindowEndTime: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getOriginalPauseWindowEndTime: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPauseWindowDuration: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPoolCount: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPools: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPoolsInRange: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getVault: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + isDisabled: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + isPoolFromFactory: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + }, + }, + LotteryHookExample: { + address: "0x1e2e9190cea3a97b5aa85d9757117f499d31c47d", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "vault", + type: "address", + internalType: "contract IVault", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "LUCKY_NUMBER", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "MAX_NUMBER", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getHookFlags", + inputs: [], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct HookFlags", + components: [ + { + name: "enableHookAdjustedAmounts", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeInitialize", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterInitialize", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallComputeDynamicSwapFee", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeSwap", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterSwap", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeAddLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterAddLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeRemoveLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterRemoveLiquidity", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getRandomNumber", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "hookSwapFeePercentage", + inputs: [], + outputs: [ + { + name: "", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "onAfterAddLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum AddLiquidityKind", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "amountsInRaw", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterInitialize", + inputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterRemoveLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum RemoveLiquidityKind", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "amountsOutRaw", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterSwap", + inputs: [ + { + name: "params", + type: "tuple", + internalType: "struct AfterSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "tokenIn", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenOut", + type: "address", + internalType: "contract IERC20", + }, + { + name: "amountInScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountOutScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokenInBalanceScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokenOutBalanceScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountCalculatedScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountCalculatedRaw", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "pool", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [ + { + name: "success", + type: "bool", + internalType: "bool", + }, + { + name: "hookAdjustedAmountCalculatedRaw", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeAddLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum AddLiquidityKind", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeInitialize", + inputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeRemoveLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum RemoveLiquidityKind", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeSwap", + inputs: [ + { + name: "", + type: "tuple", + internalType: "struct PoolSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "amountGivenScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "balancesScaled18", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "indexIn", + type: "uint256", + internalType: "uint256", + }, + { + name: "indexOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onComputeDynamicSwapFeePercentage", + inputs: [ + { + name: "", + type: "tuple", + internalType: "struct PoolSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "amountGivenScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "balancesScaled18", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "indexIn", + type: "uint256", + internalType: "uint256", + }, + { + name: "indexOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "onRegister", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "pool", + type: "address", + internalType: "address", + }, + { + name: "", + type: "tuple[]", + internalType: "struct TokenConfig[]", + components: [ + { + name: "token", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenType", + type: "uint8", + internalType: "enum TokenType", + }, + { + name: "rateProvider", + type: "address", + internalType: "contract IRateProvider", + }, + { + name: "paysYieldFees", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "renounceOwnership", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setHookSwapFeePercentage", + inputs: [ + { + name: "swapFeePercentage", + type: "uint64", + internalType: "uint64", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferOwnership", + inputs: [ + { + name: "newOwner", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "HookSwapFeePercentageChanged", + inputs: [ + { + name: "hooksContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "hookFeePercentage", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "LotteryFeeCollected", + inputs: [ + { + name: "hooksContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "token", + type: "address", + indexed: true, + internalType: "contract IERC20", + }, + { + name: "feeAmount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "LotteryHookExampleRegistered", + inputs: [ + { + name: "hooksContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "pool", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "LotteryWinningsPaid", + inputs: [ + { + name: "hooksContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "winner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "token", + type: "address", + indexed: true, + internalType: "contract IERC20", + }, + { + name: "amountWon", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "OwnershipTransferred", + inputs: [ + { + name: "previousOwner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newOwner", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "AddressEmptyCode", + inputs: [ + { + name: "target", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "AddressInsufficientBalance", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "FailedInnerCall", + inputs: [], + }, + { + type: "error", + name: "IndexOutOfBounds", + inputs: [], + }, + { + type: "error", + name: "OwnableInvalidOwner", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "OwnableUnauthorizedAccount", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "SafeERC20FailedOperation", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "SenderIsNotVault", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + ], + }, + ], + inheritedFunctions: { + getHookFlags: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterAddLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterInitialize: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterRemoveLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterSwap: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeAddLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeInitialize: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeRemoveLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeSwap: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onComputeDynamicSwapFeePercentage: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onRegister: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + owner: "lib/openzeppelin-contracts/contracts/access/Ownable.sol", + renounceOwnership: "lib/openzeppelin-contracts/contracts/access/Ownable.sol", + transferOwnership: "lib/openzeppelin-contracts/contracts/access/Ownable.sol", + }, + }, + WeightedPoolFactory: { + address: "0x4a65b9d13908487a1654be48e6aa9bc701735910", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "vault", + type: "address", + internalType: "contract IVault", + }, + { + name: "pauseWindowDuration", + type: "uint32", + internalType: "uint32", + }, + { + name: "factoryVersion", + type: "string", + internalType: "string", + }, + { + name: "poolVersion", + type: "string", + internalType: "string", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "create", + inputs: [ + { + name: "name", + type: "string", + internalType: "string", + }, + { + name: "symbol", + type: "string", + internalType: "string", + }, + { + name: "tokens", + type: "tuple[]", + internalType: "struct TokenConfig[]", + components: [ + { + name: "token", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenType", + type: "uint8", + internalType: "enum TokenType", + }, + { + name: "rateProvider", + type: "address", + internalType: "contract IRateProvider", + }, + { + name: "paysYieldFees", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "normalizedWeights", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "roleAccounts", + type: "tuple", + internalType: "struct PoolRoleAccounts", + components: [ + { + name: "pauseManager", + type: "address", + internalType: "address", + }, + { + name: "swapFeeManager", + type: "address", + internalType: "address", + }, + { + name: "poolCreator", + type: "address", + internalType: "address", + }, + ], + }, + { + name: "swapFeePercentage", + type: "uint256", + internalType: "uint256", + }, + { + name: "poolHooksContract", + type: "address", + internalType: "address", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "pool", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "disable", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "getActionId", + inputs: [ + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getAuthorizer", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IAuthorizer", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getDefaultLiquidityManagement", + inputs: [], + outputs: [ + { + name: "liquidityManagement", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getDefaultPoolHooksContract", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getDeploymentAddress", + inputs: [ + { + name: "constructorArgs", + type: "bytes", + internalType: "bytes", + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getNewPoolPauseWindowEndTime", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getOriginalPauseWindowEndTime", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPauseWindowDuration", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolCount", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolVersion", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPools", + inputs: [], + outputs: [ + { + name: "", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolsInRange", + inputs: [ + { + name: "start", + type: "uint256", + internalType: "uint256", + }, + { + name: "count", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "pools", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getVault", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IVault", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isDisabled", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isPoolFromFactory", + inputs: [ + { + name: "pool", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "version", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "event", + name: "FactoryDisabled", + inputs: [], + anonymous: false, + }, + { + type: "event", + name: "PoolCreated", + inputs: [ + { + name: "pool", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "Create2EmptyBytecode", + inputs: [], + }, + { + type: "error", + name: "Create2FailedDeployment", + inputs: [], + }, + { + type: "error", + name: "Create2InsufficientBalance", + inputs: [ + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "Disabled", + inputs: [], + }, + { + type: "error", + name: "IndexOutOfBounds", + inputs: [], + }, + { + type: "error", + name: "PoolPauseWindowDurationOverflow", + inputs: [], + }, + { + type: "error", + name: "SenderNotAllowed", + inputs: [], + }, + { + type: "error", + name: "StandardPoolWithCreator", + inputs: [], + }, + ], + inheritedFunctions: { + getPoolVersion: "lib/balancer-v3-monorepo/pkg/interfaces/contracts/solidity-utils/helpers/IPoolVersion.sol", + disable: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getActionId: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getAuthorizer: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDefaultLiquidityManagement: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDefaultPoolHooksContract: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDeploymentAddress: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getNewPoolPauseWindowEndTime: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getOriginalPauseWindowEndTime: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPauseWindowDuration: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPoolCount: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPools: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPoolsInRange: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getVault: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + isDisabled: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + isPoolFromFactory: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + version: "lib/balancer-v3-monorepo/pkg/solidity-utils/contracts/helpers/Version.sol", + }, + }, + ExitFeeHookExample: { + address: "0x295129609d6876f5ecc62052ba6bc082139a982c", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "vault", + type: "address", + internalType: "contract IVault", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "MAX_EXIT_FEE_PERCENTAGE", + inputs: [], + outputs: [ + { + name: "", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "exitFeePercentage", + inputs: [], + outputs: [ + { + name: "", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getHookFlags", + inputs: [], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct HookFlags", + components: [ + { + name: "enableHookAdjustedAmounts", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeInitialize", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterInitialize", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallComputeDynamicSwapFee", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeSwap", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterSwap", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeAddLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterAddLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeRemoveLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterRemoveLiquidity", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "onAfterAddLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum AddLiquidityKind", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "amountsInRaw", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterInitialize", + inputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterRemoveLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "pool", + type: "address", + internalType: "address", + }, + { + name: "kind", + type: "uint8", + internalType: "enum RemoveLiquidityKind", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "amountsOutRaw", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "hookAdjustedAmountsOutRaw", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterSwap", + inputs: [ + { + name: "", + type: "tuple", + internalType: "struct AfterSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "tokenIn", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenOut", + type: "address", + internalType: "contract IERC20", + }, + { + name: "amountInScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountOutScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokenInBalanceScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokenOutBalanceScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountCalculatedScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountCalculatedRaw", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "pool", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeAddLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum AddLiquidityKind", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeInitialize", + inputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeRemoveLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum RemoveLiquidityKind", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeSwap", + inputs: [ + { + name: "", + type: "tuple", + internalType: "struct PoolSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "amountGivenScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "balancesScaled18", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "indexIn", + type: "uint256", + internalType: "uint256", + }, + { + name: "indexOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onComputeDynamicSwapFeePercentage", + inputs: [ + { + name: "", + type: "tuple", + internalType: "struct PoolSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "amountGivenScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "balancesScaled18", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "indexIn", + type: "uint256", + internalType: "uint256", + }, + { + name: "indexOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "onRegister", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "pool", + type: "address", + internalType: "address", + }, + { + name: "", + type: "tuple[]", + internalType: "struct TokenConfig[]", + components: [ + { + name: "token", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenType", + type: "uint8", + internalType: "enum TokenType", + }, + { + name: "rateProvider", + type: "address", + internalType: "contract IRateProvider", + }, + { + name: "paysYieldFees", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "liquidityManagement", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "renounceOwnership", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setExitFeePercentage", + inputs: [ + { + name: "newExitFeePercentage", + type: "uint64", + internalType: "uint64", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferOwnership", + inputs: [ + { + name: "newOwner", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "ExitFeeCharged", + inputs: [ + { + name: "pool", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "token", + type: "address", + indexed: true, + internalType: "contract IERC20", + }, + { + name: "feeAmount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ExitFeeHookExampleRegistered", + inputs: [ + { + name: "hooksContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "pool", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ExitFeePercentageChanged", + inputs: [ + { + name: "hookContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "exitFeePercentage", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "OwnershipTransferred", + inputs: [ + { + name: "previousOwner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newOwner", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "ExitFeeAboveLimit", + inputs: [ + { + name: "feePercentage", + type: "uint256", + internalType: "uint256", + }, + { + name: "limit", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "OwnableInvalidOwner", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "OwnableUnauthorizedAccount", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "PoolDoesNotSupportDonation", + inputs: [], + }, + { + type: "error", + name: "SenderIsNotVault", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + ], + }, + ], + inheritedFunctions: { + getHookFlags: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterAddLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterInitialize: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterRemoveLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterSwap: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeAddLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeInitialize: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeRemoveLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeSwap: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onComputeDynamicSwapFeePercentage: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onRegister: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + owner: "lib/openzeppelin-contracts/contracts/access/Ownable.sol", + renounceOwnership: "lib/openzeppelin-contracts/contracts/access/Ownable.sol", + transferOwnership: "lib/openzeppelin-contracts/contracts/access/Ownable.sol", + }, + }, + }, 31337: { MockToken1: { - address: "0xdcaa80371bdf9ff638851713f145df074428db19", + address: "0x205cfc23ef26922e116135500abb4b12ab6d4668", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "name", + type: "string", + internalType: "string", + }, + { + name: "symbol", + type: "string", + internalType: "string", + }, + { + name: "initialSupply", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "allowance", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "decimals", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "mint", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "name", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "symbol", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "totalSupply", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "Approval", + inputs: [ + { + name: "owner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "spender", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Transfer", + inputs: [ + { + name: "from", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "to", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "ERC20InsufficientAllowance", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "allowance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC20InsufficientBalance", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidApprover", + inputs: [ + { + name: "approver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidReceiver", + inputs: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidSender", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidSpender", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + }, + ], + inheritedFunctions: { + allowance: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + approve: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + balanceOf: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + decimals: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + name: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + symbol: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + totalSupply: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + transfer: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + transferFrom: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + }, + }, + MockToken2: { + address: "0xbb57fe325e769dedb1236525a91cded842143fa7", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "name", + type: "string", + internalType: "string", + }, + { + name: "symbol", + type: "string", + internalType: "string", + }, + { + name: "initialSupply", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "allowance", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "decimals", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "mint", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "name", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "symbol", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "totalSupply", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "Approval", + inputs: [ + { + name: "owner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "spender", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Transfer", + inputs: [ + { + name: "from", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "to", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "ERC20InsufficientAllowance", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "allowance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC20InsufficientBalance", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidApprover", + inputs: [ + { + name: "approver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidReceiver", + inputs: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidSender", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidSpender", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + }, + ], + inheritedFunctions: { + allowance: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + approve: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + balanceOf: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + decimals: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + name: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + symbol: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + totalSupply: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + transfer: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + transferFrom: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + }, + }, + MockVeBAL: { + address: "0xd69bc314bdaa329eb18f36e4897d96a3a48c3eef", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "name", + type: "string", + internalType: "string", + }, + { + name: "symbol", + type: "string", + internalType: "string", + }, + { + name: "initialSupply", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "allowance", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "decimals", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "mint", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "name", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "symbol", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "totalSupply", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "Approval", + inputs: [ + { + name: "owner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "spender", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Transfer", + inputs: [ + { + name: "from", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "to", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "ERC20InsufficientAllowance", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "allowance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC20InsufficientBalance", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidApprover", + inputs: [ + { + name: "approver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidReceiver", + inputs: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidSender", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidSpender", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + }, + ], + inheritedFunctions: { + allowance: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + approve: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + balanceOf: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + decimals: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + name: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + symbol: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + totalSupply: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + transfer: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + transferFrom: "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", + }, + }, + ConstantSumFactory: { + address: "0x6712008ccd96751d586fdba0def5495e0e22d904", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "vault", + type: "address", + internalType: "contract IVault", + }, + { + name: "pauseWindowDuration", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "create", + inputs: [ + { + name: "name", + type: "string", + internalType: "string", + }, + { + name: "symbol", + type: "string", + internalType: "string", + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "tokens", + type: "tuple[]", + internalType: "struct TokenConfig[]", + components: [ + { + name: "token", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenType", + type: "uint8", + internalType: "enum TokenType", + }, + { + name: "rateProvider", + type: "address", + internalType: "contract IRateProvider", + }, + { + name: "paysYieldFees", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "swapFeePercentage", + type: "uint256", + internalType: "uint256", + }, + { + name: "protocolFeeExempt", + type: "bool", + internalType: "bool", + }, + { + name: "roleAccounts", + type: "tuple", + internalType: "struct PoolRoleAccounts", + components: [ + { + name: "pauseManager", + type: "address", + internalType: "address", + }, + { + name: "swapFeeManager", + type: "address", + internalType: "address", + }, + { + name: "poolCreator", + type: "address", + internalType: "address", + }, + ], + }, + { + name: "poolHooksContract", + type: "address", + internalType: "address", + }, + { + name: "liquidityManagement", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + outputs: [ + { + name: "pool", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "disable", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "getActionId", + inputs: [ + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getAuthorizer", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IAuthorizer", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getDefaultLiquidityManagement", + inputs: [], + outputs: [ + { + name: "liquidityManagement", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getDefaultPoolHooksContract", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getDeploymentAddress", + inputs: [ + { + name: "constructorArgs", + type: "bytes", + internalType: "bytes", + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getNewPoolPauseWindowEndTime", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getOriginalPauseWindowEndTime", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPauseWindowDuration", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolCount", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPools", + inputs: [], + outputs: [ + { + name: "", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolsInRange", + inputs: [ + { + name: "start", + type: "uint256", + internalType: "uint256", + }, + { + name: "count", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "pools", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getVault", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IVault", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isDisabled", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isPoolFromFactory", + inputs: [ + { + name: "pool", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "event", + name: "FactoryDisabled", + inputs: [], + anonymous: false, + }, + { + type: "event", + name: "PoolCreated", + inputs: [ + { + name: "pool", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "Create2EmptyBytecode", + inputs: [], + }, + { + type: "error", + name: "Create2FailedDeployment", + inputs: [], + }, + { + type: "error", + name: "Create2InsufficientBalance", + inputs: [ + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "Disabled", + inputs: [], + }, + { + type: "error", + name: "IndexOutOfBounds", + inputs: [], + }, + { + type: "error", + name: "PoolPauseWindowDurationOverflow", + inputs: [], + }, + { + type: "error", + name: "SenderNotAllowed", + inputs: [], + }, + { + type: "error", + name: "StandardPoolWithCreator", + inputs: [], + }, + ], + inheritedFunctions: { + disable: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getActionId: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getAuthorizer: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDefaultLiquidityManagement: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDefaultPoolHooksContract: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDeploymentAddress: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getNewPoolPauseWindowEndTime: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getOriginalPauseWindowEndTime: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPauseWindowDuration: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPoolCount: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPools: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPoolsInRange: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getVault: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + isDisabled: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + isPoolFromFactory: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + }, + }, + VeBALFeeDiscountHookExample: { + address: "0x8659df1c638cda8e475cd3c6481730c2b4f85873", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "vault", + type: "address", + internalType: "contract IVault", + }, + { + name: "allowedFactory", + type: "address", + internalType: "address", + }, + { + name: "veBAL", + type: "address", + internalType: "address", + }, + { + name: "trustedRouter", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "getHookFlags", + inputs: [], + outputs: [ + { + name: "hookFlags", + type: "tuple", + internalType: "struct HookFlags", + components: [ + { + name: "enableHookAdjustedAmounts", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeInitialize", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterInitialize", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallComputeDynamicSwapFee", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeSwap", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterSwap", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeAddLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterAddLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeRemoveLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterRemoveLiquidity", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "onAfterAddLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum AddLiquidityKind", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "amountsInRaw", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterInitialize", + inputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterRemoveLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum RemoveLiquidityKind", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "amountsOutRaw", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterSwap", + inputs: [ + { + name: "", + type: "tuple", + internalType: "struct AfterSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "tokenIn", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenOut", + type: "address", + internalType: "contract IERC20", + }, + { + name: "amountInScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountOutScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokenInBalanceScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokenOutBalanceScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountCalculatedScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountCalculatedRaw", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "pool", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeAddLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum AddLiquidityKind", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeInitialize", + inputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeRemoveLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum RemoveLiquidityKind", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeSwap", + inputs: [ + { + name: "", + type: "tuple", + internalType: "struct PoolSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "amountGivenScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "balancesScaled18", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "indexIn", + type: "uint256", + internalType: "uint256", + }, + { + name: "indexOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onComputeDynamicSwapFeePercentage", + inputs: [ + { + name: "params", + type: "tuple", + internalType: "struct PoolSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "amountGivenScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "balancesScaled18", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "indexIn", + type: "uint256", + internalType: "uint256", + }, + { + name: "indexOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "staticSwapFeePercentage", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "onRegister", + inputs: [ + { + name: "factory", + type: "address", + internalType: "address", + }, + { + name: "pool", + type: "address", + internalType: "address", + }, + { + name: "", + type: "tuple[]", + internalType: "struct TokenConfig[]", + components: [ + { + name: "token", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenType", + type: "uint8", + internalType: "enum TokenType", + }, + { + name: "rateProvider", + type: "address", + internalType: "contract IRateProvider", + }, + { + name: "paysYieldFees", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "VeBALFeeDiscountHookExampleRegistered", + inputs: [ + { + name: "hooksContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "factory", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "pool", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "SenderIsNotVault", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + ], + }, + ], + inheritedFunctions: { + getHookFlags: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterAddLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterInitialize: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterRemoveLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterSwap: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeAddLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeInitialize: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeRemoveLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeSwap: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onComputeDynamicSwapFeePercentage: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onRegister: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + }, + }, + ConstantProductFactory: { + address: "0x53dab165b879542e9adfc41c6474a9d797b9b042", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "vault", + type: "address", + internalType: "contract IVault", + }, + { + name: "pauseWindowDuration", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "create", + inputs: [ + { + name: "name", + type: "string", + internalType: "string", + }, + { + name: "symbol", + type: "string", + internalType: "string", + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "tokens", + type: "tuple[]", + internalType: "struct TokenConfig[]", + components: [ + { + name: "token", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenType", + type: "uint8", + internalType: "enum TokenType", + }, + { + name: "rateProvider", + type: "address", + internalType: "contract IRateProvider", + }, + { + name: "paysYieldFees", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "swapFeePercentage", + type: "uint256", + internalType: "uint256", + }, + { + name: "protocolFeeExempt", + type: "bool", + internalType: "bool", + }, + { + name: "roleAccounts", + type: "tuple", + internalType: "struct PoolRoleAccounts", + components: [ + { + name: "pauseManager", + type: "address", + internalType: "address", + }, + { + name: "swapFeeManager", + type: "address", + internalType: "address", + }, + { + name: "poolCreator", + type: "address", + internalType: "address", + }, + ], + }, + { + name: "poolHooksContract", + type: "address", + internalType: "address", + }, + { + name: "liquidityManagement", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + outputs: [ + { + name: "pool", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "disable", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "getActionId", + inputs: [ + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getAuthorizer", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IAuthorizer", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getDefaultLiquidityManagement", + inputs: [], + outputs: [ + { + name: "liquidityManagement", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getDefaultPoolHooksContract", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getDeploymentAddress", + inputs: [ + { + name: "constructorArgs", + type: "bytes", + internalType: "bytes", + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getNewPoolPauseWindowEndTime", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getOriginalPauseWindowEndTime", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPauseWindowDuration", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolCount", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPools", + inputs: [], + outputs: [ + { + name: "", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolsInRange", + inputs: [ + { + name: "start", + type: "uint256", + internalType: "uint256", + }, + { + name: "count", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "pools", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getVault", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IVault", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isDisabled", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isPoolFromFactory", + inputs: [ + { + name: "pool", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "event", + name: "FactoryDisabled", + inputs: [], + anonymous: false, + }, + { + type: "event", + name: "PoolCreated", + inputs: [ + { + name: "pool", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "Create2EmptyBytecode", + inputs: [], + }, + { + type: "error", + name: "Create2FailedDeployment", + inputs: [], + }, + { + type: "error", + name: "Create2InsufficientBalance", + inputs: [ + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "Disabled", + inputs: [], + }, + { + type: "error", + name: "IndexOutOfBounds", + inputs: [], + }, + { + type: "error", + name: "PoolPauseWindowDurationOverflow", + inputs: [], + }, + { + type: "error", + name: "SenderNotAllowed", + inputs: [], + }, + { + type: "error", + name: "StandardPoolWithCreator", + inputs: [], + }, + ], + inheritedFunctions: { + disable: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getActionId: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getAuthorizer: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDefaultLiquidityManagement: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDefaultPoolHooksContract: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDeploymentAddress: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getNewPoolPauseWindowEndTime: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getOriginalPauseWindowEndTime: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPauseWindowDuration: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPoolCount: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPools: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPoolsInRange: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getVault: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + isDisabled: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + isPoolFromFactory: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + }, + }, + LotteryHookExample: { + address: "0x03f7f064e6ced8e154e3fdaaf92dccc4e818e97b", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "vault", + type: "address", + internalType: "contract IVault", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "LUCKY_NUMBER", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "MAX_NUMBER", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getHookFlags", + inputs: [], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct HookFlags", + components: [ + { + name: "enableHookAdjustedAmounts", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeInitialize", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterInitialize", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallComputeDynamicSwapFee", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeSwap", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterSwap", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeAddLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterAddLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeRemoveLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterRemoveLiquidity", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getRandomNumber", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "hookSwapFeePercentage", + inputs: [], + outputs: [ + { + name: "", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "onAfterAddLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum AddLiquidityKind", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "amountsInRaw", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterInitialize", + inputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterRemoveLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum RemoveLiquidityKind", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "amountsOutRaw", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterSwap", + inputs: [ + { + name: "params", + type: "tuple", + internalType: "struct AfterSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "tokenIn", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenOut", + type: "address", + internalType: "contract IERC20", + }, + { + name: "amountInScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountOutScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokenInBalanceScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokenOutBalanceScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountCalculatedScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountCalculatedRaw", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "pool", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [ + { + name: "success", + type: "bool", + internalType: "bool", + }, + { + name: "hookAdjustedAmountCalculatedRaw", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeAddLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum AddLiquidityKind", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeInitialize", + inputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeRemoveLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum RemoveLiquidityKind", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeSwap", + inputs: [ + { + name: "", + type: "tuple", + internalType: "struct PoolSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "amountGivenScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "balancesScaled18", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "indexIn", + type: "uint256", + internalType: "uint256", + }, + { + name: "indexOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onComputeDynamicSwapFeePercentage", + inputs: [ + { + name: "", + type: "tuple", + internalType: "struct PoolSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "amountGivenScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "balancesScaled18", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "indexIn", + type: "uint256", + internalType: "uint256", + }, + { + name: "indexOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "onRegister", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "pool", + type: "address", + internalType: "address", + }, + { + name: "", + type: "tuple[]", + internalType: "struct TokenConfig[]", + components: [ + { + name: "token", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenType", + type: "uint8", + internalType: "enum TokenType", + }, + { + name: "rateProvider", + type: "address", + internalType: "contract IRateProvider", + }, + { + name: "paysYieldFees", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "renounceOwnership", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setHookSwapFeePercentage", + inputs: [ + { + name: "swapFeePercentage", + type: "uint64", + internalType: "uint64", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferOwnership", + inputs: [ + { + name: "newOwner", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "HookSwapFeePercentageChanged", + inputs: [ + { + name: "hooksContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "hookFeePercentage", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "LotteryFeeCollected", + inputs: [ + { + name: "hooksContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "token", + type: "address", + indexed: true, + internalType: "contract IERC20", + }, + { + name: "feeAmount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "LotteryHookExampleRegistered", + inputs: [ + { + name: "hooksContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "pool", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "LotteryWinningsPaid", + inputs: [ + { + name: "hooksContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "winner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "token", + type: "address", + indexed: true, + internalType: "contract IERC20", + }, + { + name: "amountWon", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "OwnershipTransferred", + inputs: [ + { + name: "previousOwner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newOwner", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "AddressEmptyCode", + inputs: [ + { + name: "target", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "AddressInsufficientBalance", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "FailedInnerCall", + inputs: [], + }, + { + type: "error", + name: "IndexOutOfBounds", + inputs: [], + }, + { + type: "error", + name: "OwnableInvalidOwner", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "OwnableUnauthorizedAccount", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "SafeERC20FailedOperation", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "SenderIsNotVault", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + ], + }, + ], + inheritedFunctions: { + getHookFlags: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterAddLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterInitialize: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterRemoveLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterSwap: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeAddLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeInitialize: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeRemoveLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeSwap: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onComputeDynamicSwapFeePercentage: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onRegister: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + owner: "lib/openzeppelin-contracts/contracts/access/Ownable.sol", + renounceOwnership: "lib/openzeppelin-contracts/contracts/access/Ownable.sol", + transferOwnership: "lib/openzeppelin-contracts/contracts/access/Ownable.sol", + }, + }, + WeightedPoolFactory: { + address: "0x737b8f095e3c575a6ae5fe1711adb8f271e20269", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "vault", + type: "address", + internalType: "contract IVault", + }, + { + name: "pauseWindowDuration", + type: "uint32", + internalType: "uint32", + }, + { + name: "factoryVersion", + type: "string", + internalType: "string", + }, + { + name: "poolVersion", + type: "string", + internalType: "string", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "create", + inputs: [ + { + name: "name", + type: "string", + internalType: "string", + }, + { + name: "symbol", + type: "string", + internalType: "string", + }, + { + name: "tokens", + type: "tuple[]", + internalType: "struct TokenConfig[]", + components: [ + { + name: "token", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenType", + type: "uint8", + internalType: "enum TokenType", + }, + { + name: "rateProvider", + type: "address", + internalType: "contract IRateProvider", + }, + { + name: "paysYieldFees", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "normalizedWeights", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "roleAccounts", + type: "tuple", + internalType: "struct PoolRoleAccounts", + components: [ + { + name: "pauseManager", + type: "address", + internalType: "address", + }, + { + name: "swapFeeManager", + type: "address", + internalType: "address", + }, + { + name: "poolCreator", + type: "address", + internalType: "address", + }, + ], + }, + { + name: "swapFeePercentage", + type: "uint256", + internalType: "uint256", + }, + { + name: "poolHooksContract", + type: "address", + internalType: "address", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "pool", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "disable", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "getActionId", + inputs: [ + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getAuthorizer", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IAuthorizer", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getDefaultLiquidityManagement", + inputs: [], + outputs: [ + { + name: "liquidityManagement", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getDefaultPoolHooksContract", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getDeploymentAddress", + inputs: [ + { + name: "constructorArgs", + type: "bytes", + internalType: "bytes", + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getNewPoolPauseWindowEndTime", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getOriginalPauseWindowEndTime", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPauseWindowDuration", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolCount", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolVersion", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPools", + inputs: [], + outputs: [ + { + name: "", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolsInRange", + inputs: [ + { + name: "start", + type: "uint256", + internalType: "uint256", + }, + { + name: "count", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "pools", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getVault", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IVault", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isDisabled", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isPoolFromFactory", + inputs: [ + { + name: "pool", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "version", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "event", + name: "FactoryDisabled", + inputs: [], + anonymous: false, + }, + { + type: "event", + name: "PoolCreated", + inputs: [ + { + name: "pool", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "Create2EmptyBytecode", + inputs: [], + }, + { + type: "error", + name: "Create2FailedDeployment", + inputs: [], + }, + { + type: "error", + name: "Create2InsufficientBalance", + inputs: [ + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "Disabled", + inputs: [], + }, + { + type: "error", + name: "IndexOutOfBounds", + inputs: [], + }, + { + type: "error", + name: "PoolPauseWindowDurationOverflow", + inputs: [], + }, + { + type: "error", + name: "SenderNotAllowed", + inputs: [], + }, + { + type: "error", + name: "StandardPoolWithCreator", + inputs: [], + }, + ], + inheritedFunctions: { + getPoolVersion: "lib/balancer-v3-monorepo/pkg/interfaces/contracts/solidity-utils/helpers/IPoolVersion.sol", + disable: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getActionId: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getAuthorizer: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDefaultLiquidityManagement: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDefaultPoolHooksContract: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getDeploymentAddress: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getNewPoolPauseWindowEndTime: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getOriginalPauseWindowEndTime: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPauseWindowDuration: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPoolCount: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPools: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getPoolsInRange: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + getVault: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + isDisabled: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + isPoolFromFactory: "lib/balancer-v3-monorepo/pkg/pool-utils/contracts/BasePoolFactory.sol", + version: "lib/balancer-v3-monorepo/pkg/solidity-utils/contracts/helpers/Version.sol", + }, + }, + ExitFeeHookExample: { + address: "0xad3e631c01798f9aae4692dabf791a62c226c5d4", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "vault", + type: "address", + internalType: "contract IVault", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "MAX_EXIT_FEE_PERCENTAGE", + inputs: [], + outputs: [ + { + name: "", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "exitFeePercentage", + inputs: [], + outputs: [ + { + name: "", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getHookFlags", + inputs: [], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct HookFlags", + components: [ + { + name: "enableHookAdjustedAmounts", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeInitialize", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterInitialize", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallComputeDynamicSwapFee", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeSwap", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterSwap", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeAddLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterAddLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallBeforeRemoveLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "shouldCallAfterRemoveLiquidity", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "onAfterAddLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum AddLiquidityKind", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "amountsInRaw", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterInitialize", + inputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterRemoveLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "pool", + type: "address", + internalType: "address", + }, + { + name: "kind", + type: "uint8", + internalType: "enum RemoveLiquidityKind", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "amountsOutRaw", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "hookAdjustedAmountsOutRaw", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onAfterSwap", + inputs: [ + { + name: "", + type: "tuple", + internalType: "struct AfterSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "tokenIn", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenOut", + type: "address", + internalType: "contract IERC20", + }, + { + name: "amountInScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountOutScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokenInBalanceScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokenOutBalanceScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountCalculatedScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountCalculatedRaw", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "pool", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeAddLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum AddLiquidityKind", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeInitialize", + inputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeRemoveLiquidity", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint8", + internalType: "enum RemoveLiquidityKind", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onBeforeSwap", + inputs: [ + { + name: "", + type: "tuple", + internalType: "struct PoolSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "amountGivenScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "balancesScaled18", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "indexIn", + type: "uint256", + internalType: "uint256", + }, + { + name: "indexOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onComputeDynamicSwapFeePercentage", + inputs: [ + { + name: "", + type: "tuple", + internalType: "struct PoolSwapParams", + components: [ + { + name: "kind", + type: "uint8", + internalType: "enum SwapKind", + }, + { + name: "amountGivenScaled18", + type: "uint256", + internalType: "uint256", + }, + { + name: "balancesScaled18", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "indexIn", + type: "uint256", + internalType: "uint256", + }, + { + name: "indexOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "router", + type: "address", + internalType: "address", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "onRegister", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "pool", + type: "address", + internalType: "address", + }, + { + name: "", + type: "tuple[]", + internalType: "struct TokenConfig[]", + components: [ + { + name: "token", + type: "address", + internalType: "contract IERC20", + }, + { + name: "tokenType", + type: "uint8", + internalType: "enum TokenType", + }, + { + name: "rateProvider", + type: "address", + internalType: "contract IRateProvider", + }, + { + name: "paysYieldFees", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "liquidityManagement", + type: "tuple", + internalType: "struct LiquidityManagement", + components: [ + { + name: "disableUnbalancedLiquidity", + type: "bool", + internalType: "bool", + }, + { + name: "enableAddLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableRemoveLiquidityCustom", + type: "bool", + internalType: "bool", + }, + { + name: "enableDonation", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "renounceOwnership", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setExitFeePercentage", + inputs: [ + { + name: "newExitFeePercentage", + type: "uint64", + internalType: "uint64", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferOwnership", + inputs: [ + { + name: "newOwner", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "ExitFeeCharged", + inputs: [ + { + name: "pool", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "token", + type: "address", + indexed: true, + internalType: "contract IERC20", + }, + { + name: "feeAmount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ExitFeeHookExampleRegistered", + inputs: [ + { + name: "hooksContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "pool", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ExitFeePercentageChanged", + inputs: [ + { + name: "hookContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "exitFeePercentage", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "OwnershipTransferred", + inputs: [ + { + name: "previousOwner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newOwner", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "ExitFeeAboveLimit", + inputs: [ + { + name: "feePercentage", + type: "uint256", + internalType: "uint256", + }, + { + name: "limit", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "OwnableInvalidOwner", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "OwnableUnauthorizedAccount", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "PoolDoesNotSupportDonation", + inputs: [], + }, + { + type: "error", + name: "SenderIsNotVault", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + ], + }, + ], + inheritedFunctions: { + getHookFlags: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterAddLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterInitialize: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterRemoveLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onAfterSwap: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeAddLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeInitialize: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeRemoveLiquidity: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onBeforeSwap: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onComputeDynamicSwapFeePercentage: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + onRegister: "lib/balancer-v3-monorepo/pkg/vault/contracts/BaseHooks.sol", + owner: "lib/openzeppelin-contracts/contracts/access/Ownable.sol", + renounceOwnership: "lib/openzeppelin-contracts/contracts/access/Ownable.sol", + transferOwnership: "lib/openzeppelin-contracts/contracts/access/Ownable.sol", + }, + }, + }, + 11155111: { + MockToken1: { + address: "0xebd6303d9cd09605545f723545d2d0bf56966cb9", abi: [ { type: "constructor", @@ -365,7 +10465,7 @@ const deployedContracts = { }, }, MockToken2: { - address: "0xcf23ce2ffa1ddd9cc2b445ae6778c4dbd605a1a0", + address: "0x6c205d1b1c20352e9d33a88569f18d103004762d", abi: [ { type: "constructor", @@ -723,7 +10823,7 @@ const deployedContracts = { }, }, MockVeBAL: { - address: "0x427ee58a6c574032085aeb90dd05deea6f054930", + address: "0x72007ee16e562335c7505f190e53073428bfdc25", abi: [ { type: "constructor", @@ -1081,7 +11181,7 @@ const deployedContracts = { }, }, ConstantSumFactory: { - address: "0x2963ff0196a901ec3f56d7531e7c4ce8f226462b", + address: "0xd8a5cb276f76e675bffd98d02cedb75191e668a0", abi: [ { type: "constructor", @@ -1554,7 +11654,7 @@ const deployedContracts = { }, }, VeBALFeeDiscountHookExample: { - address: "0xba840136e489cb5ecf9d9988421f3a9f45e0c341", + address: "0xa42537a573f81173e0989ed75f7d9e612a90e625", abi: [ { type: "constructor", @@ -2264,7 +12364,7 @@ const deployedContracts = { }, }, ConstantProductFactory: { - address: "0xf4fa0d1c10c47cde9f65d56c3ec977cbeb13449a", + address: "0x04e08a0ce01c5b8418f93ab38d9a0123a44c1cb3", abi: [ { type: "constructor", @@ -2737,7 +12837,7 @@ const deployedContracts = { }, }, LotteryHookExample: { - address: "0xa343b1fc2897b8c49a72a9a0b2675cb9c7664e8c", + address: "0x84a94a689ea85b0c880bb61a62e3c6833d68262a", abi: [ { type: "constructor", @@ -3691,7 +13791,7 @@ const deployedContracts = { }, }, WeightedPoolFactory: { - address: "0x2fe19128a8257182fdd77f90ea96d27ca342897a", + address: "0xa3dba161c34940d4a145448a4cdc3f5b88e8a179", abi: [ { type: "constructor", @@ -4185,7 +14285,7 @@ const deployedContracts = { }, }, ExitFeeHookExample: { - address: "0x2f6f107d4afd43c451b74da41a6dda53d2bf24b1", + address: "0x6d3fdf461f8ca0c6ca9928705687f3794a2cb671", abi: [ { type: "constructor", diff --git a/packages/nextjs/hooks/balancer/swap/useQuerySwap.ts b/packages/nextjs/hooks/balancer/swap/useQuerySwap.ts index 6fbaca20..621970d3 100644 --- a/packages/nextjs/hooks/balancer/swap/useQuerySwap.ts +++ b/packages/nextjs/hooks/balancer/swap/useQuerySwap.ts @@ -40,7 +40,7 @@ export const useQuerySwap = (swapInput: SwapInput, setSwapConfig: Dispatch