Manage Hyperlane Warp Route Limits on xERC20 and FiatToken
xERC20
tokens. Follow these steps to configure xERC20
for HWR usage:
xERC20
contract is transferred to a secure multisig for security purposes. This step is crucial to prevent unauthorized changes.xERC20
contract uses OpenZeppelin’s Ownable
interface. Use the transferOwnership
function to complete this step.setLimits
function in the xERC20
contract. This function must be called by the contract owner.
xERC20
contract uses a 24-hour window to manage limits. This is defined by the _DURATION
variable, which is set to 1 days (24 hours). The current available limits are calculated dynamically using the _getCurrentLimit
function._DURATION
) have passed since the last use, the limit will automatically restore to the full maxLimit
.FiatToken
(See more on the repo for documentation). There are three roles that are relevant on the FiatToken
and MasterMinter
contracts:
MasterMinter
owner is the account that can set controllers and minters.MasterMinter
controller is the account that can set the mint limits for its assigned minters.MasterMinter
minter is the account that can actually call mint
on FiatToken
.FiatToken
are absolute, meaning they do not reset automatically and must be updated if required.
There are three actions that should be set on the MasterMinter
contract to be ready for usage:
removeController(address _controller)
functionconfigureController(address controller, address worker)
function. The controller can be the same as the owner, the minter should be the HWR address.configureMinter(uint256 _newAllowance)
function. This limit is not being continuously reset, so either set it to a sufficiently large value (like cast max-uint
) or monitor the usage and adjust accordingly.