I recently posted a small Lottery contract on the ethereum rinkeby network. The contract got deployed successfully however I am not able to see Contract source code and ABI on the Etherscan portal. Below is the address


Other people from my training group deployed their code they got ABI and other details. Below is the URL


Below is Solidity code.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

contract Lottery{

    address payable public manager;
    address payable[] public players;

    constructor()  {
        manager = payable(msg.sender);


    function enter() public payable{
        require (msg.value > 0.01 ether);


    function random_num() private view returns (uint){
        return uint(keccak256(abi.encodePacked(block.difficulty, block.timestamp, players)));

    function pick_winner() public restricted_func {
        uint index = random_num() % players.length;
        players = new address payable[](0);

    function get_list_players() public view returns(address payable[] memory) {
        return players;

    modifier restricted_func{
        require (msg.sender == manager);


And below is my Deploy.js

const HDWalletProvider = require('@truffle/hdwallet-provider');
const Web3 = require('web3');

const { abi, evm } = require('./compile');


provider = new HDWalletProvider(
  "my secret code phrase",

const web3 = new Web3(provider);

const deploy = async () => {
  const accounts = await web3.eth.getAccounts();

  console.log('Attempting to deploy from account', accounts[0]);

  const result = await new web3.eth.Contract(abi)
    .deploy({ data: evm.bytecode.object })
    .send({ gas: '1000000', from: accounts[0] });

  console.log('Contract deployed to', result.options.address);


Could someone please help me understand why? Many thanks in advance!!

1 Answer 1


Sometimes Etherscan may identify similar contracts which is probably why your partners have the ABI of the contract already visible. You can make this happen for your contract manually by verifying the contract yourself on https://rinkeby.etherscan.io/verifyContract.

For a single file contract it's easy but you can follow some tutorials such as this one or this one for context.

  • 1
    For development frameworks such as hardhat or truffle you have different plugins that use the Etherscan API to verify your contracts when they are deployed.
    – Richard
    Jan 16, 2022 at 15:11

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.