These are chat archives for Nethereum/Nethereum

9th
Nov 2016
Vladimir Milenko
@VladimirMilenko
Nov 09 2016 10:11
@juanfranblanco and another one. What should we know to call function on contract? For example, i have a contract in Ethereum but i don't want to share bytecode, i just want to be able to call some functions
Juan Blanco
@juanfranblanco
Nov 09 2016 12:23
the abi and the contract address is all you need
the abi is like the wsdl (web service definition) of the contract , the address will be following the analogy the url
Vladimir Milenko
@VladimirMilenko
Nov 09 2016 13:04
yeah, i understand, i don't have ethereum running atm, that's why I asked:)
Are we able to listen for contract calls?
Juan Blanco
@juanfranblanco
Nov 09 2016 14:04
"listen" you can check for transactions which address is the contract address. Also the contract can "raise" events which can be extracted from the logs using filters (more convenient)
"raise" as the events are written to the log, is not something you can react to
Vladimir Milenko
@VladimirMilenko
Nov 09 2016 15:29
and one more question. it's more about ethereum.
When we created some contract on one ethereum machine.
And we want to call it from another one, can we detect somehow, that this contact can be mined on this eth client?
Juan Blanco
@juanfranblanco
Nov 09 2016 15:30
Ill rephrase the last part
"And we want to call it from another one, can we detect somehow, that this contract has be mined on another eth client?"
is your other client going to have any information about the transaction? (the trasanction hash?)
Vladimir Milenko
@VladimirMilenko
Nov 09 2016 15:33
ok. sry, english is not my native language.
I mean, we have deployed contract using one eth client.
Then, i want to call this contract from other eth client(another server)
Juan Blanco
@juanfranblanco
Nov 09 2016 15:34
don't worry :) for most of us is not our native language
To call the contract you need the contract address
Vladimir Milenko
@VladimirMilenko
Nov 09 2016 15:35
:D
we don't have a transaction hash, but we assume, that contract was successfully deployed
Juan Blanco
@juanfranblanco
Nov 09 2016 15:35
ah ok
so you dont have any information
Vladimir Milenko
@VladimirMilenko
Nov 09 2016 15:36
but we have an address
and abi
Juan Blanco
@juanfranblanco
Nov 09 2016 15:36
oh if you have an address of the contract and abi, yes
you can call it from another server
Vladimir Milenko
@VladimirMilenko
Nov 09 2016 15:36
fine!
Juan Blanco
@juanfranblanco
Nov 09 2016 15:37
you don't even need to have installed a client there, if you know your private key
Vladimir Milenko
@VladimirMilenko
Nov 09 2016 15:38
we assume, that for each client(i mean, organisation or smth like that) they have their own ethereum node
and they can communicate only with their node(and once with our server)
Juan Blanco
@juanfranblanco
Nov 09 2016 15:41
yes that should be fine
what you can do to get a better understanding is create a contract and publish it to Morden (public testnet)
then use another client to interact with the contract
Vladimir Milenko
@VladimirMilenko
Nov 09 2016 15:43
google said:
'Want to immigrate to Mordon, Canada?":D
actually, we are gonna use azure for testing
Juan Blanco
@juanfranblanco
Nov 09 2016 15:45
lol, yes Azure is of course a great option for a consortium
Vladimir Milenko
@VladimirMilenko
Nov 09 2016 15:45
microsoft has given us bizspark access
Juan Blanco
@juanfranblanco
Nov 09 2016 15:47
I have not tried it yet
Vladimir Milenko
@VladimirMilenko
Nov 09 2016 15:48
Let me see
let's wait until it will be deployed
Juan Blanco
@juanfranblanco
Nov 09 2016 15:51
ok
Vladimir Milenko
@VladimirMilenko
Nov 09 2016 16:34
yep, it works
Vladimir Milenko
@VladimirMilenko
Nov 09 2016 17:44
can't connect via rpc
Juan Blanco
@juanfranblanco
Nov 09 2016 18:28
have you enabled rpc?
are you running in a remote pc?
Vladimir Milenko
@VladimirMilenko
Nov 09 2016 18:59
Yep, I've enabled,
Juan Blanco
@juanfranblanco
Nov 09 2016 19:00
geth --rpc --rpccorsdomain "*"
do you need cors?
or are using a different api?
--rpcapi value API's offered over the HTTP-RPC interface (default: "eth,net,web3")
url ?