DispatchError: ContractTrapped
DispatchError docs: Contract trapped during execution.
Debug message:
panicked at 'encountered error while calling <AccountId as PSP22>::transfer_from: CalleeTrapped',...
This gets invoked when calling:
PSP22Ref::transfer_from(
&token,
sender,
contract,
amount,
Vec::new(),
)?;
I do have checks prior to make sure the sender
has greater or equal than amount
of token
in balance and allowance to the contract. The PSP22 token is initialized on my local chain. Not really sure why it tells me it's trapped.