Skip to content

Commit

Permalink
Merge pull request scaffold-eth#906 from seaona/setpurpose-payable
Browse files Browse the repository at this point in the history
Make `setPurpose` function payable for fixing revert function on ExampleUI interactions
  • Loading branch information
codenamejason authored Oct 27, 2022
2 parents f21eb19 + 47e08e3 commit ce94844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hardhat/contracts/YourContract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ contract YourContract {
// what should we do on deploy?
}

function setPurpose(string memory newPurpose) public {
function setPurpose(string memory newPurpose) public payable {
purpose = newPurpose;
console.log(msg.sender,"set purpose to",purpose);
emit SetPurpose(msg.sender, purpose);
Expand Down

0 comments on commit ce94844

Please sign in to comment.