These are chat archives for Nethereum/Nethereum

22nd
Sep 2017
amjadDev
@amjadDev
Sep 22 2017 09:34
Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()". if(msg.sender!=minter) throw; ^---^
shoud be return or anything else
@juanfranblanco @kaista82_twitter
kai
@kaista82_twitter
Sep 22 2017 09:37
Sorry I'm confused, whats the issue?
oh
return will stop processing the following code
so
its a start
amjadDev
@amjadDev
Sep 22 2017 09:37
tring to compile solidity coin contract
using truffle
geting this error
kai
@kaista82_twitter
Sep 22 2017 09:38
well its a warning so should still compile
but
depends
if thats a deal breaker maybe swap for revert
if that will kill the tx and not let it proceed
amjadDev
@amjadDev
Sep 22 2017 09:38
yes just to ensure that this is not big issue?
ok thanks
kai
@kaista82_twitter
Sep 22 2017 09:39
its just telling you throw no longer exists, or wont soon
and to use one of the two new functions
so i wouldnt be too concerned no
amjadDev
@amjadDev
Sep 22 2017 12:38
i want to deploye contract abi json using private public key no using t geth node account with lock unlock
@juanfranblanco
var transactionHash = await Web3.Eth.DeployContract.SendRequestAsync(contractByteCode, Account, new HexBigInteger(900000));
is this work
kai
@kaista82_twitter
Sep 22 2017 12:55
oh
erm
just pass Account object into new Web3()
so
var _web3 = new Web3(_account);
then deploy away
amjadDev
@amjadDev
Sep 22 2017 12:56
i am not able to locate Account any where
kai
@kaista82_twitter
Sep 22 2017 12:57
        var _account = new Account(privateKey); OR Account.LoadFrom....
        var _web3 = new Web3(_account);
you want to know where your keystore is?
amjadDev
@amjadDev
Sep 22 2017 12:57
namespace please?
Account
Juan Blanco
@juanfranblanco
Sep 22 2017 12:57
Web3.Accounts.Account
you need your private key as per kai's comments
kai
@kaista82_twitter
Sep 22 2017 12:59
sup Juan, how are you mate
Juan Blanco
@juanfranblanco
Sep 22 2017 12:59
not bad, yourself?
amjadDev
@amjadDev
Sep 22 2017 12:59
yes @juanfranblanco
^^ some info on accounts
kai
@kaista82_twitter
Sep 22 2017 13:00
yeah im good thanks mate, althought ive just gone super tired all of a sudden
Juan Blanco
@juanfranblanco
Sep 22 2017 13:00
ha ha it happens
same here, might be brain overload
or winter is coming
how is ipfs?
kai
@kaista82_twitter
Sep 22 2017 13:01
oh i still have the problem i didnt go back to it
i will this weekend
the encoding issue
so confusing
doesnt error anymore but when i go to look no good
blank now no error
but no html either
public async Task<MerkleNode> Upload(string data = "<HTML><HEAD></HEAD><BODY style=\"background-color:#111;color:#999\"><h1>Kai's Profile</h1></BODY></HTML>")
{
        using (var _stream = new MemoryStream())
        {
            using (var _writer = new StreamWriter(_stream))
            {
                _writer.Write(data);

                _stream.Position = 0;

                var _addResponse = await _ipfsClient.Add(new IpfsStream("index.htm", _stream));
                //var _pinResponse = _ipfsClient.Pin.Add(System.Text.Encoding.UTF8.GetString(_addResponse.Hash.Value), false);

                return _addResponse;
            }

        }
    }
textBox.Text = _response.Hash.ToString();
kai
@kaista82_twitter
Sep 22 2017 13:09
hmm always seems to give the same hash wtf
Juan Blanco
@juanfranblanco
Sep 22 2017 13:12
are you submitting the same file ? :D
you will get always the same hash
kai
@kaista82_twitter
Sep 22 2017 13:18
no im changing it and its always returning a blank file, weird, pretty sure its just me not realising something, ive only spent 10 mins on it ill focus properly later
Juan Blanco
@juanfranblanco
Sep 22 2017 13:18
oh you want infura
not the ipfs gateway
kai
@kaista82_twitter
Sep 22 2017 13:19
?
im connecting to 5001 on infura, only using the gateway to see the file
kai
@kaista82_twitter
Sep 22 2017 13:20
yup
blank
amjadDev
@amjadDev
Sep 22 2017 13:40
unknownaccount.jpg
unknoiwn account
error
kai
@kaista82_twitter
Sep 22 2017 13:42
oh yeah it may look in keystore for the file, Juan is the guy you need I think he may have a plan
amjadDev
@amjadDev
Sep 22 2017 13:46
@juanfranblanco
Juan Blanco
@juanfranblanco
Sep 22 2017 13:52
@amjadDev you have not initialise web3 with the account have you?
amjadDev
@amjadDev
Sep 22 2017 14:07
this is how m doing
Web3 web3 = new Web3("http://localhost:8545");
var abi = @"[{""""constant"""": true, """
var byteCode = "0x6060604
var _account = new Account(privatekey);
//var _web3 = new Web3(_account);
var txId = await web3.Eth.DeployContract.SendRequestAsync(abi, byteCode, _account.Address, new HexBigInteger(4000000));
i think not
Juan Blanco
@juanfranblanco
Sep 22 2017 14:07
move the account to the top
and use it as part of the constructor
amjadDev
@amjadDev
Sep 22 2017 14:09
what about pointing to geth node new Web3("http://localhost:8545");?
insufficient funds for gas * price + value
anywat to calculate this
?
Juan Blanco
@juanfranblanco
Sep 22 2017 14:12
Web3 has 2 parameters, check the overloads
use EstimateGas
kai
@kaista82_twitter
Sep 22 2017 14:33
cheers Juan ill read that properly later much apprecaited
amjadDev
@amjadDev
Sep 22 2017 14:45
insufficient funds for gas * price + value
after using this
var gas = await web3.Eth.DeployContract.EstimateGasAsync(abi, byteCode, _account.Address);
have 3 ether in account
kai
@kaista82_twitter
Sep 22 2017 14:46
use the overload
, new BigHexInteger(400000) or whatever
amjadDev
@amjadDev
Sep 22 2017 14:47
when i am incresing its show gas limit increase
kai
@kaista82_twitter
Sep 22 2017 14:48
?
amjadDev
@amjadDev
Sep 22 2017 14:48
but can't found that point where gas excute
,new HexBigInteger(gas.Value * 16)
exceeds block gas limit
gas=302999
insufficient funds for gas price + value
for
var txId = await web3.Eth.DeployContract.SendRequestAsync(abi, byteCode, _account.Address,new HexBigInteger(gas.Value
15));// YOUR PARAMETERS FOR CONTRACT);
,new HexBigInteger(gas.Value * 15)
kai
@kaista82_twitter
Sep 22 2017 14:52
right click sendrequestasync click goto definition make sure its hitting the overload you expect
as the overloads on that can be a bit strange soemtimes
just as a first thing to check
amjadDev
@amjadDev
Sep 22 2017 15:09
ok
Juan Blanco
@juanfranblanco
Sep 22 2017 15:18
you can always use named parameters https://www.dotnetperls.com/named-parameters
kai
@kaista82_twitter
Sep 22 2017 15:47
yeah if thats the problem, named params ftw
Luciano Bertenasco
@lbertenasco
Sep 22 2017 23:56

Hi guys, I’m calling PersonalNewAccountUnityRequest from Unity with

var createAccountRequest = new PersonalNewAccountUnityRequest ("https://rinkeby.infura.io/");
yield return createAccountRequest.SendRequest(password);

But I keep getting the same error: Generic/unknown HTTP error
I ‘m able to get the balance of an account, but create a new account always fails.
Does anyone have a clue on what’s the error here?
All help is greatly appreciated :)