truffle migrate --network rinkeby returns "MyLootBox" -- The contract code couldn't be stored, please check your gas limit
Opened this issue · 1 comments
steffano commented
~/Development/opensea-erc1155(master):0 truffle migrate --network rinkeby
Compiling your contracts...
===========================
✔ Fetching solc version list from solc-bin. Attempt #1
✔ Downloading compiler. Attempt #1.
> Compiling ./contracts/ERC1155Tradable.sol
> Compiling ./contracts/IFactory.sol
> Compiling ./contracts/ILootBox.sol
> Compiling ./contracts/Migrations.sol
> Compiling ./contracts/MyCollectible.sol
> Compiling ./contracts/MyFactory.sol
> Compiling ./contracts/MyLootBox.sol
> Compiling ./contracts/SafeMath.sol
> Compiling ./contracts/Strings.sol
> Compiling ./contracts/test/MockProxyRegistry.sol
> Compiling ./contracts/test/TestForReentrancyAttack.sol
> Compiling multi-token-standard/contracts/interfaces/IERC1155.sol
> Compiling multi-token-standard/contracts/interfaces/IERC1155TokenReceiver.sol
> Compiling multi-token-standard/contracts/interfaces/IERC165.sol
> Compiling multi-token-standard/contracts/tokens/ERC1155/ERC1155.sol
> Compiling multi-token-standard/contracts/tokens/ERC1155/ERC1155Metadata.sol
> Compiling multi-token-standard/contracts/tokens/ERC1155/ERC1155MintBurn.sol
> Compiling multi-token-standard/contracts/utils/Address.sol
> Compiling multi-token-standard/contracts/utils/SafeMath.sol
> Compiling openzeppelin-solidity/contracts/GSN/Context.sol
> Compiling openzeppelin-solidity/contracts/access/Roles.sol
> Compiling openzeppelin-solidity/contracts/access/roles/PauserRole.sol
> Compiling openzeppelin-solidity/contracts/lifecycle/Pausable.sol
> Compiling openzeppelin-solidity/contracts/ownership/Ownable.sol
> Compiling openzeppelin-solidity/contracts/utils/ReentrancyGuard.sol
> Compilation warnings encountered:
/Users/$/Development/opensea-erc1155/contracts/MyCollectible.sol:19:3: Warning: Function state mutability can be restricted to pure
function contractURI() public view returns (string memory) {
^ (Relevant source part starts here and spans across multiple lines).
> Artifacts written to /Users/$/Development/opensea-erc1155/build/contracts
> Compiled successfully using:
- solc: 0.5.12+commit.7709ece9.Emscripten.clang
Migrations dry-run (simulation)
===============================
> Network name: 'rinkeby-fork'
> Network id: 4
> Block gas limit: 10000000 (0x989680)
1_initial_migration.js
======================
Using network: rinkeby-fork
Using accounts [
'0x572CA7790260415b71C4de19f02c9F2311Baa909',
'0xAd70c031647333F91172e9a728E0AEa342d9d4ea',
'0x46c127f0C9f7f50b5EBA10207052630EdB16982c',
'0xD27D913CCdbe5B5d441F42725A2FCf6af03C97Cd',
'0x831743C3Bd5890cfF288755e7B01c6c540D2e532',
'0xe46a6e2Ee673dd1A2BEF86a60aD701B419E60458',
'0x0D3BC212aB5019eDB1Adc8697d52d5Bd74164f43',
'0x9983EdcAF3ECc076aE0fD72c1626aB8C8a43da29',
'0x9213DAe4FdBD42C22F9F667ab228A68018FdFf67',
'0xD8e08eD50862a135CE955c814D0181184B51fe5B'
]
Deploying 'Migrations'
----------------------
> block number: 8156642
> block timestamp: 1614579193
> account: 0x16811935C8b4DEda61c2A9dd20dB8eD7253729d5
> balance: 3.830943566
> gas used: 210225 (0x33531)
> gas price: 2 gwei
> value sent: 0 ETH
> total cost: 0.00042045 ETH
-------------------------------------
> Total cost: 0.00042045 ETH
2_deploy_contracts.js
=====================
Deploying 'MyCollectible'
-------------------------
> block number: 8156644
> block timestamp: 1614579202
> account: 0x16811935C8b4DEda61c2A9dd20dB8eD7253729d5
> balance: 3.823865964
> gas used: 3511438 (0x35948e)
> gas price: 2 gwei
> value sent: 0 ETH
> total cost: 0.007022876 ETH
Deploying 'MyLootBox'
---------------------
> block number: 8156645
> block timestamp: 1614579219
> account: 0x16811935C8b4DEda61c2A9dd20dB8eD7253729d5
> balance: 3.816570698
> gas used: 3647633 (0x37a891)
> gas price: 2 gwei
> value sent: 0 ETH
> total cost: 0.007295266 ETH
-------------------------------------
> Total cost: 0.014318142 ETH
Summary
=======
> Total deployments: 3
> Final cost: 0.014738592 ETH
Starting migrations...
======================
> Network name: 'rinkeby'
> Network id: 4
> Block gas limit: 10000000 (0x989680)
1_initial_migration.js
======================
Using network: rinkeby
Using accounts [ '0x16811935C8b4DEda61c2A9dd20dB8eD7253729d5' ]
Deploying 'Migrations'
----------------------
> transaction hash: 0x0f27f134d37d52ca8d84035fbb204352a2db144c9844d07ad6dc7d095bd8fa66
> Blocks: 1 Seconds: 16
> contract address: 0x6B22B2784e61B502e12a4B4f1E9a3bF2A3e3Cf1a
> block number: 8156644
> block timestamp: 1614579246
> account: 0x16811935C8b4DEda61c2A9dd20dB8eD7253729d5
> balance: 3.826859516
> gas used: 225225 (0x36fc9)
> gas price: 20 gwei
> value sent: 0 ETH
> total cost: 0.0045045 ETH
> Saving migration to chain.
> Saving artifacts
-------------------------------------
> Total cost: 0.0045045 ETH
2_deploy_contracts.js
=====================
Deploying 'MyCollectible'
-------------------------
> transaction hash: 0xbeecc82102f0ca6e25ffa70758756b761bf0517f6dc6e6c052aefbb19ca66a38
> Blocks: 0 Seconds: 12
> contract address: 0xFCffE304633fEC42dFCf34C6744cdEA3cF7aa234
> block number: 8156646
> block timestamp: 1614579276
> account: 0x16811935C8b4DEda61c2A9dd20dB8eD7253729d5
> balance: 3.753683736
> gas used: 3616426 (0x372eaa)
> gas price: 20 gwei
> value sent: 0 ETH
> total cost: 0.07232852 ETH
Deploying 'MyLootBox'
---------------------
> transaction hash: 0xa8ff7c6adea7b60f86efe01d502223abfa1f0d532e5389c0d59ea4f73723040b
Error: *** Deployment Failed ***
"MyLootBox" -- The contract code couldn't be stored, please check your gas limit..
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/deployer/src/deployment.js:364:1
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at Migration._deploy (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:68:1)
at Migration._load (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:55:1)
at Migration.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:171:1)
at Object.runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:150:1)
at Object.runFrom (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1)
at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:87:1)
at runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:269:1)
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:229:1
Truffle v5.1.39 (core: 5.1.39)
Node v12.18.0
chahakshah111 commented