{"id":15311074,"url":"https://github.com/talentlessguy/eth-clang-experiments","last_synced_at":"2025-04-06T04:44:51.998Z","repository":{"id":242553749,"uuid":"809788622","full_name":"talentlessguy/eth-clang-experiments","owner":"talentlessguy","description":"Clang experiments with Ethereum","archived":false,"fork":false,"pushed_at":"2024-06-14T13:32:48.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-12T10:55:20.915Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","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/talentlessguy.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":"2024-06-03T13:01:35.000Z","updated_at":"2024-06-14T13:32:51.000Z","dependencies_parsed_at":"2024-10-31T21:12:15.431Z","dependency_job_id":"19e48f81-b58c-4e17-89bb-221b5cba163c","html_url":"https://github.com/talentlessguy/eth-clang-experiments","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"6ccc497e08a0a54e746e59c594386e781d8d295d"},"previous_names":["talentlessguy/eth-clang-experiments"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talentlessguy%2Feth-clang-experiments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talentlessguy%2Feth-clang-experiments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talentlessguy%2Feth-clang-experiments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talentlessguy%2Feth-clang-experiments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/talentlessguy","download_url":"https://codeload.github.com/talentlessguy/eth-clang-experiments/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247436140,"owners_count":20938532,"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-10-01T08:31:13.292Z","updated_at":"2025-04-06T04:44:51.969Z","avatar_url":"https://github.com/talentlessguy.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clang experiments with Ethereum\n\n## Setup\n\nGCC/clang 17+ is recommended.\n\n## Experiments\n\n### JSONRPC request\n\nRequirements: `libcurl`, `json-glib`, `glib`\n\nMakes an HTTP request to an Ethereum node to obtain chain ID.\n\n```sh\ngcc src/chain_id.c src/utils/jsonrpc.c -I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -ljson-glib-1.0 -lgobject-2.0 -lglib-2.0 -lcurl\n```\n\n### Sign a message\n\nRequirements: `libethc`\n\nLoads an Ethereum account from env, signs a \"Hello World\" message and outputs an\nEthereum address.\n\n```\n$ LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib clang src/sign.c -lethc\n\nSignature: 0xb81efa243127sda5...00\nEthereum Address: 0xce9667fa..43c6\n```\n\n### Resolve ENS\n\nRequirements: `libethc`, `libcurl`, `json-glib`, `glib`\n\nResolves given ENS name to an Ethereum address.\n\n```\n$ LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib gcc src/ens-addr.c src/utils/*.c -I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -ljson-glib-1.0 -lgobject-2.0 -lglib-2.0 -lcurl -lethc\n\nENS name: v1rtl.eth\nnamehash: 0x6dd56164f699a101d6063add452dfed7c6c09fe17b8e4acf3328f9387f5030b9\nEncoded ABI: 0x3b3b57de6dd56164f699a101d6063add452dfed7c6c09fe17b8e4acf3328f9387f5030b9\nResponse: {\"jsonrpc\":\"2.0\",\"id\":1,\"result\":\"0x000000000000000000000000d3b282e9880cdcb1142830731cd83f7ac0e1043f\"}\n\nAddress: d3b282e9880cdcb1142830731cd83f7ac0e1043f\n```\n\n### Content-Hash\n\nRequirements: `libethc`, `libcurl`, `json-glib`, `glib`\n\n```\nLD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib gcc src/content-hash.c src/utils/*.c -I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -ljson-glib-1.0 -lgobject-2.0 -lglib-2.0 -lcurl -lethc\n\nENS name:     v1rtl.eth\nContent-Hash: 0xe30101701220846a8475d7d2ee4178ea696d2f3a15075b1e57729abbfa72f01c5caf24668eec\nIPFS Hash:    bafybeieenkchlv6s5zaxr2tjnuxtufihlmpfo4u2xp5hf4a4lsxsizuo5q\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalentlessguy%2Feth-clang-experiments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftalentlessguy%2Feth-clang-experiments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalentlessguy%2Feth-clang-experiments/lists"}