Skip to content

Update greeter contract for modern solc#15

Open
dangerousfood wants to merge 2 commits intoweb3j:masterfrom
dangerousfood:update-greeter-contract
Open

Update greeter contract for modern solc#15
dangerousfood wants to merge 2 commits intoweb3j:masterfrom
dangerousfood:update-greeter-contract

Conversation

@dangerousfood
Copy link
Copy Markdown

Greeter.sol has been updated to remove compiler errors in 0.5.0.

@conor10
Copy link
Copy Markdown
Contributor

conor10 commented Dec 13, 2018

How come the event and newGreeting method have been removed?

@dangerousfood
Copy link
Copy Markdown
Author

That was a mistake. Thank you for catching it. I will push another update.

Copy link
Copy Markdown
Contributor

@conor10 conor10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment re: memory declaration.

/* this runs when the contract is executed */
constructor (string _greeting) public {
/* This runs when the contract is executed */
constructor(string memory _greeting) public {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what was the reason for adding the memory declaration to strings? As function parameters is this not already implicit? I'd like to keep the code as simple as possible for users unfamiliar to Solidity, so I'd rather keep the memory declaration out if we can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants