Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump composable stable pool factories to v6 #539

Merged
merged 3 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/afraid-schools-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@balancer/sdk": patch
---

Bump composable stable pool factories to v6
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
Loading