-
-
Save etekis/1a2251963b458a18cb6e63a1a28eaa28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the contract instance using your contract's abi and address: | |
const contractInstance = web3.eth.contract(abi).at(contractAddress); | |
// Get user’s web3 address | |
var sender = web3.eth.accounts[0]; | |
// Call a function of the contract: | |
contractInstance.someFunction({ | |
from: sender, value: someValue, gas: limit | |
}, (err, res) => { /** do something with results **/ }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment