Skip to content

Conversation

@nicholaspai
Copy link
Member

Adds constants from UMIP to ConfigStore contract.

@nicholaspai nicholaspai requested review from chrismaree and mrice32 May 3, 2022 15:03
Copy link
Contributor

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Only one minor comment

Comment on lines 24 to 45
event UpdatedRateModel(address indexed l1Token, string rateModel);
event UpdatedTransferThreshold(address indexed l1Token, uint256 transferThreshold);

/**
* @notice Updates rate model string for L1 token.
* @param l1Token the l1 token rate model to update.
* @param rateModel the updated rate model.
*/
function updateRateModel(address l1Token, string memory rateModel) external onlyOwner {
l1TokenRateModels[l1Token] = rateModel;
emit UpdatedRateModel(l1Token, rateModel);
}

/**
* @notice Updates token transfer threshold percentage for L1 token.
* @param l1Token the l1 token rate model to update.
* @param transferThresholdPct the updated transfer threshold percentage.
*/
function updateTransferThreshold(address l1Token, uint256 transferThresholdPct) external onlyOwner {
l1TokenTransferThresholds[l1Token] = transferThresholdPct;
emit UpdatedTransferThreshold(l1Token, transferThresholdPct);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just have a single config string to contain the rate model fields and the transfer threshold? That way we can add more token specific config later if needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point, done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants