Skip to content
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

add update and disable endpoints (owner only) #9

Merged
merged 6 commits into from
Mar 14, 2024
Merged

Conversation

a5-pickle
Copy link
Contributor

@a5-pickle a5-pickle commented Mar 13, 2024

Before the owner or owner assistant could update foreign endpoints.

We now enforce that only the owner can update (and disable) existing endpoints, only allowing the owner assistant to be able to add endpoints.

* add update router and disable router for engine and router

* clean up imports

* reorganize modules
@a5-pickle a5-pickle requested a review from gator-boi March 13, 2024 20:18
* remove IWormhole.sol and WormholeBytesParsing.sol

* add wormhole-solidity-sdk

* fix Makefile
@@ -54,6 +57,50 @@ impl common::admin::OwnerAssistant for Custodian {
}
}

#[derive(Accounts)]
pub struct OwnerCustodian<'info> {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is pretty slick.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got this from our boy @kcsongor

await expectIxErr(connection, [ix], [ownerAssistant], "Error Code: OwnerOnly");
});

it("Disable Router Endpoint as Owner", async function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be nice to add a test where we attempt to start an auction for a disabled endpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added issue #11 to track this

@a5-pickle a5-pickle merged commit a17a2b5 into main Mar 14, 2024
3 checks passed
@a5-pickle a5-pickle deleted the update-endpoint branch March 14, 2024 21:36
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.

2 participants