These are chat archives for Nethereum/Nethereum

12th
Oct 2017
Tomas Tichy
@ttichy
Oct 12 2017 01:50
There has to be a convenient way to encode the data field in a transaction, right?
I need to encode a transaction sent to a contract. I know that I would use OfflineTransactionSigner.SignTransaction(pk, addr,amount, nonce,data).
But how do I put e.g. multiply(7) in the data field?
Can you guys point me in the right direction?
Juan Blanco
@juanfranblanco
Oct 12 2017 05:31
What is your scenario
if you create a new instance of Web3(new Account("privateKey"))
it will sign for you the transaction offline
all functions have GetData
also
and or CreateTransactionInput
gordns
@gordns
Oct 12 2017 11:10
Has anyone else tried to use the Unity version and build to webgl? Getting this error: blob:http://localhost:54929/fca94d40-f9c9-4fe3-89aa-40d9c4d6cf1f:8778 JsonException: No parameterless constructor defined for 'Nethereum.Unity.RpcModel.RpcParametersJsonConverter'.
that runs in webgl ^^
you need to use the Json library provided
also you need to have link.xml
in the project
@gordns ^^^^^
gordns
@gordns
Oct 12 2017 11:18
Ok, thanks will try that.
Juan Blanco
@juanfranblanco
Oct 12 2017 11:19
unity is not just the 3.5 is the compatibility with AOT and the stripping of libraries
kai
@kaista82_twitter
Oct 12 2017 11:38
Hey Juan, my man, can you give me your opinion on the following two:
function getAllGames() public constant returns (address[]) { return gamesByAddress; }
function getGame(address gameAddress) public constant returns (string,string,string,bytes32,bytes32,bytes32) {
    return (Games[gameAddress].name, Games[gameAddress].publisher, Games[gameAddress].developer, Games[gameAddress].country, Games[gameAddress].state, Games[gameAddress].logoImg);
}
function getAllGames() public constant returns (address[]) { return gamesByAddress; }
I obviously need the output, so am I getting _contract.GetEvent("getAllGames") etc? i expected them to be function calls as they are noted as functions
also thought getGame(address gameAddress) should be indexed
but i didnt write the contract
Juan Blanco
@juanfranblanco
Oct 12 2017 11:42
without context i really don't know
kai
@kaista82_twitter
Oct 12 2017 11:42
yeah ive not got much more context tbh, bit vague
I'll push back and tell them to sort their heads out
hope you're well mate
Juan Blanco
@juanfranblanco
Oct 12 2017 11:43
yes not bad :)
ha ha are you in the typical scenario, hey we can do this by ourselves, but we don't know what to do?
kai
@kaista82_twitter
Oct 12 2017 11:46
well it was me saying I need contracts then two guys learned solidity and i dont think they understand how it works tbh
Juan Blanco
@juanfranblanco
Oct 12 2017 11:46
yeah :)
lets quickly knock out something
Lucas Cullen
@bitcoinbrisbane
Oct 12 2017 12:08
how can you send eth to a no name function? Just "" in the send tx method?
Juan Blanco
@juanfranblanco
Oct 12 2017 12:09
just send it to the contract
try it before anyway :)
gordns
@gordns
Oct 12 2017 12:11
The link.xml fixed the problems I had with webgl. Thanks again
Lucas Cullen
@bitcoinbrisbane
Oct 12 2017 12:12
so like this? var functionToTest = contract.GetFunction("");
Juan Blanco
@juanfranblanco
Oct 12 2017 12:13
oh no
mainly just send some ether to the contract address
forget the function
but test it beforehand as i have not done that in a while
Lucas Cullen
@bitcoinbrisbane
Oct 12 2017 12:15
ok thanks
Karsten Gebbert
@krgn
Oct 12 2017 19:55
Hey, g'd evening!
I wonder what I can do to debug this:

Unhandled Exception: System.AggregateException: One or more errors occurred. (Code not deployed succesfully) ---> Nethereum.RPC.Eth.Exceptions.ContractDeploymentException: Code not deployed succesfully
   at Nethereum.RPC.TransactionReceipts.TransactionReceiptPollingService.<DeployContractAsync>d__8.MoveNext()
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.FSharp.Control.AsyncBuilderImpl.commit[a](AsyncImplResult`1 res)
   at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronouslyInCurrentThread[a](CancellationToken token, FSharpAsync`1 computation)
   at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronously[a](CancellationToken token, FSharpAsync`1 computation, FSharpOption`1 timeout)
   at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken)
   at Main.main(String[] argv) in /home/k/src/projects/ethereum/purity/app/PurityServer/Main.fs:line 227
ah, its a problem with the contract, nevermind
Karsten Gebbert
@krgn
Oct 12 2017 20:00
its a bit confusing, because the contract itself compiles