These are chat archives for Nethereum/Nethereum

27th
Apr 2018
Vahid1Ali
@Vahid1Ali
Apr 27 2018 04:10
Guys , is there any open source mining software available for mine custom erc20 token?
Juan Blanco
@juanfranblanco
Apr 27 2018 05:00
@kianmehr21 you need to create the filter before the transfer
you don't mine erc20 is a contract
@Vahid1Ali
Vahid1Ali
@Vahid1Ali
Apr 27 2018 06:05
@juanfranblanco , "you don't mine erc20 is a contract", i did't understand , please explain.
@juanfranblanco , i have developed a token xyz(erc20 token). i want to mine xyz ,
Khojiakbar Muminov
@khmuminov
Apr 27 2018 07:48
@juanfranblanco but results are different. Will try another way.
If I unlock account using:
var account = new Account("my_private_key");
var web3 = new Web3(account, "https://kovan.infura.io");
is there method like in web3js 's web3.eth.personal.sign ?
Psilon
@Pzixel
Apr 27 2018 08:24
@juanfranblanco hey again

web3.eth.getCode("0x7DC93a7ABE77793DC8B57e21b58301a0698563B4")

"0x608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063904e2b93146044575b600080fd5b348015604f57600080fd5b5060566070565b604051808215151515815260200191505060405180910390f35b600060019050905600a165627a7a723058200bb8bca6c6f4d9ed3a5eb78eb867378af17cb61d4f6f1bf4c316e79019cc1d4a0029"

it's the answer on your yesterday question
Juan Blanco
@juanfranblanco
Apr 27 2018 08:25
interesting so the contract deployed
Psilon
@Pzixel
Apr 27 2018 08:26
hmm
Juan Blanco
@juanfranblanco
Apr 27 2018 08:26
you should not be getting default values then
Psilon
@Pzixel
Apr 27 2018 08:26
But I do
Juan Blanco
@juanfranblanco
Apr 27 2018 08:27
that is slightly different to
0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633bef595f1461005157806381d12c5814610080575b600080fd5b34801561005d57600080fd5b506100666100ed565b604051808215151515815260200191505060405180910390f35b34801561008c57600080fd5b506100ab600480360381019080803590602001909291905050506101d7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600080600080600081548110151561010157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691508173ffffffffffffffffffffffffffffffffffffffff1663904e2b936040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561019257600080fd5b505af11580156101a6573d6000803e3d6000fd5b505050506040513d60208110156101bc57600080fd5b81019080805190602001909291905050509050809250505090565b6000818154811015156101e657fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582078bd0d37b064e76c8528bccb52175d45a82e1e78668f262be1ae9f9ed29a6c4b0029
Psilon
@Pzixel
Apr 27 2018 08:28
image.png
Juan Blanco
@juanfranblanco
Apr 27 2018 08:28
have you just trimmed it?
so it is working now?
Psilon
@Pzixel
Apr 27 2018 08:29
No
if I watch contract itself then it return true
Juan Blanco
@juanfranblanco
Apr 27 2018 08:29
ok
Psilon
@Pzixel
Apr 27 2018 08:29
But if I call this method on Season contract it return default value
Juan Blanco
@juanfranblanco
Apr 27 2018 08:29
the bytecode in both is different
have you deployed the right contract?
ie not the base contract instead
"base"
Psilon
@Pzixel
Apr 27 2018 08:30
I deployed Season contract
Juan Blanco
@juanfranblanco
Apr 27 2018 08:30
the isMatch one
Psilon
@Pzixel
Apr 27 2018 08:30
which is deployed Request itself in constructor
so I don't see what could go wrong
Juan Blanco
@juanfranblanco
Apr 27 2018 08:31
your bytecode is different from getht and parity
hence i am asking
Psilon
@Pzixel
Apr 27 2018 08:31
hm
how did you see parity bytecode?

This is Season.bin from solc

608060405234801561001057600080fd5b50610248806100206000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633bef595f14610046575b600080fd5b34801561005257600080fd5b5061005b610075565b604051808215151515815260200191505060405180910390f35b600080600061008261014a565b604051809103906000f08015801561009e573d6000803e3d6000fd5b5091508173ffffffffffffffffffffffffffffffffffffffff1663904e2b936040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561010557600080fd5b505af1158015610119573d6000803e3d6000fd5b505050506040513d602081101561012f57600080fd5b81019080805190602001909291905050509050809250505090565b60405160c38061015a8339019056006080604052348015600f57600080fd5b5060a58061001e6000396000f300608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063904e2b93146044575b600080fd5b348015604f57600080fd5b5060566070565b604051808215151515815260200191505060405180910390f35b600060019050905600a165627a7a723058202e8a1d2cd595b34a2f8c3621ab8517890f5c46175fad1c722f479fb46040afcc0029a165627a7a7230582028aa56f14a11931eb4c7c59165ba156fef37918c25d5523b12e4b5256839534a0029

This is Request.bin

6080604052348015600f57600080fd5b5060a58061001e6000396000f300608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063904e2b93146044575b600080fd5b348015604f57600080fd5b5060566070565b604051808215151515815260200191505060405180910390f35b600060019050905600a165627a7a723058202e8a1d2cd595b34a2f8c3621ab8517890f5c46175fad1c722f479fb46040afcc0029

Juan Blanco
@juanfranblanco
Apr 27 2018 08:32
right
getCode
is returning
REquest
in parity
Psilon
@Pzixel
Apr 27 2018 08:32
because I was asking for request
see full getCode

web3.eth.getCode("0x15689096ad3Eda847809FeEaDAE407154a5C9610")

"0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633bef595f1461005157806381d12c5814610080575b600080fd5b34801561005d57600080fd5b506100666100ed565b604051808215151515815260200191505060405180910390f35b34801561008c57600080fd5b506100ab600480360381019080803590602001909291905050506101d7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600080600080600081548110151561010157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691508173ffffffffffffffffffffffffffffffffffffffff1663904e2b936040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561019257600080fd5b505af11580156101a6573d6000803e3d6000fd5b505050506040513d60208110156101bc57600080fd5b81019080805190602001909291905050509050809250505090565b6000818154811015156101e657fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582078bd0d37b064e76c8528bccb52175d45a82e1e78668f262be1ae9f9ed29a6c4b0029"

web3.eth.getCode("0x7DC93a7ABE77793DC8B57e21b58301a0698563B4")

"0x608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063904e2b93146044575b600080fd5b348015604f57600080fd5b5060566070565b604051808215151515815260200191505060405180910390f35b600060019050905600a165627a7a723058200bb8bca6c6f4d9ed3a5eb78eb867378af17cb61d4f6f1bf4c316e79019cc1d4a0029"

Juan Blanco
@juanfranblanco
Apr 27 2018 08:33
ah ok
that was my question
so it has deployed succesfully and it works in geth
ill test it later in parity i havent got much time at the moment
Psilon
@Pzixel
Apr 27 2018 08:38
ok
I'm going to try debug.traceTransaction if I get how to work with it)
Vahid1Ali
@Vahid1Ali
Apr 27 2018 08:47
@juanfranblanco , can't mine erc20 based token?
dimonkov
@dimonkov
Apr 27 2018 09:58

@juanfranblanco ,
Hi, I'd like to know, how can I alter the code in Nethereum.Generators to create ServiceClasses compatible with Unity.

In general - how can I create custom generators, and change the "using" s at the top of the file?

Khojiakbar Muminov
@khmuminov
Apr 27 2018 10:25
@juanfranblanco but results are different. Will try another way.
If I unlock account using:
var account = new Account("my_private_key");
var web3 = new Web3(account, "https://kovan.infura.io");
is there method like in web3js 's web3.eth.personal.sign ?
Psilon
@Pzixel
Apr 27 2018 10:25
@juanfranblanco seems to be Parity bug
Works on Ganache
Kirankumar
@kiranbasvaraj
Apr 27 2018 11:48
hi hope all doing well, i need to convert string value to byte32 in c#, i am doing this because i have a scenario where i am sending byte array of a string to the smart contract which has byte32 as input type. if i send byte array of string i am getting exception saying that it is expecting byte32 instead of byte . can any one please guide me through this.
Trycoder
@Trycoder
Apr 27 2018 12:36
I have deployed the contract in Azure consortium.It was working perfectly.Today the mining nodes were not running,So i did a restart in azure portal.Now it is up and running however the transaction node is not running now.
Can somebody help
Kevin Small
@KevinSmall
Apr 27 2018 14:49
@Vahid1Ali ERC20 tokens don't get mined. ERC20 is just a contract standard. It is the contract that controls who gets tokens. For example, when you create the contract you can send tokens to the creator (see https://www.youtube.com/watch?v=b3kzi4UVdCk).
Enigmatic
@EnigmaticUnreal_twitter
Apr 27 2018 15:34

@kiranbasvaraj

Have to tried passing it simply as a string?

Dim update As String = "I am a string."
Dim transactionHash = Await pushUpdate.SendTransactionAndWaitForReceiptAsync(account.Address, gas, value, , update)

Example: https://rinkeby.etherscan.io/address/0x347520549ff909c9322cbb278cda5aca71133255#code

Alternatively there is Nethereum.ABI.Encoders.Bytes32TypeEncoder but I think you could just pass it as a string.
JEN
@chukwuemekanweke
Apr 27 2018 15:49
@Vahid1Ali, glad it's working
@khmuminov , passing in an instance of the account as you have done above will auto sign all transactions you make with that web3 instance
ISGroup
@isgroupsrl_twitter
Apr 27 2018 17:06
@KevinSmall how can somebody optimize token transactions (ERC20) in batches in order to lower the gas consumption? Eg: i know that i'm going to send some tokens to an address and some others to another, can I perform a single transaction?
ShermanMeredith
@ShermanMeredith
Apr 27 2018 20:56
@juanfranblanco I'm getting an error in Unity when I try to decode a function that has a return type int[]
I'm getting the error MissingMethodException: Method not found: 'Default constructor not found...ctor() of System.Int32[]'.
Do I need to do something special when decoding arrays of uncertain lengths?
JEN
@chukwuemekanweke
Apr 27 2018 21:07
@isgroupsrl_twitter you can try including a batch transfer function in your contract. But be warned, it can lead to batch overflow.
ShermanMeredith
@ShermanMeredith
Apr 27 2018 22:42
Replacing
function.DecodeSimpleTypeOutput<int[]>(result)
with
function.DecodeSimpleTypeOutput<List<int>>(result)
fixed the issue :smile: