-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ET factories for stablecoins #58
base: develop
Are you sure you want to change the base?
Conversation
a46dd3f
to
b575c80
Compare
b575c80
to
a3e9ac3
Compare
1937717
to
f9d7b34
Compare
f9d7b34
to
a7eafa7
Compare
e7e8c44
to
dc03baa
Compare
dc03baa
to
3b718ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🍏
Left some nitpicks and rough thoughts only.
Given the following:
- additional security measurements implemented with LIP-13 and preserved with this deployment as well
- only the DAO Agent can change the token list
The risks are tolerable and good to go from my side.
// plus 1 because index 0 means a value is not in the set. | ||
mapping(address => uint256) private allowedTokenIndices; | ||
|
||
/// @notice Precise number of tokens in the system |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the comment is misleading a bit (the definition is close to 'total supply')
return allowedTokens; | ||
} | ||
|
||
/// @notice Transforms amout from token format to precise format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo 'amout'
@@ -0,0 +1,130 @@ | |||
// SPDX-FileCopyrightText: 2022 Lido <info@lido.fi> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old copyright (not only in this file)
import "OpenZeppelin/openzeppelin-contracts@4.3.2/contracts/access/AccessControl.sol"; | ||
import "OpenZeppelin/openzeppelin-contracts@4.3.2/contracts/token/ERC20/extensions/IERC20Metadata.sol"; | ||
|
||
contract AllowedTokensRegistry is AccessControl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not AccessControlEnumerable
?
return _tokenAmount * 10 ** (DECIMALS - tokenDecimals); | ||
} | ||
|
||
/// @notice Returns precision of the token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a bit misleading comment
event TopUpAllowedRecipientsDeployed( | ||
address indexed creator, | ||
address indexed topUpAllowedRecipients, | ||
address trustedCaller, | ||
address allowedRecipientsRegistry, | ||
address allowedTokenssRegistry, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo tokenss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there some memory[]
external func args left still
@@ -75,18 +84,38 @@ contract AllowedRecipientsFactory { | |||
); | |||
} | |||
|
|||
function deployAllowedTokensRegistry( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -37,6 +37,22 @@ def addresses(network=DEFAULT_NETWORK): | |||
) | |||
|
|||
|
|||
def external_contracts(network=DEFAULT_NETWORK): | |||
if network == "mainnet" or network == "mainnet-fork": | |||
return { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"usdt"?
…kens upgrade dependencies in feature/top-up-allowed-tokens
…wed-tokens-registry
…-registry added scripts for deployment with an existing tokens registry
No description provided.