0

Im trying to launch a smart contract that will call on another smart contract, but I need to be able to set the contract address to call on after launch. They actually both need to call on each other, so one is going to need to be set after launch.

address public  bugToken;
address public devAddress;
address dead = 0x000000000000000000000000000000000000dEaD;
uint256 private EGGS_TO_HATCH_1MINERS = 1080000;//for final version should be seconds in a day
uint256 private PSN = 10000;
uint256 private PSNH = 5000;
uint256 private devFeeVal = 2;
bool private initialized = false;
mapping (address => uint256) private hatcheryMiners;
mapping (address => uint256) private claimedEggs;
mapping (address => uint256) private lastHatch;
mapping (address => address) private referrals;
uint256 private marketEggs;

constructor() {
    bugToken=setbugToken;
    devAddress=msg.sender;
}

function setbugToken(address bug) public onlyOwner {
bugToken =  bug;

}
1
  • What's the question? It seems you have already solved it by having to call the setbugToken after deployment by the owner.
    – Ismael
    May 14 at 21:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.