Openzeppelin SDK 和 Truffle 的区别?

Difference between Openzeppelin SDK and Truffle?

对于智能合约开发,Openzeppelin SDK和Truffle有什么区别?我什么时候应该使用一个或另一个,或两者一起使用?

OpenZepplin SDK 和 Truffle

OpenZepplin

is a library which consist of well documented smart contracts which you can use in your projects. You can import Openzepplin library in your solidity project in order to use it. The most obvious use of this library is for the ERC720 and ERC721 implementation.Their upgradeability concept is also one of the best.

松露:

is a development framework which you can use for your solidity project. It can help you to test your developed solidity contracts by compiling and migrating it on local test network. You can interact with the deployed contracts thereafter either manually by using truffle console or by running unit test which are written in Javascript with Mocha and chai.

在构建任何需要开发可以使用 ERC 令牌实现或任何其他实现的智能合约的 solidity 项目时,Openzepplin 是选定的选择之一。 开发完成后,为了检查您开发的智能合约的功能和工作情况,使用了 Truffle

保持简单:

Truffle 是一个可用于开发智能合约的设置工具,但完全不涉及 Solidity 代码。它就像 Cargo 之于 Rust 或 npm/yarn 之于 NodeJS。

OpenZeppelin 是一组经过良好测试的库,用 Solidity 编写,您可以将其导入您的智能合约,而代码可能由 truffle 生成、维护和部署。

OpenZeppelin Contracts: SmartContracts库,可以继承和开发;

OpenZeppelin SDK: 原ZeppelinOS,是帮助开发过程的SDK;

Truffle SDK:也是众所周知的 SDK,可帮助开发过程。除了 SDK Truffle 还有 Ganache 等其他很棒的项目。

花一些时间阅读文档 - 文档非常清楚。

PS:ZeppelinOS 是第一个 SDK,允许开发可升级的智能合约 - 非常酷(https://medium.com/coinmonks/how-to-create-an-upgradeable-smart-contract-using-openzeppelin-sdk-example-of-fixing-smart-260dfbfd5bae