{"id":20060620,"url":"https://github.com/oasisprotocol/demo-starter-go","last_synced_at":"2026-02-09T21:03:19.631Z","repository":{"id":249305820,"uuid":"823520588","full_name":"oasisprotocol/demo-starter-go","owner":"oasisprotocol","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-13T11:15:50.000Z","size":47,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-12-31T21:33:44.405Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oasisprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2024-07-03T07:36:27.000Z","updated_at":"2024-10-29T12:40:29.000Z","dependencies_parsed_at":"2024-07-20T00:38:04.471Z","dependency_job_id":"284aca93-2edc-4c32-8aa7-36658d42d286","html_url":"https://github.com/oasisprotocol/demo-starter-go","commit_stats":null,"previous_names":["oasisprotocol/demo-starter-go"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oasisprotocol%2Fdemo-starter-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oasisprotocol%2Fdemo-starter-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oasisprotocol%2Fdemo-starter-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oasisprotocol%2Fdemo-starter-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oasisprotocol","download_url":"https://codeload.github.com/oasisprotocol/demo-starter-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233665645,"owners_count":18710920,"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-13T13:15:59.449Z","updated_at":"2025-09-20T13:32:02.001Z","avatar_url":"https://github.com/oasisprotocol.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oasis Starter dApp in Go\n\nThis is a skeleton for confidential Oasis dApps in Go.\n\n## Prerequisites\n\nTo build the example MessageBox contract, you need `solc` and `abigen`.\nIf you're on Ubuntu, you can install both with:\n\n```shell\nmake install-deps\n```\n\nTo build the rest of the project, you need Go.\n\n## Building\n\nTo build everything, simply run:\n\n```shell\nmake\n```\n\n## Testing\n\nTo run the end-to-end test, you should first start the Sapphire Localnet\nin Docker:\n\n```shell\nmake run-localnet\n```\n\nAfter it has finished starting up, you can run the end-to-end test:\n\n```shell\nmake test\n```\n\nThis will deploy the MessageBox contract, store a message in it, retrieve it,\nand check if the retrieved message matches the stored one.\n\n## Running\n\nBefore deploying the contract or interacting with it, you should store your\naccount's hex-encoded private key in an environment variable (the `0x` prefix\nis optional):\n\n```shell\nexport PRIVATE_KEY=...\n```\n\n### Deploying the contract\n\nYou can deploy the contract on different networks by invoking:\n\n```shell\n./demo-starter deploy --network sapphire-localnet # Sapphire Localnet\n./demo-starter deploy --network sapphire-testnet  # Sapphire Testnet\n./demo-starter deploy --network sapphire          # Sapphire Mainnet\n```\n\nThe deployed contract's address is printed to the standard output if the\ndeployment is successful.  You can store it in an environment variable,\nas you will need it to interact with the contract.\n\n### Interacting with the contract\n\nThe example MessageBox contract has two methods: `setMessage` and `message`.\n\nTo store a private message inside the deployed contract:\n\n```shell\n./demo-starter setMessage --network sapphire-localnet ${CONTRACT_ADDR} \"Hello!\"\n```\n\nTo retrieve the private message from the deployed contract:\n\n```shell\n./demo-starter message --network sapphire-localnet ${CONTRACT_ADDR}\n```\n\nIf you try to retrieve the message using a different account than the one\nthat was used to store it, the retrieval will fail.\n\n## Debugging\n\nFor debugging purposes, you can also run the localnet in debug mode with:\n\n```shell\nmake run-localnet-debug\n```\n\nInside the Docker container, the Web3 gateway logs are located in\n`/var/log/oasis-web3-gateway.log`, while the Oasis node logs are located\nunder the `/serverdir/node/net-runner/network/...` hierarchy (each node\nhas its subfolder and its log is in `node.log` inside that subfolder).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foasisprotocol%2Fdemo-starter-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foasisprotocol%2Fdemo-starter-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foasisprotocol%2Fdemo-starter-go/lists"}