0

Here's my 2_gimmy_migration.js

const Gimmy = artifacts.require("Gimmy_NFT.sol");

    module.exports = function (deployer){
    deployer.deploy(Gimmy);
};

I had tried truffe migrate --reset --network goerli but the command only migrate the Migration.sol without my Gimmy_NFT.sol contract. The output is below:

Compiling your contracts...
===========================
> Compiling @openzeppelin\contracts\access\AccessControl.sol
> Compiling @openzeppelin\contracts\access\IAccessControl.sol
> Compiling @openzeppelin\contracts\governance\utils\IVotes.sol
> Compiling @openzeppelin\contracts\governance\utils\Votes.sol
> Compiling @openzeppelin\contracts\security\Pausable.sol
> Compiling @openzeppelin\contracts\token\ERC721\ERC721.sol
> Compiling @openzeppelin\contracts\token\ERC721\IERC721.sol
> Compiling @openzeppelin\contracts\token\ERC721\IERC721Receiver.sol
> Compiling @openzeppelin\contracts\token\ERC721\extensions\ERC721Burnable.sol
> Compiling @openzeppelin\contracts\token\ERC721\extensions\ERC721Enumerable.sol
> Compiling @openzeppelin\contracts\token\ERC721\extensions\ERC721Votes.sol
> Compiling @openzeppelin\contracts\token\ERC721\extensions\IERC721Enumerable.sol
> Compiling @openzeppelin\contracts\token\ERC721\extensions\IERC721Metadata.sol
> Compiling @openzeppelin\contracts\token\ERC721\extensions\draft-ERC721Votes.sol
> Compiling @openzeppelin\contracts\utils\Address.sol
> Compiling @openzeppelin\contracts\utils\Checkpoints.sol
> Compiling @openzeppelin\contracts\utils\Context.sol
> Compiling @openzeppelin\contracts\utils\Counters.sol
> Compiling @openzeppelin\contracts\utils\Strings.sol
> Compiling @openzeppelin\contracts\utils\cryptography\ECDSA.sol
> Compiling @openzeppelin\contracts\utils\cryptography\EIP712.sol
> Compiling @openzeppelin\contracts\utils\cryptography\draft-EIP712.sol
> Compiling @openzeppelin\contracts\utils\introspection\ERC165.sol
> Compiling @openzeppelin\contracts\utils\introspection\IERC165.sol
> Compiling @openzeppelin\contracts\utils\math\Math.sol
> Compiling @openzeppelin\contracts\utils\math\SafeCast.sol
> Compiling .\contracts\Gimmy_NFT.sol
> Compiling .\contracts\Migrations.sol
> Artifacts written to D:\Code_Respository\Block chain\HW4\build\contracts
> Compiled successfully using:
   - solc: 0.8.19+commit.7dd6d404.Emscripten.clang


Starting migrations...
======================
> Network name:    'goerli'
> Network id:      5
> Block gas limit: 30000000 (0x1c9c380)


1_initial_migration.js
======================

   Deploying 'Migrations'
   ----------------------
   > transaction hash:    0xb4f6e00df63242b21ff6e9f4a229e2f893921903aeaffc88d32a75e36accf6ad
   > Blocks: 2            Seconds: 17
   > contract address:    0x37B5d147B664CC28D112B1EC93f061Af73Af7c86
   > block number:        8974768
   > block timestamp:     1683710496
   > account:             0x14583723c0A21C3f115D552C773D2C19b8B0a7D3
   > balance:             0.058721039466341876
   > gas used:            180641 (0x2c1a1)
   > gas price:           2.50000518 gwei
   > value sent:          0 ETH
   > total cost:          0.00045160343572038 ETH

   Pausing for 2 confirmations...

   -------------------------------
   > confirmation number: 1 (block: 8974769)
   > confirmation number: 2 (block: 8974770)
   ⠦ Saving migration to chain.
Exiting: Review successful transactions manually by checking the transaction hashes above on Etherscan.



    at Migration.<anonymous> (C:\Users\calvi\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\dist\src\Migration.js:127:1)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\calvi\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\dist\src\Migration.js:28:43)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
Truffle v5.8.1 (core: 5.8.1)
Node v18.15.0

No matter change my infura API key, truffle wouldn't migrate my NFT contract. Could someone help?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.