{"id":19026299,"url":"https://github.com/gipsh/basic-contract-interaction","last_synced_at":"2025-02-21T19:21:29.983Z","repository":{"id":149680063,"uuid":"450162225","full_name":"gipsh/basic-contract-interaction","owner":"gipsh","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-23T19:20:06.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-02T02:28:04.611Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gipsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-20T15:58:08.000Z","updated_at":"2022-01-20T19:01:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"13847f0f-df74-400b-b775-7a7d8875c863","html_url":"https://github.com/gipsh/basic-contract-interaction","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gipsh%2Fbasic-contract-interaction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gipsh%2Fbasic-contract-interaction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gipsh%2Fbasic-contract-interaction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gipsh%2Fbasic-contract-interaction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gipsh","download_url":"https://codeload.github.com/gipsh/basic-contract-interaction/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240072103,"owners_count":19743527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T20:48:17.551Z","updated_at":"2025-02-21T19:21:29.957Z","avatar_url":"https://github.com/gipsh.png","language":"Go","readme":"# basic-contract-interaction\n\nAPI example for talking with a smart-contract deployed on polygon \n\n\n\n## Config\n\nCopy `example.env` to `app.env` and config the private key \n\n```bash\ncp example.env app.env\n```\n\n\n## Run\n\nFirst compile \n\n```bash\ngo  build\n```\n\nThen run \n```bash\n./basic-contract-interaction\n```\n\n\n## Test \n\n#### Get product by id\n\n```bash\ncurl http://localhost:8080/product/17\n```\n\n```json\n{\n  \"Name\": \"newprod\",\n  \"Status\": 1,\n  \"Owner\": \"0x08f5f9a336aae6a72c795ddf307864b13d13f0aa\",\n  \"NewOwner\": \"0x08f5f9a336aae6a72c795ddf307864b13d13f0aa\"\n}\n```\n\n#### Get delegated products from a wallet\n\n```bash\ncurl http://localhost:8080/products/0xCF6380c9B128941d20d9F812dA406A79424b4B7B\n```\n\n```json\n{\n    \"address\": \"0xCF6380c9B128941d20d9F812dA406A79424b4B7B\",\n    \"products\": [\n        \"34\",\n        \"35\",\n        \"37\"\n    ]\n}\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgipsh%2Fbasic-contract-interaction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgipsh%2Fbasic-contract-interaction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgipsh%2Fbasic-contract-interaction/lists"}