diff --git a/locked-asset/simple-lock/src/proxy_farm.rs b/locked-asset/simple-lock/src/proxy_farm.rs index d97b2cd73..508301a4b 100644 --- a/locked-asset/simple-lock/src/proxy_farm.rs +++ b/locked-asset/simple-lock/src/proxy_farm.rs @@ -56,6 +56,20 @@ pub trait ProxyFarmModule: ); } + #[only_owner] + #[endpoint(setTransferRoleProxyFarmToken)] + fn set_transfer_role_proxy_farm_token(&self, opt_address: OptionalValue) { + let address = match opt_address { + OptionalValue::Some(addr) => addr, + OptionalValue::None => self.blockchain().get_sc_address(), + }; + self.farm_proxy_token().set_local_roles_for_address( + &address, + &[EsdtLocalRole::Transfer], + None, + ); + } + /// Add a farm to the whitelist. /// Currently, two types of farms are supported, denoted by the `farm_type` argument: /// `0` - SimpleFarm - rewards are fungible tokens diff --git a/locked-asset/simple-lock/wasm/src/lib.rs b/locked-asset/simple-lock/wasm/src/lib.rs index 0a0f01756..1870195f2 100644 --- a/locked-asset/simple-lock/wasm/src/lib.rs +++ b/locked-asset/simple-lock/wasm/src/lib.rs @@ -26,6 +26,7 @@ elrond_wasm_node::wasm_endpoints! { removeFarmFromWhitelist removeLiquidityLockedToken removeLpFromWhitelist + setTransferRoleProxyFarmToken unlockTokens ) }