-
Notifications
You must be signed in to change notification settings - Fork 22
Remove contracts not getting deployed on outposts and some code cleanup #1
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
Conversation
ahmadkaouk
commented
Jun 27, 2022
- Remove the contracts that won't be deployed on outposts. (mars-council, mars-red-bank-closure, mars-staking, mars-treasury, mars-vesting, mars-xmars-token)
- Update build settings
- Remove Astroport, Stader and Lido dependencies and related code.
- Disable the compilation of the smart contracts temporarily.
packages/mars-core/Cargo.toml
Outdated
authors = ["Spike Spiegel <spikeonmars@protonmail.com>"] | ||
name = "mars-outpost-core" | ||
version = "0.1.0" | ||
authors = ["Ahmad Kaouk <ahmad@delphilabs.io"] |
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.
i think we should include all authors who have contributed to the code base:
authors = [
"Ahmad Kaouk <ahmad@delphilabs.io",
"Spike Spiegel <spikeonmars@protonmail.com>",
"larry_0x <larry@delphidigital.io>",
"Piotr Babel",
"Harry Scholes"
]
@ahmadkaouk added comments regarding Cargo.toml but otherwise lgtm |
I wonder if it would be easier to start from a blank slate and adding in features one-by-one (with passing builds). I'm doing this with fields. Otherwise, you may not get a passing build for a looooong time. |
pub enum PriceSource<A> { | ||
/// Returns a fixed value; used for UST | ||
pub enum PriceSource { | ||
/// Returns a fixed value; used for OSMO |
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.
Don't think we should have any chain specific tokens mentioned in core codebase (I know I put it there! :P )
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.
True, I will remove this in the next PR.
/// Amount to distribute to protocol contracts, defaults to contract balance if not specified | ||
amount: Option<Uint128>, | ||
}, | ||
|
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.
while we can remove this swap for now - we'll have to still have some swap logic in here - we need to to probably have this swap asset set as a config item on the protocol_rewards_collector contract, so anyone can still initiate the message but it's the config that stores what asset it will be swapped into (as each change might/will be different)
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.
We will have a story around the protocol rewards collector refactor where we can add this back in
Yea, this is a tough one... What this way gives us, is a way to easily diff the changes from terra -> osmosis, so it's easy to see what has changed... however it's also very message with just deleting a bunch of stuff etc and there as so many intertwined dependencies that it's hard to migrate each contract across independently... On the other hand, starting from scratch will take longer and will mean we have to audit/review more code overall, i'm on the fence as to which one is better - we know it can be more or less migrated as we have a PoC doing so already |
Yea, so as @dancreee mentioned, this way make it easier to track changes (diff from the original mars-core repo). To overcome the problem of builds, I disabled the build of the smart contracts temporarily, so I could still be able to test for a passing build and run unit tests after each change. I'll progressively re-enable the build of each contract after finishing its migration. |
Adding allow-list for vaults and assets