feat: replacement addresses added to BLR#1280
Conversation
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
… tests fixed Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
…-EmergencySystem Signed-off-by: Alberto Molina <alberto@io.builders>
…-EmergencySystem Signed-off-by: Alberto Molina <alberto@io.builders>
…-EmergencySystem Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Alberto Molina <alberto@io.builders>
…om/hashgraph/asset-tokenization-studio into feat/BBND-1777-BLR-EmergencySystem Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Alberto Molina <alberto@io.builders>
…om/hashgraph/asset-tokenization-studio into feat/BBND-1777-BLR-EmergencySystem Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
| /// @inheritdoc IBusinessLogicResolver | ||
| function removeReplacementAddress( | ||
| address _replacedAddress | ||
| ) external override onlyRole(DEFAULT_ADMIN_ROLE) onlyUnpaused { |
There was a problem hiding this comment.
Why removeReplacementAddress doesn't have a validateAddressNotZero modifier? updateReplacementAddress function doesn't allow to replace zero address
There was a problem hiding this comment.
@mamoralesiob what would be the problem is we removed the replacement address for address 0? would it be possible? It would not be possible because "update replacement address" prevents it. So such a modifier would technically be a waste of gas in my opinion
| validateAddressNotZero(_replacementAddress) | ||
| onlyNotReplacement(_replacedAddress) | ||
| onlyNotReplaced(_replacementAddress) | ||
| onlyRole(DEFAULT_ADMIN_ROLE) |
There was a problem hiding this comment.
Wouldn't a specific role be used for this?
There was a problem hiding this comment.
that's actually a good point, in the BLR so far, all methods are controlled by the default admin "register facets", "add selectors" etc.... but I do agree with you @mamoralesiob that we should use specific roles for each method. However that is not really the scope of this task, I would rather create a new task for that purpose.
| } | ||
|
|
||
| /// @inheritdoc IBusinessLogicResolver | ||
| function updateReplacementAddress( |
There was a problem hiding this comment.
Maybe BLR address should be protected for not being replace? If it is changed by error, there wouldn't be option to restore
There was a problem hiding this comment.
@mamoralesiob the BLR address cannot be replaced, it does not make sense, this replacement table is only checked when resolving facets, not the BLR itself, the BLR adderss is resolved at the proxy level not the BLR....
There was a problem hiding this comment.
You are right, the replacement table is only checked when resolving facets, so if anyone, by error, replace the BLR address it would have no consequences
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
…-EmergencySystem Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
…-EmergencySystem Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Alberto Molina <alberto@io.builders>
…-EmergencySystem Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Description
Type of change
Testing
Node version:
Checklist