{"id":31923951,"url":"https://github.com/chainsafe/game-web3gl","last_synced_at":"2025-10-13T23:59:13.692Z","repository":{"id":42622402,"uuid":"369698105","full_name":"ChainSafe/game-web3gl","owner":"ChainSafe","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-12T21:27:32.000Z","size":1859,"stargazers_count":6,"open_issues_count":2,"forks_count":12,"subscribers_count":35,"default_branch":"2020","last_synced_at":"2025-10-02T02:53:28.047Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://chainsafe.github.io/game-web3gl/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChainSafe.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}},"created_at":"2021-05-22T02:29:15.000Z","updated_at":"2024-02-20T11:30:29.000Z","dependencies_parsed_at":"2023-02-08T13:46:24.205Z","dependency_job_id":null,"html_url":"https://github.com/ChainSafe/game-web3gl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ChainSafe/game-web3gl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Fgame-web3gl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Fgame-web3gl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Fgame-web3gl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Fgame-web3gl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChainSafe","download_url":"https://codeload.github.com/ChainSafe/game-web3gl/tar.gz/refs/heads/2020","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Fgame-web3gl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017175,"owners_count":26086019,"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-10-13T02:00:06.723Z","response_time":61,"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":"2025-10-13T23:58:42.535Z","updated_at":"2025-10-13T23:59:13.685Z","avatar_url":"https://github.com/ChainSafe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity ^2020.1.0 Web3GL Template\n\n## Methods in Browser\n\n![](https://user-images.githubusercontent.com/19412160/149653806-b2c4ca54-1986-4481-bd61-721dbd8a7967.png)\n\nDispay login modal:\n\n```javascript\nwindow.web3gl.connect();\n```\n\nGet Network:\n\n```javascript\nwindow.web3gl.networkId;\n```\n\nGet Connected Address:\n\n```javascript\nwindow.web3gl.connectAccount;\n```\n\nTo Send Transaction:\n\n```javascript\nconst to = \"0xdD4c825203f97984e7867F11eeCc813A036089D1\";\nconst value = \"12300000000000000\";\nconst gasLimit = \"21000\"; // gas limit\nconst gasPrice = \"33333333333\";\nwindow.web3gl.sendTransaction(to, value, gasLimit, gasPrice);\n```\n\nTo Interact with Contract:\n\n```javascript\nconst method = \"increment\";\nconst abi = `[ { \"inputs\": [], \"name\": \"increment\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"x\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]`;\nconst contract = \"0xB6B8bB1e16A6F73f7078108538979336B9B7341C\";\nconst args = \"[]\";\nconst value = \"0\";\nconst gasLimit = \"222222\"; // gas limit\nconst gasPrice = \"333333333333\";\nwindow.web3gl.sendContract(method, abi, contract, args, value, gasLimit, gasPrice);\n```\n\nAdd Custom Token Contract:\n\n```javascript\nconst tokenContract = \"0xd8Aa1F592B6f0670176958d93cD0c6D3E2627597\";\nconst tokenSymbol = \"PROS\";\nconst decimals = \"18\";\nconst tokenImage = \"https://www.your_url_path.com/logo.png\";\n\nwindow.web3gl.addTokenFunction(tokenContract,tokenSymbol,decimals,tokenImage);\n```\n\n## Enable Torus\n\nIn `web3/index.js`\n\nUncomment\n\n```javascript\ndocument.body.appendChild(Object.assign(document.createElement(\"script\"), { type: \"text/javascript\", src: \"https://unpkg.com/@toruslabs/torus-embed\" }));\n```\n\n```javascript\n  const providerOptions = {\n    torus: {\n      package: Torus,\n    }\n  };\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainsafe%2Fgame-web3gl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainsafe%2Fgame-web3gl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainsafe%2Fgame-web3gl/lists"}