{"id":24204568,"url":"https://github.com/boostryjp/ibet-smartcontract","last_synced_at":"2025-10-07T16:51:24.850Z","repository":{"id":38833607,"uuid":"117041160","full_name":"BoostryJP/ibet-SmartContract","owner":"BoostryJP","description":"Tokens and DEX contracts available in the ibet DeFi network 🔗","archived":false,"fork":false,"pushed_at":"2024-10-22T01:13:35.000Z","size":3402,"stargazers_count":18,"open_issues_count":5,"forks_count":3,"subscribers_count":4,"default_branch":"dev-24.12","last_synced_at":"2025-01-06T17:07:26.045Z","etag":null,"topics":["eth-brownie","hardhat","ibet","openzeppelin","solidity"],"latest_commit_sha":null,"homepage":"https://ibet.jp/ibet-for-fin","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BoostryJP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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-01-11T02:48:24.000Z","updated_at":"2024-10-22T01:13:33.000Z","dependencies_parsed_at":"2023-02-09T15:17:01.709Z","dependency_job_id":"53094e02-43a3-474c-b71a-f703c1516400","html_url":"https://github.com/BoostryJP/ibet-SmartContract","commit_stats":null,"previous_names":[],"tags_count":74,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoostryJP%2Fibet-SmartContract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoostryJP%2Fibet-SmartContract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoostryJP%2Fibet-SmartContract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoostryJP%2Fibet-SmartContract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BoostryJP","download_url":"https://codeload.github.com/BoostryJP/ibet-SmartContract/tar.gz/refs/heads/dev-24.12","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233819586,"owners_count":18735302,"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":["eth-brownie","hardhat","ibet","openzeppelin","solidity"],"created_at":"2025-01-13T23:17:26.529Z","updated_at":"2025-09-22T03:30:45.409Z","avatar_url":"https://github.com/BoostryJP.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"33%\" src=\"https://user-images.githubusercontent.com/963333/71672471-6383c080-2db9-11ea-85b6-8815519652ec.png\"/\u003e\n\u003c/p\u003e\n\n# ibet Smart Contract\n\n\u003cp\u003e\n  \u003cimg alt=\"Version\" src=\"https://img.shields.io/badge/version-24.12-blue.svg?cacheSeconds=2592000\" /\u003e\n  \u003cimg alt=\"License: Apache--2.0\" src=\"https://img.shields.io/badge/License-Apache--2.0-yellow.svg\" /\u003e\n\u003c/p\u003e\n\nEnglish | [日本語](README_JA.md)\n\n**Tokens and DEX contracts available in the ibet DeFi network**\n\n## Features\n- The ibet-SmartContract project is a project to build an open financial system on the [ibet-Network blockchain](https://github.com/BoostryJP/ibet-Network).\n- The project aims to provide token standards, decentralized exchanges, and other utility functions that can be used on the ibet-Network.\n\n## Dependencies\n- [Python3](https://www.python.org/downloads/)\n  - Version 3.11\n- [Node.js](https://nodejs.org/en/download/)\n  - Version 20\n- [Solidity](https://docs.soliditylang.org/)\n  - We are using Solidity to implement our smart contracts. \n  - Currently, we are using v0.8.23.\n- [eth-brownie](https://github.com/eth-brownie/brownie)\n  - We are using the eth-brownie framework for developing and testing our contracts.\n- [GoQuorum](https://github.com/ConsenSys/quorum)\n  - We support the official GoQuorum node of [ibet-Network](https://github.com/BoostryJP/ibet-Network).\n  - We use [hardhat network](https://hardhat.org/hardhat-network/) for local development and unit testing, and we use the latest version.\n- [OpenZeppelin](https://openzeppelin.com/contracts/)\n  - Our project is partly dependent on OpenZeppelin.\n  - We use openzeppelin-contracts v4.9.\n  \n## Overview\n\n### Interface: `/interfaces`\n\n- `IbetStandardTokenInterface`: Standard token interface for ibet-SmartContract\n- `IbetExchangeInterface`: Standard interface for exchange contracts in ibet-SmartContract.\n\n### Contract: `/contracts`\n\n- `access`: Determines which users can perform each action in the system.\n- `exchange`: Implementations of the various exchanges.\n- `ledger`: A data storage system that manages the data required as additional information in the ledger.\n- `payment`: A set of functions required to build an off-chain payment system.\n- `token`: Implementation of the various token formats: ERC20, ERC721, Bonds, Shares, etc.\n- `utils`: A set of other utility functions.\n\n## Install\n\nInstall eth-brownie as a python package.\n\n```bash\n$ make install\n```\n\nInstall openzeppelin-contracts.\n\n```bash\n$ brownie pm install OpenZeppelin/openzeppelin-contracts@4.9.3\n```\n\nInstall hardhat as a Node.js package.\n\n```bash\n$ npm install\n```\n\n## Compile Contracts\nUse eth-brownie to compile contracts.\n\n```bash\n$ brownie compile\n```\n\n## Deploy Contracts\n\n### Setting environment variables\n\nYou can switch the EOA used for deploying the contract by setting an environment variable.\n\n#### 1. GoQuorum (Geth)\n\nThis is the case when you store and use your private key in GoQuorum(Geth).\n\n- `ETH_ACCOUNT_PASSWORD` - The passphrase you have set for the Geth keystore file.\n\n#### 2. Local keystore file\n\nThis is the case when you use a local keystore file.\n\n- `ETH_KEYSTORE_PATH` - Path of the directory where the keystore is stored.\n- `ETH_ACCOUNT_PASSWORD` - The passphrase you have set for the keystore file.\n\n#### 3. Raw private key\n\nThis is the case when you use a raw private key.\n\n- `ETH_PRIVATE_KEY` - Raw private key\n- `ETH_ACCOUNT_PASSWORD` - Passphrase for encrypting the private key.\n\n#### 4. AWS Secrets Manager\n\nThis is the case of storing and using a private key in keystore file format in [AWS Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html).\n\n- `AWS_REGION_NAME` - AWS Region (default: ap-northeast-1)\n- `AWS_SECRETS_ID` - Secret's ARN\n- `ETH_ACCOUNT_PASSWORD` - The passphrase you have set for the keystore file.\n\n### How to deploy contracts\nTo deploy, execute the following command.\n\n```bash\n$ ./scripts/deploy_shared_contract.sh {--payment_gateway 0xabcd...} {contract_name}\n```\n\nYou can deploy the following contract as `contract_name`.\n\n- E2EMessaging \n- TokenList\n- PersonalInfo\n- PaymentGateway\n- IbetExchange (* need --payment_gateway option)\n- IbetEscrow\n- IbetSecurityTokenEscrow\n- FreezeLog\n\nAll other contracts are not supported for deployment by script. \nYou will need to deploy them in a different way.\n\n\n## Developing Smart Contracts\n\n### Network(hardhat) settings\nNetwork settings are defined in the `hardhat.config.js` file.\n\n- chainId: 2017\n- gasPrice: 0\n- blockGasLimit: 800000000\n- hardfork: \"berlin\"\n\nWhen developing in a local environment, start and use the `hardhat-network` container defined in `docker-compose.yml`. \nBy default, the RPC service starts on port 8545.\n\n### Brownie settings\n\nImporting network settings to Brownie.\n\n```bash\n$ brownie networks import data/networks.yml\n```\n\n### Running the tests\n\nYou can run the tests with:\n```bash\n$ brownie test\n```\n\nAlternatively, you can use pytest and run it as follows.\n```bash\n$ pytest tests/\n```\n\n## Branching model\n\nThis repository is version controlled using the following flow.\n\n\u003cp align='center'\u003e\n  \u003cimg alt=\"ibet\" src=\"https://user-images.githubusercontent.com/963333/161243132-5216b4f0-cbc6-443f-bcfc-9eafb4858cb1.png\"/\u003e\n\u003c/p\u003e\n\n\n## License\n\nibet-SmartContract is licensed under the Apache License, Version 2.0.\n\n\n## Contact information\n\nWe are committed to open-sourcing our work to support your use cases. \nWe want to know how you use this library and what problems it helps you to solve. \nWe have two communication channels for you to contact us:\n\n* A [public discussion group](https://github.com/BoostryJP/ibet-SmartContract/discussions)\nwhere we will also share our preliminary roadmap, updates, events, and more.\n\n* A private email alias at\n[dev@boostry.co.jp](mailto:dev@boostry.co.jp)\nwhere you can reach out to us directly about your use cases and what more we can\ndo to help and improve the library.\n  \nPlease refrain from sending any sensitive or confidential information. \nIf you wish to delete a message you've previously sent, please contact us.\n\n\n## Sponsors\n\n[BOOSTRY Co., Ltd.](https://boostry.co.jp/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboostryjp%2Fibet-smartcontract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboostryjp%2Fibet-smartcontract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboostryjp%2Fibet-smartcontract/lists"}