Timeline for Function that returns address if is passed or msg.sender
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 11, 2022 at 7:13 | answer | added | aakash4dev | timeline score: 1 | |
Jan 3, 2019 at 0:17 | answer | added | Rick Park | timeline score: 3 | |
Jan 3, 2019 at 0:00 | comment | added | AnAllergyToAnalogy | As has been mentioned a few times, you can't have optional parameters. But the solution to your problem may best be left outside Solidity, and dealt with on the front-end. It may be simpler (and cheaper for users!) if you do this logic all on the front-end and then just pass the appropriate address to your contract function. I don't know the specifics of what you're trying to implement but it's always a good idea to ask "does this logic need to be done on-chain?" | |
Jan 2, 2019 at 23:44 | comment | added | user19510 |
The latter (this.contract.showsender() ) is invalid, even if it's allowed. The function takes a parameter, and you haven't passed one. Try this.contract.showsender("0x000000...") .
|
|
Jan 2, 2019 at 21:26 | history | edited | Peter | CC BY-SA 4.0 |
improving description and need
|
Jan 2, 2019 at 20:36 | answer | added | Rob Hitchens | timeline score: 1 | |
Jan 2, 2019 at 19:57 | comment | added | user19510 | "it doesn't work" isn't a good description of a problem. If you can tell us what you tried, what happened, and what you expected to happen instead, we can help. But the code does exactly what it says it does. | |
Jan 2, 2019 at 19:46 | history | edited | Shane Fontaine | CC BY-SA 4.0 |
added 3 characters in body; edited tags
|
Jan 2, 2019 at 19:45 | answer | added | Shane Fontaine | timeline score: 0 | |
Jan 2, 2019 at 19:45 | review | First posts | |||
Jan 2, 2019 at 20:06 | |||||
Jan 2, 2019 at 19:42 | history | asked | Peter | CC BY-SA 4.0 |