{"id":26562883,"url":"https://github.com/aelfproject/aelf-playground-build-service","last_synced_at":"2026-04-28T23:05:29.613Z","repository":{"id":243161192,"uuid":"811265688","full_name":"AElfProject/aelf-playground-build-service","owner":"AElfProject","description":"Build service for aelf Playground.","archived":false,"fork":false,"pushed_at":"2024-10-28T08:42:20.000Z","size":189,"stargazers_count":0,"open_issues_count":10,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-22T15:41:33.674Z","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/AElfProject.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-06T09:05:12.000Z","updated_at":"2024-10-21T12:24:41.000Z","dependencies_parsed_at":"2024-07-09T08:55:59.222Z","dependency_job_id":"39ae2352-0f3c-4f48-a084-e8b38e54f2f3","html_url":"https://github.com/AElfProject/aelf-playground-build-service","commit_stats":null,"previous_names":["aelfproject/aelf-playground-build-service"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/AElfProject/aelf-playground-build-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AElfProject%2Faelf-playground-build-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AElfProject%2Faelf-playground-build-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AElfProject%2Faelf-playground-build-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AElfProject%2Faelf-playground-build-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AElfProject","download_url":"https://codeload.github.com/AElfProject/aelf-playground-build-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AElfProject%2Faelf-playground-build-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32402713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2025-03-22T15:29:05.671Z","updated_at":"2026-04-28T23:05:29.585Z","avatar_url":"https://github.com/AElfProject.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Playground service\n\n## Setup\n\n1. Go to PlaygroundService/appsettings.json, change the configuration under ContractSetting to your own file path. After that, start the service.\n\n2. Using postman or other http client, call this endpint `localhost:7020/playground/generate` with the following params.\n\n   ```\n   {\n    \"ContractClass\": \"using AElf.Sdk.CSharp;\\nusing Google.Protobuf.WellKnownTypes;\\n\\nnamespace AElf.Contracts.HelloWorld\\n{\\n    // Contract class must inherit the base class generated from the proto file\\n    public class HelloWorld : HelloWorldContainer.HelloWorldBase\\n    {\\n        // A method that modifies the contract state\\n        public override Empty Update(StringValue input)\\n        {\\n            // Set the message value in the contract state\\n            State.Message.Value = input.Value;\\n            // Emit an event to notify listeners about something happened during the execution of this method\\n            Context.Fire(new UpdatedMessage\\n            {\\n                Value = input.Value\\n            });\\n            return new Empty();\\n        }\\n\\n        // A method that read the contract state\\n        public override StringValue Read(Empty input)\\n        {\\n            // Retrieve the value from the state\\n            var value = State.Message.Value;\\n            // Wrap the value in the return type\\n            return new StringValue\\n            {\\n                Value = value\\n            };\\n        }\\n    }\\n    \\n}\",\n    \"StateClass\": \"using AElf.Sdk.CSharp.State;\\n\\nnamespace AElf.Contracts.HelloWorld\\n{\\n    // The state class is access the blockchain state\\n    public class HelloWorldState : ContractState \\n    {\\n        // A state that holds string value\\n        public StringState Message { get; set; }\\n    }\\n}\",\n    \"Proto\": \"syntax = \\\"proto3\\\";\\n\\nimport \\\"aelf/options.proto\\\";\\nimport \\\"google/protobuf/empty.proto\\\";\\nimport \\\"google/protobuf/wrappers.proto\\\";\\n// The namespace of this class\\noption csharp_namespace = \\\"AElf.Contracts.HelloWorld\\\";\\n\\nservice HelloWorld {\\n  // The name of the state class the smart contract is going to use to access blockchain state\\n  option (aelf.csharp_state) = \\\"AElf.Contracts.HelloWorld.HelloWorldState\\\";\\n\\n  // Actions (methods that modify contract state)\\n  // Stores the value in contract state\\n  rpc Update (google.protobuf.StringValue) returns (google.protobuf.Empty) {\\n  }\\n\\n  // Views (methods that don't modify contract state)\\n  // Get the value stored from contract state\\n  rpc Read (google.protobuf.Empty) returns (google.protobuf.StringValue) {\\n    option (aelf.is_view) = true;\\n  }\\n}\\n\\n// An event that will be emitted from contract method call\\nmessage UpdatedMessage {\\n  option (aelf.is_event) = true;\\n  string value = 1;\\n}\"\n   }\n   ```\n\n3. Go to HelloWorldContract/src/bin/src/Debug/net6.0, you can see the dll.patched file has been generated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faelfproject%2Faelf-playground-build-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faelfproject%2Faelf-playground-build-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faelfproject%2Faelf-playground-build-service/lists"}