diff --git a/chains/evm/deployment/operations_gen_config.yaml b/chains/evm/deployment/operations_gen_config.yaml index 248ab4885c..f94dab9064 100644 --- a/chains/evm/deployment/operations_gen_config.yaml +++ b/chains/evm/deployment/operations_gen_config.yaml @@ -215,6 +215,10 @@ contracts: access: public - name: setDynamicConfig access: owner + - name: transferOwnership + access: owner + - name: acceptOwnership + access: public - contract_name: OffRamp package_name: offramp diff --git a/chains/evm/deployment/v1_6_0/operations/onramp/onramp.go b/chains/evm/deployment/v1_6_0/operations/onramp/onramp.go index 18e5f79d0f..2347abb985 100644 --- a/chains/evm/deployment/v1_6_0/operations/onramp/onramp.go +++ b/chains/evm/deployment/v1_6_0/operations/onramp/onramp.go @@ -120,6 +120,14 @@ func (c *OnRampContract) SetDynamicConfig(opts *bind.TransactOpts, args DynamicC return c.contract.Transact(opts, "setDynamicConfig", args) } +func (c *OnRampContract) TransferOwnership(opts *bind.TransactOpts, args common.Address) (*types.Transaction, error) { + return c.contract.Transact(opts, "transferOwnership", args) +} + +func (c *OnRampContract) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return c.contract.Transact(opts, "acceptOwnership") +} + type AllowlistConfigArgs struct { DestChainSelector uint64 AllowlistEnabled bool @@ -278,3 +286,39 @@ var SetDynamicConfig = contract.NewWrite(contract.WriteParams[DynamicConfig, *On return c.SetDynamicConfig(opts, args) }, }) + +var TransferOwnership = contract.NewWrite(contract.WriteParams[common.Address, *OnRampContract]{ + Name: "onramp:transfer-ownership", + Version: Version, + Description: "Calls transferOwnership on the contract", + ContractType: ContractType, + ContractABI: OnRampABI, + NewContract: NewOnRampContract, + IsAllowedCaller: contract.OnlyOwner[*OnRampContract, common.Address], + Validate: func(common.Address) error { return nil }, + CallContract: func( + c *OnRampContract, + opts *bind.TransactOpts, + args common.Address, + ) (*types.Transaction, error) { + return c.TransferOwnership(opts, args) + }, +}) + +var AcceptOwnership = contract.NewWrite(contract.WriteParams[struct{}, *OnRampContract]{ + Name: "onramp:accept-ownership", + Version: Version, + Description: "Calls acceptOwnership on the contract", + ContractType: ContractType, + ContractABI: OnRampABI, + NewContract: NewOnRampContract, + IsAllowedCaller: contract.AllCallersAllowed[*OnRampContract, struct{}], + Validate: func(struct{}) error { return nil }, + CallContract: func( + c *OnRampContract, + opts *bind.TransactOpts, + args struct{}, + ) (*types.Transaction, error) { + return c.AcceptOwnership(opts) + }, +})