Verify Crowdsale contract on Etherscan deployed using Remix

Hi
I have created two contract , ERC20 and Crowdsale suggested by ABCOATHUP earlier

I can successfully able to verify the Simple Contract but the Crowdsale is unable to verify

I have removed all the text in the constructor Argument and uploaded the flatten source code

I have deployed the both the contracts from Remix ,used the compiler 0.5.17 and Flatten with Truffle in Ubuntu18.
My Crowdsale contract address is 0x8599820a642ef194a7119bd9442b3882f3a37cb0 on the real net

Code Used

pragma solidity ^0.5.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/crowdsale/Crowdsale.sol";
/**
 @title YieldCrowdsale
 @dev This is an example of a fully fledged crowdsale.
*/contract YieldCrowdsale is Crowdsale {
    constructor (
        uint256 rate,
        address payable wallet,
        IERC20 token
    )
        public
        Crowdsale(rate, wallet, token)
    {
    }
}

Please help me to verify in the mainnet

1 Like

Hi @MarquisOgre,

Welcome to the community :wave:

I recommend reading Points to consider when creating a fungible token (ERC20, ERC777)

What values did you use for rate, wallet and token when you deployed the Crowdsale?

I have used the values as “40”,“0xb56bc45e5fe77Fa8349EF5E816E899b5A1357D3d”,“0x4A0B2e3f0C798F93e4369F4d58BcE2BaaCD2C0eF”

1 Like

Hi @MarquisOgre,

:warning: You should seek appropriate advice on regulatory compliance and your solution should have appropriate testing and auditing.

I have verified the contract with a flattened contract from truffle-flattener and the constructor parameters provided: https://etherscan.io/address/0x8599820a642ef194a7119bd9442b3882f3a37cb0#code

Thank you for verifying the contract, But where exactly i was doing wrong, can u plz guide me

1 Like

Hi @MarquisOgre,

The contract has constructor arguments so we need to supply them when verifying. Etherscan provides them so just needed to cut out the text before the 0000…00028

Hi @MarquisOgre,

Let me know if you need more information.