I have deployed a contract to testnet which appears to function.
I have a function named contribute
which gets the ether from the msg.value. The function is below and doesn't take any arguments.
I call contribute
from JavaScript like this:
var res = contracts['CrowdFunder'].contract.contribute();
How do I specify ether to be sent when calling contribute
?
Here is contribute
which expects msg.value
function contribute() public
{
contributions.push(
Contribution({
amount: msg.value,
contributor: msg.sender
})
);
totalRaised += msg.value;
}