Skip to content

Commit ac107af

Browse files
committed
merge and resolve
2 parents d36a79e + 9187f22 commit ac107af

File tree

80 files changed

+2535
-270
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2535
-270
lines changed

ccv/chains/evm/deployment/go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ require (
1313
github.com/Masterminds/semver/v3 v3.4.0
1414
github.com/ethereum/go-ethereum v1.16.8
1515
github.com/smartcontractkit/chain-selectors v1.0.89
16-
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260205102529-e2d2cca4a4f6
17-
github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260205102529-e2d2cca4a4f6
18-
github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment v0.0.0-20260205102529-e2d2cca4a4f6
19-
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260205102529-e2d2cca4a4f6
16+
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260206181544-f1613c67d071
17+
github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260206181544-f1613c67d071
18+
github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment v0.0.0-20260206181544-f1613c67d071
19+
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260206181544-f1613c67d071
2020
github.com/smartcontractkit/chainlink-common v0.9.6-0.20260114142648-bd9e1b483e96
2121
github.com/smartcontractkit/chainlink-deployments-framework v0.74.2
2222
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20260119171452-39c98c3b33cd
2323
github.com/smartcontractkit/mcms v0.34.0
2424
github.com/stretchr/testify v1.11.1
25+
golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc
2526
)
2627

2728
require (
@@ -271,7 +272,6 @@ require (
271272
go.uber.org/ratelimit v0.3.1 // indirect
272273
go.uber.org/zap v1.27.1 // indirect
273274
golang.org/x/crypto v0.47.0 // indirect
274-
golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc // indirect
275275
golang.org/x/net v0.48.0 // indirect
276276
golang.org/x/sync v0.19.0 // indirect
277277
golang.org/x/sys v0.40.0 // indirect

ccv/chains/evm/deployment/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -680,10 +680,10 @@ github.com/smartcontractkit/chain-selectors v1.0.89 h1:L9oWZGqQXWyTPnC6ODXgu3b0D
680680
github.com/smartcontractkit/chain-selectors v1.0.89/go.mod h1:qy7whtgG5g+7z0jt0nRyii9bLND9m15NZTzuQPkMZ5w=
681681
github.com/smartcontractkit/chainlink-aptos v0.0.0-20251024142440-51f2ad2652a2 h1:vGdeMwHO3ow88HvxfhA4DDPYNY0X9jmdux7L83UF/W8=
682682
github.com/smartcontractkit/chainlink-aptos v0.0.0-20251024142440-51f2ad2652a2/go.mod h1:iteU0WORHkArACVh/HoY/1bipV4TcNcJdTmom9uIT0E=
683-
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260205102529-e2d2cca4a4f6 h1:O8JFt5thd8pVm3Isgvwb6IvSCFKKKH1GKxBf42IQZvw=
684-
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260205102529-e2d2cca4a4f6/go.mod h1:ZtZ+wtqU9JsJEmbiCsavVVEbhywpgMF7q/IpD9Eaq48=
685-
github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260205102529-e2d2cca4a4f6 h1:5pViFgmgqP6SggLUifgELyk8ijyjAQuOlVGGWtqB8AM=
686-
github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260205102529-e2d2cca4a4f6/go.mod h1:Gl35ExaFLinqVhp50+Yq1GnMuHb3fnDtZUFPCtcfV3M=
683+
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260206181544-f1613c67d071 h1:2VnRpQ48kh67blhCjgkx1xJ5dLiY5gj0XN73s2UeZbM=
684+
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260206181544-f1613c67d071/go.mod h1:ZtZ+wtqU9JsJEmbiCsavVVEbhywpgMF7q/IpD9Eaq48=
685+
github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260206181544-f1613c67d071 h1:64bvvq3x6F8sJD57B8fLFvaVTOSieEiTMqod2Nwo/ZU=
686+
github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260206181544-f1613c67d071/go.mod h1:Gl35ExaFLinqVhp50+Yq1GnMuHb3fnDtZUFPCtcfV3M=
687687
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260121163256-85accaf3d28d h1:xdFpzbApEMz4Rojg2Y2OjFlrh0wu7eB10V2tSZGW5y8=
688688
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260121163256-85accaf3d28d/go.mod h1:bgmqE7x9xwmIVr8PqLbC0M5iPm4AV2DBl596lO6S5Sw=
689689
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU=

ccv/chains/evm/deployment/v1_7_0/operations/advanced_pool_hooks/advanced_pool_hooks.go

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ var Version = semver.MustParse("1.7.0")
1919
type ConstructorArgs struct {
2020
Allowlist []common.Address
2121
ThresholdAmountForAdditionalCCVs *big.Int
22+
PolicyEngine common.Address
23+
AuthorizedCallers []common.Address
2224
}
2325

2426
type CCVConfigArg = advanced_pool_hooks.AdvancedPoolHooksCCVConfigArg
@@ -115,3 +117,80 @@ var GetThresholdAmount = contract.NewRead(contract.ReadParams[any, *big.Int, *ad
115117
return advancedPoolHooks.GetThresholdAmount(opts)
116118
},
117119
})
120+
121+
var GetAuthorizedCallersEnabled = contract.NewRead(contract.ReadParams[any, bool, *advanced_pool_hooks.AdvancedPoolHooks]{
122+
Name: "advanced-pool-hooks:get-authorized-callers-enabled",
123+
Version: Version,
124+
Description: "Gets whether only authorized callers can invoke preflightCheck/postflightCheck",
125+
ContractType: ContractType,
126+
NewContract: advanced_pool_hooks.NewAdvancedPoolHooks,
127+
CallContract: func(advancedPoolHooks *advanced_pool_hooks.AdvancedPoolHooks, opts *bind.CallOpts, args any) (bool, error) {
128+
return advancedPoolHooks.GetAuthorizedCallersEnabled(opts)
129+
},
130+
})
131+
132+
var SetPolicyEngine = contract.NewWrite(contract.WriteParams[common.Address, *advanced_pool_hooks.AdvancedPoolHooks]{
133+
Name: "advanced-pool-hooks:set-policy-engine",
134+
Version: Version,
135+
Description: "Sets a new policy engine on the AdvancedPoolHooks contract",
136+
ContractType: ContractType,
137+
ContractABI: advanced_pool_hooks.AdvancedPoolHooksABI,
138+
NewContract: advanced_pool_hooks.NewAdvancedPoolHooks,
139+
IsAllowedCaller: contract.OnlyOwner[*advanced_pool_hooks.AdvancedPoolHooks, common.Address],
140+
Validate: func(common.Address) error { return nil },
141+
CallContract: func(advancedPoolHooks *advanced_pool_hooks.AdvancedPoolHooks, opts *bind.TransactOpts, newPolicyEngine common.Address) (*types.Transaction, error) {
142+
return advancedPoolHooks.SetPolicyEngine(opts, newPolicyEngine)
143+
},
144+
})
145+
146+
var SetPolicyEngineAllowFailedDetach = contract.NewWrite(contract.WriteParams[common.Address, *advanced_pool_hooks.AdvancedPoolHooks]{
147+
Name: "advanced-pool-hooks:set-policy-engine-allow-failed-detach",
148+
Version: Version,
149+
Description: "Sets a new policy engine while tolerating a pre-existing policy engine's detach reverting",
150+
ContractType: ContractType,
151+
ContractABI: advanced_pool_hooks.AdvancedPoolHooksABI,
152+
NewContract: advanced_pool_hooks.NewAdvancedPoolHooks,
153+
IsAllowedCaller: contract.OnlyOwner[*advanced_pool_hooks.AdvancedPoolHooks, common.Address],
154+
Validate: func(common.Address) error { return nil },
155+
CallContract: func(advancedPoolHooks *advanced_pool_hooks.AdvancedPoolHooks, opts *bind.TransactOpts, newPolicyEngine common.Address) (*types.Transaction, error) {
156+
return advancedPoolHooks.SetPolicyEngineAllowFailedDetach(opts, newPolicyEngine)
157+
},
158+
})
159+
160+
var GetPolicyEngine = contract.NewRead(contract.ReadParams[any, common.Address, *advanced_pool_hooks.AdvancedPoolHooks]{
161+
Name: "advanced-pool-hooks:get-policy-engine",
162+
Version: Version,
163+
Description: "Gets the current policy engine address on the AdvancedPoolHooks contract",
164+
ContractType: ContractType,
165+
NewContract: advanced_pool_hooks.NewAdvancedPoolHooks,
166+
CallContract: func(advancedPoolHooks *advanced_pool_hooks.AdvancedPoolHooks, opts *bind.CallOpts, args any) (common.Address, error) {
167+
return advancedPoolHooks.GetPolicyEngine(opts)
168+
},
169+
})
170+
171+
type AuthorizedCallerArgs = advanced_pool_hooks.AuthorizedCallersAuthorizedCallerArgs
172+
173+
var ApplyAuthorizedCallerUpdates = contract.NewWrite(contract.WriteParams[AuthorizedCallerArgs, *advanced_pool_hooks.AdvancedPoolHooks]{
174+
Name: "advanced-pool-hooks:apply-authorized-caller-updates",
175+
Version: Version,
176+
Description: "Applies authorized caller updates to the AdvancedPoolHooks contract",
177+
ContractType: ContractType,
178+
ContractABI: advanced_pool_hooks.AdvancedPoolHooksABI,
179+
NewContract: advanced_pool_hooks.NewAdvancedPoolHooks,
180+
IsAllowedCaller: contract.OnlyOwner[*advanced_pool_hooks.AdvancedPoolHooks, AuthorizedCallerArgs],
181+
Validate: func(AuthorizedCallerArgs) error { return nil },
182+
CallContract: func(advancedPoolHooks *advanced_pool_hooks.AdvancedPoolHooks, opts *bind.TransactOpts, args AuthorizedCallerArgs) (*types.Transaction, error) {
183+
return advancedPoolHooks.ApplyAuthorizedCallerUpdates(opts, args)
184+
},
185+
})
186+
187+
var GetAllAuthorizedCallers = contract.NewRead(contract.ReadParams[any, []common.Address, *advanced_pool_hooks.AdvancedPoolHooks]{
188+
Name: "advanced-pool-hooks:get-all-authorized-callers",
189+
Version: Version,
190+
Description: "Gets all authorized callers on the AdvancedPoolHooks contract",
191+
ContractType: ContractType,
192+
NewContract: advanced_pool_hooks.NewAdvancedPoolHooks,
193+
CallContract: func(advancedPoolHooks *advanced_pool_hooks.AdvancedPoolHooks, opts *bind.CallOpts, args any) ([]common.Address, error) {
194+
return advancedPoolHooks.GetAllAuthorizedCallers(opts)
195+
},
196+
})

ccv/chains/evm/deployment/v1_7_0/sequences/tokens/deploy_burn_mint_token_pool.go

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package tokens
22

33
import (
44
"fmt"
5+
"slices"
56

67
"github.com/Masterminds/semver/v3"
78
"github.com/ethereum/go-ethereum/common"
@@ -29,7 +30,10 @@ var DeployBurnMintTokenPool = cldf_ops.NewSequence(
2930
ChainSelector: input.ChainSel,
3031
TypeAndVersion: deployment.NewTypeAndVersion(advanced_pool_hooks.ContractType, *advanced_pool_hooks.Version),
3132
Args: advanced_pool_hooks.ConstructorArgs{
33+
Allowlist: input.AdvancedPoolHooksConfig.Allowlist,
3234
ThresholdAmountForAdditionalCCVs: input.ThresholdAmountForAdditionalCCVs,
35+
PolicyEngine: input.AdvancedPoolHooksConfig.PolicyEngine,
36+
AuthorizedCallers: input.AdvancedPoolHooksConfig.AuthorizedCallers,
3337
},
3438
Qualifier: &input.TokenSymbol,
3539
})
@@ -70,6 +74,41 @@ var DeployBurnMintTokenPool = cldf_ops.NewSequence(
7074
return sequences.OnChainOutput{}, fmt.Errorf("failed to configure token pool with address %s on %s: %w", tpDeployReport.Output.Address, chain, err)
7175
}
7276

77+
// If hooks authorized callers gating is enabled at deployment time, ensure the newly deployed token pool is authorized.
78+
// Otherwise, calls to preflightCheck/postflightCheck will revert when executed by the token pool.
79+
if len(input.AdvancedPoolHooksConfig.AuthorizedCallers) > 0 {
80+
poolAddr := common.HexToAddress(tpDeployReport.Output.Address)
81+
hooksAddr := common.HexToAddress(hooksDeployReport.Output.Address)
82+
83+
// Check if the pool is already an authorized caller.
84+
getAuthorizedCallersReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.GetAllAuthorizedCallers, chain, evm_contract.FunctionInput[any]{
85+
ChainSelector: input.ChainSel,
86+
Address: hooksAddr,
87+
})
88+
if err != nil {
89+
return sequences.OnChainOutput{}, fmt.Errorf("failed to get authorized callers from advanced pool hooks %s on %s: %w", hooksAddr, chain, err)
90+
}
91+
92+
if !slices.Contains(getAuthorizedCallersReport.Output, poolAddr) {
93+
applyAuthorizedCallerUpdatesReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.ApplyAuthorizedCallerUpdates, chain, evm_contract.FunctionInput[advanced_pool_hooks.AuthorizedCallerArgs]{
94+
ChainSelector: input.ChainSel,
95+
Address: hooksAddr,
96+
Args: advanced_pool_hooks.AuthorizedCallerArgs{
97+
AddedCallers: []common.Address{poolAddr},
98+
},
99+
})
100+
if err != nil {
101+
return sequences.OnChainOutput{}, fmt.Errorf("failed to authorize token pool %s on advanced pool hooks with address %s on %s: %w", poolAddr, hooksAddr, chain, err)
102+
}
103+
104+
batchOp, err := evm_contract.NewBatchOperationFromWrites([]evm_contract.WriteOutput{applyAuthorizedCallerUpdatesReport.Output})
105+
if err != nil {
106+
return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err)
107+
}
108+
configureReport.Output.BatchOps = append(configureReport.Output.BatchOps, batchOp)
109+
}
110+
}
111+
73112
return sequences.OnChainOutput{
74113
Addresses: []datastore.AddressRef{tpDeployReport.Output, hooksDeployReport.Output},
75114
BatchOps: configureReport.Output.BatchOps,

ccv/chains/evm/deployment/v1_7_0/sequences/tokens/deploy_burn_mint_token_pool_test.go

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,40 @@ func TestDeployTokenPool(t *testing.T) {
6363
},
6464
expectedErr: "",
6565
},
66+
{
67+
desc: "happy path - hooks configured",
68+
makeInput: func(tokenReport operations.Report[contract.DeployInput[burn_mint_erc20_with_drip.ConstructorArgs], datastore.AddressRef], chainReport operations.SequenceReport[sequences.DeployChainContractsInput, seq_core.OnChainOutput]) tokens.DeployTokenPoolInput {
69+
var rmnProxyAddress common.Address
70+
var routerAddress common.Address
71+
for _, addr := range chainReport.Output.Addresses {
72+
if addr.Type == datastore.ContractType(rmn_proxy.ContractType) {
73+
rmnProxyAddress = common.HexToAddress(addr.Address)
74+
}
75+
if addr.Type == datastore.ContractType(router.ContractType) {
76+
routerAddress = common.HexToAddress(addr.Address)
77+
}
78+
}
79+
return tokens.DeployTokenPoolInput{
80+
ChainSel: chainReport.Input.ChainSelector,
81+
TokenPoolType: datastore.ContractType(burn_mint_token_pool.BurnMintContractType),
82+
TokenPoolVersion: burn_mint_token_pool.Version,
83+
TokenSymbol: tokenReport.Input.Args.Symbol,
84+
RateLimitAdmin: common.HexToAddress("0x01"),
85+
ThresholdAmountForAdditionalCCVs: big.NewInt(1e18),
86+
FeeAggregator: common.HexToAddress("0x03"),
87+
ConstructorArgs: tokens.ConstructorArgs{
88+
Token: common.HexToAddress(tokenReport.Output.Address),
89+
Decimals: 18,
90+
RMNProxy: rmnProxyAddress,
91+
Router: routerAddress,
92+
},
93+
AdvancedPoolHooksConfig: tokens.AdvancedPoolHooksConfig{
94+
AuthorizedCallers: []common.Address{common.HexToAddress("0x2222222222222222222222222222222222222222")},
95+
},
96+
}
97+
},
98+
expectedErr: "",
99+
},
66100
{
67101
desc: "incorrect chain selector",
68102
makeInput: func(tokenReport operations.Report[contract.DeployInput[burn_mint_erc20_with_drip.ConstructorArgs], datastore.AddressRef], chainReport operations.SequenceReport[sequences.DeployChainContractsInput, seq_core.OnChainOutput]) tokens.DeployTokenPoolInput {
@@ -296,6 +330,48 @@ func TestDeployTokenPool(t *testing.T) {
296330
)
297331
require.NoError(t, err, "ExecuteOperation should not error")
298332
require.Equal(t, input.ThresholdAmountForAdditionalCCVs, getThresholdAmountReport.Output, "Expected threshold amount for additional ccvs to be the same as the inputted threshold amount for additional ccvs")
333+
334+
// If a policy engine was configured, ensure it was set.
335+
if input.AdvancedPoolHooksConfig.PolicyEngine != (common.Address{}) {
336+
getPolicyEngineReport, err := operations.ExecuteOperation(
337+
testsetup.BundleWithFreshReporter(e.OperationsBundle),
338+
advanced_pool_hooks.GetPolicyEngine,
339+
e.BlockChains.EVMChains()[chainSel],
340+
contract.FunctionInput[any]{
341+
ChainSelector: chainSel,
342+
Address: common.HexToAddress(hooksAddress),
343+
},
344+
)
345+
require.NoError(t, err, "ExecuteOperation should not error")
346+
require.Equal(t, input.AdvancedPoolHooksConfig.PolicyEngine, getPolicyEngineReport.Output, "Expected policy engine address to be the same as the inputted policy engine address")
347+
}
348+
349+
// If authorized callers gating was enabled at deploy time, ensure the newly deployed token pool is authorized.
350+
if len(input.AdvancedPoolHooksConfig.AuthorizedCallers) > 0 {
351+
getAuthorizedCallersEnabledReport, err := operations.ExecuteOperation(
352+
testsetup.BundleWithFreshReporter(e.OperationsBundle),
353+
advanced_pool_hooks.GetAuthorizedCallersEnabled,
354+
e.BlockChains.EVMChains()[chainSel],
355+
contract.FunctionInput[any]{
356+
ChainSelector: chainSel,
357+
Address: common.HexToAddress(hooksAddress),
358+
},
359+
)
360+
require.NoError(t, err, "ExecuteOperation should not error")
361+
require.True(t, getAuthorizedCallersEnabledReport.Output, "Expected authorized callers gating to be enabled")
362+
363+
getAuthorizedCallersReport, err := operations.ExecuteOperation(
364+
testsetup.BundleWithFreshReporter(e.OperationsBundle),
365+
advanced_pool_hooks.GetAllAuthorizedCallers,
366+
e.BlockChains.EVMChains()[chainSel],
367+
contract.FunctionInput[any]{
368+
ChainSelector: chainSel,
369+
Address: common.HexToAddress(hooksAddress),
370+
},
371+
)
372+
require.NoError(t, err, "ExecuteOperation should not error")
373+
require.Contains(t, getAuthorizedCallersReport.Output, common.HexToAddress(poolAddress), "Expected token pool address to be in the on-chain authorized callers")
374+
}
299375
})
300376
}
301377
}

ccv/chains/evm/deployment/v1_7_0/sequences/tokens/deploy_lock_release_token_pool.go

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package tokens
22

33
import (
44
"fmt"
5+
"slices"
56

67
"github.com/Masterminds/semver/v3"
78
"github.com/ethereum/go-ethereum/common"
@@ -42,7 +43,10 @@ var DeployLockReleaseTokenPool = cldf_ops.NewSequence(
4243
ChainSelector: input.ChainSel,
4344
TypeAndVersion: deployment.NewTypeAndVersion(advanced_pool_hooks.ContractType, *advanced_pool_hooks.Version),
4445
Args: advanced_pool_hooks.ConstructorArgs{
46+
Allowlist: input.AdvancedPoolHooksConfig.Allowlist,
4547
ThresholdAmountForAdditionalCCVs: input.ThresholdAmountForAdditionalCCVs,
48+
PolicyEngine: input.AdvancedPoolHooksConfig.PolicyEngine,
49+
AuthorizedCallers: input.AdvancedPoolHooksConfig.AuthorizedCallers,
4650
},
4751
Qualifier: &input.TokenSymbol,
4852
})
@@ -83,6 +87,41 @@ var DeployLockReleaseTokenPool = cldf_ops.NewSequence(
8387
return sequences.OnChainOutput{}, fmt.Errorf("failed to configure token pool with address %s on %s: %w", tpDeployReport.Output.Address, chain, err)
8488
}
8589

90+
// If hooks authorized callers gating is enabled at deployment time, ensure the newly deployed token pool is authorized.
91+
// Otherwise, calls to preflightCheck/postflightCheck will revert when executed by the token pool.
92+
if len(input.AdvancedPoolHooksConfig.AuthorizedCallers) > 0 {
93+
poolAddr := common.HexToAddress(tpDeployReport.Output.Address)
94+
hooksAddr := common.HexToAddress(hooksDeployReport.Output.Address)
95+
96+
// Check if the pool is already an authorized caller.
97+
getAuthorizedCallersReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.GetAllAuthorizedCallers, chain, evm_contract.FunctionInput[any]{
98+
ChainSelector: input.ChainSel,
99+
Address: hooksAddr,
100+
})
101+
if err != nil {
102+
return sequences.OnChainOutput{}, fmt.Errorf("failed to get authorized callers from advanced pool hooks %s on %s: %w", hooksAddr, chain, err)
103+
}
104+
105+
if !slices.Contains(getAuthorizedCallersReport.Output, poolAddr) {
106+
applyAuthorizedCallerUpdatesReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.ApplyAuthorizedCallerUpdates, chain, evm_contract.FunctionInput[advanced_pool_hooks.AuthorizedCallerArgs]{
107+
ChainSelector: input.ChainSel,
108+
Address: hooksAddr,
109+
Args: advanced_pool_hooks.AuthorizedCallerArgs{
110+
AddedCallers: []common.Address{poolAddr},
111+
},
112+
})
113+
if err != nil {
114+
return sequences.OnChainOutput{}, fmt.Errorf("failed to authorize token pool %s on advanced pool hooks with address %s on %s: %w", poolAddr, hooksAddr, chain, err)
115+
}
116+
117+
batchOp, err := evm_contract.NewBatchOperationFromWrites([]evm_contract.WriteOutput{applyAuthorizedCallerUpdatesReport.Output})
118+
if err != nil {
119+
return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err)
120+
}
121+
configureReport.Output.BatchOps = append(configureReport.Output.BatchOps, []mcms_types.BatchOperation{batchOp}...)
122+
}
123+
}
124+
86125
// Add lock release token pool to the authorized callers of the lock box.
87126
applyAuthorizedCallerUpdatesReport, err := cldf_ops.ExecuteOperation(b, erc20_lock_box.ApplyAuthorizedCallerUpdates, chain, evm_contract.FunctionInput[erc20_lock_box.AuthorizedCallerArgs]{
88127
ChainSelector: input.ChainSel,

0 commit comments

Comments
 (0)