{"id":20841586,"url":"https://github.com/iotexproject/arduino-sdk","last_synced_at":"2025-08-01T07:38:24.803Z","repository":{"id":42022838,"uuid":"429629513","full_name":"iotexproject/arduino-sdk","owner":"iotexproject","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-10T17:38:57.000Z","size":1174,"stargazers_count":11,"open_issues_count":1,"forks_count":9,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-05-08T22:15:23.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iotexproject.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2021-11-19T01:14:21.000Z","updated_at":"2024-04-22T00:20:50.000Z","dependencies_parsed_at":"2025-05-08T22:15:26.996Z","dependency_job_id":null,"html_url":"https://github.com/iotexproject/arduino-sdk","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/iotexproject/arduino-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Farduino-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Farduino-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Farduino-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Farduino-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iotexproject","download_url":"https://codeload.github.com/iotexproject/arduino-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Farduino-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268185569,"owners_count":24209395,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-18T01:20:50.770Z","updated_at":"2025-08-01T07:38:24.753Z","avatar_url":"https://github.com/iotexproject.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IoTeX Blockchain Client for Embedded systems\nA simple IoTeX Blockchain client implementation in C++ for embedded systems. Supporting Arduino IDE and PlatformIO.   \nCompatible with some popular Arduino boards and Raspberry Pi/Unix environments.  \n\n## Supported boards\nThe SDK has been successfully tested on ESP32 and SAMD21 -based boards. ESP8266 will also work well for anything except smart contract calls: in this case we have experienced random crashes.\n\n## Documentation / Usage\n\nYou can find the installation instructions in the [wiki](https://github.com/iotexproject/arduino-sdk/wiki/Home).  \nFor more detailed documentation refer to the [official documentation](https://docs.iotex.io/verifiable-data/arduino-and-more) or the [API reference](https://iotexproject.github.io/arduino-sdk).  \n\n## Examples\n\nThe `examples` directory contains examples that demonstrate most of the library functions.\nThey can be used with both Arduino IDE and PlatformIO.  \n\n## Development environment\n\n### Docker\n\nThe Dockerfile provided sets up a Ubuntu based dev container with all required dependencies to build and test the library.  \n\n#### Using the dev container with VSCode\n\nFollow the below steps in order to use VSCode to develop and contribute to the library:  \n\n1. Install the *Dev Containers* VSCode extension.\n\n2. Open the directory containing this repository in VSCode.\n\n3. Press `F1` and enter `Dev Containers: Rebuild and Reopen in Container`.  \n\n4. Wait until the container is started. It should take a couple of minutes.  \n\n#### Building using the dev container\n\nOnce the container is started and open in VSCode you should be able to run the provided tasks in `tasks.json`.  \nYou can get a list of tasks and run them by pressing`F1` and entering `Run task`. The main tasks are described below:  \n\n##### Build tasks  \n\nThe following tasks can be used to build the tests. The build output will be placed in the `build` directory. The tests executable will be located at `build/tests/iotex_unit_tests`.  \n\n- **IoTeX SDK: Build unit tests (debug):** builds the unit tests in debug mode\n- **IoTeX SDK: Build unit tests (release):** builds the unit tests in release mode  \n\n##### Test/tooling services tasks  \n\n- **HTTP-JSONRPC server: start (mainnet)**: starts the envoy HTTP-JSONRPC proxy pointing it to mainnet. The configuration file is located in `tools/server/envoy-conf-testnet.yaml`.  \n- **HTTP-JSONRPC server: start (testnet):** starts the envoy HTTP-JSONRPC proxy pointing it to testnet. The configuration file is located in `tools/server/envoy-conf-mainnet.yaml`.  \n- **HTTP-JSONRPC server: stop:** starts the envoy HTTP-JSONRPC proxy.  \n- **HTTP-JSONRPC server: restart (mainnet):** restarts the envoy HTTP-JSONRPC proxy pointing it to mainnet.  \n- **HTTP-JSONRPC server: restart (testnet):** restarts the envoy HTTP-JSONRPC proxy pointing it to testnet.  \n- **Fake HTTP-JSONRPC server: launch:** starts the fake server. This is a fake python HTTP-JSONRPC server that provides canned responses preconfigured in `tools/server-fake/config.json`. The fake server is used by the tests that.  \n\n##### Launch configurations  \n\nVSCode launch configurations are also set up for launching the unit tests in debug mode.  \nUse the VSCode Run and Debug panel to launch them.  \nEdit the `--gtest_filter` argument in `launch.json` if you want to pass a filter to the launch command. Eg: `\"--gtest_filter=\\\"ContractTests.*\\\"\"` will only run tests from the `ContracTests` test suite.  \n\n## Tools\n\nThe `tools` directory contains a set of tools that can be used to help with the development of the library. Some of them are described below:  \n\n### HTTP-JSONRPC server\n\nLocated in `tools/server`.  \nA HTTP-JSONRPC server using Envoy proxy. Two configurations files are provided to connect to either mainnet or testnet. It implements the following endpoints:  \n\n- **/GetAccount**\n- **/GetActions**\n- **/SendAction**\n- **/ReadContract**\n\n### Fake server\n\nLocated in `tools/server-fake`.  \nA fake HTTP-JSONRPC server that provides canned responses. The responses are set up in `tools/server-fake/config.json`.  \n\n### Clang-format\n\nThe clang-format configuration file is located in `tools/.clang-format`.  \nRun `./tools/clang_format.sh` from the root directory to apply clang-format.  \n\n### Abi decoder/encoder\n\nA JS helper script that can be used used to test/verify abi encoding. It uses the `abi-decoder` JS library.  \n\n### Build scripts\n\n#### build_native.sh\n\nBuilds the library and unit tests for the native (Linux) environemnt.  \n\n#### build_arduino-cli.sh\n\nBuilds all the examples for each of the supported boards using `arduino-cli`.  \n\n#### build_platformio_.sh\n\nBuilds all the examples for each of the supported boards using `platformio`.  \n\n## Generating doxygen documentation  \n\nRun `doxygen Doxyfile` to regenerate the doxygen documentation. The output will be placed in the `docs` directory.\n\n## Generating and publishing a new release  \n\nThis library uses *Conventional Commits* and *Conventional Changelog* to automete the release and changelog generation.  \nIn order to generate a new release:\n\n1. Run `standard-version \"--dry-run\"` to preview the changelog and update the version in `library.json` for PlatformIO `library.properties` for Arduino.\n2. Commit both files\n3. Run `npm run release`.  \n4. Push to Github including tags `git push --follow-tags`.  \n5. Create a tag matching the new release version in Github. The Arduino library manager should pick up the new release in about an hour or less.  \n6. For PlatformIO run `pio package publish`. Credentials are needed that belong to the author of the library.  \n\n### Troubleshooting release errors\n\nThe Arduino library manager checks the repository for new updates periodically. The logs can bee seen at \u003chttps://downloads.arduino.cc/libraries/logs/github.com/iotexproject/arduino-sdk/\u003e.\n\n## TODO\n\n- [ ] Set up CI/CD (build and test in Linux, build using arduino-cli and platformio).   \n- [ ] Automate release generation/publishing in CI.  \n- [ ] Automate doxygen generatin in CI.  \n- [ ] Support more ABI types.  \n- [ ] Improve JSON parsing. Implement a genereric JSON parsing scheme that makes it easier to add new endpoints.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotexproject%2Farduino-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiotexproject%2Farduino-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotexproject%2Farduino-sdk/lists"}