I've deployed a contract into my testrpc network.
$ truffle deploy
Using network 'development'.
Running migration: 1_initial_migration.js
Deploying Migrations...
Migrations: 0x9ec9e7fedb27068a70aedf453012bbced070d1e0
Saving successful migration to network...
Saving artifacts...
Running migration: 2_deploy_contracts.js
Deploying CrowdFunding...
CrowdFunding: 0x61a235a21078920353dbb719e7c1e6bd8c8e182b
Saving successful migration to network...
Saving artifacts...
How do I get the address for the function contribute
(from the example code for https://dappsforbeginners.wordpress.com/tutorials/contracts-that-send-transactions/) that looks like this:
function contribute(uint campaignID) {
Campaign c = campaigns[campaignID];
Funder f = c.funders[c.numFunders++];
f.addr = msg.sender;
f.amount = msg.value;
c.amount += f.amount;
}
I assume I need to get the function address, and then provide that as a parameters inside the MetaMask send dialog under transaction data
. I can send the eth as the amount, correct? Then, msg.value
and msg.sender
are provided as context to the call.