moca

module
v2.0.0-...-cd6b821 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: LGPL-3.0

README

Moca

Official Golang implementation of the Moca Blockchain. It uses cometbft for consensus and build on cosmos-sdk.

Moca aims to facilitate the decentralized data economy by simplifying the process of storing and managing data access, as well as linking data ownership with the massive DeFi context of the other EVM-compatible blockchains.

Moca operates through three core components, which distinguish it from existing centralized and decentralized storage systems:

  • It enables ethereum-compatible addresses to create and manage data and token assets seamlessly.
  • It provides similar API primitives and performance as popular existing Web2 cloud storage systems.

These features offer a novel and innovative approach to decentralized data management and ownership in the DeFi space. Overall, Moca presents a promising solution for bringing greater flexibility, control, and efficiency to users in the decentralized data economy.

Disclaimer

The software and related documentation are under active development, all subject to potential future change without notification and not ready for production use. The code and security audit have not been fully completed and not ready for any bug bounty. We advise you to be careful and experiment on the network at your own risk. Stay safe out there.

Moca Core

The center of Moca are two layers:

  1. A new storage-oriented blockchain, and
  2. network composed of "storage providers".

This repo is the official implementation of Moca blockchain.

The blockchain of Moca serves a dual purpose of maintaining the ledger for users as well as the storage metadata as common blockchain state data. The blockchain has its native token, MOCA, and is utilized for gas and governance functionalities. Governance is further enabled through the staking logic that is unique to the Moca blockchain.

The Moca blockchain has two categories of states that are stored on-chain:

  1. The ledger of accounts and their MOCA balance.

  2. The metadata of the object storage system and service providers, along with the metadata of the objects stored on the storage system, permission and billing information pertaining to the storage system.

Transactions on the Moca blockchain have the ability to modify the aforementioned on-chain states. These states and the transactions that affect them are at the core of the economic data on the Moca platform.

Users looking to create or access data on Moca may do so by engaging with the Moca Core Infrastructure through decentralized applications known as Moca dApps. These dApps provide a user-friendly interface for interacting with the platform, enabling users to create and manipulate data in a secure and decentralized environment.

Documentation

Visit our official documentation site for more info.

More advanced script and command line usage, please refer to the Tutorial.

Key Modules

  • x/evm: bridges Ethereum's smart contract capabilities with Cosmos' governance systems.
  • x/challenge: generate random data challenge events or accept user's data challenge requests.
  • x/payment: handle the billing and payment of the storage module. User fees are paid through "Stream" on Moca, with a constant rate of payment from users to Storage Providers (SP) with charges applied every second of usage.
  • x/sp: manage the various storage providers within the network.
  • x/storage: users can manage their storage data through this module, like create/delete bucket, create/delete storage object.
  • x/permission: user can manage its resource permission through this module, like put/delete policy for storage object.

And the following modules are in cosmos-sdk:

  • x/staking: based on the Proof-of-Stake logic. The elected validators are responsible for the security of the moca blockchain. They get involved in the governance and staking of the blockchain.

Refer to the docs to dive deep into these modules.

Running node

  • moca-Contract: the cross chain contract for Moca that deployed on ethereum-compatible network.
  • moca-Storage-Provider: the storage service infrastructures provided by either organizations or individuals.
  • moca-relayer: the service that relay cross chain package to both chains.
  • moca-cmd: the most powerful command line to interact with Moca system.
  • Awesome Cosmos: Collection of Cosmos related resources which also fits Moca.

Contribution

Thank you for expressing your willingness to contribute to the Moca source code. We deeply appreciate any help, no matter how small the fix. We welcome contributions from anyone on the internet, and we value your input.

If you're interested in contributing to Moca, please follow these steps:

  1. Fork the project on GitHub.
  2. Fix the issue.
  3. Commit the changes.
  4. Send a pull request for the maintainers to review and merge into the main codebase.

If you're planning to submit more complex changes, we kindly suggest that you reach out to the core developers first. This could be done through a GitHub issue or our upcoming Discord channel. By doing so, you could ensure that your changes are aligned with the project's general philosophy, and you can receive valuable feedback that will make your efforts lighter as well as our review and merge procedures quick and simple.

Once again, thank you for your willingness to contribute to the Moca project. We look forward to working with you!

License

The moca library (i.e. all code outside the cmd directory) is licensed under the GNU Lesser General Public License v3.0, also included in our repository in the COPYING.LESSER file.

The moca binaries (i.e. all code inside the cmd directory) is licensed under the GNU Affero General Public License v3.0, also included in our repository in the COPYING file.

Fork Information

This project builds on upstream work from BNB Greenfield and includes historical code derived from Evmos v12.

It has since been adapted and maintained as Moca, with substantial changes to chain configuration, tooling, and operational workflows.

Directories

Path Synopsis
api
ethermint/feemarket/v1
Code generated by protoc-gen-go-pulsar.
Code generated by protoc-gen-go-pulsar.
ethermint/types/v1
Code generated by protoc-gen-go-pulsar.
Code generated by protoc-gen-go-pulsar.
evmos/erc20/v1
Code generated by protoc-gen-go-pulsar.
Code generated by protoc-gen-go-pulsar.
app
ante
Package ante defines the SDK auth module's AnteHandler as well as an internal AnteHandler for an Ethereum transaction (i.e MsgEthereumTx).
Package ante defines the SDK auth module's AnteHandler as well as an internal AnteHandler for an Ethereum transaction (i.e MsgEthereumTx).
cmd
ci command
mocad command
crypto
e2e
internal
rpc
sdk
tests
network
Package network implements and exposes a fully operational in-process Tendermint test network that consists of at least one or potentially many validators.
Package network implements and exposes a fully operational in-process Tendermint test network that consists of at least one or potentially many validators.
nullify
Package nullify provides methods to init nil values structs for test assertion.
Package nullify provides methods to init nil values structs for test assertion.
tx
eth
wallets
x
challenge/types
Code generated by MockGen.
Code generated by MockGen.
erc20/types
Package types is a reverse proxy.
Package types is a reverse proxy.
evm
gensp/types
Package types is a reverse proxy.
Package types is a reverse proxy.
payment/types
Code generated by MockGen.
Code generated by MockGen.
permission/types
Code generated by MockGen.
Code generated by MockGen.
sp
sp/types
Code generated by MockGen.
Code generated by MockGen.
storage/types
Code generated by MockGen.
Code generated by MockGen.
virtualgroup/types
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL