{"id":17957517,"url":"https://github.com/itinance/yair-token","last_synced_at":"2025-04-03T17:30:21.112Z","repository":{"id":66335612,"uuid":"161058607","full_name":"itinance/yair-token","owner":"itinance","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-07T11:17:18.000Z","size":224,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T06:16:01.655Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"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/itinance.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":"2018-12-09T16:26:39.000Z","updated_at":"2021-04-09T08:02:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"67e0369a-6eae-467a-830e-3dc8a077e06b","html_url":"https://github.com/itinance/yair-token","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fyair-token","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fyair-token/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fyair-token/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fyair-token/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itinance","download_url":"https://codeload.github.com/itinance/yair-token/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247046671,"owners_count":20874700,"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-10-29T10:55:27.175Z","updated_at":"2025-04-03T17:30:21.082Z","avatar_url":"https://github.com/itinance.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## YAIR Token Development\n\n[![CircleCI](https://circleci.com/gh/yairtoken/yair-token.svg?style=svg\u0026circle-token=f533de9156b9356ab04069cb5daf27fb5f8db2d3)](https://circleci.com/gh/yairtoken/yair-token)\n\n### This project uses:\n- [Truffle v5](https://truffleframework.com/)\n- [Ganache](https://truffleframework.com/ganache)\n- [Solium](https://github.com/duaraghav8/Solium)\n- [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-solidity)\n- [Circle CI](https://circleci.com/gh/yairtoken)\n\n### Installation of tools;\n\n1. Install Truffle and Ganache CLI globally.\n\n```\nnpm install -g truffle\nnpm install -g ganache-cli\n```\n\n### Setup for development\n\nHow to set it up for development:\n\n```\ngit clone git@github.com:yairtoken/yair-token.git\ncd yair-token\nnpm install\ntruffle compile\n```\n\nOpen in another terminal `ganache-cli`.\n\nSwitch back to your main terminal and start migration and run the tests:\n\n```\ntruffle migrate \u0026\u0026 truffle test\n```\n\n\n\n**Token Standard for Co-Owned Assets (C.O.A. standard).**\n\n\n\nThe C.O.A. Standard is designed to have a contained economy, where there is a parent token, that can be used to embody multiple assets. These are represented by an I.D. called AssetID (asset identification number).\n\n\n\nThe C.O.A. standard is a variation of the ERC20 standard, with 3 additional mappings.\n\n### 1st mapping\n\n\n\n**address** (Owner)\n\n**assetID** (Asset identification string, eg. “artwork name”)\n\n**ownedAssetTokenCount** (the number of tokens of a particular asset held by the owner wallet)\n\n\n\n    mapping (address =\u003e mapping (string =\u003e uint256)) private _ownedAssetTokenCount;\n\n\n\nSo each wallet (**address**) contains an array of **assetID** referencing the **ownedAssetTokenCount**\n\n\n\nGiving us the total number of tokens each wallet holds for each asset.\n\n### 2nd Mapping\n\nMust always be in lockstep with 1st mapping\n\nThe total number of tokens expressing a particular asset: **assetTokenCount**\n\n\n\nmust be mapped against the **assetID**.\n\n\n\nWhenever tokens for an assetID are minted or burned, both mappings described above must be changed in sync or the transactions will be invalid.\n\n\n\nWhen tokens for an assetID are simply transferred from one address to another there must be no change in the assetTokenCount:\n\n\n\n    mapping (string =\u003e uint256) private _assetTokenCount;\n\n\n\nHence we provide external functions to perform token transfers, which have no direct access to these mappings.\n\n### 3rd Mapping\n\n\n\nThis mapping maps **assetID** to **assetMetaData**\n\n\n\n**assetMetaData** is a data structure that is multi purpose. It could be used to link a IPFS file hash of a digital asset or urls to artist website, thumbnails or descriptions etc.\n\n\n\n    struct _assetMetaData {\n\n    string uri;\n\n    string name;\n\n    // and so on\n\n    }\n\n    mapping (string =\u003e uint256) private _assetMetaData;\n\n\n\n(NOtes for development)\n\n\nERC20 Methods\n\n- list all open IAOs\n- brand token fro specific artwork\n- list my branded token\n- unbrand a token\n- brandToken nur bei aktuellen IAOs\n- lock token in precommit phase\n- unbrand token kostet penalty fee\n\n- M;ultiplier on per IAO phses\n\u003e  recipient address for burned tokens\n\u003e  getRate()\n\n\n----\n\nPhase -\u003e IAO Contract\nRefunding/Cancellation\nNo unbrand during Precommit phase or cancellation (state)\nCancel State\nArtwork-reserve (no access ferom outside)\nDifference of multiplier goes to special wallet (defaiults to artwork reserve)\n\nWenn die base valuation erreicht wurde, landet a\n\n\nInput für IAO:\n- base valuation (YAIR)\n- precommit phase bis das voll ist\n- Verteilungsschlüssel\n    + mapping(address =\u003e percentage)\n- method payOutShareholders()\n- refund()\n\n\nExtra token/wallet for IR\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitinance%2Fyair-token","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitinance%2Fyair-token","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitinance%2Fyair-token/lists"}