Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.56 KB

README.md

File metadata and controls

50 lines (35 loc) · 1.56 KB

GoethApi

GoethApi is a Rest Api allowing to dialog with an Ethereum node. GoethApi can deploy and execute smart contracts.

Installation

Config file

In order to set your own config, you have to create your config file.
rename config/app-example.yml to config/app.yml
and change the config to your own settings

Examples

Url: http://localhost:8080/contract/create/ Method: Post Data: {"name": "<contract_name>", "source": "<contract_source>"} Example: curl -H "Content-Type: application/json" -X POST -d '{"name": "simplestorage", "source": "test code etc."}' http://localhost:8080/contract/create/

Url: http://localhost:8080/contract/deploy/ Method: Post Data: {"id": "<contract_idkey>", "params": ["42"]} Example: curl -H "Content-Type: application/json" -X POST -d '{"address": "g73xKOwc", "method": "Get", "params": []}' http://localhost:8080/contract/deploy/

Url: http://localhost:8080/contract/exec/ Method: Post Data: Example: curl -H "Content-Type: application/json" -X POST -d '{"address": "<contract_adress>", "method": "Set", "params": []}' http://localhost:8080/contract/exec/

Url: http://localhost:8080/contract/get/ Method: Post Data: {"address": "<contract_adress>", "method": "Set", "params": ["42"]} Example: curl -H "Content-Type: application/json" -X POST -d '{"address": "0x15e2eb21fb84b0bb631a5853d6f4f3932bf4d3f5", "method": "Get", "params": []}' http://localhost:8080/contract/get/

Todo

  • Manage several applications (multiple callback)