fix: disable initializers in xERC20 adapters (#3979)

### Description

- Follow OZ best practice from
https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#initializing_the_implementation_contract

### Backward compatibility

Yes

### Testing

Unit tests
pull/3980/head
Yorke Rhodes 5 months ago committed by GitHub
parent 921e449b41
commit 1579ca221c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      solidity/contracts/token/extensions/HypXERC20.sol
  2. 1
      solidity/contracts/token/extensions/HypXERC20Lockbox.sol

@ -8,7 +8,9 @@ contract HypXERC20 is HypERC20Collateral {
constructor(
address _xerc20,
address _mailbox
) HypERC20Collateral(_xerc20, _mailbox) {}
) HypERC20Collateral(_xerc20, _mailbox) {
_disableInitializers();
}
function _transferFromSender(
uint256 _amountOrId

@ -18,6 +18,7 @@ contract HypXERC20Lockbox is HypERC20Collateral {
lockbox = IXERC20Lockbox(_lockbox);
xERC20 = lockbox.XERC20();
approveLockbox();
_disableInitializers();
}
/**

Loading…
Cancel
Save