Skip to content

Commit

Permalink
Fix compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
CostinCarabas committed Jun 14, 2024
1 parent 50d9121 commit b124391
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 15 deletions.
25 changes: 25 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions legacy-contracts/farm-staking-proxy-v1.3/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "farm-staking"
name = "farm-staking-legacy"
version = "0.0.0"
authors = [ "you",]
edition = "2018"
Expand All @@ -20,14 +20,14 @@ path = "../../common/modules/farm/rewards"
[dependencies.token_send]
path = "../../common/modules/token_send"

[dependencies.token_merge_old]
path = "../../common/modules/token_merge_old"
[dependencies.token_merge_helper]
path = "../../common/modules/token_merge_helper"

[dependencies.common_structs_old]
path = "../../common/common_structs_old"
[dependencies.common_structs]
path = "../../common/common_structs"

[dependencies.common_errors_old]
path = "../../common/common_errors_old"
[dependencies.common_errors]
path = "../../common/common_errors"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.48.1"
Expand Down
4 changes: 2 additions & 2 deletions legacy-contracts/farm-staking-proxy-v1.3/meta/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "farm-staking-abi"
name = "farm-staking-legacy-abi"

version = "0.0.0"
authors = [ "you",]
edition = "2018"
publish = false

[dependencies.farm-staking]
[dependencies.farm-staking-legacy]
path = ".."

[dependencies.multiversx-sc-meta]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
multiversx_sc::imports!();
multiversx_sc::derive_imports!();

use common_structs_old::Nonce;
use common_structs::Nonce;
use config::MAX_PERCENT;

Check failure on line 5 in legacy-contracts/farm-staking-proxy-v1.3/src/custom_rewards.rs

View workflow job for this annotation

GitHub Actions / clippy

[clippy] legacy-contracts/farm-staking-proxy-v1.3/src/custom_rewards.rs#L5

error[E0432]: unresolved import `config::MAX_PERCENT` --> legacy-contracts/farm-staking-proxy-v1.3/src/custom_rewards.rs:5:5 | 5 | use config::MAX_PERCENT; | ^^^^^^^^^^^^^^^^^^^ no `MAX_PERCENT` in the root
Raw output
legacy-contracts/farm-staking-proxy-v1.3/src/custom_rewards.rs:5:5:e:error[E0432]: unresolved import `config::MAX_PERCENT`
 --> legacy-contracts/farm-staking-proxy-v1.3/src/custom_rewards.rs:5:5
  |
5 | use config::MAX_PERCENT;
  |     ^^^^^^^^^^^^^^^^^^^ no `MAX_PERCENT` in the root


__END__

Check failure on line 5 in legacy-contracts/farm-staking-proxy-v1.3/src/custom_rewards.rs

View workflow job for this annotation

GitHub Actions / Contracts / Rust tests

unresolved import `config::MAX_PERCENT`

Check failure on line 5 in legacy-contracts/farm-staking-proxy-v1.3/src/custom_rewards.rs

View workflow job for this annotation

GitHub Actions / Contracts / Test Coverage

unresolved import `config::MAX_PERCENT`

Check failure on line 5 in legacy-contracts/farm-staking-proxy-v1.3/src/custom_rewards.rs

View workflow job for this annotation

GitHub Actions / Contracts / Wasm tests

unresolved import `config::MAX_PERCENT`

pub const BLOCKS_IN_YEAR: u64 = 31_536_000 / 6; // seconds_in_year / 6_seconds_per_block
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
multiversx_sc::imports!();
multiversx_sc::derive_imports!();

use token_merge_old::ValueWeight;
use token_merge_helper::ValueWeight;

#[derive(
ManagedVecItem,
Expand Down
4 changes: 2 additions & 2 deletions legacy-contracts/farm-staking-proxy-v1.3/src/whitelist.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
multiversx_sc::imports!();

use common_errors_old::ERROR_PERMISSIONS;
use common_errors::ERROR_PERMISSION_DENIED;

#[multiversx_sc::module]
pub trait WhitelistModule {
Expand All @@ -22,7 +22,7 @@ pub trait WhitelistModule {
}

fn require_whitelisted(&self, address: &ManagedAddress) {
require!(self.is_whitelisted(address), ERROR_PERMISSIONS);
require!(self.is_whitelisted(address), ERROR_PERMISSION_DENIED);
}

#[view(isWhitelisted)]
Expand Down
4 changes: 2 additions & 2 deletions legacy-contracts/farm-staking-proxy-v1.3/wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "farm-staking-wasm"
name = "farm-staking-legacy-wasm"
version = "0.0.0"
authors = [ "you",]
edition = "2018"
Expand All @@ -20,7 +20,7 @@ lto = true
debug = false
panic = "abort"

[dependencies.farm-staking]
[dependencies.farm-staking-legacy]
default-features = false
path = ".."

Expand Down

0 comments on commit b124391

Please sign in to comment.