0

Suppose Smart lock (SL) has an Internet connection.

  • How can SL send message to Smart Contract when User close SL?
  • How to protect from reply attack? Is there any gas effective way to check SL identity?

Update: I think I will create new Ethereum Account controlled only by smart lock. So SL will be able to send Transactions to Smart Contract. Is it OK?

If OK, how can low power mobile IoT device send Transactions? Do I need some third party solution?

1 Answer 1

0

Yes, you are right. You need to send a transaction to the smart contract to tell it what is happening out of the blockchain.

You can either send the transaction from the Smart lock itself (it will need a node controlling an address then) or send a ping to a trusted oracle responsible of informing the contract (the keys and the node would be stored in a server). Another approach would be to sign the transaction from the lock and send it already signed to a node to propagate it (keys in the lock and node in a server).

2
  • thanks! but what is mechanism of the last approach? and where can I find nodes to propagate TX, if I want it to be scalable, decentrilized and extremely close to free of charge xD? Is there any solution like MetaMask could be applicable?
    – aleebek
    Commented Apr 17, 2017 at 13:10
  • You can use libraries such as eth-lightwallet/ethereumjs-tx to create and sign transactions, and then send them to your own node or to a node that propagates them for you. Take a look at the API of etherscan or infura.
    – AdrianClv
    Commented Apr 17, 2017 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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