ethereum-org-website icon indicating copy to clipboard operation
ethereum-org-website copied to clipboard

Transfer token tutorial throws: DeclarationError: Event with same name and parameter types defined twice.

Open vladx777 opened this issue 3 years ago • 5 comments

https://github.com/ethereum/ethereum-org-website/blob/864d77178dee04e80d5f983b3911cc351118fb26/src/content/developers/tutorials/transfers-and-approval-of-erc-20-tokens-from-a-solidity-smart-contract/index.md

The above tutorial no longer works with current solidity versions, which throw this error:

DeclarationError: Event with same name and parameter types defined twice.

This is because Approval and Transfer events are declared more than once.

How could it be updated not to have this error?

vladx777 avatar Feb 07 '22 21:02 vladx777

This issue is stale because it has been open 45 days with no activity.

github-actions[bot] avatar Mar 25 '22 08:03 github-actions[bot]

The problem is NOT the Hysterium of ETHERIUM being #blocked, more than the #number#s of "POSSIBLE Ethereum 1&2.0 tokens", according to CoinBase, RISING 100k (IN BOTH ETH1&2.0) tokens since the BEGINNING of this year(ie. 120million ETH 1&2.0 tokens available, ON January 2022, to 120.1 ETH1&2.0 tokens IN February 2022, to NOW; Where CoinBase is showing there ARE 120.8Million ETH1&2.0 tokens PRESENTLY, May 2022, EQUALLING "121.6 TOTAL ETH1&2.0 tokens" Today, Though Eth 2.0 is STILL Not even available to use!? Appearing as if ETHERIUM 2.0 is EQUALLY being "staked" is a Major Mining&Proof-Of-Stake RIP-OFF! Not only that, the increase of NOW 1.8MILLION MORE of Both ETHERIUMS 1&2.0, is MAKING MY Current ETHERIUM 1 tokens DEPRECIATE in value ALSO!! ADDING TWICE AS MANY tokens to "Balance out"_"APPEAR" as if ETH1&2.0 ARE Equal, while the "staked" ETH2.0 CAN'T Even be Touched, is the BIGGEST RIP OFF I HAVE EVER SEEN IN MY ENTIRE LIFE(lol next to Blu-ray, merely ENHANCING the Color MORE, to "appear" better than HD 🙂)! WHO KEEPS ADDING THESE "NEW TOKENS" that @CoinBase is reporting, FOR BOTH ETHERIUM 1&2.0?! Because whomever is the "Extra Tokens Adder," is Not Only DEPRECIATING the VALUE of BOTH ETHERIUMS 1&2.0, but putting these "Mysteriously Added $1.6MILLION New Eth 1&2.0 tokens" in their OWN pockets(ie. Vitalik Buterin's "Custom Oil Painting" of Himself, for his Twitter Photo), while the REST OF US Have to just WATCH, as the #Number#s of ETHERIUMS 1&2.0 tokens KEEP going UP(while also watching the prices keep going DOWN) in the process! Dehumanizing others because of COLA(Cost Of Living Adjustment) going UP 5.9%(the Highest since 1981, when the World Wide Web came out), just to Maintain their Rich Living Lifestyle (#Greedily) was NOT what Ethereum was Originally invented For, nor originally "All About"! It's a Community Currency, which iss now seeming to become the greedy bank-like/centralized architecture the Whole Idea of Ethereum was AGAINST to start with! Ethereum Cant survive without BitCoin, and Vise Versa too! Let's ALSO please Keep in mind that Public Service Providers, HERE IN the USA(&Other countries), HAVE been starting 2B Paid for by BitCoin &transfered through ETHERIUM, to $$$$! iSalute Ethereum for the Main Mission Statement's ideal of "promoting the general welfare,to ENSURE Domestic Tranquility"!,but ADDING MORE TOKENS to Both ETHERIUMS 1&2.0 Diviates THAT ENTIRE MO(Modus Operandi) of said "Mission Statement" while Also doing the SAME "for" the Communities, that CryptoCurrency was designed for to begin with!

Thank you for your time, CAPT David Simonton-Valento, O-3_USAF, AAS, BT-BAS, Sap-Certification

DaveyD233 avatar May 20 '22 05:05 DaveyD233

This issue is stale because it has been open 45 days with no activity.

github-actions[bot] avatar Jul 06 '22 08:07 github-actions[bot]

Had and still have the same problem.

mfurkanatac avatar Jul 31 '22 11:07 mfurkanatac

This issue is stale because it has been open 45 days with no activity.

github-actions[bot] avatar Sep 15 '22 08:09 github-actions[bot]

I found out that you don't need to re-declare the event on the contract since it will be the same line of code they probably reducted to not re-declare on the contract. So just delete the event declerations that does exist in the interface. Better option can be keeping your events inside your interface and you can focus on the logic part on contract side.

karasakalmt avatar Nov 28 '22 16:11 karasakalmt

If any Solidity devs out there would like to patch this tutorial, open to it =)

wackerow avatar Jan 08 '24 17:01 wackerow

I can fix it @wackerow

Edit: it is already fixed in the dev branch https://github.com/ethereum/ethereum-org-website/blob/dev/src/content/developers/tutorials/transfers-and-approval-of-erc-20-tokens-from-a-solidity-smart-contract/index.md

karasakalmt avatar Jan 08 '24 20:01 karasakalmt

Ok great! Will close this out... appreciate you taking a look @karasakalmt

wackerow avatar Jan 08 '24 22:01 wackerow