-
Notifications
You must be signed in to change notification settings - Fork 43
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
Rc/v3.0.1.5 #972
Draft
dorin-iancu
wants to merge
16
commits into
rc/v3.0.1
Choose a base branch
from
rc/v3.0.1.5
base: rc/v3.0.1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Rc/v3.0.1.5 #972
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
0458214
just some cleanup
dorin-iancu 742664f
small fix
dorin-iancu 9a4f4a8
setter
dorin-iancu e04a6f2
disable add liq for old proxy
dorin-iancu efb6797
common module + disable in simple lock
dorin-iancu 2028bd6
remove useless dependency
dorin-iancu b5146b4
change undistributed rewards code
dorin-iancu a2f0007
Merge pull request #969 from multiversx/all-xmex-fees-to-users
dorin-iancu a1d02b0
Merge branch 'rc/v3.0.1.5' into no-more-add-liq-with-locked-tokens
dorin-iancu cca4b51
evil clippy
dorin-iancu 94d6506
Merge pull request #970 from multiversx/no-more-add-liq-with-locked-t…
dorin-iancu 64319c1
Merge branch 'rc/v3.0.1.5' into change-undistributed-rew-code
dorin-iancu b2beb0d
Merge pull request #971 from multiversx/change-undistributed-rew-code
dorin-iancu 5258ca5
additional tests for add liq disabled
dorin-iancu 4f70ada
evil clippy
dorin-iancu 78df98b
Merge pull request #973 from multiversx/additional-tests-add-liq
dorin-iancu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "disable-add-liq" | ||
version = "0.0.0" | ||
authors = ["Dorin Iancu <dorin.iancu@multiversx.com>"] | ||
edition = "2021" | ||
|
||
[lib] | ||
path = "src/lib.rs" | ||
|
||
[dependencies.multiversx-sc] | ||
version = "=0.53.2" | ||
features = ["esdt-token-payment-legacy-decode"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#![no_std] | ||
|
||
multiversx_sc::imports!(); | ||
|
||
pub const ADD_LIQ_ENABLED: bool = false; | ||
pub const ADD_LIQ_DISABLED: bool = true; | ||
|
||
#[multiversx_sc::module] | ||
pub trait DisableAddLiqModule { | ||
#[only_owner] | ||
#[endpoint(enableAddLiq)] | ||
fn enable_add_liq(&self) { | ||
self.add_liq_disabled().set(ADD_LIQ_ENABLED); | ||
} | ||
|
||
#[only_owner] | ||
#[endpoint(disableAddLiq)] | ||
fn disable_add_liq(&self) { | ||
self.add_liq_disabled().set(ADD_LIQ_DISABLED); | ||
} | ||
|
||
fn require_add_liq_enabled(&self) { | ||
require!( | ||
self.add_liq_disabled().get() == ADD_LIQ_ENABLED, | ||
"Add Liquidity is disabled" | ||
); | ||
} | ||
|
||
#[view(isAddLiqDisabled)] | ||
#[storage_mapper("addLiqDisabled")] | ||
fn add_liq_disabled(&self) -> SingleValueMapper<bool>; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Even though we want to have it disabled, we shouldn't name the storage in a negative manner. I would suggest add_liq_enabled -> and set it to false. It is more clear this way. Also, this way the default would still be disabled, if the storage is empty.
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.
Alright then. Currently working on something else, will do after.