Skip to content

Commit

Permalink
Bump composable stable pool factories to v6
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoguerios committed Dec 17, 2024
1 parent c818d3d commit 034f0d6
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 870 deletions.
4 changes: 2 additions & 2 deletions examples/createAndInitPool/createAndInitPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
parseEther,
} from 'viem';
import {
composableStableFactoryV5Abi_V2,
composableStableFactoryV6Abi_V2,
CreatePool,
CreatePoolV2ComposableStableInput,
PoolType,
Expand Down Expand Up @@ -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,
});

Expand Down
Original file line number Diff line number Diff line change
@@ -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: [
Expand All @@ -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',
Expand Down Expand Up @@ -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: [
Expand All @@ -83,34 +116,64 @@ 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',
},
{
inputs: [],
name: 'getAuthorizer',
outputs: [
{ internalType: 'contract IAuthorizer', name: '', type: 'address' },
{
internalType: 'contract IAuthorizer',
name: '',
type: 'address',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'getCreationCode',
outputs: [{ internalType: 'bytes', name: '', type: 'bytes' }],
outputs: [
{
internalType: 'bytes',
name: '',
type: 'bytes',
},
],
stateMutability: 'view',
type: 'function',
},
{
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',
Expand All @@ -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',
},
Expand All @@ -157,29 +226,57 @@ export const composableStableFactoryV5Abi_V2 = [
inputs: [],
name: 'getVault',
outputs: [
{ internalType: 'contract IVault', name: '', type: 'address' },
{
internalType: 'contract IVault',
name: '',
type: 'address',
},
],
stateMutability: 'view',
type: 'function',
},
{
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',
},
Expand Down
Loading

0 comments on commit 034f0d6

Please sign in to comment.