These are chat archives for Nethereum/Nethereum

23rd
Feb 2018
She Jong Shon
@kkagill
Feb 23 2018 00:05

@juanfranblanco When I send transaction with data and call constant function to see that data, it is working fine using nethereum. Ex: var transactionHash = await fPlaceBet.SendTransactionAsync(tInput, fInput); Now I tried with metamask to submit transaction with data (angular 5) and called constant function (nethereum); it always returns an empty data.

angular5:

this.MyBetting.deployed().then((instance) => {
        return instance.placeBet(this.schedule.matchId, 
                                 this.schedule.homeTeamScore, 
                                 this.schedule.awayTeamScore, 
                                 this.schedule.bettingPrice, {
            from: this.account,
            value: this.schedule.bettingPrice,
            gas: 50000
        });
      })
      .then((value) => {
        console.log(value);
      })
      .catch((e) => {
        console.log(e);
      });

nethereum:

public async Task<List<BetterBettingInfo>> GetBetterBettingInfo(string senderAddress)
        {           
            var contract = web3.Eth.GetContract(abi, contractAddress);
            var fGetBetterBettingInfo = contract.GetFunction("getBetterBettingInfo");

            await SendTransactionAndWaitForReceipt(fGetBetterBettingInfo, senderAddress);

            var bbinfo = await fGetBetterBettingInfo.CallDeserializingToObjectAsync<GetBetterBettingInfo>
(senderAddress);
            // bbinfo is null

I tested this in geth local environment. If it returns data when I submitted transaction using nethereumvar transactionHash = await fPlaceBet.SendTransactionAsync(tInput, fInput); and doesn't return data when I submitted transaction through metamask, then I guess it's a problem in angular code? Metamask transaction is successful btw.

Enrique Chavez
@Tmeister
Feb 23 2018 01:59
Hi all, what's the best way to call the approve and transferFrom in a ERC20 contract using Nethereum, I have 3 account, A) Manager Account, B) Buyer Account C) Seller Account I want to made a transfer from B to C using A to paid the gas transaction. Not sure if I have to use ManagedAccount and then call this two functions signed?
var approveFunction = contract.GetFunction("approve");
var transferFromFunction = contract.GetFunction("transferFrom");
Juan Blanco
@juanfranblanco
Feb 23 2018 06:45
@Astrovicis did you get sorted?
check the FlappyBird sample
RevVivek
@RevVivek
Feb 23 2018 06:49
How to get the private key for a address using the Nethereum
Juan Blanco
@juanfranblanco
Feb 23 2018 06:49
@kkagill you should get something, at least from metamask, check the code generated by truffle
@RevVivek if it is not yours you cannot
otherwise depends how you created the account
RevVivek
@RevVivek
Feb 23 2018 06:50
At the time of creating
Can it be possible
?
Juan Blanco
@juanfranblanco
Feb 23 2018 06:50
how
do you create it
RevVivek
@RevVivek
Feb 23 2018 06:50
web3.Personal.NewAccount.SendRequestAsync(Password).GetAwaiter().GetResult();
in this way
Juan Blanco
@juanfranblanco
Feb 23 2018 06:50
you cannot
you will need to go to your keystore folder in geth (i assume)
and open the file using the KeyStore
library
with your password
RevVivek
@RevVivek
Feb 23 2018 06:51
Ok
Juan Blanco
@juanfranblanco
Feb 23 2018 06:51
or you can just create your own account using Nethereum
and then save it using the same format as the keystore
@Tmeister I want to made a transfer from B to C using A to paid the gas transaction. ?
RevVivek
@RevVivek
Feb 23 2018 06:53
Is there any other method where it will return me address and private key both
Juan Blanco
@juanfranblanco
Feb 23 2018 06:55
@Tmeister it gets complicated, but somehow B needs to give permissions to A to do the transfer
@RevVivek no
RevVivek
@RevVivek
Feb 23 2018 06:56
Alright
thanks
that might help
She Jong Shon
@kkagill
Feb 23 2018 06:56
@juanfranblanco
alt
My transaction is successful what do you mean by I should check code generated by truffle?
Juan Blanco
@juanfranblanco
Feb 23 2018 06:57
I am guessing that you are using Truffle to generate your contract code
so you can debug or check when the transaction receipt or transaction is getting returned from there
that is what I meant
She Jong Shon
@kkagill
Feb 23 2018 06:58
ok
Juan Blanco
@juanfranblanco
Feb 23 2018 06:59
the overall design is
  1. you create an instance of web3
  1. specific methods are intercepted by the metamask provider (metamask takes control of them)
(3) these are normally but not limited to GetAccounts, SendTransaction, etc
(4) when intercepted it behaves the same as your normal web3
so it will "return" mainly do a callback with the response (async)
when you create a contract with truffle, it creates a "service" that wraps all the methods (similar to Netherum generating a service)
for the contract
so the first point to check is in there :)
Juan Blanco
@juanfranblanco
Feb 23 2018 07:04
then go down the rabbit hole
She Jong Shon
@kkagill
Feb 23 2018 07:13
hmm when i create a contract with truffle, i usually go to truffle console and do migrate which creates build folder and json files
so i should check those you mean?
Juan Blanco
@juanfranblanco
Feb 23 2018 07:14
yeah
you will see the inner workings
She Jong Shon
@kkagill
Feb 23 2018 07:15
ok
She Jong Shon
@kkagill
Feb 23 2018 07:25
hmm funny thing is
when I created a contract with truffle and submitted transaction with nethereum and called constant function with also nethereum it works
so i guess contract creation does not have a problem tho
Juan Blanco
@juanfranblanco
Feb 23 2018 07:26
oh no
at the end of the day it is the same process
everyone tries to simplify it in different ways
She Jong Shon
@kkagill
Feb 23 2018 07:29
hmm... it makes sense with nethereum but can't seem to figure it out with metamask
Juan Blanco
@juanfranblanco
Feb 23 2018 07:30
metamask is simple
it just injects a web3 with a provider
the provider replaces some rpc methods
with their own
so it can use your private keys in metamask
if you look at the dapphybrid in Nethereum it does the same
She Jong Shon
@kkagill
Feb 23 2018 07:31
yeah juan would it be because I instantiate web3 instance two times? once with sendtransaction and once with calling constant method
Juan Blanco
@juanfranblanco
Feb 23 2018 07:32
ahh yeah
in javascript you need to create only one instance
for this scenario
window.addEventListener('load', function() {

  // Checking if Web3 has been injected by the host
  if (typeof web3 !== 'undefined') {
    // Use the host provider
    window.web3 = new Web3(web3.currentProvider);
  } else {
    //default settings
    window.web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
  }
  // Now you can start your app & access web3 freely:
  startApp()

})
She Jong Shon
@kkagill
Feb 23 2018 07:33
oh man
that could be the cause
Juan Blanco
@juanfranblanco
Feb 23 2018 07:33
so mainly you are using the Web3 of metamask
She Jong Shon
@kkagill
Feb 23 2018 07:34
yea
Juan Blanco
@juanfranblanco
Feb 23 2018 07:34
well the provider
in that scenario
just for fun this is the DappHybrid https://github.com/Nethereum/Nethereum.DappHybrid
She Jong Shon
@kkagill
Feb 23 2018 07:35
I instantiate web3 instance on each component (angular)
  if (typeof window.web3 !== 'undefined') {
        console.warn('Using web3 detected from external source. If you find that your accounts don\'t appear or you have 0 MetaCoin, ensure you\'ve configured that source properly. If using MetaMask, see the following link. Feel free to delete this warning. :) http://truffleframework.com/tutorials/truffle-and-metamask');       
        // Use Mist/MetaMask's provider
        this.web3 = new Web3(window.web3.currentProvider);
    } else {
        console.warn('No web3 detected. Falling back to http://localhost:8545. You should remove this fallback when you deploy live, as it\'s inherently insecure. Consider switching to Metamask for development. More info here: http://truffleframework.com/tutorials/truffle-and-metamask');         
        // fallback - use your fallback strategy (local node / hosted node + in-dapp id mgmt / fail)
        this.web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'));
    }

    this.MyBetting.setProvider(this.web3.currentProvider);
so I need to just do it once initially
dapphybrid nice
Juan Blanco
@juanfranblanco
Feb 23 2018 07:35
well you are using the same provider
She Jong Shon
@kkagill
Feb 23 2018 07:36
you have so many different scenarios :)
Juan Blanco
@juanfranblanco
Feb 23 2018 07:36
ha ha well slowly getting there
She Jong Shon
@kkagill
Feb 23 2018 07:37
ok so juan since i am instantiating one web3 instance initially when I submit transaction from angular
and trying to call constant function from nethereum
would this work?
because nethereum also instantiates web3 instance by itself
Juan Blanco
@juanfranblanco
Feb 23 2018 08:29
yeah
because nethereum in that scenario is not signing the transaction
just getting the state from the node
She Jong Shon
@kkagill
Feb 23 2018 08:34
yeah that's what I thought. hmm i just tried with submitting transaction from angular and called constant function from nethereum
it didn't return any data
so far,
  1. deployed contract from truffle, transaction&calling constant function using nethereum returns data
  2. deployed contract from truffle, transaction from angular works (metamask), calling constant function using angular returns no data (two web3 instances, haven't tried with one instance yet)
  3. deployed contract from truffle, transaction from angular works (metamask), calling constant function using nethereum returns no data
web3 = new Web3Geth();
contract = web3.Eth.GetContract(abi, "0xdb5c56ecc3e241d3b5def4eb13c82885c12fe30f");
var fGetBetterBettingInfo = contract.GetFunction("getBetterBettingInfo");
await SendTransactionAndWaitForReceipt(fGetBetterBettingInfo, senderAddress);
var bbinfo = await fGetBetterBettingInfo.CallDeserializingToObjectAsync<GetBetterBettingInfo>(senderAddress);
same contract address I deployed using truffle
tested in geth local environment
Juan Blanco
@juanfranblanco
Feb 23 2018 09:01
maybe the address is not set in web3 (javascript)
She Jong Shon
@kkagill
Feb 23 2018 09:07

hmm once I deploy contract via truffle, I go to build folder and copy the address in MyBetting.json file

  "networks": {
    "4224": {
      "events": {},
      "links": {},
      "address": "0xdb5c56ecc3e241d3b5def4eb13c82885c12fe30f"
    }
  },

and pass it in to GetContract parameter in nethereum.

so the address should be correct i guess
is this what you were saying?
Juan Blanco
@juanfranblanco
Feb 23 2018 09:22
no I meant the localhost:8545
She Jong Shon
@kkagill
Feb 23 2018 09:26
metamask's private network is set to localhost 8545 and geth --rpcport is 8545

when I submit transaction from metamask, I see that in geth

alt

Juan Blanco
@juanfranblanco
Feb 23 2018 09:52
so what about the other instances of web3 you create?
do they default to them
(just wondering)
She Jong Shon
@kkagill
Feb 23 2018 09:53
so one instance from angular (metamask transaction)
and one instance from var web3 = new Web3Geth();
Juan Blanco
@juanfranblanco
Feb 23 2018 09:53
ah ok
She Jong Shon
@kkagill
Feb 23 2018 09:53
to call constant function
Juan Blanco
@juanfranblanco
Feb 23 2018 09:54
so both point to localhost then
She Jong Shon
@kkagill
Feb 23 2018 09:54
yes
default is pointing to localhost in nethereum right?
Juan Blanco
@juanfranblanco
Feb 23 2018 09:54
yeah
She Jong Shon
@kkagill
Feb 23 2018 09:55
so my guess is metamask does not store data into the network?
when i send transaction
so the constant function can't grab it
Juan Blanco
@juanfranblanco
Feb 23 2018 09:55
metamask sends the transaction
check in your geth console
if it has pending transactions
She Jong Shon
@kkagill
Feb 23 2018 09:56
yeah it is successful
juan
Juan Blanco
@juanfranblanco
Feb 23 2018 09:56
so then metamask has submitted it
She Jong Shon
@kkagill
Feb 23 2018 09:57
i'm sending four parameters and at the same time send ether
Juan Blanco
@juanfranblanco
Feb 23 2018 09:57
so the problem is just reading the data
from the browser no?
She Jong Shon
@kkagill
Feb 23 2018 09:57
from nethereum
Juan Blanco
@juanfranblanco
Feb 23 2018 09:58
so you cannot read it from nethereum
She Jong Shon
@kkagill
Feb 23 2018 09:58
correct
Juan Blanco
@juanfranblanco
Feb 23 2018 09:58
ahh
and you have the contract address
correct?
and you want to get the data
She Jong Shon
@kkagill
Feb 23 2018 09:58
correct
        var fGetBetterBettingInfo = contract.GetFunction("getBetterBettingInfo");
        await SendTransactionAndWaitForReceipt(fGetBetterBettingInfo, senderAddress);
        var bbinfo = await fGetBetterBettingInfo.CallDeserializingToObjectAsync<GetBetterBettingInfo>(senderAddress);
Juan Blanco
@juanfranblanco
Feb 23 2018 09:58
has it deployed succesfully
She Jong Shon
@kkagill
Feb 23 2018 09:58
bbinfo is null
Juan Blanco
@juanfranblanco
Feb 23 2018 09:58
check
web3.Eth.GetCode.SendReqeuestAsync(contractAddress)
if it returns "0x"
it has not deployed succesfully
She Jong Shon
@kkagill
Feb 23 2018 09:59
oh nice
i will check
Juan Blanco
@juanfranblanco
Feb 23 2018 09:59
it might be you are not supplying enough gas
or just an error in your constructor
but the transaction will be submitted
regardles
She Jong Shon
@kkagill
Feb 23 2018 10:00
   public ContractRequestService()
        {
            web3 = new Web3Geth();
            contract = web3.Eth.GetContract(abi, "0xdb5c56ecc3e241d3b5def4eb13c82885c12fe30f"); 
        }
Juan Blanco
@juanfranblanco
Feb 23 2018 10:00
yes that mainly creates an instance of the Contract object
does not go and validate GetCode
use this web3.Eth.GetCode.SendReqeuestAsync(contractAddress)
She Jong Shon
@kkagill
Feb 23 2018 10:05
I see this
alt
Juan Blanco
@juanfranblanco
Feb 23 2018 10:06
you need to await it
or call result
She Jong Shon
@kkagill
Feb 23 2018 10:06
right
I get the result
alt
Juan Blanco
@juanfranblanco
Feb 23 2018 10:10
oh so it is fine
it has deployed
await SendTransactionAndWaitForReceipt(fGetBetterBettingInfo, senderAddress);
what do you do above
is that related?
She Jong Shon
@kkagill
Feb 23 2018 10:12
private async Task<TransactionReceipt> SendTransactionAndWaitForReceipt(Function f, string senderAddress)
        {
            var tInput = new TransactionInput { From = senderAddress, Gas = new HexBigInteger(3000000) };

            return await f.SendTransactionAndWaitForReceiptAsync(tInput);
        }
wait to be mined
Juan Blanco
@juanfranblanco
Feb 23 2018 10:13
ah ok
She Jong Shon
@kkagill
Feb 23 2018 10:13
so it is deployed, everything points to localhost 8545
Juan Blanco
@juanfranblanco
Feb 23 2018 10:13
yeah
She Jong Shon
@kkagill
Feb 23 2018 10:14
but still can't grab data
Juan Blanco
@juanfranblanco
Feb 23 2018 10:14
so you should get results
GetBetterBettingInfo
is that ok
She Jong Shon
@kkagill
Feb 23 2018 10:15
yeah it's okay
    [FunctionOutput]
    public class GetBetterBettingInfo
    {
        [Parameter("uint256[]", "matchId", 1)]
        public List<BigInteger> MatchId { get; set; }

        [Parameter("uint[]", "homeTeamScore", 2)]
        public List<uint> HomeTeamScore { get; set; }

        [Parameter("uint[]", "awayTeamScore", 3)]
        public List<uint> AwayTeamScore { get; set; }

        [Parameter("uint[]", "bettingPrice", 4)]
        public List<uint> BettingPrice { get; set; }
    }
  1. deployed contract from truffle, transaction&calling constant function using nethereum returns data
so it is working
Juan Blanco
@juanfranblanco
Feb 23 2018 10:15
ah
now im lost you said nethereum was not working
She Jong Shon
@kkagill
Feb 23 2018 10:16
in the geth, all the recipient points to the contract address
:)
so far,
  1. deployed contract from truffle, transaction&calling constant function using nethereum returns data
  2. deployed contract from truffle, transaction from angular works (metamask), calling constant function using angular returns no data (two web3 instances, haven't tried with one instance yet)
  3. deployed contract from truffle, transaction from angular works (metamask), calling constant function using nethereum returns no data
so first one = nethereum works
mystery
so I'm trying the third one
maybe it's not working because i'm storing and transfering ether at the same time via metamask?
 function placeBet(uint256 _matchId, 
                    uint _homeTeamScore, 
                    uint _awayTeamScore, 
                    uint _bettingPrice) payable returns (bool) {    

    betterBettingInfo[msg.sender].push(
      BetterBettingInfo(_matchId, _homeTeamScore, _awayTeamScore, _bettingPrice, false, false, 0, 0)); 

    require(_bettingPrice == msg.value); // Check ether sent is matching with the betting price
    this.transfer(msg.value); // Send betting price to the contract address  

    return true;
  }
She Jong Shon
@kkagill
Feb 23 2018 10:21
i strongly doubt it's from angular or metamask problem
Juan Blanco
@juanfranblanco
Feb 23 2018 10:29
hmm so both variables are "transaction from angular works (metamask)"
Andres G. Aragoneses
@knocte
Feb 23 2018 10:29
@juanfranblanco hey thanks for merging my PRs so quickly; btw have you thought about using AppVeyor to run tests in PRs?
Juan Blanco
@juanfranblanco
Feb 23 2018 10:29
you may not have supplied enough gas
@knocte well those were easy
to read :)
and yes I have thought about it
i am just waiting for people to join the team
and put AppVeyor
She Jong Shon
@kkagill
Feb 23 2018 10:32
Gas = new HexBigInteger(3000000) isn't this enough?
Juan Blanco
@juanfranblanco
Feb 23 2018 10:32
this was one of the reasons of moving all the tests to clique and parity poa
still doing them manually myself
Andres G. Aragoneses
@knocte
Feb 23 2018 10:32
what do you mean people join the team? more consensys coworkers will start contributing to Nethereum?
Juan Blanco
@juanfranblanco
Feb 23 2018 10:33
it will be to the Nethereum team :)
then
Andres G. Aragoneses
@knocte
Feb 23 2018 10:33
not sure I understand :sweat_smile:
maybe we should switch to Spanish :laughing:
Juan Blanco
@juanfranblanco
Feb 23 2018 10:34
ja ja
Andres G. Aragoneses
@knocte
Feb 23 2018 10:34
(I was asking cause I was scared of breaking tests with my PRs, given that I couldn't know before if they were passing)
Juan Blanco
@juanfranblanco
Feb 23 2018 10:34
pues que van a empezar a trabajar más gente en Nethereum
Andres G. Aragoneses
@knocte
Feb 23 2018 10:35
ah genial!
Juan Blanco
@juanfranblanco
Feb 23 2018 10:35
y sí pagados por Consensys
Andres G. Aragoneses
@knocte
Feb 23 2018 10:35
perfect!
Juan Blanco
@juanfranblanco
Feb 23 2018 10:35
to run the tests you just need start the geth clique
Andres G. Aragoneses
@knocte
Feb 23 2018 10:36
clique? what's that?
Juan Blanco
@juanfranblanco
Feb 23 2018 10:36
ah that is geth poa
Andres G. Aragoneses
@knocte
Feb 23 2018 10:36
I've run them without geth and only 5 fail
ah I see
Juan Blanco
@juanfranblanco
Feb 23 2018 10:36
proof of authority
which is much faster
Andres G. Aragoneses
@knocte
Feb 23 2018 10:36
I'm thinking some tests should even be able to run without geth, such as the ones using offline transaction signing
Juan Blanco
@juanfranblanco
Feb 23 2018 10:36
yeah
Andres G. Aragoneses
@knocte
Feb 23 2018 10:37
but one doesn't, it seems it tries to get TransactionCount
Juan Blanco
@juanfranblanco
Feb 23 2018 10:37
separating them to integration tests (most of them) and unit tests will also make sense
Andres G. Aragoneses
@knocte
Feb 23 2018 10:37
I'll check if I can make it not depend on geth
yep exactly
glad we're on the same page there
Juan Blanco
@juanfranblanco
Feb 23 2018 10:37
ha ha yes I know where I took shortcuts
Andres G. Aragoneses
@knocte
Feb 23 2018 10:38
gotta go now, will keep tinkering later!
Juan Blanco
@juanfranblanco
Feb 23 2018 10:38
i have to shower every so often
so i don't feel so dirty
Andres G. Aragoneses
@knocte
Feb 23 2018 10:38
hahah
Juan Blanco
@juanfranblanco
Feb 23 2018 10:38
thanks !
Martin Hsu
@Martin-Hsu
Feb 23 2018 10:47
@juanfranblanco Thank you, I use:
geth.exe --rinkeby --syncmode "fast" --datadir=devchain --rpc --rpccorsdomain "*" --rpcapi "eth,web3,personal,net,miner,admin,debug" --verbosity 0 console
And I can to create account
@juanfranblanco But I have another question. Can we use smart contract function ?
Juan Blanco
@juanfranblanco
Feb 23 2018 10:50
yes
you need to include "personal"
Martin Hsu
@Martin-Hsu
Feb 23 2018 10:50
yes
But I have another question. Can we use smart contract function ?
Juan Blanco
@juanfranblanco
Feb 23 2018 10:51
i thought you were connecting to infura
yes you can
Martin Hsu
@Martin-Hsu
Feb 23 2018 10:51
how can i use ?
check those workbooks
you can run them if you install Xamarin.Workbooks
Martin Hsu
@Martin-Hsu
Feb 23 2018 10:54
the function like : var transferFunction = contract.GetFunction("transfer");
different with web3.js
Juan Blanco
@juanfranblanco
Feb 23 2018 10:55
yeah
it is not going to be the same
Martin Hsu
@Martin-Hsu
Feb 23 2018 10:55
OK, i will try. thank you.
I run the MultipleAccountTransferSample , but the time is old
For the Sample, do you have an better sample
Juan Blanco
@juanfranblanco
Feb 23 2018 10:57
like this ?
or this?
the time is Updated on 28 Jul 2017
Juan Blanco
@juanfranblanco
Feb 23 2018 11:00
well i have many samples
that will work still
Martin Hsu
@Martin-Hsu
Feb 23 2018 11:02
Can I pull request for MultipleAccountTransferSample
I will write some sample
Juan Blanco
@juanfranblanco
Feb 23 2018 11:03
sure
Martin Hsu
@Martin-Hsu
Feb 23 2018 11:03
Thank you
Juan Blanco
@juanfranblanco
Feb 23 2018 11:03
but obviously dont change the logic
but you can upgrade the Nethereum version :)
Martin Hsu
@Martin-Hsu
Feb 23 2018 11:04
OK
And I want to write some readme
Juan Blanco
@juanfranblanco
Feb 23 2018 11:04
if you want
Martin Hsu
@Martin-Hsu
Feb 23 2018 11:05
because the readme -> Quick sample to create and transfer ether to multiple accounts
Juan Blanco
@juanfranblanco
Feb 23 2018 11:05
it is really a very quick sample
like a quick mock up
for people to get started, nothing major
BUT if you want to contribute on docs
Workbooks
Martin Hsu
@Martin-Hsu
Feb 23 2018 11:07
OK
It is very good project
Juan Blanco
@juanfranblanco
Feb 23 2018 11:08
yeah workbooks are awesome
Martin Hsu
@Martin-Hsu
Feb 23 2018 11:47
I send the pull request
the request is for compile
Juan Blanco
@juanfranblanco
Feb 23 2018 12:27
seen it thanks
i put a comment
yltlatl
@yltlatl
Feb 23 2018 12:41
@juanfranblanco got it, thanks!
Jonathan Smirnoff
@jonathansmirnoff
Feb 23 2018 13:09
@juanfranblanco is there any way to do this https://web3js.readthedocs.io/en/1.0/web3-eth-accounts.html with nethereum? I would like to generates an account object with private key and public key.
Trycoder
@Trycoder
Feb 23 2018 13:10
In Azure consortium ,Im only able to get the latest transaction event but not every event after filter is created
im using GetAllChanges
Martin Hsu
@Martin-Hsu
Feb 23 2018 13:39
@juanfranblanco Thank you, I push again.
Juan Blanco
@juanfranblanco
Feb 23 2018 14:51
@Trycoder you need to pass a block range
Thanks @Martin-Hsu
Enrique Chavez
@Tmeister
Feb 23 2018 15:46
@juanfranblanco thanks, There is a way to call contract function with the extra parameters to set the “from” account, this works on the get console
contract.approve('0xA', 10, {from:'0xB'})
contract.transferFrom('0xB', '0xC', 10, {from:'0xA'})
Enrique Chavez
@Tmeister
Feb 23 2018 16:05
*geth console
BradenPorter
@BradenPorter
Feb 23 2018 18:19
Hello again all, the only package one really needs is nethereum.portable yes?
Why does one need to use vscode at all for .sol contracts?
BradenPorter
@BradenPorter
Feb 23 2018 18:27
Have a lot of noobie questions, and would be eternally grateful for a one on one session with a nethereum dev. I learn quick just a bit overwhelmed on how to apply what I'm learning from Juan's videos to my cross platform xamarin forms VS project. Managed to get rid of all warnings and have .portable installed. Also able to manage the test contracts in solidity
BradenPorter
@BradenPorter
Feb 23 2018 18:48
Look forward to learning from someone 1v1 and if anyone wants to join in contribution to this ICO maybe we could work out something monetarily down the line, plan on just building the whole thing myself and scrapping it together from the nethereum docs, just a bit new to VS. Thanks in advance. Love to all.
Juan Blanco
@juanfranblanco
Feb 23 2018 18:50
@Tmeister those extra parameters are the generic ones for a transaction
@BradenPorter to compile them, you can use remix if you want (vs code)
you could use Nethereum.Web3
instead of portable, it is .net standard
Enrique Chavez
@Tmeister
Feb 23 2018 19:58
again thanks, can you give a little sample on how to call the CallAsync with those parameters
She Jong Shon
@kkagill
Feb 23 2018 22:56
@juanfranblanco What is this error when I try to SendTransactionAndWaitForReceiptAsync(tInput);?
Error = {System.Exception: Unable to convert the result to type Nethereum.RPC.Eth.DTOs.TransactionReceipt ---> System.InvalidCastException: Unable to cast object of type 'System.Int64' to type 'System.String'.  at Nethereum.Hex.HexTypes.HexRPCTypeJsonConverter`2...