IERC20Upgradeable.trasfer fails without reason messages

I cant figure out why calling a function from web app fails while calling from Polygonscan works...

Does anyone know why?

I am trying to call the function with the same args and condition yet calling from my test front end app fails. Without reasons for the failure.

Contract is here

when I call the function from the link above it works.

The function that doesn't work is below.

 function release(bytes32 _proofId) external virtual proofExists(_proofId) {
    ModInfoVesting storage modVestingInfo = modInfoVesting[_proofId];
        modVestingInfo.modAddress == msg.sender,
        "msg.sender must be modAddress"
        block.timestamp > modVestingInfo.jobEndTime,
        "now must be > jobEndTime"
        modVestingInfo.completed == false,
        "release: you already completed"
    uint256 releasable = releaseAmount(_proofId);
    modVestingInfo.released += releasable;

    if (modVestingInfo.amount == modVestingInfo.released) {
        modVestingInfo.completed = true;

    depositedToken.transfer(msg.sender, releasable);
    emit Released(_proofId, msg.sender);

I read this post and changed from safeTransfer to just transfer but no luck...

its probably an error in your frontend code then, can you provide the relevant parts as well?

THank you for your reply!

here is my front end code

const Vesting = () => {
	const { account, library } = useWeb3React<ethers.providers.Web3Provider>();
	const [text, setText] = useState('');

	const VestingContract = useMemo(() => {
		if (!account) return null;
		return new ethers.Contract(
		) as VestingContract;
	}, [account]);

	const release = async () => {
		if (!VestingContract || !text) return;
		try {
			const tx = await VestingContract.release(text, { gasLimit: 100000 });
			await tx.wait();

			console.log('tx : ', tx);
		} catch (e) {
			if (e instanceof Error) {
				console.log('release error');


	return (
				onChange={(e) => setText(}
			<button onClick={release}>Release</button>

export default Vesting;

You will find the entire code below.

Thanks for your help!

tbh I cant see the problem either :sweat_smile:

Interestingly, this transaction failed, while this transaction was successful, although both transactions came from the same address with the same params and there were no other state modifying transactions inbetween.

Thanks for checking.

Yeah... That is weird right?
So I cannot find any possible reasons :smiling_face_with_tear:

Weird? thing is that only successful transfers are recorded in transfer history.

You will see the method column "Release" so I assume something is wrong with the contract calling this Token contract?