urbit / bridge

An application for interacting with Azimuth.
MIT License
94 stars 25 forks source link

local deployment fails: `"Azimuth" ran out of gas` #1106

Closed dillon closed 1 year ago

dillon commented 1 year ago

Describe the bug Local deployment with npm run pilot fails to deploy azimuth contracts. This is related to azimuth/issues/62

To Reproduce Steps to reproduce the behavior:

  1. clone this repo
  2. nvm use
  3. npm i -g truffle
  4. npm i
  5. npm run pilot

Expected behavior Should deploy azimuth contracts to local ganache instance.

Screenshots

➜  bridge git:(master) ✗ nvm use
Found '/Users/admin/git/dillon/bridge/.nvmrc' with version <16.18.0>
Now using node v16.18.0 (npm v8.19.2)
➜  bridge git:(master) ✗ truffle --version
Truffle v5.9.0 (core: 5.9.0)
Ganache v7.8.0
Solidity - pragma (solc-js)
Node v16.18.0
Web3.js v1.10.0
➜  bridge git:(master) ✗ npm run pilot

> bridge@3.2.4 pilot
> HTTPS=true npm-run-all pilot:setup start pilot:cleanup --continue-on-error

> bridge@3.2.4 pilot:setup
> npm run pilot:ganache && truffle deploy

> bridge@3.2.4 pilot:ganache
> ganache-cli --blockTime 1 --networkId 5 --host '0.0.0.0' -m 'benefit crew supreme gesture quantum web media hazard theory mercy wing kitten' > /dev/null &

Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.

Starting migrations...
======================
> Network name:    'development'
> Network id:      5
> Block gas limit: 6721975 (0x6691b7)

1_migration.js
==============

   Deploying 'Azimuth'
   -------------------
   > transaction hash:    0xbc516bc8a945d0566a73c0125c171052751b4a365f7a314ec40807a3084b00fb
   ✖ Blocks: 0            Seconds: 0
 *** Deployment Failed ***

"Azimuth" ran out of gas (using a value you set in your network config or deployment parameters.)
   * Block limit:  6721975 (0x6691b7)
   * Gas sent:     6000000 (0x5b8d80)

Exiting: Review successful transactions manually by checking the transaction hashes above on Etherscan.

Error:  *** Deployment Failed ***

"Azimuth" ran out of gas (using a value you set in your network config or deployment parameters.)
   * Block limit:  6721975 (0x6691b7)
   * Gas sent:     6000000 (0x5b8d80)

    at /Users/admin/.nvm/versions/node/v16.18.0/lib/node_modules/truffle/build/webpack:/packages/deployer/src/deployment.js:330:1
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at module.exports (/Users/admin/git/dillon/bridge/migrations/1_migration.js:55:19)
Truffle v5.9.0 (core: 5.9.0)
Node v16.18.0

> bridge@3.2.4 start
> vite

  VITE v3.1.7  ready in 486 ms

  ➜  Local:   https://127.0.0.1:3000/
  ➜  Network: use --host to expose
marcusmiguel commented 1 year ago

I'm also experiencing this issue. It seems that the problem is related to contract size.