Caiman Fund Contract – 凯曼基金合同区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,Caiman Fund Contract – 凯曼基金合同区块链毕设代写 是一篇很好的国外资料

Caiman Fund Contract

Contract and fund exchanging.

  • App.js is the frontend client.
  • CaimanFund.sol is contract.

Installation / Development

  1. Install dependencies for the contract.

    npm install -g truffle npm install
  2. Run the development console.

    truffle develop
  3. Compile and migrate the smart contracts. Note inside the development console we don’t preface commands with truffle.

    compile migrate
  4. In the client directory, we run the React app. Smart contract changes must be manually recompiled and migrated.

    // in another terminal (i.e. not in the truffle develop prompt) cd client npm run start
  5. To build the application for production, use the build script. A production build will be in the client/build folder.

    // ensure you are inside the client directory when running this npm run build

Deployment to testnet

Assuming you have all dependencies:

  1. Use Metamask, add Binance Testnet, create an account for testing.

  2. Earn some test BNB by sitting under the faucet: https://testnet.binance.org/faucet-smart

  3. Create your .env file with credentials.

  4. Deploy to test network: npx truffle migrate --reset --compile-all --network bsctestnet

  5. Verify the contract: (example address from migration) npx truffle run verify [email protected] --network bsctestnet --debug

Run tests

To run the local tests in verbose mode: truffle test --debug --show-events

Report

File Name SHA-1 Hash
CaimanFund.sol 434d87fa2ada7a41906a2d50476428cf60c14633

Contracts Description Table

Contract Type Bases
Function Name Visibility Mutability Modifiers
CaimanFund Implementation Context, AccessControlEnumerable, ERC721Enumerable, ERC721Pausable, ReentrancyGuard
Public ❗️ ? ERC721
setFund Public ❗️ ? onlyFinancialRole
pauseFund Public ❗️ ? onlyPauserRole
unpauseFund Public ❗️ ? onlyPauserRole
deposit Public ❗️ ? whenNotPaused onlyHuman
fund Public ❗️ whenNotPaused
withdraw Public ❗️ ? onlyFinancialRole whenNotPaused
tokenInfo Public ❗️ NO❗️
releaseFromContract Public ❗️ ? onlyFinancialRole whenNotPaused
releaseFromWallet Public ❗️ ? onlyFinancialRole whenNotPaused
_releaseTo Private ?
pause Public ❗️ ? onlyPauserRole
unpause Public ❗️ ? onlyPauserRole
tokenURI Public ❗️ NO❗️
tokenURIsByOwner Public ❗️ NO❗️
_beforeTokenTransfer Internal ? ? whenNotPaused
supportsInterface Public ❗️ NO❗️

Legend

Symbol Meaning
? Function can modify state
? Function is payable

凯曼基金合同

合同和资金交换

  • App.js是前端客户端
  • CaimanFund.sol是合同

安装/开发

  1. 安装合同的依赖项。npm install-g truffle npm install运行开发控制台。truffle开发
  2. 编译并迁移智能合约。注意,在开发控制台中,我们不使用truffle作为命令的开头。编译migrate
  3. 在客户机目录中,我们运行React应用程序。智能合约更改必须手动重新编译和迁移。//在另一个终端(即不在truffle develop提示符中)中,cd client npm run start要为生产构建应用程序,请使用构建脚本。生产生成将位于client/build文件夹中。//运行此npm run build时,请确保您在客户机目录中使用Metamask,添加Binance Testnet,创建用于测试的帐户
  4. 坐在水龙头下赚取一些测试BNB:https://testnet.binance.org/faucet-smart
  5. 使用凭据创建.env文件

部署到testnet

假设您拥有所有依赖项:

  1. 部署到测试网络:npx truffle migrate–reset–compile all–network bsctestnet
  2. 验证契约:(来自迁移的示例地址)npx truffle run [email protected] –网络bsctestnet——调试434d87fa2ada7a41906a2d50476428cf60c14633 └

    ? ERC721 └

    ? 仅财务角色└

    ? 仅音频 └

    ? 仅音频 └

    ? 当不是只有人类时 └

    ? 仅在未暂停时担任财务角色 └ 令牌信息❗️ 否❗️ └

    ? 仅在未暂停时担任财务角色 └ 从钱包中释放❗️ ? 仅在未暂停时担任财务角色 └ u发布到 私人? └ 暂停 公开❗️ ? 仅音频 └

    ? 仅音频 └ 令牌URI 公共❗️ 否❗️ └ tokenURIsByOwner 公共❗️ 否❗️ └

    ?

    支持接口 公共❗️ 否❗️ ? 函数可以修改状态? 功能是可支付的
  3. 使用凭据创建.env文件

  4. 部署到测试网络:npx truffle migrate–reset–compile all–network bsctestnet

  5. 验证契约:(来自迁移的示例地址)npx truffle run [email protected] –network bsctestnet–debug以详细模式运行本地测试:truffle test–debug–show events

运行测试

合同描述表

报告

File Name SHA-1 Hash
?

图例

Contract Type Bases
ERC721 ? 仅财务角色└ ?
仅音频 ? 仅音频
? 当不是只有人类时 ? 仅在未暂停时担任财务角色
令牌信息❗️ Public ❗️ 否❗️
? 仅在未暂停时担任财务角色 从钱包中释放❗️ ?
仅在未暂停时担任财务角色 u发布到 私人? onlyPauserRole
暂停 公开❗️ ?
仅音频 ? 仅音频
令牌URI 公共❗️ Public ❗️ 否❗️
tokenURIsByOwner 公共❗️ Public ❗️ 否❗️
? 支持接口 公共❗️ 否❗️
? 函数可以修改状态? 功能是可支付的 ? onlyFinancialRole whenNotPaused
releaseFromWallet Public ❗️ ? onlyFinancialRole whenNotPaused
_releaseTo Private ?
pause Public ❗️ ? onlyPauserRole
unpause Public ❗️ ? onlyPauserRole
tokenURI Public ❗️ NO❗️
tokenURIsByOwner Public ❗️ NO❗️
_beforeTokenTransfer Internal ? ? whenNotPaused
supportsInterface Public ❗️ NO❗️

Legend

Symbol Meaning
? Function can modify state
? Function is payable

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/22701.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » Caiman Fund Contract – 凯曼基金合同区块链毕设代写

提供最优质的资源集合

立即查看 了解详情