current position:Home>Truffle deploys multiple contracts

Truffle deploys multiple contracts

2022-02-04 00:17:54 Q & A of Denglian community

For example, I want to use ERC721 contract , Related dependent contracts are

import "./Context.sol";import "./IERC721.sol";import "./IERC721Metadata.sol";import "./IERC721Enumerable.sol";import "./IERC721Receiver.sol";import "./ERC165.sol";import "./SafeMath.sol";import "./Address.sol";import "./EnumerableSet.sol";import "./EnumerableMap.sol";import "./Strings.sol"

Is there a simple way to deploy ? I see it in detail truffle migration This article uses the following method

**var** Storage = artifacts.require(**"./Storage.sol"**);**var** InfoManager = artifacts.require(**"./InfoManager.sol"**);**module**.exports = **function****(****deployer****) **{**//  Deploy  Storage**deployer.deploy(Storage)**//  wait for 、 Until the contract deployment is completed **.then(**()**** =>** Storage.deployed())**//  Pass on  Storage  Contract address , Deploy  InfoManager  contract **.then(**()**** =>** deployer.deploy(InfoManager, Storage.address));

Other answers 1:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.

Random recommended