@dharmaprotocol/contracts

中文文档
0.1.24发布于 2018/10/16ISCTypeScriptCommonJS近 30 天下载 3765

New & improved smart contracts for Dharma protocol

此软件包已被标记为弃用

This package is no longer being maintained by the Dharma Labs team. Please email [email protected] if you have any questions / concerns

原始使用文档
文档目录3 节
  1. Deployed Contracts
  2. Setup
  3. Contract Architecture

'Charta' is the latin word for 'letter or document'. We loosely appropriate this term as a codename for the smart contracts comprising the business logic of Dharma protocol.

Dharma is a protocol for generic tokenized debt issuance and fundraising on blockchains supporting requisite smart contract functionality (i.e. EVM blockchains). For a full description of the protocol's mechanics, a thorough overview can be found in the Dharma Protocol Whitepaper. This repository contains the core contracts that compromise the business logic for issuing and administering debt crypto-assets on-chain.

We use truffle for deployment, testing, and development, and use Typescript for testing and deployment.

Join us on our chat for any technical or general questions.

Deployed Contracts


Ethereum Mainnet
  • DebtKernel: 0x8ef1351941d0cd8da09d5a4c74f2d64503031a18
  • DebtToken: 0xf7b3fc555c458c46d288ffd049ddbfb09f706df7
  • DebtRegistry: 0x4e0f2b97307ad60b741f993c052733acc1ea5811
  • TokenTransferProxy: 0x2f40766e91aaee4794d3389ac8dc3a4b8fd7ab3e
  • DharmaMultiSigWallet: 0x9445d5ddc2d8a3663ce8cc9fe74009f99b343cfc
  • RepaymentRouter: 0xc1df9b92645cc3b6733992c692a39c34a86fae5f
  • TokenRegistry: 0xd79396ab3bfaaa0d9f6d11f95bb641601d93c0a9
  • SimpleInterestTermsContract: 0xb78a7d1c1d03cf9155cc522097cbc679e15cf9a3
  • CollateralizedSimpleInterestTermsContract: 0x5de2538838b4eb7fa2dbdea09d642b88546e5f20
  • Collateralizer: 0xecc718386176d714dc9e4e35e177396b291499ee
  • PermissionsLib: 0xba0d793fb316d7a457b758e75a57e22ee14bc188
  • ContractRegistry: 0x10512440113cb6cb613be403135876d2e0a42c0b
Kovan Testnet
  • DebtKernel: 0x755e131019e5ab3e213dc269a4020e3e82e06e20
  • DebtToken: 0x12c8615fd55bf6e1f5a298cebdc72e50f838df74
  • DebtRegistry: 0x9662d6cae0e6914a388cb96c1c161cc4d12c3d7a
  • TokenTransferProxy: 0x668beab2e4dfec1d8c0a70fb5e52987cb22c2f1a
  • DharmaMultiSigWallet: 0x5e6d80063af17bf22b6828a7a61693ec37881563
  • RepaymentRouter: 0x0688659d5e36896da7e5d44ebe3e10aa9d2c9968
  • TokenRegistry: 0x6949948d93f3dbe50ec2fe54815fa33bfa284d35
  • SimpleInterestTermsContract: 0x4cad7ad79464628c07227928c851d3bc5ef3da0c
  • CollateralizedSimpleInterestTermsContract: 0x13763cf3eb3b6813fa800d4935725a0504c8eb8f
  • Collateralizer: 0x4b86bbe375577262cb0b3b7893e3de0d11751dd6
  • PermissionsLib: 0x0e7e2aace2ed2565777b420fd181b556971a8cb1
  • ContractRegistry: 0x506acb19a451cc6e2a5c76e65f6b65840406e5f9

Setup


Dependencies

Install dependencies:

yarn install
Testing

Start testrpc:

yarn chain

Run truffle tests:

yarn test

Contract Architecture

A specification of the contracts comprising Dharma protocol's logic can be found in the Dharma wiki.

版本与发布记录

@dharmaprotocol/contracts 共发布 64 个版本,首次发布于 2018/03/04;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.1.24latest2018/10/168 年前
0.1.232018/10/138 年前
0.1.222018/10/128 年前
0.1.212018/10/098 年前
0.1.202018/09/278 年前
0.1.192018/09/268 年前

关于 @dharmaprotocol/contracts 的常见问题

@dharmaprotocol/contracts 是什么?

New & improved smart contracts for Dharma protocol注意:该包已被作者标记为弃用——This package is no longer being maintained by the Dharma Labs team. Please email [email protected] if you have any questions / concerns

如何安装 @dharmaprotocol/contracts?

在项目目录运行 npm install @dharmaprotocol/contracts,或使用 pnpm add / yarn add / bun add。

@dharmaprotocol/contracts 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@dharmaprotocol/contracts 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@dharmaprotocol/contracts 可以商用吗?

@dharmaprotocol/contracts 使用 ISC 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@dharmaprotocol/contracts 的下载量有多少?

根据 npm 官方下载统计,@dharmaprotocol/contracts 在 2026/10/12 – 2026/11/10 这 30 天内被下载 3,765 次,日均约 126 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@dharmaprotocol/contracts 还在维护吗?

最新版本 0.1.24 发布于 2018/10/16(8 年前);至今共发布 64 个版本,其中过去 12 个月发布了 0 个;首次发布于 2018/03/04。作者已将其标记为弃用,新项目建议寻找替代方案。