{"id":24039095,"url":"https://github.com/rust-sol-dev/sui-ido-smart-contract","last_synced_at":"2025-02-26T07:21:46.220Z","repository":{"id":257549142,"uuid":"778981504","full_name":"Rust-Sol-Dev/sui-ido-smart-contract","owner":"Rust-Sol-Dev","description":"SUI IDO Smart Contract","archived":false,"fork":false,"pushed_at":"2024-09-17T07:06:59.000Z","size":94,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T20:37:17.646Z","etag":null,"topics":["ido","move","movelang","smart-contract","smartcontract","sui"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Rust-Sol-Dev.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-03-28T19:50:20.000Z","updated_at":"2024-09-17T07:08:25.000Z","dependencies_parsed_at":"2024-09-17T10:41:11.435Z","dependency_job_id":"bcda825f-5219-4641-aa4a-df03a5117b40","html_url":"https://github.com/Rust-Sol-Dev/sui-ido-smart-contract","commit_stats":null,"previous_names":["rust-sol-dev/sui-ido-smart-contract"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rust-Sol-Dev%2Fsui-ido-smart-contract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rust-Sol-Dev%2Fsui-ido-smart-contract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rust-Sol-Dev%2Fsui-ido-smart-contract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rust-Sol-Dev%2Fsui-ido-smart-contract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rust-Sol-Dev","download_url":"https://codeload.github.com/Rust-Sol-Dev/sui-ido-smart-contract/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240808962,"owners_count":19861014,"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":["ido","move","movelang","smart-contract","smartcontract","sui"],"created_at":"2025-01-08T20:35:18.954Z","updated_at":"2025-02-26T07:21:46.183Z","avatar_url":"https://github.com/Rust-Sol-Dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IDO Contract on SUI Blockchain\n\nThis contract enables Initial DEX Offerings (IDOs) on the SUI blockchain. An IDO is a decentralized fundraising mechanism for new crypto projects, where participants can contribute funds and receive newly minted tokens in return.\n\n## Features\n\nThe IDO contract has the following features:\n\n**Whitelist**: The IDO owner can maintain a whitelist of addresses that are allowed to participate in the IDO. Participants who are not on the whitelist will be rejected.\n**Funding Cap**: The IDO owner can set a funding cap for the IDO, beyond which no more funds will be accepted.\n**Start and End Time**: The IDO owner can set a start and end time for the IDO, during which participants can contribute funds.\n**Funds Transfer**: When a participant contributes funds to the IDO, the funds are transferred to the IDO owner's account and the participant receives newly minted tokens in return.\n\n## Usage\n\n### Creating an IDO\n\nTo create an IDO, call the **create_ido** function with the following parameters:\n\n- **start_time**: The start time of the IDO, in Unix timestamp format.\n- **end_time**: The end time of the IDO, in Unix timestamp format.\n- **whitelisted_addresses**: A list of addresses that are allowed to participate in the IDO.\n- **ctx**: A mutable reference to the TxContext object.\n\n### Participating in an IDO\n\nTo participate in an IDO, first check that you are on the whitelist by calling the **is_whitelisted** function with the following parameters:\n\n- **ido**: A mutable reference to the IDO object.\n- **address**: Your SUI Wallet Address.\n\nIf you are on the whitelist, you can contribute funds to the IDO by calling the **fund_ido** function with the following parameters:\n\n- **ido**: A mutable reference to the IDO object.\n- **amount**: The amount of SUI tokens you want to contribute.\n- **ctx**: A mutable reference to the TxContext object.\n- **clock**: A mutable reference to the Clock object.\n\n### Transfer Funds\n\nAfter the end of the IDO, the IDO owner can transfer the funds raised by calling the **transfer_funds** function with the following parameters:\n\n- **ido**: A mutable reference to the IDO object.\n- **amount**: The amount of SUI tokens the IDO owner wants to withdraw or transfer.\n- **ctx**: A mutable reference to the TxContext object.\n\n### Checking the Whitelisted Address of the IDO\n\nTo check the **whitelisted_addresses** of the IDO, you can call the following functions:\n\n- **is_whitelisted**: Checks if an address is on the IDO whitelist.\n\n## Deployed on SUI Testnet\n\n### SUI Explorer\n\n- [SUI Testnet](https://explorer.sui.io/object/0x7a397566abee80f9ecfef31e3e98cae7f9af0fb684cb6f3f9ba8ad43ede766fb)\n\n## Run Locally\n\nClone the project\n\n```bash\ngit clonegit@github.com:karangorania/Block-Chain-Full-stack.git\n```\n\nGo to the project directory\n\n```bash\ncd Block-Chain-Full-stack\n```\n\nCheckout to feature branch\n\n```bash\ngit checkout feature\n```\n\nInstall dependencies\n\n```bash\nnpm run dev\n# or\nyarn dev\n# or\npnpm dev\n```\n\n```bash\nnpm run dev\nnpm run build\nnpm run start\n```\n\nFor SUI Contract Build\n\nPS: You need **Rust**, **Move** \u0026 **SUI Binaries** install on your system.\n\n```bash\nsui move build\n```\n\n```bash\nsui client publish --gas-budget 1000\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-sol-dev%2Fsui-ido-smart-contract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-sol-dev%2Fsui-ido-smart-contract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-sol-dev%2Fsui-ido-smart-contract/lists"}