Solve issue with our smart contract
Budget: $1,500 – $3,000 USD
I am Jacob de Regt, CEO of BABYBNB. BABYBNB is listed on Binance Smart Chain. We're experiencing an error that blocks sell-orders, triggered after making adjustments ( more parameters involved?). Reading the code I can't find what triggers the error and why. Fortunately the error is exclusively related to the swap of the _liquidityFee. I've set the swapAndLiquifyEnabled on false so that trading is possible including the redistribution of the reflection fee. I hope that you are able to help us. Sincerely.
ERROR ‘TRANSFER_FROM_FAILED’
At this moment it is not possible to set the feature ‘swapAndLiquifyEnabled’ on ‘true’.
After writing 'true’ the buy orders will go through perfectly, but the sell-orders are blocked. When clicked on 'swap' the following error appears: ‘TRANSFER_FROM_FAILED’. This is strange, because with the approval and swap the trader gives the contract the allowance to process the trade. The trick to change the last number of the tokens to sell doesn’t work either.
Personally, I think that the problem occurred when I changed the feature ‘_liquidityFee’ at 4 (the contract demands 8). Apparently, this triggered something in the code that disabled the possibility to proceed sell-orders and caused the error.
It’s good to know that I earlier have made changes in the settings of the contract:
- lowered/topped up the ‘_maxTxAmount’
- dis- and enabling the ‘buyBackEnabled’ feature
- changing the ‘buyBackUpperLimitAmount’
- re-allocated the ‘marketingAddress’
- changed the ‘minimumTokernsBeforeSwapAmount’
- the hight of the ‘marketingDivisor’
It’s strange, but in the code isn’t stated if the marketingDivisor can be adjusted. Reading the parts of the code about the fees made that I had enough certainty to adjust it. I did and it worked for the feature 'marketDivisor'. When I changed the _liquidityFee feature to 5 the sell/swap function was directly disabled. I supposed that, because the marketDivisor could be adjusted the _liquidityFee also should be adjustable. Normally it is coded in the last section as its determents the range in between the tax can be adjusted. Because the contract doesn’t provide clarity in this matter I decided to change the liquidity fee also.
TEMPORARY SOLUTION
I've set the swapAndLiquifyEnabled on false so that trading is possible including the redistribution of the reflection fee besides changing the _liquidityFee and the marketingDivisor to 0 (zero). Otherwise the traders will pay 8% without purpose.
FOR NOW
*Buying is possible
*Selling is also able whit this note:
- When you just type in how many tokens you want to sell and click on ‘swap’ the sell-order will proceed as meant to be.
- When you first fill in how many BNB you need for the sell-order, and you click on ‘swap’ then the error appears: ‘Pancake:K’. If you, after filling in the number of BNB just change one of the last numbers of the total of tokens that you want to sell then the order succeeds just like the first approach.
- - - - - - - - - - - - - - - - - - - - - - - -
Our first main goal is to make the charity token BABYBNB self-sustainable after starting with the registration of the company BABYBNB that will generate revenue besides the market fee. It’s of course inevitable and obvious that the swap of the collected tokens into BNB doesn’t work also. You will understand that, for the development of our use-cases funds are needed. In this way those funds won’t be generated and therefore the existence of our company BABYBNB can’t be ensured.
PAYMENT
We are offering a fixed price of $2,000 for solving the error in the shortest time as possible. It is urgent.
Website: https://www.babybnb.org
Telegram: https://t.me/babybinance
Smart contract ~ https://bscscan.com/address/0xc1168b7b85b2bbc8a5c73c007b74e7523b2da209#code
Github BABYBNB ~ https://gist.github.com/babybnb/51a031dc77b60b0585bfb9f3f57e6204
ERROR ‘TRANSFER_FROM_FAILED’
At this moment it is not possible to set the feature ‘swapAndLiquifyEnabled’ on ‘true’.
After writing 'true’ the buy orders will go through perfectly, but the sell-orders are blocked. When clicked on 'swap' the following error appears: ‘TRANSFER_FROM_FAILED’. This is strange, because with the approval and swap the trader gives the contract the allowance to process the trade. The trick to change the last number of the tokens to sell doesn’t work either.
Personally, I think that the problem occurred when I changed the feature ‘_liquidityFee’ at 4 (the contract demands 8). Apparently, this triggered something in the code that disabled the possibility to proceed sell-orders and caused the error.
It’s good to know that I earlier have made changes in the settings of the contract:
- lowered/topped up the ‘_maxTxAmount’
- dis- and enabling the ‘buyBackEnabled’ feature
- changing the ‘buyBackUpperLimitAmount’
- re-allocated the ‘marketingAddress’
- changed the ‘minimumTokernsBeforeSwapAmount’
- the hight of the ‘marketingDivisor’
It’s strange, but in the code isn’t stated if the marketingDivisor can be adjusted. Reading the parts of the code about the fees made that I had enough certainty to adjust it. I did and it worked for the feature 'marketDivisor'. When I changed the _liquidityFee feature to 5 the sell/swap function was directly disabled. I supposed that, because the marketDivisor could be adjusted the _liquidityFee also should be adjustable. Normally it is coded in the last section as its determents the range in between the tax can be adjusted. Because the contract doesn’t provide clarity in this matter I decided to change the liquidity fee also.
TEMPORARY SOLUTION
I've set the swapAndLiquifyEnabled on false so that trading is possible including the redistribution of the reflection fee besides changing the _liquidityFee and the marketingDivisor to 0 (zero). Otherwise the traders will pay 8% without purpose.
FOR NOW
*Buying is possible
*Selling is also able whit this note:
- When you just type in how many tokens you want to sell and click on ‘swap’ the sell-order will proceed as meant to be.
- When you first fill in how many BNB you need for the sell-order, and you click on ‘swap’ then the error appears: ‘Pancake:K’. If you, after filling in the number of BNB just change one of the last numbers of the total of tokens that you want to sell then the order succeeds just like the first approach.
- - - - - - - - - - - - - - - - - - - - - - - -
Our first main goal is to make the charity token BABYBNB self-sustainable after starting with the registration of the company BABYBNB that will generate revenue besides the market fee. It’s of course inevitable and obvious that the swap of the collected tokens into BNB doesn’t work also. You will understand that, for the development of our use-cases funds are needed. In this way those funds won’t be generated and therefore the existence of our company BABYBNB can’t be ensured.
PAYMENT
We are offering a fixed price of $2,000 for solving the error in the shortest time as possible. It is urgent.
Website: https://www.babybnb.org
Telegram: https://t.me/babybinance
Smart contract ~ https://bscscan.com/address/0xc1168b7b85b2bbc8a5c73c007b74e7523b2da209#code
Github BABYBNB ~ https://gist.github.com/babybnb/51a031dc77b60b0585bfb9f3f57e6204