Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Contract has inherent loop issues from original source #9

Open
geopayme opened this issue Apr 26, 2018 · 7 comments
Open

Contract has inherent loop issues from original source #9

geopayme opened this issue Apr 26, 2018 · 7 comments

Comments

@geopayme
Copy link

I have tried to run this contract like the original, on Remix with Metamask, they all have the same issue...

Gas requirement of function FucksToken.approveAndCall(address,uint256,bytes) high: infinite. If the gas requirement of a function is higher than the block gas limit, it cannot be executed. Please avoid loops in your functions or actions that modify large areas of storage (this includes clearing or copying arrays in storage)

Gas requirement of function FucksToken.name() high: infinite. If the gas requirement of a function is higher than the block gas limit, it cannot be executed. Please avoid loops in your functions or actions that modify large areas of storage (this includes clearing or copying arrays in storage

Gas requirement of function FucksToken.symbol() high: infinite. If the gas requirement of a function is higher than the block gas limit, it cannot be executed. Please avoid loops in your functions or actions that modify large areas of storage (this includes clearing or copying arrays in storage)

Gas requirement of function FucksToken.transferAnyERC20Token(address,uint256) high: infinite. If the gas requirement of a function is higher than the block gas limit, it cannot be executed. Please avoid loops in your functions or actions that modify large areas of storage (this includes clearing or copying arrays in storage)

Gas requirement of function FucksToken.transferFrom(address,address,uint256) high: infinite. If the gas requirement of a function is higher than the block gas limit, it cannot be executed. Please avoid loops in your functions or actions that modify large areas of storage (this includes clearing or copying arrays in storage)

ApproveAndCallFallBack.receiveApproval(address,uint256,address,bytes) : Variables have very similar names tokens and token. Note: Modifiers are currently not considered by this static analysis.

FucksToken.balanceOf(address) : Variables have very similar names balances and balance. Note: Modifiers are currently not considered by this static analysis.

Use assert(x) if you never ever want x to be false, not in any circumstance (apart from a bug in your code). Use require(x) if x can be false, due to e.g. invalid input or a failing external component.
more

The contract never executes it is stuck in a perpetual loop... any thoughts?

@anticlimactic
Copy link

Could you give me the precise instructions to replicate your issues? I'll take a look at it after you provide some more detail instructions. 👍

@geopayme
Copy link
Author

Trying to fix them... once I get code working I will send corrections

@kenmistry
Copy link

hi, i followed the steps outlined in this article to set up a contract for testing. i am also receiving the same 8 warnings raised by "Static Analysis". the only variables i changed were:

  • the token and its naming details
  • total supply to be five times the original amount outlined in the contract template

@kvzn
Copy link

kvzn commented May 11, 2018

Got these 8 warnings while using this sol at http://remix.ethereum.org , please give some advices.

@nek8
Copy link

nek8 commented May 6, 2019

browser/ballot.sol:115:17: ParserError: Expected '(' but got identifier constructor YourTokenName() public {
^------------^

@johnsoncarl
Copy link

maybe you are using some later compiler @nek8 and it is made in an older one, where constructor name was the same as the contract name.

In later versions, the constructor is defined as
constructor() public {}

@suspectzed
Copy link

You might want to add the self-destruct function to the 0FUCKS token code. That way newb's, like myself, wont clog the EVM storage with useless junk. 8)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants