pub fn add_farm(
        &self,
        admin_signer: &dyn Signer,
        farm: Farm,
    ) -> Result<Signature, FarmClientError> {
        self.farms
            .borrow_mut()
            .data
            .insert(farm.name.to_string(), farm);
        self.farm_refs.borrow_mut().reset();
        let inst = self.new_instruction_add_farm(&admin_signer.pubkey(), farm)?;
        self.sign_and_send_instructions(&[admin_signer], &[inst])
    }
/// Records the Farm metadata on-chain
Records the Farm metadata on-chain
Records the Farm metadata on - chain
pub fn add_farm(
        &self,
        admin_signer: &dyn Signer,
        farm: Farm,
    ) -> Result<Signature, FarmClientError> {
        self.farms
            .borrow_mut()
            .data
            .insert(farm.name.to_string(), farm);
        self.farm_refs.borrow_mut().reset();
        let inst = self.new_instruction_add_farm(&admin_signer.pubkey(), farm)?;
        self.sign_and_send_instructions(&[admin_signer], &[inst])
    }
pub fn add_farm ( & self , admin_signer : & dyn Signer , farm : Farm , ) -> Result < Signature , FarmClientError > { self . farms . borrow_mut ( ) . data . insert ( farm . name . to_string ( ) , farm ) ; self . farm_refs . borrow_mut ( ) . reset ( ) ; let inst = self . new_instruction_add_farm ( & admin_signer . pubkey ( ) , farm ) ? ; self . sign_and_send_instructions ( & [ admin_signer ] , & [ inst ] ) }
Records the Farm metadata on-chain
Records the Farm metadata on - chain
&self
admin_signer
&dyn Signer
farm
Farm
&self
admin_signer
&dyn Signer
farm
Farm