Skip to content

feat: replacement addresses added to BLR#1280

Open
AlbertoMolinaIoBuilders wants to merge 41 commits into
developfrom
feat/BBND-1777-BLR-EmergencySystem
Open

feat: replacement addresses added to BLR#1280
AlbertoMolinaIoBuilders wants to merge 41 commits into
developfrom
feat/BBND-1777-BLR-EmergencySystem

Conversation

@AlbertoMolinaIoBuilders

Copy link
Copy Markdown
Contributor

Description

Type of change

  • Bug fix 🐞
  • New feature ✨
  • Breaking change 💥
  • Documentation update 📖
  • Refactor 🔧

Testing

Node version:

  • 20
  • 22
  • 24

Checklist

  • Style Guidelines followed ✅
  • Documentation Updated 📚
  • Linters - No New Warnings ⚠️
  • Local Tests Pass ✅
  • Effective Tests Added ✔️
  • No reduction of Coverage

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>
@github-actions github-actions Bot added the hash-change PR modifies @custom:hash annotations or codegen formula — review on-chain impact carefully label Jun 18, 2026
github-actions Bot and others added 12 commits June 18, 2026 08:19
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 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why removeReplacementAddress doesn't have a validateAddressNotZero modifier? updateReplacementAddress function doesn't allow to replace zero address

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@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

Comment thread packages/ats/contracts/contracts/infrastructure/diamond/DiamondCut.sol Outdated
validateAddressNotZero(_replacementAddress)
onlyNotReplacement(_replacedAddress)
onlyNotReplaced(_replacementAddress)
onlyRole(DEFAULT_ADMIN_ROLE)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wouldn't a specific role be used for this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe BLR address should be protected for not being replace? If it is changed by error, there wouldn't be option to restore

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@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....

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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>
github-actions Bot and others added 5 commits June 23, 2026 12:02
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>
@AlbertoMolinaIoBuilders AlbertoMolinaIoBuilders marked this pull request as ready for review June 24, 2026 11:50
@AlbertoMolinaIoBuilders AlbertoMolinaIoBuilders requested review from a team as code owners June 24, 2026 11:50
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hash-change PR modifies @custom:hash annotations or codegen formula — review on-chain impact carefully

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants