Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Conversation

@vincentlg
Copy link

I propose this because I had trouble finding the syntax to do that (There may be a simpler way to indicate this...)

I propose this because I had trouble finding the syntax to do that (There may be a simpler way to indicate this...)
@eggplantzzz
Copy link
Contributor

Do we really want this? It seems like it might be more appropriate in the Solidity docs as it is mostly Solidity syntax. Is that right?

```
Here is the code to test the `payable` function `contribute` with a `string _message` in parameter

```javascript
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
```javascript
```solidity

@fainashalts fainashalts requested a review from haltman-at June 23, 2021 18:22
function testContribute() public {
// Expected contribute increase amountRaised
uint256 expected = 5 ether;
campaign.contribute.value(5 ether) ("my test message");
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that the .value syntax doesn't exist anymore in current versions of Solidity. We probably want this to be up to date, so the syntax would be campagain.contribute{value: 5 ether}("my test message").

@cds-amal cds-amal changed the title Add Testing ether transactions exemple Add Testing ether transactions example Jul 9, 2021
@eggplantzzz
Copy link
Contributor

Since this is out of date, should we close this PR?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants