binance smart chain testnet verify not working at all

94 Views Asked by At

even this simple smart contract is not verifing in the binance testnet platform I can not find the issue. already tried with and without constructor parameters. I complied it using remix.

smart contract

pragma solidity ^0.8.0;

contract miniContract {
    address contractCreator;
  

    constructor() public {
        contractCreator = msg.sender;
        
    }
 

}

ABI Code

[
    {
        "inputs": [],
        "stateMutability": "nonpayable",
        "type": "constructor"
    }
]

ByteCode

6080604052348015600f57600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550603f80605d6000396000f3fe6080604052600080fdfea2646970667358221220fbeaad32f4b33eaa4eaf624c2ff32432ae611a5adbe9a4da1709388a3e65ba5464736f6c63430008120033

verify page

thanks a lot

I tried with and without constructor parameters. I tried minify abiCode

1

There are 1 best solutions below

0
Petr Hejda On

Since your constructor doesn't accept any arguments, leave the "Constructor Arguments" field on BscScan empty.


If your constructor accepted any arguments, you'd need to pass the ABI-encoded values - not the ABI JSON definition of the constructor function (what you're doing now).

For example: uint256 type, decimal value 1000 is encoded as 0x00000000000000000000000000000000000000000000000000000000000003E8


I tried with and without constructor parameters.

Assuming you've selected the same compiler version, optimization params, and other inputs that you used to compile your code, it will work with the "Constructor Arguments" field empty. If the form returns a different error message that you're not able to resolve, please submit a separate question with steps to reproduce the other issue.