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

feat: late initialization of astroport oracle contract #NTRN-429 #25

Merged
merged 5 commits into from
Apr 7, 2023

Conversation

foxpy
Copy link
Contributor

@foxpy foxpy commented Apr 4, 2023

List of changes:

  • asset_infos field in InstantiateMsg is now optional, and, when this field is not set, contract remains unusable;
  • manager field added to InstantiateMsg which sets a contract manager. Contract manager is the only account which can set asset_infos field;
  • ExecuteMsg now has two new handles:
    • UpdateManager which is only executable by owner to set a new manager;
    • SetAssetInfos for use by manager in the aforementioned scenario.

Small note for reviewers: schema used to be outdated before I have edited this contract, hence the diff for schema is quite big and mostly unrelated to my patchset.

[Tracking task]

Copy link
Contributor

@sotnikov-s sotnikov-s left a comment

Choose a reason for hiding this comment

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

the rest lgtm

contracts/astroport/oracle/src/contract.rs Outdated Show resolved Hide resolved
@foxpy foxpy requested a review from sotnikov-s April 5, 2023 08:11
@quasisamurai quasisamurai self-requested a review April 5, 2023 08:12
Copy link
Contributor

@sotnikov-s sotnikov-s left a comment

Choose a reason for hiding this comment

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

discussed a couple of things with @foxpy and @ratik that need to be addressed:

  1. remove asset_info from init msg because it will always be None in our case;
  2. come to a conclusion with @ratik re amount of times the asset_info can be set during the contract's life

thus I renounce the approval

@foxpy foxpy requested a review from sotnikov-s April 7, 2023 07:46
@zavgorodnii zavgorodnii merged commit 7c4caee into main Apr 7, 2023
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.

3 participants