0

Is it possible to call a function of smart contract to send a transaction (for example, writing on the Ethereum blockchain) but "without" installing "Geth" or "Parity" clients?

In a more general question, is it possible to interact with Ethereum blockchain, without installing Geth or Parity?

  • 2
    You can interact to existing node like infura :) – Ha ĐANG Aug 31 '18 at 12:20
  • Is it possible to use infura in a micro-controller, because of limitations of installing Geth or Parity on these devices? Thanks – Questioner Aug 31 '18 at 12:27
  • It’s just a endpoint then you can connect to it via json rpc – Ha ĐANG Aug 31 '18 at 12:33
1

You can download the contract's code, and the part of the StateDB that this contract uses for storage, also the part of the SateDB of the addresses involved in contract calls, and then you can use cmd/evm binary to run this contract's code:

cmd/evm run --input 0xa5e4d2b41223289af53234 --code 0xcontract'scode ....

It is very hacky, but you asked if it is possible and that's how it is possible to do it without installing Geth or Parity.

| improve this answer | |
1

On the generic question - interacting with Ethereum without using a client, it depends on the definition of "interacting". If it is limited to sending transactions only, then the short answer is yes, provided one:

  • has the account's private key
  • know the account's nonce
  • has the called contract's ABI (not needed for simple payment transactions).

With the above, a transaction can be constructed byte by byte. One actual example is here. The constructed "raw" transaction can be sent over with tools such as etherscan's broadcaster (well, in theory even this can be rid of, but then one will have to implement - at least partially - the RLPx protocol) .

In fact, this is what makes it hard to censor a blockchain transaction: one can always construct the transaction off-line, and send the bytes through a post (or even voice) to friends, who can then help push to the network.

Although, the problem is the "one-way" sending can be hardly called "interacting". To make things go two ways, a receiver is needed, which will need to check the validity of incoming messages. This, in turn, requires fully implementing the protocol. Now we have just brought back "the client".

For the original question, calling a contract's method without using geth or parity, the same bytes construction methodology from the aforementioned post can be used, although the contract ABI becomes necessary. See this question for more details.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.