{"id":13639503,"url":"https://github.com/JoinColony/colonySDK","last_synced_at":"2025-04-19T22:32:53.478Z","repository":{"id":38215393,"uuid":"135839969","full_name":"JoinColony/colonySDK","owner":"JoinColony","description":":rocket: Get started with Colony quickly","archived":true,"fork":false,"pushed_at":"2023-05-08T15:05:42.000Z","size":24426,"stargazers_count":63,"open_issues_count":3,"forks_count":28,"subscribers_count":18,"default_branch":"main","last_synced_at":"2024-08-03T01:14:57.401Z","etag":null,"topics":["boilerplates","colony","ethereum","examples"],"latest_commit_sha":null,"homepage":"https://github.com/JoinColony/colonyJS/tree/main/packages/sdk","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JoinColony.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-06-02T17:52:39.000Z","updated_at":"2023-10-04T22:27:52.000Z","dependencies_parsed_at":"2024-01-12T20:03:23.092Z","dependency_job_id":null,"html_url":"https://github.com/JoinColony/colonySDK","commit_stats":null,"previous_names":[],"tags_count":111,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoinColony%2FcolonySDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoinColony%2FcolonySDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoinColony%2FcolonySDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoinColony%2FcolonySDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoinColony","download_url":"https://codeload.github.com/JoinColony/colonySDK/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223810463,"owners_count":17206775,"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":["boilerplates","colony","ethereum","examples"],"created_at":"2024-08-02T01:01:01.522Z","updated_at":"2024-11-09T09:31:06.347Z","avatar_url":"https://github.com/JoinColony.png","language":"TypeScript","readme":"# MOVED. Colony SDK lives [here](https://github.com/JoinColony/colonyJS/tree/main/packages/sdk) now.\n\n🚀 The Colony SDK. Get started with Colony quickly\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/JoinColony/brand/v1.0.0/logo_sdk.svg\" width=\"600\" /\u003e\n\u003c/div\u003e\n\n[![Discord](https://img.shields.io/discord/562263648173555742)](https://discord.gg/feVZWwysqM)\n\n# Colony SDK\n\nThe Colony SDK is under heavy development by the community and will be an easy-to-use interface for the Colony Network contracts, providing simple functions that hide the dark magic going on under the hood of ColonyJS.\nIt covers _everything_ the dApp can do, so you'll be able to run your DAO entirely programmatically 👩‍💻\n\nColony SDK also includes a variety of examples to get you up and building with Colony in no time!\n\n## Quickstart\n\n```javascript\nimport { providers } from 'ethers';\nimport { ColonyNetwork, toEth } from '@colony/sdk';\n\n// If MetaMask is installed there will be an `ethereum` object on the `window`\n// NOTE: Make sure MetaMask is connected to Gnosis chain (see https://www.xdaichain.com/for-users/wallets/metamask/metamask-setup)\nconst provider = new providers.Web3Provider(window.ethereum);\n\n// Get the Colony's XDAI funding in the ROOT pot (id 1)\nconst start = async () =\u003e {\n  // This will try to connect the page to MetaMask\n  await provider.send('eth_requestAccounts', []);\n  // Create a new connection to the Colony Network contracts using the MetaMask \"wallet\"\n  const colonyNetwork = await ColonyNetwork.init(provider.getSigner());\n  // Connect to the MetaColony (this could be replaced with your own colony using `colonyNetwork.getColony(COLONY_ADDRESS)`)\n  const metaColony = await colonyNetwork.getMetaColony();\n  // Get the CLNY funding for the MetaColony (CLNY is it's native token)\n  const funding = await metaColony.getBalance();\n  // The funding will be in wei (x * 10^18), so we format into a readable string using the `toEth` function\n  alert('MetaColony balance is ' + toEth(funding) + ' CLNY');\n};\n\nstart();\n```\n\n## Documentation\n\n[🖺 Click here for docs!](https://docs.colony.io/colonysdk)\n\n## Running the examples\n\nFirst, clone this repo: \n```bash\ngit clone https://github.com/JoinColony/colonySDK.git\n```\n\nThen install all the required dependencies (this will install [ethers.js](https://docs.ethers.io/v5/) and [colonyJS](https://github.com/JoinColony/colonyJS) as well as some required development dependencies):\n\n```bash\nnpm install\n```\n\nThen you can run the examples:\n\n### Node.js\n\n```bash\nnpm run examples:node\n```\n\n### Browser (vanilla JS example)\n\n```bash\nnpm run examples:browser\n```\n\n### Some notes\n\nThese examples will run on Gnosis chain. If you'd like to make transactions, you will need some XDAI. Reach out to us in our [Discord](https://discord.gg/feVZWwysqM) if you're having trouble starting out.\n\n## Development\n\n### Prerequisites\n\n- Node `\u003e=16.0.0`\n\n_You may find it helpful to use [Node Version Manager (`nvm`)](https://github.com/nvm-sh/nvm) to manage Node versions._\n\n### Creating a new release\n\ncolonySDK is using [`release-it`](https://github.com/release-it/release-it) to create new releases. To create and publish a new release, commit your changes, then execute\n\n```bash\nnpm run release -- SEMVER_TAG # SEMVER_TAG is major, minor, patch\n```\n\nIf you don't supply a `GITHUB_TOKEN` environment variable, `release-it` will open a browser window and pre-populate the corresponding release input fields for you.\n\n**Frequent commits and descriptive commit messages** will help when `release-it` tries to autogenerate the changelog.\n\n### Contribute\n\n_Are you interested in contributing?_ Check out the following document for more information:\n\n- [Contributing](CONTRIBUTING.md)\n","funding_links":[],"categories":["DAO 产生器"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJoinColony%2FcolonySDK","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJoinColony%2FcolonySDK","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJoinColony%2FcolonySDK/lists"}