These are chat archives for Nethereum/Nethereum

22nd
Dec 2017
Kirankumar
@kiranbasvaraj
Dec 22 2017 06:33
@juanfranblanco the method which you suggested to extract private key from keystore file was working fine .since we are developing the mobile app i need how can we retrieve the keystore file from server in a safest manner. -----Thanks
Juan Blanco
@juanfranblanco
Dec 22 2017 06:45
well that will depend on your architecture
i cannot give you any recommendations on that
as you are also going to store the private keys
in here you can see how to generate private keys and accounts
if you need to store them using web3 key storage definition you can use this sample
Juan Blanco
@juanfranblanco
Dec 22 2017 07:08
you may want to look at this too https://github.com/Nethereum/Nethereum.Console
TarrahArshad
@TarrahArshad
Dec 22 2017 10:23
@juanfranblanco we can send token without privatekey ?
Juan Blanco
@juanfranblanco
Dec 22 2017 10:47
no
TarrahArshad
@TarrahArshad
Dec 22 2017 11:15
@juanfranblanco how to get balance token and ether address?
TarrahArshad
@TarrahArshad
Dec 22 2017 11:22
@juanfranblanco u are great , thank u
@juanfranblanco after finish my project u must send me ur ether address
TarrahArshad
@TarrahArshad
Dec 22 2017 11:33
for balanceof token contract how to we use ?
TarrahArshad
@TarrahArshad
Dec 22 2017 12:23
@juanfranblanco for transaction and confirmation status u have code ?
Juan Blanco
@juanfranblanco
Dec 22 2017 12:26
you need to check the samples and documentation
you mainly check for the receipt of the transaction
TransactionReceipt
TarrahArshad
@TarrahArshad
Dec 22 2017 12:26
@juanfranblanco i checked but function is null
public Task<List<WalletTransaction>> GetLatestTransactions()
{
throw new NotImplementedException();
}
Juan Blanco
@juanfranblanco
Dec 22 2017 12:27
what?
what function
is that your function?
TarrahArshad
@TarrahArshad
Dec 22 2017 12:28
in ur code nethereum.wallet
Juan Blanco
@juanfranblanco
Dec 22 2017 12:28
ah
yes that is a sample
we will be working next year to have a full wallet
dapp host etc
full hardened version
TarrahArshad
@TarrahArshad
Dec 22 2017 12:30
so now how to i get transactions pf ETH and my token ?
Juan Blanco
@juanfranblanco
Dec 22 2017 12:35
ah that is more interesting
you will need to check events or use filters for tokens
TarrahArshad
@TarrahArshad
Dec 22 2017 12:37
@juanfranblanco can u link me on sample code ?
Juan Blanco
@juanfranblanco
Dec 22 2017 12:37
check the docs and samples
even stackoverflow
that gives you an overview of events
if you check the test project you will see more
TarrahArshad
@TarrahArshad
Dec 22 2017 13:01
@juanfranblanco so with event we can get all calls log of methods , right ?
example we can get event of transfer and next filter by address , right ?
Juan Blanco
@juanfranblanco
Dec 22 2017 13:01
yeah
check the erc20 smart contract
TarrahArshad
@TarrahArshad
Dec 22 2017 13:02
oky , and for erc20 and erc233 is same coding ?
Juan Blanco
@juanfranblanco
Dec 22 2017 13:03
well same interface
erc233 adds extra stuff
TarrahArshad
@TarrahArshad
Dec 22 2017 13:08
so for send is old code work on both , right ?
my code no need change if u make contract erc233 ?
Juan Blanco
@juanfranblanco
Dec 22 2017 13:08
yes just check the code
ok you don't know this
the contract abi is the interface
so if the abi matches a method signature
it is the same
interface
TarrahArshad
@TarrahArshad
Dec 22 2017 13:14

oh approve removed in erc233 , right ?
contract ERC223 {
uint public totalSupply;
function balanceOf(address who) constant returns (uint);

function name() constant returns (string _name);
function symbol() constant returns (string _symbol);
function decimals() constant returns (uint8 _decimals);
function totalSupply() constant returns (uint256 _supply);

function transfer(address to, uint value) returns (bool ok);
function transfer(address to, uint value, bytes data) returns (bool ok);
function transfer(address to, uint value, bytes data, string custom_fallback) returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value, bytes indexed data);
}

Juan Blanco
@juanfranblanco
Dec 22 2017 13:15
oh yeah, haven't looked at it for a while
TarrahArshad
@TarrahArshad
Dec 22 2017 13:15
only balance and transfer existy is erc233
Juan Blanco
@juanfranblanco
Dec 22 2017 13:15
i will add to the standard contract
TarrahArshad
@TarrahArshad
Dec 22 2017 13:15
so current ur package not work on erc233 ?
Juan Blanco
@juanfranblanco
Dec 22 2017 13:15
it does
TarrahArshad
@TarrahArshad
Dec 22 2017 13:16
my final token must be on erc233
Juan Blanco
@juanfranblanco
Dec 22 2017 13:16
ok
TarrahArshad
@TarrahArshad
Dec 22 2017 13:16
oh thanks
Juan Blanco
@juanfranblanco
Dec 22 2017 13:16
i will be releasing a new token service
in the near future
TarrahArshad
@TarrahArshad
Dec 22 2017 13:17
my api for send , genreate account , balance is ready but i'm problem in transaction and confirmation method
i think if i done transaction also i have all for my client app mobile and dashboard
@juanfranblanco for Exchange tokens contracts we can add method on contract for automatic convert ?
or need manually , client send ETH first and we calc rate and send him token amount
out of contract and inside our exchange platform
Juan Blanco
@juanfranblanco
Dec 22 2017 13:20
? if you are creating an exchange platform
you need to know the current rate of exchange
how are you doing this? have you got market makers?
TarrahArshad
@TarrahArshad
Dec 22 2017 14:56
yes
i need exchange platform inside my dashboard for my client token
@juanfranblanco method of buy/sell in contract can convert or need i do manually ?
Juan Blanco
@juanfranblanco
Dec 22 2017 16:05
you need to do it manually
or get feeds of the price
or have a smart contract to drive the bids
TarrahArshad
@TarrahArshad
Dec 22 2017 16:53
@juanfranblanco oh juan i'm still pronlem for get transaction and confirmatio status
@mwherman2000 i can't find transaction method for token and ETH
Michael Herman (Toronto)
@mwherman2000
Dec 22 2017 17:20
My samples illustrate the most common ETH tasks ...there's nothing specific in terms of supporting custom tokens.
Michael Herman (Toronto)
@mwherman2000
Dec 22 2017 18:59
Where can I find a (good) reference implementation of the most revent ECR2x Contract?
Juan Blanco
@juanfranblanco
Dec 22 2017 19:00
for erc20 samples try zeppelin or dappsys
Michael Herman (Toronto)
@mwherman2000
Dec 22 2017 19:15
This appears to be a simle "starter example" of an ECR20 Contract: https://theethereum.wiki/w/index.php/ERC20_Token_Standard#Further_Information_On_Ethereum_Tokens
simple
Sebastian Giro
@SebastianGiro
Dec 22 2017 21:35
Hi guys, I'm trying to deploy a contract in Unity.
in web3 we would use web3.Contracts.DeployContract.SendRequestAsync(abi, byteCode, senderAddress, gas, multiplier);
But in Unity, we should use a custom request? Like : var deployContractRequest = new deployContractUnityRequest (_url);
But I wasn't able to find it (The custom UnityRequest, so I can do yield return deployContractRequest.SendRequest(...)later)
rboelen
@rboelen
Dec 22 2017 22:22
Hi, i'm just checking out nethereum for some backend work on smart contracts. Not sure if doing things right so maybe people could give some advise.
I am trying to get a balance value from an already deployed contract : https://etherscan.io/address/0x06012c8cf97bead5deae237070f9587f8e7a266d#code
I use infura mainnet with my own access token, but when I call balanceOf on this contract it give me different results : 5 and 0...
Is this related to gas or maybe limits from infura?
Is there a way to do tracing on the rcp calls to infura?
rboelen
@rboelen
Dec 22 2017 22:30
Wow, now it seems to work each time I call the function, how do I now if a function call fails??
rboelen
@rboelen
Dec 22 2017 22:36
mmm, something is not stable not sure where to look.
rboelen
@rboelen
Dec 22 2017 22:41
`static async Task CheckBalance()
{
string kittyCoreAddress = "0x06012c8cf97BEaD5deAe237070F9587f8E7A266d";
string address = "0x79bd592415ff6c91cfe69a7f9cd091354fc65a18";
        var web3 = new Web3("https://mainnet.infura.io");
        var contract = web3.Eth.GetContract(kittyCoreABI, kittyCoreAddress);
        var balanceFunction = contract.GetFunction("balanceOf");

        var balance = await balanceFunction.CallAsync<BigInteger>(address);

        // sometimes 46 other times 0....expected result always 46 (not 0)
        Console.WriteLine(balance);
    }`
rboelen
@rboelen
Dec 22 2017 23:02
so the problem here is that most of the time runs fine, but now and then I get 0 as result...