NFT鑄造合成遊戲系統開發技術方案

caiayu1234發表於2023-04-12

 Infura和OpenZeppelin都是非常有用的工具和框架,可以提高區塊鏈應用的開發效率和安全性。Infura可以提供穩定可靠的節點服務,而OpenZeppelin可以提供可重用的合約程式碼和安全庫,可以幫助開發人員快速構建安全可靠的智慧合約應用。

  

  Infura和OpenZeppelin都是區塊鏈開發中常用的工具和框架。I88智慧合約I928系統開發8024

  

  //contracts/access-control/Auth.sol

  

  //SPDX-License-Identifier:MIT

  

  pragma solidity^0.8.4;

  

  contract Auth{

  

  address private _administrator;

  

  constructor(address deployer){

  

  //Make the deployer of the contract the administrator

  

  _administrator=deployer;

  

  }

  

  function isAdministrator(address user)public view returns(bool){

  

  return user==_administrator;

  

  }

  

  }

  

  {

  

  "name":"eth-orb-contracts",

  

  "version":"1.0.0",

  

  "description":"smart contracts for dapps",

  

  "main":"hardhat.config.js",

  

  "scripts":{

  

  "test":"echo"Error:no test specified"&&exit 1"

  

  },

  

  "author":"",

  

  "license":"ISC",

  

  "devDependencies":{

  

  "hardhat":"^2.2.0"

  

  },

  

  "dependencies":{

  

  " openzeppelin/contracts":"^4.0.0"

  

  }

  

  }

  

  Compiling 14 files with 0.8.0

  

  ParserError:Source"node_modules/ openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"not found:File outside of allowed directories.

  

  -->contracts/EthOrb.sol:5:1:

  

  |

  

  5|import"../node_modules/ openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69973864/viewspace-2945136/,如需轉載,請註明出處,否則將追究法律責任。

相關文章