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

fix: allow mfx minting only #422

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

fmorency
Copy link
Contributor

@fmorency fmorency commented Nov 8, 2024

Disable token minting for all BUT MFX.

This only works if the MFX address is mqbh742x4s356ddaryrxaowt4wxtlocekzpufodvowrirfrqaaaaa3l, i.e., the production network MFX address. The resiliency test reflects this.

@fmorency fmorency self-assigned this Nov 8, 2024
Copy link

codecov bot commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.

Project coverage is 81.67%. Comparing base (1e887dd) to head (45d091d).

Files with missing lines Patch % Lines
src/many-ledger/src/module/ledger_mintburn.rs 76.92% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #422   +/-   ##
=======================================
  Coverage   81.67%   81.67%           
=======================================
  Files         151      151           
  Lines       16837    16841    +4     
=======================================
+ Hits        13751    13755    +4     
  Misses       3086     3086           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@fmorency fmorency requested a review from jgryffindor November 21, 2024 16:12
@@ -48,7 +48,11 @@ jobs:
steps:
- run:
name: install cbor-diag
command: cargo install --force cbor-diag-cli
command: |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

cbor-diag-cli no longer builds using Rust < 1.81 because of some nested dependency issue.

I created a binary release and used it here.

@@ -87,12 +87,12 @@ local tendermint(i, user) = {
ports: [ "" + (26600 + i) + ":26657" ],
};

function(nb_nodes=4, user=1000, id_with_balances="", allow_addrs=false, enable_migrations=false, abci_migrations=false) {
function(nb_nodes=4, user=1000, id_with_balances="", token="mqbfbahksdwaqeenayy2gxke32hgb7aq4ao4wt745lsfs6wiaaaaqnz", allow_addrs=false, enable_migrations=false, abci_migrations=false) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Allow one to customize the token symbol for initial balances in tests.


// Production network MFX address
pub static MFX: Lazy<Address> = Lazy::new(|| {
Address::from_str("mqbh742x4s356ddaryrxaowt4wxtlocekzpufodvowrirfrqaaaaa3l").unwrap()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The production network MFX address. Won't work if the MFX address is something else.

let TokenMintArgs {
symbol,
distribution,
memo,
} = args;

if symbol != *MFX
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Disable minting for everything except MFX.

@@ -3,7 +3,7 @@
GIT_ROOT="$BATS_TEST_DIRNAME/../../../"
MIGRATION_ROOT="$GIT_ROOT/staging/ledger_migrations.json"
MAKEFILE="Makefile.ledger"
MFX_ADDRESS=mqbfbahksdwaqeenayy2gxke32hgb7aq4ao4wt745lsfs6wiaaaaqnz
MFX_ADDRESS=mqbh742x4s356ddaryrxaowt4wxtlocekzpufodvowrirfrqaaaaa3l
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use the production MFX address in the resiliency test

@fmorency fmorency marked this pull request as ready for review November 21, 2024 16:12
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.

1 participant