These are chat archives for Nethereum/Nethereum

17th
Jan 2018
She Jong Shon
@kkagill
Jan 17 2018 00:29
Hello Juan, I just finished testing dapp with node.js, truffle & metamask. Got interested in your library and just wondering if creating dapp using nethereum with asp.net core web api && frontend angular 4 && metamask would work out. Can Nethereum also connect to rinkeby for testing?
Maximilian Weber MWC
@CineTekDev_twitter
Jan 17 2018 01:48
nethereum can connect to any node/network - my team is working with Unity3D, React, Express and Amazon Lightsail - all running flawlessly together. There are some heavy liftings you might have to do (at least for our setup) but once everything is connected it works like a blast
Jonathan Smirnoff
@jonathansmirnoff
Jan 17 2018 16:08

Hi! I'm working in a project which uses RSK. I followed this tutorial title to setup a standalone RSK node.
I used truffle to interact with the node using web3 without any issue.
I expected to use Nethereum to do the same. But I have a problem. When I try to get the accounts using this:

var web3 = new Web3("http://localhost:4444/");
var accounts = await web3.Eth.Accounts.SendRequestAsync();

I have this error: 'unsupported media type 415'.

In general every action that I do I have the same error. It seems that it is a network related problem.

I've tried different things but I haven't figure out how to solve the issue.

Anyone have any idea? thanks!

She Jong Shon
@kkagill
Jan 17 2018 17:27
@CineTekDev_twitter Thanks! good to know.
DesignBrian
@Thought_2Life_twitter
Jan 17 2018 18:58
Hey. I wanted to chat with someone who is pretty well rounded with smart contracts in general. I can code pretty well just have a hard time wrapping my head around this. I see the inegration of Unity but before I jump in i wanted to get a better understanding of best workflow
She Jong Shon
@kkagill
Jan 17 2018 20:03

I'm trying to deploy contract following this tutorial, but seems like it's a bit old to follow now. I'm using .net core 2.0 and geth 1.7.3. When the debugger hits the line where it unlocks account or getting transactionHash, the program suddenly terminates.

    public async Task TestDeployContract()
    {
        var senderAddress = "0x12890d2cce102216644c59daE5baed380d84830c";
        var password = "password";
        var abi = @"[{""constant"":false,""inputs"":[{""name"":""val"",""type"":""int256""}],""name"":""multiply"",""outputs"":[{""name"":""d"",""type"":""int256""}],""payable"":false,""stateMutability"":""nonpayable"",""type"":""function""},{""inputs"":[{""name"":""multiplier"",""type"":""int256""}],""payable"":false,""stateMutability"":""nonpayable"",""type"":""constructor""}]";
        var byteCode = "0x6060604052341561000f57600080fd5b6040516020806100cf833981016040528080516000555050609a806100356000396000f300606060405260043610603e5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631df4f14481146043575b600080fd5b3415604d57600080fd5b60566004356068565b60405190815260200160405180910390f35b506000905600a165627a7a72305820b5f50780088314a911e350ceb893b82d6201da10f5399de0d35b8597dbf3296f0029";

        var multiplier = 7;           
        var web3Geth = new Web3Geth();
        // Terminates from here. Commenting out unlockAccountResult doesn't make any difference.
        var unlockAccountResult = await web3Geth.Personal.UnlockAccount.SendRequestAsync(senderAddress, password, new HexBigInteger(120));                     
        var transactionHash = await web3Geth.Eth.DeployContract.SendRequestAsync(abi, byteCode, senderAddress, multiplier);
        ....
    }

Did anyone experience this? seems like the request is not connecting to geth. startgeth batch file is running fine.

She Jong Shon
@kkagill
Jan 17 2018 22:36
I commented out unlockAccountResult, and increased gas for transactionHash and it worked. But still unlockAccountResult hangs.
She Jong Shon
@kkagill
Jan 17 2018 22:48
I can probably unlock it using geth console ex: personal.unlockAccount(eth.accounts[1], "password", 300), but just want to know why it hangs.
She Jong Shon
@kkagill
Jan 17 2018 23:44

I changed startgeth.bat
geth --networkid 4224 --mine --datadir "~/private" --nodiscover --rpc --rpcport "8545" --port "30303" --rpccorsdomain "*" --nat "any" --rpcapi eth,web3,personal,net --unlock 0 --password password.sec

and opened up another console to attach geth, and it worked.

She Jong Shon
@kkagill
Jan 17 2018 23:59

@juanfranblanco But the last line

    var result = await multiplyFunction.CallAsync<int>(7);

returns 0. Any idea?