These are chat archives for ethereum/tutorials

12th
Mar 2018
Ayushya Devmurari
@pathfinder2104
Mar 12 2018 09:18
@helloEOS use this link to get your token
it has code in it
Rahul Anand
@anand011090
Mar 12 2018 09:49

Hi All, I am currently working with DAO1.0 code and want to simulate it using testrpc + truffle on my local machine . Can anyone of you help me regarding this.

Also, I want to know what are the changes that have happen in new DAO contract. Any documentation or suggests will do it for me. Thanks

Jehan-Gabriel de Brosses Berthier
@JGdBB
Mar 12 2018 11:29

Hi Guys,

I try to load the smart contract MyAdvancedToken on my privateNet.
I am using geth and I use the following commands :

var estimateGas = web3.eth.estimateGas({ from: web3.eth.defaultAccount, data: icoCompiled }); estimateGas = 1718743

var icoContract = icoFactory.new({from:eth.accounts[0],data:icoCompiled,gas: 1718743, gasPrice: web3.toWei(20, 'shannon') }, ......})

But I have a error: Error: Contract transaction couldn't be found after 50 blocks

Have you ever had this kind of error?
Thanks!

aerycrypto
@aerycrypto
Mar 12 2018 14:49
hi all
i want to create my own crypto..can anybody help mw?
*me?
lnairdavis
@lnairdavis
Mar 12 2018 18:46
Is there anyone that can help me create the contract for my ICO? I am willing to pay.
efecan26
@efecan26
Mar 12 2018 19:48
hello
Adam Skrodzki
@adamskrodzki
Mar 12 2018 22:09
@JGdBB I had this error in truffle tests when from test i did not return a promise and not used await
@aerycrypto what You mean by 'crypto' ?
Johannes Breytenbach
@websalesabc
Mar 12 2018 22:30
Hi all, I've been working through a number of Solidity courses but I cannot figure out why a number of functions in the token example contract https://www.ethereum.org/token do not work. The approveAndCall, burnFrom, and transferFrom functions keep giving me an error on execution. The error is transact to TokenERC20.approveAndCall errored: VM error: revert. revert The transaction has been reverted to the initial state. Note: The constructor should be payable if you send value. I am not sending an Eth value, only a token _value. Thanks
Adam Skrodzki
@adamskrodzki
Mar 12 2018 22:32
@websalesabc how You call that method ?
Johannes Breytenbach
@websalesabc
Mar 12 2018 22:33
I'm running the example code in Remix
Adam Skrodzki
@adamskrodzki
Mar 12 2018 22:34

as comment states approveAndCall
"Allows _spender to spend no more than _value tokens on your behalf, and then ping the contract about it"

Is ment to be used with smart contract

is spender address a smart contract?
does it implements tokenRecipient interface?
Johannes Breytenbach
@websalesabc
Mar 12 2018 22:36
OK, No I simply tried to use another remix account. Thanks
Adam Skrodzki
@adamskrodzki
Mar 12 2018 22:37
burnFrom and transferFrom need first a call of approve from the _from address unless value is zero
Johannes Breytenbach
@websalesabc
Mar 12 2018 22:39
I did "approve" the accounts before trying to execute these functions
Adam Skrodzki
@adamskrodzki
Mar 12 2018 22:40
what are parameters of invocation ?
they are in remix console
paste both for approval and transfer from
Johannes Breytenbach
@websalesabc
Mar 12 2018 22:55
I do enter the address _from, address _to and uint256 _value
"0x14723a09acff6d2a60dcdf7aa4aff308fddc160c", "0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db", 1000000
Adam Skrodzki
@adamskrodzki
Mar 12 2018 22:56
on what network do You test?
give transaction hash it will be easier
Johannes Breytenbach
@websalesabc
Mar 12 2018 22:58
Just trying to run it in Remix with the JavaScript VM
Adam Skrodzki
@adamskrodzki
Mar 12 2018 23:05
First i create token with parameters
10000,"test ","TST"
then I transfer from my account to second account 500 (so I have something to transferFrom)
"0x56947aC048452f75A64e2411CA140336cF939f7D",500
then I swith the account to the second account and approve the first one for 450
"0x94DA43C587c515AD30eA86a208603a7586D2C25F",450
then I swith back to first and transferFrom second one to the third one
"0x56947aC048452f75A64e2411CA140336cF939f7D","0x59A5aC4033dB403587e8BEAb8996EDe2F170413a",400
as a result third one has now 400
Johannes Breytenbach
@websalesabc
Mar 12 2018 23:06
Fantastic, thanks I'll give it a go
Adam Skrodzki
@adamskrodzki
Mar 12 2018 23:06
glad I could help
It worked for me on ropsten test network, so should work for You
btw using javaScript for so heavy contract is actually slow
get friendly with metamask if You are not already It boosts Remix significantly
Johannes Breytenbach
@websalesabc
Mar 12 2018 23:09
Thanks, I've played quite a bit with MetaMask and love it.
Johannes Breytenbach
@websalesabc
Mar 12 2018 23:14
Ahh, I got it. My mistake was that I did not approve from the second account but from the first. Thanks a million for your support.