Error: data out-of-bounds on ERC20 transfer function

Get this error in Remix with Transfer function:

transact to Rex.transfer errored: Error: data out-of-bounds (length=64, offset=96, code=BUFFER_OVERRUN, version=abi/5.0.7)

function transfer(address to, uint256 value) external returns (bool success) {
    require(balanceOf[msg.sender] >= value);

    balanceOf[msg.sender] -= value;
    balanceOf[to] += value;
    emit Transfer(msg.sender, to, value);
    return true;
1 Like

It seems like you pass some wrong parameters, so what are the parameters when you call this function?

1 Like