diff --git a/.changeset/afraid-schools-provide.md b/.changeset/afraid-schools-provide.md new file mode 100644 index 00000000..44219c5e --- /dev/null +++ b/.changeset/afraid-schools-provide.md @@ -0,0 +1,5 @@ +--- +"@balancer/sdk": patch +--- + +Bump composable stable pool factories to v6 diff --git a/examples/createAndInitPool/createAndInitPool.ts b/examples/createAndInitPool/createAndInitPool.ts index 0c7e71e9..5b611523 100644 --- a/examples/createAndInitPool/createAndInitPool.ts +++ b/examples/createAndInitPool/createAndInitPool.ts @@ -17,7 +17,7 @@ import { parseEther, } from 'viem'; import { - composableStableFactoryV5Abi_V2, + composableStableFactoryV6Abi_V2, CreatePool, CreatePoolV2ComposableStableInput, PoolType, @@ -156,7 +156,7 @@ async function createPool({ client, call, userAccount }) { const poolCreatedEvent = findEventInReceiptLogs({ receipt: transactionReceipt, eventName: 'PoolCreated', - abi: composableStableFactoryV5Abi_V2, + abi: composableStableFactoryV6Abi_V2, to: call.to, }); diff --git a/src/abi/composableStableFactoryV5.V2.ts b/src/abi/composableStableFactoryV6.V2.ts similarity index 57% rename from src/abi/composableStableFactoryV5.V2.ts rename to src/abi/composableStableFactoryV6.V2.ts index 0db5441f..bb5d3343 100644 --- a/src/abi/composableStableFactoryV5.V2.ts +++ b/src/abi/composableStableFactoryV6.V2.ts @@ -1,19 +1,36 @@ -export const composableStableFactoryV5Abi_V2 = [ +export const composableStableFactoryV6Abi_V2 = [ { inputs: [ - { internalType: 'contract IVault', name: 'vault', type: 'address' }, + { + internalType: 'contract IVault', + name: 'vault', + type: 'address', + }, { internalType: 'contract IProtocolFeePercentagesProvider', name: 'protocolFeeProvider', type: 'address', }, - { internalType: 'string', name: 'factoryVersion', type: 'string' }, - { internalType: 'string', name: 'poolVersion', type: 'string' }, + { + internalType: 'string', + name: 'factoryVersion', + type: 'string', + }, + { + internalType: 'string', + name: 'poolVersion', + type: 'string', + }, ], stateMutability: 'nonpayable', type: 'constructor', }, - { anonymous: false, inputs: [], name: 'FactoryDisabled', type: 'event' }, + { + anonymous: false, + inputs: [], + name: 'FactoryDisabled', + type: 'event', + }, { anonymous: false, inputs: [ @@ -29,8 +46,16 @@ export const composableStableFactoryV5Abi_V2 = [ }, { inputs: [ - { internalType: 'string', name: 'name', type: 'string' }, - { internalType: 'string', name: 'symbol', type: 'string' }, + { + internalType: 'string', + name: 'name', + type: 'string', + }, + { + internalType: 'string', + name: 'symbol', + type: 'string', + }, { internalType: 'contract IERC20[]', name: 'tokens', @@ -61,8 +86,16 @@ export const composableStableFactoryV5Abi_V2 = [ name: 'swapFeePercentage', type: 'uint256', }, - { internalType: 'address', name: 'owner', type: 'address' }, - { internalType: 'bytes32', name: 'salt', type: 'bytes32' }, + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'bytes32', + name: 'salt', + type: 'bytes32', + }, ], name: 'create', outputs: [ @@ -83,9 +116,21 @@ export const composableStableFactoryV5Abi_V2 = [ type: 'function', }, { - inputs: [{ internalType: 'bytes4', name: 'selector', type: 'bytes4' }], + inputs: [ + { + internalType: 'bytes4', + name: 'selector', + type: 'bytes4', + }, + ], name: 'getActionId', - outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], stateMutability: 'view', type: 'function', }, @@ -93,7 +138,11 @@ export const composableStableFactoryV5Abi_V2 = [ inputs: [], name: 'getAuthorizer', outputs: [ - { internalType: 'contract IAuthorizer', name: '', type: 'address' }, + { + internalType: 'contract IAuthorizer', + name: '', + type: 'address', + }, ], stateMutability: 'view', type: 'function', @@ -101,7 +150,13 @@ export const composableStableFactoryV5Abi_V2 = [ { inputs: [], name: 'getCreationCode', - outputs: [{ internalType: 'bytes', name: '', type: 'bytes' }], + outputs: [ + { + internalType: 'bytes', + name: '', + type: 'bytes', + }, + ], stateMutability: 'view', type: 'function', }, @@ -109,8 +164,16 @@ export const composableStableFactoryV5Abi_V2 = [ inputs: [], name: 'getCreationCodeContracts', outputs: [ - { internalType: 'address', name: 'contractA', type: 'address' }, - { internalType: 'address', name: 'contractB', type: 'address' }, + { + internalType: 'address', + name: 'contractA', + type: 'address', + }, + { + internalType: 'address', + name: 'contractB', + type: 'address', + }, ], stateMutability: 'view', type: 'function', @@ -136,7 +199,13 @@ export const composableStableFactoryV5Abi_V2 = [ { inputs: [], name: 'getPoolVersion', - outputs: [{ internalType: 'string', name: '', type: 'string' }], + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], stateMutability: 'view', type: 'function', }, @@ -157,7 +226,11 @@ export const composableStableFactoryV5Abi_V2 = [ inputs: [], name: 'getVault', outputs: [ - { internalType: 'contract IVault', name: '', type: 'address' }, + { + internalType: 'contract IVault', + name: '', + type: 'address', + }, ], stateMutability: 'view', type: 'function', @@ -165,21 +238,45 @@ export const composableStableFactoryV5Abi_V2 = [ { inputs: [], name: 'isDisabled', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], stateMutability: 'view', type: 'function', }, { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], + inputs: [ + { + internalType: 'address', + name: 'pool', + type: 'address', + }, + ], name: 'isPoolFromFactory', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], stateMutability: 'view', type: 'function', }, { inputs: [], name: 'version', - outputs: [{ internalType: 'string', name: '', type: 'string' }], + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], stateMutability: 'view', type: 'function', }, diff --git a/src/abi/composableStablePoolV5.V2.ts b/src/abi/composableStablePoolV5.V2.ts deleted file mode 100644 index e7c6a067..00000000 --- a/src/abi/composableStablePoolV5.V2.ts +++ /dev/null @@ -1,828 +0,0 @@ -export const composabableStablePoolV5Abi_V2 = [ - { - inputs: [ - { - components: [ - { - internalType: 'contract IVault', - name: 'vault', - type: 'address', - }, - { - internalType: 'string', - name: 'name', - type: 'string', - }, - { - internalType: 'string', - name: 'symbol', - type: 'string', - }, - { - internalType: 'contract IERC20', - name: 'mainToken', - type: 'address', - }, - { - internalType: 'contract IERC20', - name: 'wrappedToken', - type: 'address', - }, - { - internalType: 'address', - name: 'assetManager', - type: 'address', - }, - { - internalType: 'uint256', - name: 'upperTarget', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'swapFeePercentage', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'pauseWindowDuration', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'bufferPeriodDuration', - type: 'uint256', - }, - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'string', - name: 'version', - type: 'string', - }, - ], - internalType: 'struct AaveLinearPool.ConstructorArgs', - name: 'args', - type: 'tuple', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bool', - name: 'paused', - type: 'bool', - }, - ], - name: 'PausedStateChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bool', - name: 'enabled', - type: 'bool', - }, - ], - name: 'RecoveryModeStateChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'swapFeePercentage', - type: 'uint256', - }, - ], - name: 'SwapFeePercentageChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'contract IERC20', - name: 'token', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'lowerTarget', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'upperTarget', - type: 'uint256', - }, - ], - name: 'TargetsSet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { internalType: 'address', name: 'owner', type: 'address' }, - { internalType: 'address', name: 'spender', type: 'address' }, - ], - name: 'allowance', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { internalType: 'address', name: 'spender', type: 'address' }, - { internalType: 'uint256', name: 'amount', type: 'uint256' }, - ], - name: 'approve', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'account', type: 'address' }], - name: 'balanceOf', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { internalType: 'address', name: 'spender', type: 'address' }, - { internalType: 'uint256', name: 'amount', type: 'uint256' }, - ], - name: 'decreaseAllowance', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'disableRecoveryMode', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'enableRecoveryMode', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [{ internalType: 'bytes4', name: 'selector', type: 'bytes4' }], - name: 'getActionId', - outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getAuthorizer', - outputs: [ - { - internalType: 'contract IAuthorizer', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getBptIndex', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [], - name: 'getDomainSeparator', - outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getMainIndex', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getMainToken', - outputs: [ - { internalType: 'contract IERC20', name: '', type: 'address' }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'account', type: 'address' }], - name: 'getNextNonce', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getOwner', - outputs: [{ internalType: 'address', name: '', type: 'address' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getPausedState', - outputs: [ - { internalType: 'bool', name: 'paused', type: 'bool' }, - { - internalType: 'uint256', - name: 'pauseWindowEndTime', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'bufferPeriodEndTime', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getPoolId', - outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getProtocolFeesCollector', - outputs: [ - { - internalType: 'contract IProtocolFeesCollector', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getRate', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getScalingFactors', - outputs: [{ internalType: 'uint256[]', name: '', type: 'uint256[]' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getSwapFeePercentage', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getTargets', - outputs: [ - { - internalType: 'uint256', - name: 'lowerTarget', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'upperTarget', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getVault', - outputs: [ - { internalType: 'contract IVault', name: '', type: 'address' }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getVirtualSupply', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getWrappedIndex', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getWrappedToken', - outputs: [ - { internalType: 'contract IERC20', name: '', type: 'address' }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getWrappedTokenRate', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'inRecoveryMode', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { internalType: 'address', name: 'spender', type: 'address' }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [{ internalType: 'string', name: '', type: 'string' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'owner', type: 'address' }], - name: 'nonces', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { internalType: 'bytes32', name: 'poolId', type: 'bytes32' }, - { internalType: 'address', name: 'sender', type: 'address' }, - { internalType: 'address', name: '', type: 'address' }, - { - internalType: 'uint256[]', - name: 'balances', - type: 'uint256[]', - }, - { internalType: 'uint256', name: '', type: 'uint256' }, - { internalType: 'uint256', name: '', type: 'uint256' }, - { internalType: 'bytes', name: 'userData', type: 'bytes' }, - ], - name: 'onExitPool', - outputs: [ - { - internalType: 'uint256[]', - name: 'amountsOut', - type: 'uint256[]', - }, - { - internalType: 'uint256[]', - name: 'dueProtocolFees', - type: 'uint256[]', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { internalType: 'bytes32', name: 'poolId', type: 'bytes32' }, - { internalType: 'address', name: 'sender', type: 'address' }, - { internalType: 'address', name: 'recipient', type: 'address' }, - { - internalType: 'uint256[]', - name: 'balances', - type: 'uint256[]', - }, - { internalType: 'uint256', name: '', type: 'uint256' }, - { internalType: 'uint256', name: '', type: 'uint256' }, - { internalType: 'bytes', name: 'userData', type: 'bytes' }, - ], - name: 'onJoinPool', - outputs: [ - { - internalType: 'uint256[]', - name: 'amountsIn', - type: 'uint256[]', - }, - { - internalType: 'uint256[]', - name: 'dueProtocolFees', - type: 'uint256[]', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - components: [ - { - internalType: 'enum IVault.SwapKind', - name: 'kind', - type: 'uint8', - }, - { - internalType: 'contract IERC20', - name: 'tokenIn', - type: 'address', - }, - { - internalType: 'contract IERC20', - name: 'tokenOut', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - { - internalType: 'uint256', - name: 'lastChangeBlock', - type: 'uint256', - }, - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'bytes', - name: 'userData', - type: 'bytes', - }, - ], - internalType: 'struct IPoolSwapStructs.SwapRequest', - name: 'request', - type: 'tuple', - }, - { - internalType: 'uint256[]', - name: 'balances', - type: 'uint256[]', - }, - { internalType: 'uint256', name: 'indexIn', type: 'uint256' }, - { internalType: 'uint256', name: 'indexOut', type: 'uint256' }, - ], - name: 'onSwap', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - components: [ - { - internalType: 'enum IVault.SwapKind', - name: 'kind', - type: 'uint8', - }, - { - internalType: 'contract IERC20', - name: 'tokenIn', - type: 'address', - }, - { - internalType: 'contract IERC20', - name: 'tokenOut', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - { - internalType: 'uint256', - name: 'lastChangeBlock', - type: 'uint256', - }, - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'bytes', - name: 'userData', - type: 'bytes', - }, - ], - internalType: 'struct IPoolSwapStructs.SwapRequest', - name: 'request', - type: 'tuple', - }, - { - internalType: 'uint256', - name: 'balanceTokenIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'balanceTokenOut', - type: 'uint256', - }, - ], - name: 'onSwap', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'pause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { internalType: 'address', name: 'owner', type: 'address' }, - { internalType: 'address', name: 'spender', type: 'address' }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'uint256', name: 'deadline', type: 'uint256' }, - { internalType: 'uint8', name: 'v', type: 'uint8' }, - { internalType: 'bytes32', name: 'r', type: 'bytes32' }, - { internalType: 'bytes32', name: 's', type: 'bytes32' }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { internalType: 'bytes32', name: '', type: 'bytes32' }, - { internalType: 'address', name: 'sender', type: 'address' }, - { internalType: 'address', name: '', type: 'address' }, - { - internalType: 'uint256[]', - name: 'balances', - type: 'uint256[]', - }, - { internalType: 'uint256', name: '', type: 'uint256' }, - { internalType: 'uint256', name: '', type: 'uint256' }, - { internalType: 'bytes', name: 'userData', type: 'bytes' }, - ], - name: 'queryExit', - outputs: [ - { internalType: 'uint256', name: 'bptIn', type: 'uint256' }, - { - internalType: 'uint256[]', - name: 'amountsOut', - type: 'uint256[]', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { internalType: 'bytes32', name: '', type: 'bytes32' }, - { internalType: 'address', name: 'sender', type: 'address' }, - { internalType: 'address', name: '', type: 'address' }, - { - internalType: 'uint256[]', - name: 'balances', - type: 'uint256[]', - }, - { internalType: 'uint256', name: '', type: 'uint256' }, - { internalType: 'uint256', name: '', type: 'uint256' }, - { internalType: 'bytes', name: 'userData', type: 'bytes' }, - ], - name: 'queryJoin', - outputs: [ - { internalType: 'uint256', name: 'bptOut', type: 'uint256' }, - { - internalType: 'uint256[]', - name: 'amountsIn', - type: 'uint256[]', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'swapFeePercentage', - type: 'uint256', - }, - ], - name: 'setSwapFeePercentage', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'newLowerTarget', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'newUpperTarget', - type: 'uint256', - }, - ], - name: 'setTargets', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [{ internalType: 'string', name: '', type: 'string' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { internalType: 'address', name: 'recipient', type: 'address' }, - { internalType: 'uint256', name: 'amount', type: 'uint256' }, - ], - name: 'transfer', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { internalType: 'address', name: 'sender', type: 'address' }, - { internalType: 'address', name: 'recipient', type: 'address' }, - { internalType: 'uint256', name: 'amount', type: 'uint256' }, - ], - name: 'transferFrom', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'unpause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'version', - outputs: [{ internalType: 'string', name: '', type: 'string' }], - stateMutability: 'view', - type: 'function', - }, -] as const; diff --git a/src/abi/index.ts b/src/abi/index.ts index 64282bb4..653e47d5 100644 --- a/src/abi/index.ts +++ b/src/abi/index.ts @@ -5,8 +5,7 @@ export * from './balancerQueries'; export * from './balancerRelayer'; export * from './balancerRouter'; export * from './batchRelayerLibrary'; -export * from './composableStableFactoryV5.V2'; -export * from './composableStablePoolV5.V2'; +export * from './composableStableFactoryV6.V2'; export * from './erc20'; export * from './permit2'; export * from './vault.V2'; diff --git a/src/entities/createPool/createPoolV2/composableStable/createPoolComposableStable.ts b/src/entities/createPool/createPoolV2/composableStable/createPoolComposableStable.ts index a21129c9..6de24fde 100644 --- a/src/entities/createPool/createPoolV2/composableStable/createPoolComposableStable.ts +++ b/src/entities/createPool/createPoolV2/composableStable/createPoolComposableStable.ts @@ -1,5 +1,5 @@ import { Address, encodeFunctionData, parseEther } from 'viem'; -import { composableStableFactoryV5Abi_V2 } from '../../../../abi/composableStableFactoryV5.V2'; +import { composableStableFactoryV6Abi_V2 } from '../../../../abi/composableStableFactoryV6.V2'; import { CreatePoolBase, CreatePoolBuildCallOutput, @@ -16,7 +16,7 @@ export class CreatePoolComposableStableV2 implements CreatePoolBase { ): CreatePoolBuildCallOutput { const args = this.parseCreateFunctionArgs(input); const encodedCall = encodeFunctionData({ - abi: composableStableFactoryV5Abi_V2, + abi: composableStableFactoryV6Abi_V2, functionName: 'create', args, }); diff --git a/src/utils/constants.ts b/src/utils/constants.ts index f4d55e8e..3714d5b3 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -190,16 +190,17 @@ export const WEIGHTED_POOL_FACTORY_BALANCER_V2: Record = { }; export const COMPOSABLE_STABLE_POOL_FACTORY: Record = { - [ChainId.ARBITRUM_ONE]: '0xa8920455934da4d853faac1f94fe7bef72943ef1', - [ChainId.AVALANCHE]: '0xe42ffa682a26ef8f25891db4882932711d42e467', - [ChainId.BASE]: '0x8df317a729fcaa260306d7de28888932cb579b88', + [ChainId.ARBITRUM_ONE]: '0x4bdCc2fb18AEb9e2d281b0278D946445070EAda7', + [ChainId.AVALANCHE]: '0xb9F8AB3ED3F3aCBa64Bc6cd2DcA74B7F38fD7B88', + [ChainId.BASE]: '0x956CCab09898C0AF2aCa5e6C229c3aD4E93d9288', [ChainId.FRAXTAL]: '0x4bdCc2fb18AEb9e2d281b0278D946445070EAda7', - [ChainId.GNOSIS_CHAIN]: '0x4bdcc2fb18aeb9e2d281b0278d946445070eada7', - [ChainId.MAINNET]: '0xdb8d758bcb971e482b2c45f7f8a7740283a1bd3a', + [ChainId.GNOSIS_CHAIN]: '0x47B489bf5836f83ABD928C316F8e39bC0587B020', + [ChainId.MAINNET]: '0x5B42eC6D40f7B7965BE5308c70e2603c0281C1E9', [ChainId.MODE]: '0x5DbAd78818D4c8958EfF2d5b95b28385A22113Cd', - [ChainId.OPTIMISM]: '0x043a2dad730d585c44fb79d2614f295d2d625412', - [ChainId.POLYGON]: '0xe2fa4e1d17725e72dcdafe943ecf45df4b9e285b', - [ChainId.ZKEVM]: '0x577e5993b9cc480f07f98b5ebd055604bd9071c4', + [ChainId.OPTIMISM]: '0x4bdCc2fb18AEb9e2d281b0278D946445070EAda7', + [ChainId.POLYGON]: '0xEAedc32a51c510d35ebC11088fD5fF2b47aACF2E', + [ChainId.SEPOLIA]: '0x05503B3aDE04aCA81c8D6F88eCB73Ba156982D2B', + [ChainId.ZKEVM]: '0xf23b4DB826DbA14c0e857029dfF076b1c0264843', }; export const WEIGHTED_POOL_FACTORY_BALANCER_V3: Record = { diff --git a/test/lib/utils/createPoolHelper.ts b/test/lib/utils/createPoolHelper.ts index ec00e426..6617907c 100644 --- a/test/lib/utils/createPoolHelper.ts +++ b/test/lib/utils/createPoolHelper.ts @@ -3,7 +3,7 @@ import { Address, PoolType, weightedPoolFactoryV4Abi_V2, - composableStableFactoryV5Abi_V2, + composableStableFactoryV6Abi_V2, weightedPoolFactoryAbi_V3, stablePoolFactoryAbi_V3, } from 'src'; @@ -21,7 +21,7 @@ export async function doCreatePool( const abis = { 2: { [PoolType.Weighted]: weightedPoolFactoryV4Abi_V2, - [PoolType.ComposableStable]: composableStableFactoryV5Abi_V2, + [PoolType.ComposableStable]: composableStableFactoryV6Abi_V2, }, 3: { [PoolType.Weighted]: weightedPoolFactoryAbi_V3, diff --git a/test/v2/createPool/composableStable.integration.test.ts b/test/v2/createPool/composableStable.integration.test.ts index 085ae805..667344a9 100644 --- a/test/v2/createPool/composableStable.integration.test.ts +++ b/test/v2/createPool/composableStable.integration.test.ts @@ -26,11 +26,7 @@ describe('Create Composable Stable Pool tests', () => { let rpcUrl: string; beforeAll(async () => { - ({ rpcUrl } = await startFork( - ANVIL_NETWORKS.MAINNET, - undefined, - 18980070n, - )); + ({ rpcUrl } = await startFork(ANVIL_NETWORKS.MAINNET)); const client = createTestClient({ mode: 'anvil', chain: CHAINS[chainId], diff --git a/test/v2/initPool/composableStable.integration.test.ts b/test/v2/initPool/composableStable.integration.test.ts index 03993e8b..7388a2d2 100644 --- a/test/v2/initPool/composableStable.integration.test.ts +++ b/test/v2/initPool/composableStable.integration.test.ts @@ -26,11 +26,7 @@ import { doCreatePool } from '../../lib/utils/createPoolHelper'; import { forkSetup } from '../../lib/utils/helper'; import { assertInitPool, doInitPool } from '../../lib/utils/initPoolHelper'; -const { rpcUrl } = await startFork( - ANVIL_NETWORKS.MAINNET, - undefined, - 18980070n, -); +const { rpcUrl } = await startFork(ANVIL_NETWORKS.MAINNET); const chainId = ChainId.MAINNET; describe('Composable Stable Pool - Init Pool tests', async () => {