I am working on a smart contract, but when calling one of the methods of another contract (which is IBEP20 token), I am getting the below error:


revert The transaction has been reverted to the initial state. Note: The called function should be payable if you send value and the value you send should be less than your current balance. Debug the transaction to get more information.

Trimmed contract:

interface IBEP20 {
// methods 

contract TestContract {

    address public constant stakeTokenAddr = 0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82;
    uint256 public __TESTVAR;

    function  __testFunction() external {
        __TESTVAR = IBEP20(stakeTokenAddr).balanceOf(0x51Ea633faE8a74765aeeb50cdc288d1eCFdfc590);

Can someone please help me here?

  • Can't see any issue. Are you trying to call the method sending some BNB? Commented Feb 12, 2022 at 1:22
  • is that contract working? it could probably paused
    – Majd TL
    Commented Feb 13, 2022 at 17:09
  • Got it working now, some issue with the way it was called from remix.
    – VikasGS
    Commented Feb 14, 2022 at 17:57

1 Answer 1


Got it working now, some issue with the way it was called from remix

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.