require (_msgSender() == _stakingContract, "$WEAPON: must stake through staking contract");
can you explain me what is this?
there is 2 contract one an ERC20 contract named WEAPON and tow a staking contract that should use weapon. now in method stake in contract 2 there is the above line that makes my calls reverts.
Mar 6, 2022, 6:47 PM
It means that function can be called only by the other contract
Mar 6, 2022, 6:49 PM
Only the contract in the variable _stakingContract can call that method, so you should be calling that like user=> _stakingContract => function in contract
Mar 6, 2022, 6:51 PM
thanks
I needed to set staking contract in ERC20 contract
Mar 6, 2022, 7:05 PM