Hi there,
I'm making safemoon fork (yes, I know this is shit🤦‍♂️ but i have fixed all the errors, bugs and unsafe functions),
but after verifying the contract I'm getting this error:
Sorry, we were unable to retrieve a valid Contract ABI for this contract.
Unable to read contract information

What could be the problem?
For the third day I cannot to solve this 😢

Aug 11, 2021, 9:14 AM
For example, I just copied and pasted the contract without any changes, but I still get this error
https://testnet.bscscan.com/address/0x780353579cf58b556035f0b95b25404a846d6189#readContract
Aug 11, 2021, 9:15 AM
Lol
Typical safemoon clone farmer xDD
Aug 11, 2021, 9:16 AM
I can help you bro
Aug 11, 2021, 9:18 AM
PM?
Aug 11, 2021, 9:18 AM
Yes
Aug 11, 2021, 9:18 AM
if you don't have constructor arguments, delete everything in ABI section
Aug 11, 2021, 9:19 AM
Not typical, I made a lot of changes. This contact I have deployed for example
Aug 11, 2021, 9:19 AM
remember to enable optimization if remix has it ON
Aug 11, 2021, 9:19 AM
Bro you are deploying the wrong thing
You deployed address library instead of actual token contract
Yeah not typical at all >.<
Aug 11, 2021, 9:20 AM
I did this
here is the library and the contract code https://testnet.bscscan.com/address/0x780353579cf58b556035f0b95b25404a846d6189#code
Aug 11, 2021, 9:24 AM
Bruh...
WRONG CONTRACT!
Deploy token contract instead of address library
On remix, select proper contract from the dropdown menu
Like this
Aug 11, 2021, 9:27 AM
I took the same contract like safemoon and a lot of forks
https://bscscan.com/address/0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3#code
https://bscscan.com/address/0x1771ad5b28549467ad5fe68e9f271667a5930a2e#code
https://bscscan.com/address/0x0cF011A946f23a03CeFF92A4632d5f9288c6C70D#code
Aug 11, 2021, 9:31 AM
Yeah good luck :))
Aug 11, 2021, 9:34 AM
This is a flattened contract. No libs separately
Aug 11, 2021, 9:35 AM
Did you even read what I said?
Safemoon imports like 4-5 contracts
Address library is one of them
What you want to deploy is the actual token contract
But on remix, by default it selects address library
Aug 11, 2021, 9:37 AM
Where are they?
Aug 11, 2021, 9:37 AM
Already in the code. Its flattened
Aug 11, 2021, 9:37 AM
Yes
What should I do? Remove library code from contract code and import them separately?
Aug 11, 2021, 9:39 AM
No. While deploying...
Do this
And select proper contract
Aug 11, 2021, 9:40 AM
Thank you very much! It's work 👍❤️
I thought if there is only one file, I cannot select anything.
I usually imported libs separately
Aug 11, 2021, 9:46 AM
Please don't make a real token before understanding solidity.
Aug 11, 2021, 9:48 AM
I've already done a few before 😁
It's more about understanding how remix work with flattened files.
Aug 11, 2021, 9:54 AM
Truffle/hardhat ftw :)
Aug 11, 2021, 9:55 AM
Yes, hardhat is good)
Aug 11, 2021, 9:56 AM
yes, i just deploy token who take 10% of each tx, when hit threshold swap for eth and send to dev wallet
Aug 11, 2021, 10:47 AM
From what I can tell it's failing here
Aug 11, 2021, 10:47 AM
what are you trying to do exactly?
Aug 11, 2021, 10:47 AM
So the token's made it to the router fine
Swap tokenAmount of tokens for Eth
So I approve the token to the router address, use swapExactTokensForETHSupportingFeeOnTransferTokens, and expect to recieve WETH back. I've done this hundreds of times without issue
But for some reason now the router is failing to transfer Eth back to my contract
Aug 11, 2021, 10:49 AM
ok, im only use swapExactTokensForETH
Aug 11, 2021, 10:49 AM
*100s of times without issue in other contracts, it's not suddenly stopped working in this one
Aug 11, 2021, 10:49 AM
yeah its little strange
Aug 11, 2021, 10:50 AM
I'll try that, though there's no reason that would work when "supportingFeesOn" doesn't that I can see
This didn't work. Got a "Pancake: K" response. Anyone else got any suggestions?
Aug 11, 2021, 11:31 AM
i didnt read your whole thread but that means the curve got messed up i think. It could be the token that you are trading too. For example I forced the balance of the pool to change with a token once, and it started giving my K errors because the balance the contract thought it had was no longer
if you're using a debugger or can write console.log() print out the numbers and start figuring out why its hitting this error
oh yeah transfer helper usually means its your token failing from my experience
Aug 11, 2021, 11:44 AM
Yeah but it's specifically safeTransferETH
So returning the Eth to the contract, not transferring the token to the router
Aug 11, 2021, 11:44 AM
well you said Exact Tokens — is your token being taxed?
Aug 11, 2021, 11:45 AM
I'm using SupportingFeeOn
Yes it is
Aug 11, 2021, 11:45 AM
well those exact tokens arent gonna arrive i dont think. if you say 10000 for ETH and only 8500 show up
youre gonna have a bad time i think
what are you using to code
Aug 11, 2021, 11:46 AM
The contract is exempted from fees
It would through a safetransfer exception for the token if that was the issue
Not for eth
Remix
Aug 11, 2021, 11:47 AM
debug if you havent yet. it can be a problem between eth — weth too?
one time when i first launched my local pancake, i wasnt getting the right rates between BNB and wBNB because of something i was doing, i forget what exactly
Aug 11, 2021, 11:48 AM
I'm just using kiemtiem's pancake for testing
Aug 11, 2021, 11:48 AM
and theres liquidity in your pool on the BSC test net?
Aug 11, 2021, 11:49 AM
Yes
Aug 11, 2021, 11:49 AM
🤷‍♂️ im running out of things i can guess to help lol
Aug 11, 2021, 11:49 AM
Thanks man
Yeah following the uniswap contract code it's literally all fine to the point it tries to Tx eth to my contract
Aug 11, 2021, 11:49 AM
you cant debug their contract as easy
Aug 11, 2021, 11:49 AM
Which is baffling to me
Aug 11, 2021, 11:49 AM
Anyone have an idea how do you make successful gas estimation even if the transaction hits a require?
Aug 11, 2021, 12:18 PM
Does your contract have a "receive method"?
Aug 11, 2021, 12:19 PM

© 2024 Draquery.com All rights reserved.