These are chat archives for Nethereum/Nethereum

14th
Dec 2017
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 08:20
@juanfranblanco I tried to send some tokens via Infura testnet, it's said 405. What would be possible issue?
@juanfranblanco Confirmed with you that issue #211 exists on Infura testnet as well.
Juan Blanco
@juanfranblanco
Dec 14 2017 09:01
@tuyen-vuduc you need to supply the gas
and gas price
if not providing the default
the default is not 0 or null
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:02
Thank you for your prompt support. Let me try then.
Juan Blanco
@juanfranblanco
Dec 14 2017 09:02
When you are sending using infura you need to use your private key with an Account to sign the transaction and use a raw send transaction
Obviously your account needs some ether, so you will need to use a testnet to trieal
trial*
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:03
I am using StandTokenService to send some tokens to another account. I am using Wallet from HdWallet package
Juan Blanco
@juanfranblanco
Dec 14 2017 09:03
well has your account (first of any)
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:03
Yeah, I got some tokens from rinkeby netowkr
Juan Blanco
@juanfranblanco
Dec 14 2017 09:04
so your first account from the hd wallet has ether
and you are sending tokens in rinkeby
TarrahArshad
@TarrahArshad
Dec 14 2017 09:04
hi all
Juan Blanco
@juanfranblanco
Dec 14 2017 09:04
correct?
TarrahArshad
@TarrahArshad
Dec 14 2017 09:04
i need send my ERC20 token in my c# code , can u help me ?
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:04

o your first account from the hd wallet has ether

Yes.

and you are using it more or less like this ^^
TarrahArshad
@TarrahArshad
Dec 14 2017 09:05
i need send my ERC20 token in my c# code , can u help me ?
Juan Blanco
@juanfranblanco
Dec 14 2017 09:05
you can use the standard erc20 / eip contract
TarrahArshad
@TarrahArshad
Dec 14 2017 09:06
i created contract and token is ready , only i need handle from my c# code
that is mainly a service wrapper to it
TarrahArshad
@TarrahArshad
Dec 14 2017 09:07
i used api also for get balance and transaction , but i can find api for send token
Juan Blanco
@juanfranblanco
Dec 14 2017 09:07
oh the above is an extension
just a service
you can also generate your service if you have extra methods using the code generator
TarrahArshad
@TarrahArshad
Dec 14 2017 09:08
@juanfranblanco what ur mean method ? method of inside contract ?
Juan Blanco
@juanfranblanco
Dec 14 2017 09:10
yeah
actually it is easier if you look at this workbook
TarrahArshad
@TarrahArshad
Dec 14 2017 09:10
@juanfranblanco i'm new in ether ERC20
Juan Blanco
@juanfranblanco
Dec 14 2017 09:11
look at the getting started with smart contracts
that uses a token as the sample
TarrahArshad
@TarrahArshad
Dec 14 2017 09:11
my contract created before i can edit or need create again ?
Juan Blanco
@juanfranblanco
Dec 14 2017 09:12
no
if you have deployed it is fine
you can just interact with it
open it with workbooks
i think it is easier to understand when you interact with it
the link is in the index file
TarrahArshad
@TarrahArshad
Dec 14 2017 09:13
@juanfranblanco thank u , u can help me later for finish my project ?
Juan Blanco
@juanfranblanco
Dec 14 2017 09:14
ha ha not really
TarrahArshad
@TarrahArshad
Dec 14 2017 09:14
@juanfranblanco can i add ur skype ? or here ?
ur freelancer or ether group ?
Juan Blanco
@juanfranblanco
Dec 14 2017 09:14
i / the community guide you
Nethereum is my project and I work for Consensys
TarrahArshad
@TarrahArshad
Dec 14 2017 09:14
@juanfranblanco thank u
after i run c# code i get error for this http://localhost:8545
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:17
@juanfranblanco Could you help
405 (Method Not Allowed)
 var gas = await function.EstimateGasAsync(addressFrom, null, null, addressTo, value);
var tx = await function.SendTransactionAndWaitForReceiptAsync(addressFrom, gas, null, null, addressTo, value);
TarrahArshad
@TarrahArshad
Dec 14 2017 09:18
@tuyen-vuduc hi u are in c# for handle erc20 token ?
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:19
Yes.
TarrahArshad
@TarrahArshad
Dec 14 2017 09:19
@tuyen-vuduc good , i', also , like we chat on skype or telegram ?
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:20
:). I am getting issues :D. not sure if I could help you.
TarrahArshad
@TarrahArshad
Dec 14 2017 09:20
@tuyen-vuduc we can share our knowledge
@tuyen-vuduc u fixed problem for http://localhost:8545 ?
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:24
:), I not working on C# when building the contract. I only consume from C# :).
Juan Blanco
@juanfranblanco
Dec 14 2017 09:27
@tuyen-vuduc how do you create web3
i am assuming you are not creating the account correctly
TarrahArshad
@TarrahArshad
Dec 14 2017 09:28
@juanfranblanco i have a error this line
var gas = await transferFunction.EstimateGasAsync(senderAddress, null, null, newAddress, amountToSend);
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:28
web3 = new Web3(wallet.GetAccount(0), client)
TarrahArshad
@TarrahArshad
Dec 14 2017 09:28
can't find transferfunction
Juan Blanco
@juanfranblanco
Dec 14 2017 09:28
well have you created the function?
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:29
@juanfranblanco I could get balance in ETH, or my custom token balance, but not able to transfer.
Juan Blanco
@juanfranblanco
Dec 14 2017 09:29
@TarrahArshad have you ran the workbook?
as an example?
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:29
well have you created the function?
Which function do you mean?
Juan Blanco
@juanfranblanco
Dec 14 2017 09:29
have you setup your testnet?
TarrahArshad
@TarrahArshad
Dec 14 2017 09:29
yes
i flow ur codes only
@juanfranblanco i get from ur link all codes
Juan Blanco
@juanfranblanco
Dec 14 2017 09:30
@tuyen-vuduc sorry two conversation
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:30
Here is it @juanfranblanco
class WorkaroundStandardTokenService : StandardTokenService
    {
        public WorkaroundStandardTokenService(Web3 web3, string address) : base(web3, address)
        {

        }

        public new async Task<bool> TransferAsyncCall<T>(string addressFrom, string addressTo, T value)
        {
            var function = GetTransferFunction();

            var gas = await function.EstimateGasAsync(addressFrom, null, null, addressTo, value);
            var tx = await function.SendTransactionAndWaitForReceiptAsync(addressFrom, gas, null, null, addressTo, value);

            return true
        }
    }
Juan Blanco
@juanfranblanco
Dec 14 2017 09:32
so the workaround uses the SendTransactionAndWaitForReceipt
i need to generate those in the code gen :)
TarrahArshad
@TarrahArshad
Dec 14 2017 09:33
@juanfranblanco i used ur class code and call with this line , its correct ?
WorkaroundStandardTokenService k = new WorkaroundStandardTokenService(web3, "");
Juan Blanco
@juanfranblanco
Dec 14 2017 09:33
that is not my class
that is not correct :D
you need your contract address
TarrahArshad
@TarrahArshad
Dec 14 2017 09:33
oh
Juan Blanco
@juanfranblanco
Dec 14 2017 09:34
you won't be able to do anything without a contract
the extension method seem fine anyway
TarrahArshad
@TarrahArshad
Dec 14 2017 09:34
i have contract in solitary my token is read in my wallet
Juan Blanco
@juanfranblanco
Dec 14 2017 09:34
so you dont need to do the polling manualy
@TarrahArshad you do need to go through the step by step
to get an understanding
TarrahArshad
@TarrahArshad
Dec 14 2017 09:35
my token before created in https://wallet.ethereum.org/contracts
check this video
TarrahArshad
@TarrahArshad
Dec 14 2017 09:36
this is first step , right ?
var privateKey = "0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7";
var senderAddress = "0x12890d2cce102216644c59daE5baed380d84830c";
var account = new Nethereum.Web3.Accounts.Account(privateKey);
Juan Blanco
@juanfranblanco
Dec 14 2017 09:36
ignore the mining process, but overall it give you an understanding
yes but you need to understand what is an account
TarrahArshad
@TarrahArshad
Dec 14 2017 09:37
i saw this video before but its on contract on .net but my contract before created on solitari remix
Juan Blanco
@juanfranblanco
Dec 14 2017 09:37
no the contract is not in .net
the contract is in solidity
TarrahArshad
@TarrahArshad
Dec 14 2017 09:39
i'm comfuz
first my ask is about http://localhost:8545
why i see this error after run my code ?
Juan Blanco
@juanfranblanco
Dec 14 2017 09:41
because you don't have your testnet running?
@tuyen-vuduc
everything you have done seems correct
TarrahArshad
@TarrahArshad
Dec 14 2017 09:41
on chrome i used metamask
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:41
@juanfranblanco BUT it doesn't work :(
TarrahArshad
@TarrahArshad
Dec 14 2017 09:42
but in c# i unknow how to run testnet
Juan Blanco
@juanfranblanco
Dec 14 2017 09:42
in metamask you connect to the testnets, mainnet or local
this is a lower level of understanding
@tuyen-vuduc let me check the overload that you are using
i think that is the problem
TarrahArshad
@TarrahArshad
Dec 14 2017 09:42
for final deply i used mainet but before finish my token contract i used testnet
now is on mainnet
Juan Blanco
@juanfranblanco
Dec 14 2017 09:44
actually it shouldn't, you should not get a 405 there
the only issue might have been on Web3 not having your account
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:45
@juanfranblanco Thank you. I have to customize be cause it raise issue 3>2 parameter count as I reported in #211.
Juan Blanco
@juanfranblanco
Dec 14 2017 09:45
yes but that was due to passing a 0 value for gas
which is a no no
or having the wrong parameters
give me 10 minutes
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:47
standardTokenService.TransferAsyncCall(from, to, amount)
I called that way, @juanfranblanco

@juanfranblanco You're right. My Wallet instance is disposed before I create Web3 instance. Thank you.

the only issue might have been on Web3 not having your account

TarrahArshad
@TarrahArshad
Dec 14 2017 09:51
@juanfranblanco really bad document for explain code or sample , u can provide one sample how to developed this system ?
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:52
@TarrahArshad :). Plz be calm.
I think it's good enough to follow.
@juanfranblanco now account instance is ok, but the transaction is still 405 :|
TarrahArshad
@TarrahArshad
Dec 14 2017 09:53
@tuyen-vuduc shutoff
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 09:57

@juanfranblanco I might find it.

In NEthereum code base,

public Web3(IAccount account, IClient client):this(client)
        {
            this.TransactionManager = account.TransactionManager;
            this.TransactionManager.Client = this.Client;
        }

However, I changed to use my custom instance of TransacationManager:D.

Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 10:37

@juanfranblanco I was able to send tokens without using my custom TransactionManager class.

However, I faced other issue when getting transactions.

Is it correct to get all transactions?

var transferEvent = standardTokenService.GetTransferEvent();

var filter = false == sent
                    ? await transferEvent.CreateFilterAsync(accountAddress)
                    : await transferEvent.CreateFilterAsync<string, object, string>(null, null, accountAddress);

var changes = transferEvent.GetFilterChanges<Transfer>(filter);

return changes;

It returns 405

TarrahArshad
@TarrahArshad
Dec 14 2017 10:41
@juanfranblanco where is contractByteCode , abi ?
JaheiraHarper
@JaheiraHarper
Dec 14 2017 10:42
Hi there, @juanfranblanco, i'm new here, and trying to follow the video you linked earlier as close as possible. I have 2 issues i seem to not get around: 1. the using Xunit directive in Nethereum.Tutorials won't accept it although the nuget packages are installed (and referenced in Nethereum.Tutorials.Acocunt, so i moved the testclass to this project so it would work.
  1. the web3.Miner does not exist anymore? Severity Code Description Project File Line Suppression State
    Error CS1061 'Web3' does not contain a definition for 'Miner' and no extension method 'Miner' accepting a first argument of type 'Web3' could be found (are you missing a using directive or an assembly reference?) Nethereum.Tutorials.Account C:\Users\johnny\Source\Repos\Nethereum\src\Nethereum.Tutorials\Nethereum.Tutorials.Account\Class1.cs 35 Active
sorry pressed enter too soon..
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 10:43

@TarrahArshad

Open Visual Studio Code
Copy the contract test into a new file and save it as "test.sol", you will need to have opened a folder as your workspace.
If you don't have the Solidity extension press F1 or Shift+Command+P on a mac and type "ext", then search for "solidity" and install it.
Now that is installed you can press F1 again type "compile" and select the option to "Compile current contract"
Your abi and bytecode files can be found now in your bin folder.

At the very beginning of the guide. Have you done it?

TarrahArshad
@TarrahArshad
Dec 14 2017 10:44
@tuyen-vuduc my contract before deployed and available in tokens
i like only send my token from my address to another
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 10:45
@JaheiraHarper Why not start from scratch step by step. It's much better :).
@TarrahArshad If you know the contract is an ERC20 contract, plz try to use StandardTokenService.
TarrahArshad
@TarrahArshad
Dec 14 2017 10:47
where is StandTokenService ?
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 10:48
Install-Package Nethereum.StandardTokenEIP20
TarrahArshad
@TarrahArshad
Dec 14 2017 10:49
i installed , but need abi and i unknow where is abi
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 10:49
You don't need ABI when using StandardTokenService
It contains all the standard functions defined in ERC20.
If you needs something else in your contract, you must have the contract code, I guess.
JaheiraHarper
@JaheiraHarper
Dec 14 2017 10:50
@tuyen-vuduc that is what i did, started with the code you posted 7 mins ago, everything
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 10:51
standardTokenService.TransferAsync
TarrahArshad
@TarrahArshad
Dec 14 2017 10:51
so its oky :smile: WorkaroundStandardTokenService k = new WorkaroundStandardTokenService(web3, contractaddress);
?
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 10:51
Yes, if you know the contract address, that's the way.
Plz don't set my custom transaction manager.
TarrahArshad
@TarrahArshad
Dec 14 2017 10:53
its oky u think ? k.TransferAsync(senderAddress, addressTo, 1000);
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 10:53
WHY NOT TRY IT OUT.
TarrahArshad
@TarrahArshad
Dec 14 2017 11:01
@tuyen-vuduc i try but result is always null
Edson Alcalá
@EdsonAlcala
Dec 14 2017 11:05
@JaheiraHarper I think Nethereum has changed a little considering the video, however why do you need the Miner? Probably you can skip that part, would that work?
JaheiraHarper
@JaheiraHarper
Dec 14 2017 11:21
Not sure Edson, trying to get my hello world example working first so to speak. In the video and part of the code is a private chain, which needs the miner. Trying to get familiar with all this including the development stack.
TarrahArshad
@TarrahArshad
Dec 14 2017 11:41
@JaheiraHarper hi can u help me ?
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 11:52
@TarrahArshad How do you create your web3?
TarrahArshad
@TarrahArshad
Dec 14 2017 11:56
@tuyen-vuduc after i run code always is null
Vũ Đức Tuyến
@tuyen-vuduc
Dec 14 2017 11:57
Plz share fullcode.
TarrahArshad
@TarrahArshad
Dec 14 2017 11:58
        var privateKey = "1";
        var senderAddress = "1";
        var account = new Nethereum.Web3.Accounts.Account(privateKey);
        var web3 = new Web3(account);
        var contractaddress = "1";
        var addressTo = "2";           


        WorkaroundStandardTokenService k = new WorkaroundStandardTokenService(web3, contractaddress);

        var s = k.TransferAsync(senderAddress, addressTo, 1000);
TarrahArshad
@TarrahArshad
Dec 14 2017 12:06
hello
@tuyen-vuduc see my code ?
TarrahArshad
@TarrahArshad
Dec 14 2017 12:11
@tuyen-vuduc hello
TarrahArshad
@TarrahArshad
Dec 14 2017 12:23
@juanfranblanco hi
@juanfranblanco
var privateKey = "1";
var senderAddress = "1";
var account = new Nethereum.Web3.Accounts.Account(privateKey);
var web3 = new Web3(account);
var contractaddress = "1";
var addressTo = "2";
        WorkaroundStandardTokenService k = new WorkaroundStandardTokenService(web3, contractaddress);

        var s = k.TransferAsync(senderAddress, addressTo, 1000);
full sample with out inheritance, I will extend the erc20 service to include those
i had to go to a meeting ;)
TarrahArshad
@TarrahArshad
Dec 14 2017 12:39
but where is my abi and bytecode for add to this ?
Juan Blanco
@juanfranblanco
Dec 14 2017 12:41
The standard contract service / library it is a simple service that wraps the functionality of the erc20 smart contract. It includes the abi
if you are familiar with wsdl or web services, it is very similar
if you are consuming an existing smart contract you dont need the bytecode
as it is already deployed
TarrahArshad
@TarrahArshad
Dec 14 2017 12:43
so i need only contract address , right ?
Juan Blanco
@juanfranblanco
Dec 14 2017 12:43
if you have already a service, which contains the abi, you dont need it. Just check the code
yes exactly
TarrahArshad
@TarrahArshad
Dec 14 2017 12:43
var privateKey = "1";
var senderAddress = "1";
var account = new Nethereum.Web3.Accounts.Account(privateKey);
var web3 = new Web3(account);
var contractaddress = "1";
var addressTo = "2";
this my code is wrong ?
TarrahArshad
@TarrahArshad
Dec 14 2017 12:43
WorkaroundStandardTokenService k = new WorkaroundStandardTokenService(web3, contractaddress);
        var s = k.TransferAsync(senderAddress, addressTo, 1000);
Juan Blanco
@juanfranblanco
Dec 14 2017 12:44
Just look at that code
i posted
TarrahArshad
@TarrahArshad
Dec 14 2017 12:44
but in code i see words i no have a words i have privatekey only and address
Juan Blanco
@juanfranblanco
Dec 14 2017 12:45
then ignore that and use var account = new Nethereum.Web3.Accounts.Account(privateKey);
TarrahArshad
@TarrahArshad
Dec 14 2017 12:45
WorkaroundStandardTokenService k = new WorkaroundStandardTokenService(web3, contractaddress);
        var s = k.TransferAsync(senderAddress, addressTo, 1000);
i added this in code but when i call transfer i get null
Juan Blanco
@juanfranblanco
Dec 14 2017 12:46
you need to await the call
TarrahArshad
@TarrahArshad
Dec 14 2017 12:46
how much ?
Juan Blanco
@juanfranblanco
Dec 14 2017 12:46
have you just started developing in c#?
TarrahArshad
@TarrahArshad
Dec 14 2017 12:47
contact is in solitari remix IDE web chrome
Juan Blanco
@juanfranblanco
Dec 14 2017 12:47
just want to understand if you fully understand what i am talking about
that is not my question
TarrahArshad
@TarrahArshad
Dec 14 2017 12:47
but code is in c# for i create webpage wallet
in c# i'm expert
Juan Blanco
@juanfranblanco
Dec 14 2017 12:48
ah excellent
your call then needs to be awaited
TarrahArshad
@TarrahArshad
Dec 14 2017 12:48
but i worked more web app
Juan Blanco
@juanfranblanco
Dec 14 2017 12:48
the transfer call
TarrahArshad
@TarrahArshad
Dec 14 2017 12:48
so my code is correcy ?
Juan Blanco
@juanfranblanco
Dec 14 2017 12:49
actually just copy and paste all my code i posted
excluding the hd stuff
the words bit
TarrahArshad
@TarrahArshad
Dec 14 2017 12:49
ok , i try again
Juan Blanco
@juanfranblanco
Dec 14 2017 12:49
and deployment
TarrahArshad
@TarrahArshad
Dec 14 2017 12:49
thank u juan
and start with
TarrahArshad
@TarrahArshad
Dec 14 2017 12:50
ok
Juan Blanco
@juanfranblanco
Dec 14 2017 12:50
var web3 = new Web3(new Account(privateKey));
instead with an account retrieved from an HD wallet
TarrahArshad
@TarrahArshad
Dec 14 2017 12:51
ok
Juan Blanco
@juanfranblanco
Dec 14 2017 12:52
but test this on a testnet
TarrahArshad
@TarrahArshad
Dec 14 2017 12:52
how to i choise main network or test ?
Juan Blanco
@juanfranblanco
Dec 14 2017 12:52
you might need to adjust the amount you are sending depending on the decimals
var web3 = new Web3(new Account(privateKey), "https://mainnet.infura.io");
that is mainnet
go to infura.io, register and use their nodes for testnets
TarrahArshad
@TarrahArshad
Dec 14 2017 12:55
ok
i regestred and i get this : https://mainnet.infura.io/jAj4Ji3YulA9EO2qDj0Z
Juan Blanco
@juanfranblanco
Dec 14 2017 12:55
well that is your address to use
with web3
but remember that is mainnet
test using testnets
TarrahArshad
@TarrahArshad
Dec 14 2017 12:56
for gas how to i proccess this >?
Juan Blanco
@juanfranblanco
Dec 14 2017 12:56
and don't do anything in the mainnet until you are sure
what to do
TarrahArshad
@TarrahArshad
Dec 14 2017 12:56
before send in account need ETH
Juan Blanco
@juanfranblanco
Dec 14 2017 12:56
yes
TarrahArshad
@TarrahArshad
Dec 14 2017 12:57
for get balance , aslo ?
Juan Blanco
@juanfranblanco
Dec 14 2017 12:57
no that only does a call
TarrahArshad
@TarrahArshad
Dec 14 2017 12:57
ok
Juan Blanco
@juanfranblanco
Dec 14 2017 12:57
to query the state
TarrahArshad
@TarrahArshad
Dec 14 2017 12:57
for get balance need wait to complete ?
Juan Blanco
@juanfranblanco
Dec 14 2017 12:57
it is an async call so yes
but that is awaiting
c# await
TarrahArshad
@TarrahArshad
Dec 14 2017 12:58
i know need wait its parallet coding but i unknow why its slow
http://snap.ashampoo.com/AGdeYmrM
Juan Blanco
@juanfranblanco
Dec 14 2017 12:58
you know async / await calls
TarrahArshad
@TarrahArshad
Dec 14 2017 12:58
can u see this image ?
yes
Juan Blanco
@juanfranblanco
Dec 14 2017 12:59
well you have not awaited any call
TarrahArshad
@TarrahArshad
Dec 14 2017 13:13
nothing result
if i use vpn possible get problem ?
Juan Blanco
@juanfranblanco
Dec 14 2017 13:19
i do sincerely recommend you to setup your own testnet
read that above
get familiar with the technology
TarrahArshad
@TarrahArshad
Dec 14 2017 13:20
its windows app ?
Juan Blanco
@juanfranblanco
Dec 14 2017 13:20
yes
TarrahArshad
@TarrahArshad
Dec 14 2017 13:20
i'm on windows 10
Juan Blanco
@juanfranblanco
Dec 14 2017 13:20
that is geth
it is fine
TarrahArshad
@TarrahArshad
Dec 14 2017 13:21
simple run or need parameter pass ?
Juan Blanco
@juanfranblanco
Dec 14 2017 13:21
run the batch file
that has some parameters already set
you can read on the help file
if you want
but really take your time to understand
the whole technolgy
TarrahArshad
@TarrahArshad
Dec 14 2017 13:23
oh only for send much time ,
@juanfranblanco now runed
Juan Blanco
@juanfranblanco
Dec 14 2017 13:24
well that is your testchain
you can test your work
there
you can deploy contracts to it
you can transfer
etc
familiarise with it
for example go through the steps here
TarrahArshad
@TarrahArshad
Dec 14 2017 13:25
so no need url pass to web3 ?
in here no
as it is defaulted to your localhost:8545
sorry i have to go and do some work
TarrahArshad
@TarrahArshad
Dec 14 2017 13:26
i read all but i need work on my existy token
Juan Blanco
@juanfranblanco
Dec 14 2017 13:26
have fun
TarrahArshad
@TarrahArshad
Dec 14 2017 13:26
contract
i killed u , u killed me also
Juan Blanco
@juanfranblanco
Dec 14 2017 13:27
well before you start deploying token contracts
TarrahArshad
@TarrahArshad
Dec 14 2017 13:27
u maked all complex for only ur friend can develop
Juan Blanco
@juanfranblanco
Dec 14 2017 13:27
you need to undertand everything
what?
sorry mate
TarrahArshad
@TarrahArshad
Dec 14 2017 13:27
i need sample task , get balance , transactions and send
but from 2 days i'm wait here
Juan Blanco
@juanfranblanco
Dec 14 2017 13:28
well you have that already there on the help
there is also an example
which i have posted already
TarrahArshad
@TarrahArshad
Dec 14 2017 13:28
i know u posted thank u but why do not work ur codes
Juan Blanco
@juanfranblanco
Dec 14 2017 13:29
well from your screenshot i mentioned you need to start by awaiting your calls
so the best thing for you is to use the samples and read step by step the instructions
also watching the videos may help you
you can simply copy and paste the code
TarrahArshad
@TarrahArshad
Dec 14 2017 13:32
@juanfranblanco for GetBalanceOfAsync what is result if 0 ?
0 = balance and -1 is wrong address ?
on testnet i get 0
i think now work fine GetBalanceOfAsync method
i can test on mainnetwork now ?
TarrahArshad
@TarrahArshad
Dec 14 2017 13:39
@juanfranblanco great now i get balance ETH
but for find my Token balance how to ?
Console.Write("start\n");
        StandardTokenService standardTokenServicek = new StandardTokenService(web3, contractaddress);

        Console.Write("wait\n");

        var s =await standardTokenServicek.GetBalanceOfAsync<int>(senderAddress);

        Console.Write(s.ToString()+"\n");
Juan Blanco
@juanfranblanco
Dec 14 2017 13:42
correct
you may want to use a BigInteger instead of an int
GetBalanceOfAsync<BigInteger>
TarrahArshad
@TarrahArshad
Dec 14 2017 20:32
@juanfranblanco i got balance of ETH success but my token response is null always for balance