I cant call me a pro at all. Rather newbie than pro, wishing to learn and develop. I`m sincerely asking you to help me.
I have the token and crowdsale contract (testing) which I deploy and initialize using solidity ^0.4.20
without any issues. But in the REMIX
I have an exclamation mark there like this:
Warning: Function state mutability can be restricted to pure function finalization() internal {
^
Spanning multiple lines.
No matter of what it still works fine (include finalization step).
But when I try to compile it with solidity ^0.4.21
(after adding emit
and some changes in ...............(this.balance);
to ...........(myAddress.balance);
with adding additional string above: address myAddress = this;
) - to remove all exclamation marks (except finalization()
)
Token deploys fine but the crowdsale contract gives me an error:
"Error: gas required exceeds allowance or always failing transaction"
Seems that its not enought just to make this changes (above). Did I miss anything?.
+
Could this finalization()
warning exclamation mark affect and breake everything in 4.21?
I saw people help each other here and it works very effective. So I decided to post my question as well.
Thank you in advance.