Hello Guys! I have been searching and experimenting and trying for hours now and I cant figure out how to deploy the Caketoken, Syrupbar and Masterchef correctly. I hope someone can help me out.
I want to create my own token and to start mining it through the masterchef and syrupbar contract. Im stuck at the very end of the contract and thats "depositing the LP Token"
My Steps:
Deploy CakeToken
Deploy Syrupbartoken with the Caketoken address
Deploy Masterchef with Caketoken, Syrupbar adress and also giving my own address as a DEV and mintin 40 tokens per block.
Added a Pool which is visible on the screenshot with poolid: 1 , the Bakeryswap testnet LP and 1000 allocation points.
The contracts above are all verified on the bsc explorer.
When I try to deposit the LP token I get this error.
I also tried to to transfer wonership to the masterchef contract (Caketoken and Syrupbar) but still got the same error. In this example I didnt transfer the ownership yet. But same error appears even if I set the gas fee high.
But there is something I dont understand on the masterchef contract. When someone adds an LP to the pool to lets say farm CAKE. What rlly happens there: As far as I understand: The produced LP are beeing sold and CAKE are beeing bought instead. Is this right.
Here are my contract:
Token address:
0x739c258022ee233BEB833b7aC7C747eb63721D5e
I actually tried to force the transaction, but still got the error. My Question is also, where are the LP token sold for mytoken? How do I know that. Im trying to understand that but since im not a „real“ developer its hard for me to interpret every single code.
I copied the contracts 1 on 1 with small changes. There is something on the import contracts that surely do smth. I looked into that and yet I could not understand it. Kinda depressed about this, spent so many hours trying.
I actually want to start from 0 tokens. If I approve lets say only 100 token, then it will stop at 100 tokens and wont mint any by itself right? Or can I just type in a big number to approve.
I want to make it kinda like bitcoin. No premine just by staking lets say CAKE and earn mytoken. I dont want to manually mint and want to transfer ownership to the masterchef
Oke, I know now what u mean. I did approve the token to masterchef and syrupbar with an imaginary number (just typed in a number to approve). After that I was able to deposit the LP Toke (I also had to approve LP Token). Now I cant withdraw out of the contract. Masterchef started minting so its kinda working. But I dont see any of my tokens in the wallet nor the syruptoken. I did not verify the contract yet. is that the problem? Very thankful for your help.
I had to redeploy the contract again:
Token address:
0xcF6600dfBF7B0B19cFDa66c40e16708e445E62D6