@uua and @abcoathup I am facing the same issue. I am staking the LP(BNB-BCOIN) token in my smart contract(incentive pool) to farm the (BCOIN).
After deploying the incentive pool I added the incentive pool as minter in the BCOIN smart contract.
And from the truffle console, I am calling the stake function of the incentive pool but getting 'StatusError: Transaction:".
hi, @rbhardwaj0078
Have you approved your LP token with your incentive pool contract address?
I am calling the LP_token.stake() function from the truffle console.
Should I do anything else?
I Lp tokens are in my wallet (same wallet with created the incentive pool) and truffle console with the same wallet.
I mean that maybe you should call the approve function to approve your pool contract to transfer your LP token into the pool contract before you call stake function. At least I do that in my case.
stakeTokens = (amount) => { this.state.daiToken.methods.approve("0xcE596ddaB7fA101D9B0929C712e4360b401012Ca", amount).send({ from: this.state.account }).on('transactionHash', (hash) => {
this.state.tokenFarm.methods.stake(amount).send({ from: this.state.account }).on('transactionHash', (hash) => {
this.setState({ loading: false })
})
})
}
I am doing this from the UI now to approve the LP token to my incentive pool contract and the transaction is failing with status Transaction: 0x8f55e7d05c3ca3a8fe0211e02426866a8ca93ad0ae806789a6660a2d2c8110bc exited with an error (status 0).
Hi, @rbhardwaj0078
Would you mind share your source code? you can post it in testnet and verify the source code.