diff --git a/contracts/transfer/src/state.rs b/contracts/transfer/src/state.rs index dab8621a41..4ab6b1558b 100644 --- a/contracts/transfer/src/state.rs +++ b/contracts/transfer/src/state.rs @@ -315,6 +315,12 @@ impl TransferOps { &mut self, tx: Transaction, ) -> Result, ContractError> { + if let Some((contract_id, _, _)) = tx.call { + if contract_id == TRANSFER_DATA_CONTRACT.to_bytes() { + panic!("Transfer data contract can only be called from the transfer contract"); + } + } + // 1. α ∈ R if !self.root_exists(&tx.anchor) { panic!("Anchor not found in the state!");