//SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.0;
interface IERC20 { function transferFrom(address from,address to,uint256 amount) external returns (bool); } contract test {
function transferFrom(address tokeIn, uint amountIn)public{ IERC20 _tokeIn = IERC20(tokeIn); _tokeIn.transferFrom(msg.sender, address(this), amountIn); }
}
不能转到合约地址,错误代码: Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? Internal JSON-RPC error. { "code": 3, "message": "execution reverted: BEP40: transfer amount exceeds allowance", "data": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002842455034303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365000000000000000000000000000000000000000000000000" }