1
votes

Unable to launch Storage.sol on BSC Testnet but it works on Ropsten and I have no idea why. Using Brave Browser and Metamask however switching browsers and wallets doesn't seem to help. Have successfully launched on Polygon's Mumbai network so it has to be BSC Testnet, but I can see other people posting new contracts on the test explorer :/. Any ideas on how to resolve this?

    // SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.7.0 <0.9.0;

/**
 * @title Storage
 * @dev Store & retrieve value in a variable
 */
contract Storage {

    uint256 number;

    /**
     * @dev Store value in variable
     * @param num value to store
     */
    function store(uint256 num) public {
        number = num;
    }

    /**
     * @dev Return value 
     * @return value of 'number'
     */
    function retrieve() public view returns (uint256){
        return number;
    }
}

enter image description here

1
Confirm the compiler is the proper version? What error are you getting?pgSystemTester
@pgSystemTester Compiler is set to 0.7.0 and I tried 0.7.2/latest to be safe. No error code, just pending forever on BSC testnet (I included link to picture above. Don't have rights to share pictures yet)TNJCoding
Okay, not sure. I displayed your image. That is strange.pgSystemTester
Can't tell if it's just me or if the BSC testnet is down. I greatly appreciate your help making this easier to seeTNJCoding

1 Answers

0
votes

You may have set BSC Testnet on Metamask like this:

New RPC URL: https://data-seed-prebsc-1-s1.binance.org:8545/

Chain id: 97

But change into this:

New RPC URL: https://data-seed-prebsc-2-s3.binance.org:8545/

Chain id: 97

If still doesn't work, also change Chain ID into 0x61