hey there, im trying to interact with a "write" function of my deployed smart contract from a specific account
Oct 29, 2018, 5:00 PM
What is the syntax? I am trying to use:
mycontract.myfunction.sendTransaction(params..., {from: myaccount });
mycontract.myfunction.sendTransaction(params..., {from: myaccount });
Is that correct?
... doesnt work haha
do u have any resource/doc where I can check it?
I tried a lot of forms... and I didnt get it
I tried a lot of forms... and I didnt get it
Oct 29, 2018, 5:03 PM
It should looks like this mycontract.methods.myfuncion().send({from: accounts[0], gas: '100000'})
Does anybody know what is this repo https://github.com/MyEtherWallet/MyEtherWallet. I thought it repo of myetherwallet.com, but it is not. Repo for myetherwallet.com is https://github.com/kvhnuke/etherwallet. I build sources from this repo, and it looks very differently from the site.
I received answer "This is the version 5 of MEW and other repo is the current version, version 5 is still under development".
Oct 31, 2018, 6:04 AM
what about the params?
Oct 31, 2018, 8:37 AM
mycontract.methods.myfuncion(param1, param2).send({from: accounts[0], gas: '100000'})
Oct 31, 2018, 8:38 AM
thanks, I will try it!
Oct 31, 2018, 8:47 AM
If function is read only, and marked as "public view" it could be excecuted with .call(). mycontract.methods.myfuncion(param1, param2).call() No gas or account required.
@migumar try zombie tutorial
https://cryptozombies.io/
Oct 31, 2018, 8:49 AM
I have already done it! Thanks anywayn
Oct 31, 2018, 9:24 AM
If a view function is called internally from another function in the same contract that is not a view function, it will still cost gas. This is because the other function creates a transaction on Ethereum, and will still need to be verified from every node. So view functions are only free when they're called externally.
( as per the cryptozombies tutorial )
( as per the cryptozombies tutorial )
Nov 9, 2018, 6:56 PM