Skip to content

BoostryJP/ibet-SmartContract

Repository files navigation

ibet Smart Contract

Version License: Apache--2.0

English | ζ—₯本θͺž

Tokens and DEX contracts available in the ibet DeFi network

Features

  • The ibet-SmartContract project is a project to build an open financial system on the ibet-Network blockchain.
  • The project aims to provide token standards, decentralized exchanges, and other utility functions that can be used on the ibet-Network.

Dependencies

  • Python3
    • Version 3.13
  • uv
    • We use uv to manage the Python environment and run Ape commands.
  • Solidity
    • We are using Solidity to implement our smart contracts.
    • Currently, we are using v0.8.34.
  • Ape
    • We use Ape as the primary framework for compiling and testing contracts.
  • Foundry Anvil
    • We use Anvil for local development and unit testing.
  • OpenZeppelin
    • Our project is partly dependent on OpenZeppelin.
    • We use openzeppelin-contracts v4.9.3.
  • Node.js
    • Version 24

Overview

Interface: /interfaces

  • IbetStandardTokenInterface: Standard interface for ibet token contracts
  • IbetExchangeInterface: Standard interface for exchange contracts

Contracts: /contracts

  • access: Ownership and access control primitives (e.g., Ownable)
  • exchange: Decentralized exchange and escrow contracts, including DVP (IbetExchange, IbetEscrow, IbetSecurityTokenDVP, etc.)
  • ledger: Personal information registry for associating off-chain data with on-chain accounts (PersonalInfo)
  • payment: Payment gateway and DvP agent contracts for atomic settlement between tokens and off-chain payments (PaymentGateway)
  • token: Various token standards and implementations:
    • ibet original tokens (Bond, Share, Membership, Coupon)
    • ERC20 and ERC721 compatible tokens
    • Token registry contract (TokenList)
  • utils: Utility contracts for messaging, contract wallet, etc. (E2EMessaging, SnapMessaging, P256Wallet, etc.)

Install

Install Python, Node.js, and development dependencies. Make sure uv and Foundry are available in your environment before running the setup commands.

$ make install

Install Solidity package dependencies managed by Ape.

$ make setup

Compile Contracts

Compile contracts with Ape.

$ make compile

You can also run the underlying command directly.

$ uv run ape compile

Developing Smart Contracts

Local setup

The default local test network is ethereum:local:foundry. The Ape configuration is defined in ape-config.yaml, and pytest uses the same network by default.

Running the tests

Run the full test suite with:

$ make test

You can also run the underlying Ape command directly.

$ uv run ape test --network ethereum:local:foundry tests/

If you need a narrower run during development, pass pytest targets through ARG.

$ make test ARG="tests/token/test_IbetERC20.py"

Branching model

This repository is version controlled using the following flow.

ibet

License

ibet-SmartContract is licensed under the Apache License, Version 2.0.

Contact information

We are committed to open-sourcing our work to support your use cases. We want to know how you use this library and what problems it helps you to solve. We have two communication channels for you to contact us:

  • A public discussion group where we will also share our preliminary roadmap, updates, events, and more.

  • A private email alias at dev@boostry.co.jp where you can reach out to us directly about your use cases and what more we can do to help and improve the library.

Please refrain from sending any sensitive or confidential information. If you wish to delete a message you've previously sent, please contact us.

Sponsors

BOOSTRY Co., Ltd.

About

Tokens and DEX contracts available in the ibet DeFi network πŸ”—

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors